/* ═══════════════════════════════════════════
   HEADER-MOBILE — Fond BLANC opaque
   Ne PAS mettre opacity sur .mobile-menu : à < 1 le fond se voit à travers.
   Le bouton (10060) > le panneau (10050) pour rester cliquable dans le header.
   ═══════════════════════════════════════════ */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 10060;
  position: relative;
  padding: 8px;
  background: transparent;
  border: 0;
  touch-action: manipulation;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all var(--transition-medium);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu .mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Calque plein écran : pas d’opacity ici */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
}

.mobile-menu.open {
  display: block;
  pointer-events: auto;
  visibility: visible;
  background: #ffffff !important;
  background-color: #ffffff !important;
  /* Un seul “niveau” de scroll : pas de débordement sur le body + barre horizontale */
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Hauteur = viewport : le scroll se fait ICI seulement (évite double barre + scroll horizontal) */
.mobile-menu-panel {
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: calc(72px + env(safe-area-inset-top, 0px)) 24px 32px 24px;
  background-color: #ffffff !important;
  background-image: none !important;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.mobile-menu .menu-item a {
  display: block;
  padding: 16px 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: var(--night) !important;
  border-bottom: 1px solid rgba(12, 10, 7, 0.12);
  text-decoration: none;
  transition: color var(--transition-fast);
  overflow-wrap: anywhere;
  max-width: 100%;
}

.mobile-menu .menu-item a:hover,
.mobile-menu .menu-item a:focus-visible {
  color: var(--fire) !important;
}

.mobile-menu .nav-cta a {
  display: inline-block;
  margin-top: 24px;
  background: var(--fire);
  color: #fff !important;
  padding: 14px 32px;
  font-size: 1.2rem;
  border-radius: var(--border-radius);
  text-align: center;
  border-bottom: none;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
  }
}
