/* =============================
   MENU BURGER — feuille dédiée (finale)
   ============================= */

/* Hauteur d’en-tête (décale l’overlay) */
:root { --header-h: 72px; }

/* Header toujours visible au-dessus */
header{
  position: sticky;
  top: 0;
  z-index: 2147483647;          /* tout en haut */
  background: #000;
}

/* Barre de navigation (logo + burger) */
.menu-container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

/* Logo */
.logo .logo-manoirs{
  display:block;
  width:200px;
  height:40px;
  background: url('../img/manoirserie.png') left center / contain no-repeat;
  text-indent:-9999px;
  position: relative;
  z-index: 2147483647;          /* au-dessus de l’overlay */
}

/* Bouton burger */
#menu-btn{
  width: 44px;
  height: 36px;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 2147483647;          /* au-dessus de l’overlay */
}
#menu-btn .menu-btn__burger,
#menu-btn .menu-btn__burger::before,
#menu-btn .menu-btn__burger::after{
  content:"";
  position:absolute;
  left:50%;
  width:28px;
  height:2px;
  background:#fff;
  border-radius:2px;
  transform: translateX(-50%);
  transition: transform .25s, opacity .2s, top .25s;
}
#menu-btn .menu-btn__burger{ top:50%; transform: translate(-50%,-50%); }
#menu-btn .menu-btn__burger::before{ top:-8px; }
#menu-btn .menu-btn__burger::after { top: 8px; }

/* État ouvert -> croix */
#menu-btn.open .menu-btn__burger{
  transform: translate(-50%,-50%) rotate(45deg);
}
#menu-btn.open .menu-btn__burger::before,
#menu-btn.open .menu-btn__burger::after{
  top:0; transform: translateX(-50%) rotate(-90deg);
}

/* =========================
   MOBILE (par défaut)
   ========================= */

/* Overlay du menu — fermé : ne bloque rien */
#nav-links{
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  display: none;
  visibility: hidden;
  pointer-events: none;        /* ne bloque pas le fond quand fermé */
  background: rgba(13,16,20,.98);
  padding: 20px 24px 24px;
  overflow-y: auto;            /* scroll interne du menu si long */
  z-index: 2147483646;         /* juste sous header/bouton/logo */
}
#nav-links li{ margin: 0; }
#nav-links a{
  color:#fff; text-decoration:none;
  font-size: clamp(18px, 4vw, 28px);
  line-height: 1.4;
}
#nav-links a:hover{ color: #ff69b4; }

/* Ouvert : visible + cliquable */
#nav-links.nav-active{
  display: flex;
  visibility: visible;
  pointer-events: auto;
  flex-direction: column;
  gap: 14px;
}

/* Bloquer le scroll de la page UNIQUEMENT en mobile quand le menu est ouvert */
@media (max-width: 767.98px){
  body.menu-open{ overflow: hidden !important; }
}

/* Force explicite : quand le menu est fermé, on assure le scroll */
@media (max-width: 767.98px){
  body:not(.menu-open){ overflow-y: auto !important; }
}

/* =========================
   DESKTOP (>= 768px)
   ========================= */
@media (min-width:768px){

  /* Burger caché */
  #menu-btn{ display: none !important; }

  /* Nav horizontale classique, pas d’overlay */
  #nav-links{
    position: static !important;
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;

    inset: auto !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    z-index: auto !important;

    flex-direction: row !important;
    gap: 20px !important;
  }

  #nav-links a{
    font-size: 16px;
    line-height: 23px;
  }

  /* En desktop : scroll jamais bloqué, même si la classe traîne */
  body{ overflow: auto !important; }
  body.menu-open{ overflow: auto !important; }
}

/* ---- Sécurité : s’il reste des z-index forts sur le contenu ---- */
#contenu, main, .mx-wrap, .mx-oeuvre, .mx-oeuvre-head, .mx-h1 {
  position: relative;
  z-index: auto;                /* neutralise d’anciens 9999 etc. */
}
/* ===== SAFETY OVERRIDES — page donation ===== */
#nav-links{
  z-index: 999999 !important;            /* au-dessus de tout le contenu */
}

/* remet le contenu sous l’overlay (au cas où un z-index/transform traîne) */
#contenu, main, .mx-wrap, .don-wrap, .don-head, .don-head *{
  position: relative !important;
  z-index: 0 !important;
  transform: none !important;
  filter: none !important;
}

/* Couleur par défaut du menu (si besoin) */
.menu-container .nav-links li a { color: #fff; }

/* Le lien gris (priorité + haute) */
.menu-container .nav-links li a.grey{
pointer-events: none;       /* optionnel : empêche le clic */
  cursor: not-allowed;        /* optionnel : curseur grisé */
  opacity: .2;                /* optionnel : léger voile */
}




/* Couleur grisée, y compris si le lien est visité */
.menu-container .nav-links li a.muted,
.menu-container .nav-links li a.muted:visited {
  color: #888 !important;
}

/* Barré discret */
.menu-container .nav-links li a.strike {
  text-decoration: line-through;
  text-decoration-thickness: .08em;
}
.menu-container .nav-links li a.muted {
  pointer-events: none;       /* optionnel : empêche le clic */
  cursor: not-allowed;        /* optionnel : curseur grisé */
  opacity: .9;                /* optionnel : léger voile */
}
