/* ============================================================
   EMOSEL — Menus déroulants « Saisons » / « Essentiels »
   ============================================================
   Fichier additif : ne redéfinit ni ne modifie aucune règle
   existante (.site-nav, .nav-left, .nav-mobile, etc.). Chargé sur
   toutes les pages qui ont une navigation, en plus du CSS de nav
   déjà présent dans le <style> de chaque page.

   Conçu pour rester extensible : ajouter une Saison 03 ou un
   nouvel Essentiel ne demande qu'une ligne <li><a> de plus dans
   le sous-menu concerné, sans toucher à ce fichier.
   ============================================================ */

/* ------------------------------------------------------------
   Desktop — au survol ou au focus clavier
   ------------------------------------------------------------ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: .56rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.6);
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.nav-dropdown.active .nav-dropdown-toggle {
  color: var(--gold);
}

.nav-dropdown-arrow {
  display: inline-block;
  font-size: .8em;
  transition: transform .3s;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown:focus-within .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 168px;
  margin: 0;
  /* padding-top inclut la zone de transition (pont invisible) qui relie
     le lien du menu au sous-menu, pour que le survol ne se perde pas
     dans l'espace vide entre les deux (cf. bug « menu qui se sauve »). */
  padding: 1.5rem 0 .8rem;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s;
  z-index: 150;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: .7rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 9, 10, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 169, 110, 0.15);
  z-index: -1;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-dropdown-menu li {
  margin: 0;
}

.nav-dropdown-menu a {
  display: block;
  padding: .55rem 1.5rem;
  font-size: .56rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.65);
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s, background .25s;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  color: var(--gold);
  background: rgba(201, 169, 110, 0.06);
}

.nav-dropdown-menu a.active {
  color: var(--gold);
}

/* ------------------------------------------------------------
   Mobile — accordéon (menu plein écran existant)
   ------------------------------------------------------------ */
.nav-mobile-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-mobile-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 0;
  transition: color .3s;
}

.nav-mobile-group-toggle:hover,
.nav-mobile-group-toggle:focus-visible,
.nav-mobile-group.active .nav-mobile-group-toggle {
  color: var(--gold);
}

.nav-mobile-group-arrow {
  display: inline-block;
  font-size: .7em;
  transition: transform .3s;
}

.nav-mobile-group.open .nav-mobile-group-arrow {
  transform: rotate(180deg);
}

.nav-mobile-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: max-height .35s ease, margin-top .35s ease;
}

.nav-mobile-group.open .nav-mobile-submenu {
  max-height: 260px;
  margin-top: 1.3rem;
}

.nav-mobile-submenu li {
  margin-top: 1.1rem;
}

.nav-mobile-submenu li:first-child {
  margin-top: 0;
}

.nav-mobile-submenu a {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: .88rem;
  letter-spacing: .12em;
  color: rgba(240, 232, 216, 0.65);
  text-decoration: none;
  transition: color .25s;
}

.nav-mobile-submenu a:hover,
.nav-mobile-submenu a:focus-visible {
  color: var(--gold);
}

.nav-mobile-submenu a.active {
  color: var(--gold);
}
