/* ═══ MENU MOBILE — feuille de style (refonte, 3 septembre 2026) ═══
   Avant : tout ce CSS était injecté par nav-mobile.js. Si le script ne se
   chargeait pas, le menu se dépliait sur cinq lignes et l'accueil devenait
   inutilisable sur téléphone.
   Maintenant : le style vit ici, et le repli du menu est conditionné à
   l'attribut [data-nav-ready] que le script pose une fois le bouton ☰ créé.
   Sans JavaScript, le menu reste donc simplement visible — dégradé, jamais cassé.
   Cibles tactiles : 44 × 44 px minimum (recommandation Apple et Google). */

.nav-emoji,
.nav-desc { display: none; }

@media (max-width: 820px) {

  nav.nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50;
    min-height: 84px !important;
    padding: 8px 60px !important;
    gap: 0 !important;
  }
  nav.nav > .logo { margin: 0 !important; }

  /* Le bouton ☰ occupe le bord droit : sans compensation, le logo paraît
     collé à lui alors qu'il est géométriquement centré. On lui rend
     de l'air à droite et on resserre les marges latérales. */
  nav.nav { padding-left: 46px !important; padding-right: 52px !important; }
  nav.nav[data-nav-ready] > .logo { transform: translateX(-9px); }

  /* ─── Bouton ☰ : 44 × 44 px de zone tactile ─── */
  nav.nav .nav-burger {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 61;
    -webkit-tap-highlight-color: rgba(201, 162, 39, .18);
  }
  nav.nav .nav-burger:active { background: rgba(201, 162, 39, .12); }
  nav.nav .nav-burger:focus-visible { outline: 2px solid #C9A227; outline-offset: 2px; }
  nav.nav .nav-burger span {
    display: block; width: 24px; height: 2.5px;
    background: #7a5968; border-radius: 2px;
    transition: transform .3s, opacity .3s;
  }

  /* ─── Le repli ne s'applique QUE si le script a fait son travail ─── */
  nav.nav[data-nav-ready] ul {
    display: none !important;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column !important;
    align-items: stretch;
    gap: 0 !important;
    padding: 4px 0 10px !important;
    margin: 0;
    background: #fdf8f5;
    box-shadow: 0 8px 22px rgba(74, 59, 82, .14);
    z-index: 60;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
  }
  nav.nav[data-nav-ready].nav-open ul { display: flex !important; }

  nav.nav ul li {
    width: 100%; text-align: center; list-style: none;
    border-bottom: 1px solid rgba(212, 175, 55, .14);
  }
  nav.nav ul li:last-child { border-bottom: none; }

  /* ─── Chaque entrée : 60 px de haut, texte lisible à 50 cm ─── */
  nav.nav ul a {
    display: block;
    padding: 14px 18px;
    min-height: 56px;
    line-height: 1.3;
    font-size: 16px !important;
    -webkit-tap-highlight-color: rgba(201, 162, 39, .15);
  }
  nav.nav ul a:active { background: rgba(201, 162, 39, .1); }
  nav.nav ul a .nav-emoji { display: inline-block; margin-right: 8px; font-size: 1.1em; }
  nav.nav ul a .nav-desc {
    display: block; font-size: 13.5px; font-weight: 400;
    color: #8a7468; margin-top: 3px; letter-spacing: 0;
    text-transform: none; font-style: italic;
  }

  /* ─── Croix quand le menu est ouvert ─── */
  nav.nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  nav.nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  nav.nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

@media (min-width: 821px) {
  nav.nav .nav-burger { display: none !important; }
}
