/* ============================================================
   MonMenu – Style "Nature Club" (inspiré de l'image)
   Fond blanc, liens uppercase espacés, accent doré,
   dropdown blanc ombré centré, flyout latéral, animations fluides
   Burger à partir de 475px
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ══════════════════════════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════════════════════════ */
:root {
  --mm-gold:        #c9a84c;   /* accent doré – item actif & hover accent    */
  --mm-gold-light:  #e8c96a;   /* doré clair – hover lien actif              */
  --mm-ink:         #1a1a1a;   /* texte principal                            */
  --mm-muted:       #888;      /* texte secondaire dropdown                  */
  --mm-white:       #ffffff;
  --mm-off-white:   #fafafa;
  --mm-divider:     #e8e8e8;   /* séparateur horizontal dropdown             */
  --mm-shadow:      0 12px 48px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
  --mm-shadow-fly:  8px 12px 40px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.05);
  --mm-nav-h:       56px;
  --mm-drop-w:      220px;
  --mm-font:        'Montserrat', 'Arial', sans-serif;

  /* Timings animation */
  --mm-t-fast:  .15s;
  --mm-t-med:   .25s;
  --mm-t-slow:  .35s;
  --mm-ease:    cubic-bezier(.4, 0, .2, 1);
  --mm-spring:  cubic-bezier(.34, 1.56, .64, 1);  /* léger rebond à l'entrée */
}

/* ══════════════════════════════════════════════════════════════
   BARRE PRINCIPALE
══════════════════════════════════════════════════════════════ */
/* Aligne logo + menu sur la même ligne */
.nav2 .fj-contain {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

/* Le menu prend l'espace restant */
.nav2 .fj-contain .mm-nav {
  flex: 1;
  border-bottom: none; /* supprime la bordure si elle gêne */
}

/* La barre du menu elle-même devient transparente (fond déjà géré par nav2) */
.nav2 .fj-contain .mm-nav-inner {
  justify-content: flex-end; /* liens alignés à droite du logo */
  padding: 0;
}

.mm-nav {
  background: var(--mm-white);
  border-bottom: 1px solid var(--mm-divider);
  position: relative;
  z-index: 900;
  font-family: var(--mm-font);
}

.mm-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;   /* centré comme dans l'image */
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Liste principale ── */
.mm-menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  height: var(--mm-nav-h);
}
.mm-has-dropdown::after{
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 1;
}
.mm-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* ══════════════════════════════════════════════════════════════
   LIEN NIVEAU 0 — style "Nature Club"
══════════════════════════════════════════════════════════════ */
.mm-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 20px;
  color: var(--mm-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition:
    color var(--mm-t-fast) var(--mm-ease),
    background var(--mm-t-fast) var(--mm-ease);
}

/* Trait bas animé */
.mm-link::after {
  content: '';
  position: absolute;
  bottom: -1px;   /* couvre la bordure de la nav */
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 28px);
  height: 2px;
  background: var(--mm-gold);
  border-radius: 1px;
  transform-origin: center;
  transition: transform var(--mm-t-med) var(--mm-spring);
}

/* Hover */
.mm-link:hover {
  color: var(--mm-ink);
}
.mm-link:hover::after,
.mm-item:focus-within > .mm-link::after {
  transform: translateX(-50%) scaleX(1);
}

/* Actif */
.mm-current > .mm-link {
  color: var(--mm-gold);
}
.mm-current > .mm-link::after {
  transform: translateX(-50%) scaleX(1);
  background: var(--mm-gold);
}

/* Icône */
.mm-link i { font-size: .75em; opacity: .6; flex-shrink: 0; }

/* ── Flèche ── */
.mm-arrow {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .5;
  flex-shrink: 0;
  transition:
    transform var(--mm-t-fast) var(--mm-ease),
    opacity var(--mm-t-fast);
}

.mm-has-dropdown:hover > .mm-link .mm-arrow,
.mm-has-dropdown:focus-within > .mm-link .mm-arrow {
  transform: rotate(-135deg) translateY(-2px);
  opacity: .9;
}

/* ══════════════════════════════════════════════════════════════
   DROPDOWN NIVEAU 1 — centré, blanc pur, ombre douce
══════════════════════════════════════════════════════════════ */
.mm-dropdown {
  position: absolute;
  top: calc(var(--mm-nav-h) + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: var(--mm-drop-w);
  background: var(--mm-white);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  box-shadow: var(--mm-shadow);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  /* Animation : descend + fade */
  transition:
    opacity var(--mm-t-med) var(--mm-ease),
    transform var(--mm-t-med) var(--mm-ease);
}

/* Petit triangle en haut centré */
.mm-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--mm-white);
  border-left: 1px solid rgba(0,0,0,.06);
  border-top: 1px solid rgba(0,0,0,.06);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0,0,0,.04);
}

.mm-has-dropdown:hover > .mm-dropdown,
.mm-has-dropdown:focus-within > .mm-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ── Item dropdown ── */
.mm-dropdown-item { position: relative; }

/* Séparateur entre chaque item (style image : tiret horizontal) */
.mm-dropdown-item + .mm-dropdown-item {
  border-top: 1px solid var(--mm-divider);
}

.mm-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: center;  /* centré comme dans l'image */
  gap: 8px;
  padding: 11px 24px;
  color: var(--mm-ink);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  /* Animation : légère translation + couleur */
  transition:
    color var(--mm-t-fast) var(--mm-ease),
    background var(--mm-t-fast) var(--mm-ease),
    letter-spacing var(--mm-t-med) var(--mm-ease);
}

/* Trait doré gauche au hover */
.mm-dropdown-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 2px;
  background: var(--mm-gold);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--mm-t-med) var(--mm-spring);
  border-radius: 1px;
}

.mm-dropdown-link:hover {
  color: var(--mm-gold);
  background: var(--mm-off-white);
  letter-spacing: .13em;
}
.mm-dropdown-link:hover::before { transform: scaleY(1); }

.mm-dropdown-item.mm-current > .mm-dropdown-link {
  color: var(--mm-gold);
}
.mm-dropdown-item.mm-current > .mm-dropdown-link::before { transform: scaleY(1); }

.mm-dropdown-link i { font-size: .7em; opacity: .5; }

/* ── Flèche flyout ── */
.mm-flyout-arrow {
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: .4;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity var(--mm-t-fast), transform var(--mm-t-fast) var(--mm-ease);
}

.mm-has-flyout:hover > .mm-dropdown-link .mm-flyout-arrow,
.mm-has-flyout:focus-within > .mm-dropdown-link .mm-flyout-arrow {
  opacity: .9;
  transform: rotate(45deg) translate(3px, -3px);
}

/* ══════════════════════════════════════════════════════════════
   FLYOUT NIVEAU 2+ — latéral droit
══════════════════════════════════════════════════════════════ */
.mm-flyout {
  position: absolute;
  top: -9px;
  left: calc(100% + 2px);
  min-width: var(--mm-drop-w);
  background: var(--mm-white);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  box-shadow: var(--mm-shadow-fly);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  /* Animation : glisse depuis la gauche */
  transform: translateX(10px);
  transition:
    opacity var(--mm-t-med) var(--mm-ease),
    transform var(--mm-t-med) var(--mm-ease);
}

.mm-has-flyout:hover > .mm-flyout,
.mm-has-flyout:focus-within > .mm-flyout {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* ── Item flyout ── */
.mm-flyout-item { position: relative; }
.mm-flyout-item + .mm-flyout-item { border-top: 1px solid var(--mm-divider); }

.mm-flyout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  color: var(--mm-ink);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition:
    color var(--mm-t-fast) var(--mm-ease),
    background var(--mm-t-fast) var(--mm-ease),
    letter-spacing var(--mm-t-med) var(--mm-ease);
}

.mm-flyout-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 2px;
  background: var(--mm-gold);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--mm-t-med) var(--mm-spring);
  border-radius: 1px;
}

.mm-flyout-link:hover {
  color: var(--mm-gold);
  background: var(--mm-off-white);
  letter-spacing: .13em;
}
.mm-flyout-link:hover::before { transform: scaleY(1); }

.mm-flyout-item.mm-current > .mm-flyout-link { color: var(--mm-gold); }
.mm-flyout-item.mm-current > .mm-flyout-link::before { transform: scaleY(1); }

/* ══════════════════════════════════════════════════════════════
   BURGER
══════════════════════════════════════════════════════════════ */
.mm-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1.5px solid var(--mm-divider);
  border-radius: 3px;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition:
    border-color var(--mm-t-fast),
    background var(--mm-t-fast);
}
.mm-burger:hover {
  border-color: var(--mm-gold);
  background: rgba(201,168,76,.06);
}

.mm-burger span {
  display: block;
  height: 1.5px;
  background: var(--mm-ink);
  border-radius: 1px;
  transition:
    transform var(--mm-t-med) var(--mm-ease),
    opacity var(--mm-t-fast),
    background var(--mm-t-fast);
}
.mm-burger:hover span { background: var(--mm-gold); }

/* Croix animée */
.mm-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.mm-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mm-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — breakpoints multiples, burger à 475px
══════════════════════════════════════════════════════════════ */

/* ── 1200px : réduit l'espacement ── */
@media (max-width: 1200px) {
  .mm-link { padding: 0 14px; letter-spacing: .09em; }
}

/* ── 1024px : réduit encore ── */
@media (max-width: 1024px) {
  .mm-link { padding: 0 11px; font-size: .7rem; letter-spacing: .07em; }
  .mm-nav-inner { padding: 0 20px; }
}

/* ── 768px : réduit au minimum avant burger ── */
@media (max-width: 768px) {
  .mm-link { padding: 0 9px; font-size: .68rem; letter-spacing: .05em; }
  .nav2 .fj-contain {
  
  flex-direction: column;
}
}

/* ── 475px : BURGER — le menu se replie entièrement ── */
@media (max-width: 475px) {

  .mm-burger { display: flex; }
  .mm-nav-inner { justify-content: flex-start; padding: 0 16px; }

  /* Overlay menu mobile */
  .mm-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    position: fixed;         /* fixed pour couvrir tout l'écran */
    top: calc(var(--mm-nav-h) + 1px);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mm-white);
    overflow-y: auto;
    z-index: 899;
    padding: 0 0 40px;
    /* Animation entrée : glisse du haut */
    transform: translateY(-8px);
    opacity: 0;
    transition:
      opacity var(--mm-t-med) var(--mm-ease),
      transform var(--mm-t-med) var(--mm-ease);
  }

  .mm-menu.is-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  /* Items */
  .mm-item { flex-direction: column; border-bottom: 1px solid var(--mm-divider); }

  .mm-link {
    padding: 14px 20px;
    font-size: .75rem;
    letter-spacing: .1em;
    justify-content: space-between;
    color: var(--mm-ink);
  }
  .mm-link::after { display: none; }

  /* Flèche du burger — tourne quand sous-menu ouvert */
  .mm-item.is-open > .mm-link .mm-arrow {
    transform: rotate(-135deg) translateY(-2px);
    opacity: .9;
  }

  /* Dropdown mobile : se déplie en accordéon */
  .mm-dropdown {
    position: static;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--mm-divider);
    border-radius: 0;
    padding: 0;
    background: var(--mm-off-white);
    /* Accordéon : max-height animé */
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--mm-t-slow) var(--mm-ease);
  }
  .mm-dropdown::before { display: none; }
  .mm-item.is-open > .mm-dropdown { max-height: 600px; }

  .mm-dropdown-link {
    justify-content: flex-start;
    padding: 12px 28px;
    font-size: .7rem;
    letter-spacing: .08em;
    border-left: 3px solid transparent;
    transition:
      color var(--mm-t-fast),
      border-color var(--mm-t-fast),
      background var(--mm-t-fast);
  }
  .mm-dropdown-link::before { display: none; }
  .mm-dropdown-link:hover,
  .mm-dropdown-item.mm-current > .mm-dropdown-link {
    color: var(--mm-gold);
    border-left-color: var(--mm-gold);
    background: rgba(201,168,76,.05);
    letter-spacing: .08em;
  }

  /* Flyout mobile : accordéon imbriqué */
  .mm-flyout {
    position: static;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--mm-divider);
    border-radius: 0;
    padding: 0;
    background: #f3f3f1;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--mm-t-slow) var(--mm-ease);
  }
  .mm-dropdown-item.is-open > .mm-flyout { max-height: 400px; }

  .mm-flyout-link {
    justify-content: flex-start;
    padding: 11px 36px;
    font-size: .68rem;
    letter-spacing: .08em;
    border-left: 3px solid transparent;
  }
  .mm-flyout-link::before { display: none; }
  .mm-flyout-link:hover,
  .mm-flyout-item.mm-current > .mm-flyout-link {
    color: var(--mm-gold);
    border-left-color: var(--mm-gold);
    letter-spacing: .08em;
  }

  .mm-flyout-arrow { display: none; }
  .mm-has-flyout > .mm-dropdown-link { justify-content: space-between; }
}

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .mm-link::after,
  .mm-dropdown-link::before,
  .mm-flyout-link::before,
  .mm-dropdown,
  .mm-flyout,
  .mm-arrow,
  .mm-flyout-arrow,
  .mm-burger span,
  .mm-menu { transition: none !important; }
}
