/* ============================================================
   En-tête PUBLIC partagé (homepage + pages anonymes du portail) :
   SOURCE UNIQUE — règle « on ne duplique pas » (Aurélien, 11/08).
   Logo (wordmark/tuile), liens de nav, actions (CTA), burger et
   menu mobile plein écran. Chargé par home/index.html.twig ET
   base.html.twig, après tokens.css.
   ============================================================ */

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; color: var(--ink); }
.logo .wordmark { height: 22px; width: auto; display: block; }
.wordmark .wm-ink { fill: var(--ink); }
.wordmark .wm-dot { fill: var(--accent); }
.logo .logo-tuile { display: none; width: 32px; height: 32px; }
/* Le point se lie à la TUILE, pas au thème (specs DA) */
.lt-fond { fill: #1c1c1a; }
.lt-glyphe { fill: #fafaf9; }
.lt-point { fill: #34b98a; }
:root[data-theme="dark"] .lt-fond { fill: #f0efec; }
:root[data-theme="dark"] .lt-glyphe { fill: #1c1c1a; }
:root[data-theme="dark"] .lt-point { fill: #0e7a58; }

/* ---------- Liens de navigation ---------- */
.nav-public { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-public a {
  text-decoration: none; color: var(--ink-soft);
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: color var(--dur-fast);
}
.nav-public a:hover { color: var(--ink); }

/* ---------- Actions (thème, connexion, CTA, burger) ---------- */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 11px 20px; font-size: 0.75rem; white-space: nowrap; }

/* ---------- Burger (référence Apple) ---------- */
.burger { display: none; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer; position: relative; z-index: 60; padding: 0; margin-right: -13px; /* traits alignés sur la marge de page */ -webkit-tap-highlight-color: transparent; }
.burger:focus { outline: none; }
.burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4px auto; border-radius: 1px; transition: transform 0.32s var(--ease, ease), opacity 0.2s; }
html.menu-ouvert .burger span:nth-child(1) { transform: translateY(2.75px) rotate(45deg); }
html.menu-ouvert .burger span:nth-child(2) { transform: translateY(-2.75px) rotate(-45deg); }

/* ---------- Menu mobile plein écran ---------- */
.menu-mobile { position: fixed; inset: 0; z-index: 55; background: var(--bg); padding: 92px 28px 32px; display: flex; flex-direction: column; }
.menu-mobile[hidden] { display: none; } /* display:flex écraserait l'attribut hidden */
.menu-mobile nav { display: flex; flex-direction: column; }
.menu-mobile nav a {
  text-decoration: none; color: var(--ink); font-size: 28px; font-weight: 500;
  letter-spacing: -0.015em; padding: 13px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(-10px);
  -webkit-tap-highlight-color: transparent;
}
.menu-mobile nav a:focus { outline: none; }
.menu-mobile nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
html.menu-ouvert .menu-mobile nav a { opacity: 1; transform: none; transition: opacity 0.34s ease, transform 0.34s var(--ease, ease); }
html.menu-ouvert .menu-mobile nav a:nth-child(1) { transition-delay: 0.05s; }
html.menu-ouvert .menu-mobile nav a:nth-child(2) { transition-delay: 0.1s; }
html.menu-ouvert .menu-mobile nav a:nth-child(3) { transition-delay: 0.15s; }
html.menu-ouvert .menu-mobile nav a:nth-child(4) { transition-delay: 0.2s; }
.menu-pied { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
html.menu-ouvert { overflow: hidden; }
html.menu-ouvert header { background: var(--bg); position: relative; z-index: 58; }
@media (prefers-reduced-motion: reduce) {
  .burger span, .menu-mobile nav a { transition: none !important; }
}

/* ---------- Points de rupture ---------- */
@media (max-width: 860px) {
  .nav-public { display: none; }
  .burger { display: block; }
  /* spécificité .nav-actions x : les .btn/.theme-toggle des feuilles chargées
     APRÈS (portail.css, style inline home) ne doivent pas les réafficher */
  .nav-actions .theme-toggle, .nav-actions .nav-connexion { display: none; }
}
@media (max-width: 480px) {
  .logo .wordmark { height: 18px; }
  .nav-actions .btn { padding: 9px 11px; font-size: 0.7rem; letter-spacing: 0.04em; }
  .cta-duree { display: none; }
  .nav-connexion { border: none; background: transparent; padding: 9px 4px; }
  .nav-actions { gap: 6px; }
}
@media (max-width: 379px) {
  .logo .wordmark { display: none; }
  .logo .logo-tuile { display: block; }
}
