/* =====================================================
   MENU PRINCIPAL
   ===================================================== */

.menu {
  background: transparent;
  color: white;

  /* Typographie commune aux trois modules */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;

  padding: 1rem 0;

  position: fixed;

  top: -10px;

  width: 99vw;
  left: 1vw;

  opacity: 0;

  z-index: 5000;

  transition: opacity .5s ease;
}


.menu::before {
  content: "";

  position: absolute;
  inset: 0;

  z-index: -1;

  background-image: url("/img/bordureh.webp");

  background-repeat: repeat-x;

  background-position: left center;

  background-size: auto 100%;

  opacity: 0.25;

  pointer-events: none;
}


/* =====================================================
   MENU PRINCIPAL
   ===================================================== */

.menu ul {
  list-style: none;

  padding: 0;
  margin: 0;

  display: flex;

  justify-content: center;

  gap: 2%;
}


.menu li {
  margin: 1rem 0;

  text-align: center;
}


.menu a {
  color: white;

  text-decoration: none;

  padding: 0.2rem 0.5rem;

  transition: color 0.3s;
}


.menu a:hover {
  color: #f0a500;
}


.menu a.active {
  color: #f0a500;

  background: #333;

  border-radius: 0.5rem;
}


/* =====================================================
   MENU PRINCIPAL TOUJOURS HORIZONTAL SUR DESKTOP
   ===================================================== */

.menu > ul {
  display: flex;

  flex-direction: row;

  align-items: center;

  justify-content: center;
}


/* =====================================================
   BOUTON BURGER
   ===================================================== */

#burger {
  display: none;

  font-size: 3rem;

  background: none;

  border: none;

  padding: 0;

  color: white;

  cursor: pointer;

  position: fixed;

  top: 0;

  left: 86vw;

  width: 10vw;

  padding-right: 10px;

  pointer-events: auto;

  z-index: 10002;
}


.burger-footer {
  display: none;
}


/* =====================================================
   NOS LODGES
   ===================================================== */

.menu-lodges {
  position: relative;
}


.menu-lodges-toggle {
  appearance: none;

  -webkit-appearance: none;

  border: 0;

  padding: 0;

  margin: 0;

  background: transparent;

  color: inherit;

  font: inherit;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 7px;
}


/* =====================================================
   EXPERIENCE
   ===================================================== */

.menu-exp,
.menu-souvenirs {
  position: relative;
}


.menu-exp-toggle,
.menu-souvenirs-toggle {
  appearance: none;

  -webkit-appearance: none;

  border: 0;

  padding: 0;

  margin: 0;

  background: transparent;

  color: inherit;

  font: inherit;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 7px;
}


/* =====================================================
   CHEVRON
   ===================================================== */

.menu-chevron {
  width: 5px;

  height: 5px;

  border-right: 1px solid currentColor;

  border-bottom: 1px solid currentColor;

  transform: rotate(45deg) translateY(-2px);

  transition: transform .2s ease;
}


.menu-lodges.is-open .menu-chevron,
.menu-exp.is-open .menu-chevron,
.menu-souvenirs.is-open .menu-chevron {
  transform: rotate(225deg);
}


/* =====================================================
   SOUS-MENUS DESKTOP
   HORIZONTAUX + CENTRES SUR L'ECRAN
   ===================================================== */

.menu .menu-lodges-list,
.menu .menu-exp-list,
.menu .menu-souvenirs-list {

  /*
     IMPORTANT :
     fixed permet de se positionner par rapport
     au viewport et non par rapport au <li>.
  */

  position: fixed;

  /*
     Position verticale du sous-menu.
     A ajuster selon la hauteur du header.
  */

  top: 55px;

  /*
     Centre EXACT de l'écran
  */

  left: 50vw;

  transform: translateX(-50%);

  /*
     Sous-menu HORIZONTAL
  */

  display: flex;

  flex-direction: row;

  align-items: center;

  justify-content: center;

  /*
     Espace entre les éléments
  */

  gap: 15px;

  /*
     largeur adaptée au contenu
  */

  width: max-content;

  max-width: 95vw;

  margin: 0;

  padding: 7px 30px;

  background: rgba(0, 0, 0, 0.5);

  border-radius: 7px;

  box-shadow:
    0 8px 25px rgba(0, 0, 0, .14);

  /*
     fermé au chargement
  */

  visibility: hidden;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity .18s ease,
    visibility 0s linear .18s;

  z-index: 10000;
}


/* =====================================================
   OUVERTURE
   ===================================================== */

.menu-lodges.is-open .menu-lodges-list,
.menu-exp.is-open .menu-exp-list,
.menu-souvenirs.is-open .menu-souvenirs-list {

  visibility: visible;

  opacity: 1;

  pointer-events: auto;

  transition:
    opacity .18s ease;
}


/* =====================================================
   ELEMENTS DES SOUS-MENUS
   ===================================================== */

.menu .menu-lodges-list > li,
.menu .menu-exp-list > li,
.menu .menu-souvenirs-list > li {

  display: block;

  width: auto;

  margin: 0;

  padding: 0;

  flex: 0 0 auto;
}


/* =====================================================
   LIENS SOUS-MENUS
   ===================================================== */

.menu .menu-lodges-list > li > a,
.menu .menu-exp-list > li > a,
.menu .menu-souvenirs-list > li > a {

  display: block;

  width: auto;

  box-sizing: border-box;

  white-space: nowrap;

  text-align: center;

  font-size: .88em;

  padding: .25rem .5rem;
}


/* =====================================================
   SURVOL
   ===================================================== */

.menu .menu-lodges-list > li > a:hover,
.menu .menu-exp-list > li > a:hover,
.menu .menu-souvenirs-list > li > a:hover {

  background: rgba(0, 0, 0, .05);

  color: #f0a500;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 600px) {

  #burger {
    display: block;
  }


  .menu {

    display: none;

    flex-direction: column;

    background-color: rgba(0, 0, 0, 0.6);

    position: fixed;

    top: 0;

    right: 0;

    left: auto;

    height: 100vh;

    padding-top: 5rem;

    padding-left: 1rem;

    padding-right: 1rem;

    z-index: 10000;

    pointer-events: auto;

    width: max-content;
  }


  .menu.active {

    display: flex;

    opacity: 1;
  }


  /*
     MENU PRINCIPAL MOBILE
     VERTICAL
  */

  .menu > ul {

    flex-direction: column;

    gap: 2rem;
  }


  .menu li {

    margin: 0;
  }


  /*
     SOUS-MENUS MOBILE

     On annule position:fixed.
     Ils apparaissent sous Nos lodges
     ou Expérience.
  */

  .menu .menu-lodges-list,
  .menu .menu-exp-list,
.menu .menu-souvenirs-list {

    position: static;

    top: auto;

    left: auto;

    transform: none;

    /*
       vertical sur mobile
    */

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 3px;

    width: auto;

    max-width: none;

    margin-top: 10px;

    padding: 7px 15px;

    background: rgba(0, 0, 0, 0.35);

    box-shadow: none;

    /*
       fermé sans prendre de place
    */

    display: none;

    visibility: visible;

    opacity: 1;

    pointer-events: auto;
  }


  .menu-lodges.is-open .menu-lodges-list,
  .menu-exp.is-open .menu-exp-list,
.menu-souvenirs.is-open .menu-souvenirs-list {

    display: flex;
  }


  .menu .menu-lodges-list > li,
  .menu .menu-exp-list > li,
.menu .menu-souvenirs-list > li {

    width: 100%;
  }


  .menu .menu-lodges-list > li > a,
  .menu .menu-exp-list > li > a,
.menu .menu-souvenirs-list > li > a {

    width: 100%;

    text-align: center;
  }


  .burger-footer {

    display: flex;
  }


  .BoudhAnne {

    display: none;
  }
}
