/* ═══════════════════════════════════════════════════════════
   LJÓS — EN-TÊTE COMMUN
   À charger APRÈS ljos.css sur toutes les pages.

   Toutes les classes sont préfixées lh- et l'élément racine est
   un <header>, jamais un <nav> : aucune règle de ljos.css visant
   la balise nav ne peut donc l'atteindre.
   ═══════════════════════════════════════════════════════════ */

:root { --lh-h: 62px; }

/* ─── Neutralisation du bug historique ───────────────────────
   ljos.css style la BALISE nav en position:fixed;top:0. Le
   <nav class="footer-nav"> du pied de page héritait donc de la
   barre fixe et recouvrait l'en-tête. On le remet dans le flux. */
nav.footer-nav {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
  min-height: 0;
  padding: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 0;
  justify-content: flex-start;
}

/* ─── En-tête ────────────────────────────────────────────── */
.lh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  min-height: var(--lh-h);
  padding: 8px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 247, 240, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 36, 29, 0.07);
  font-family: 'Figtree', sans-serif;
}

body.dark-mode .lh-header {
  background: rgba(18, 16, 12, 0.92);
  border-bottom-color: rgba(240, 232, 216, 0.06);
}

.lh-logo {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.4em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  text-indent: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  mix-blend-mode: normal;
  transition: color 0.3s ease;
}
.lh-logo:hover { color: var(--desert-deep); }

.lh-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lh-group { display: flex; align-items: center; gap: 32px; }

.lh-sep {
  width: 1px;
  height: 14px;
  background: rgba(42, 36, 29, 0.18);
  flex-shrink: 0;
}

.lh-nav a {
  font-family: 'Figtree', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.lh-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--desert);
  transition: width 0.4s ease, left 0.4s ease;
}
.lh-nav a:hover,
.lh-nav a.active { color: var(--ink); }
.lh-nav a:hover::after,
.lh-nav a.active::after { width: 100%; left: 0; }

/* ─── Burger mobile ──────────────────────────────────────── */
.lh-burger {
  display: none;
  width: 38px;
  height: 38px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.lh-burger span {
  position: absolute;
  left: 8px;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.lh-burger span:nth-child(1) { top: 14px; }
.lh-burger span:nth-child(2) { top: 19px; }
.lh-burger span:nth-child(3) { top: 24px; }
.lh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.lh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.lh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1150px) {
  .lh-sep,
  .lh-group:last-of-type { display: none; }
}

@media (max-width: 900px) {
  :root { --lh-h: 58px; }
  .lh-header { padding: 8px 16px; }
  .lh-logo { font-size: 1.05rem; letter-spacing: 0.28em; }
  .lh-burger { display: block; }
  .lh-nav {
    position: fixed;
    top: var(--lh-h);
    left: 0;
    right: 0;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid rgba(42, 36, 29, 0.1);
    padding: 8px 0 18px;
    display: none;
  }
  .lh-nav.ouvert { display: flex; }
  .lh-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .lh-sep { display: none; }
  .lh-nav a { padding: 15px 24px; font-size: 0.72rem; }
  .lh-nav a::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lh-logo,
  .lh-nav a,
  .lh-nav a::after,
  .lh-burger span { transition: none; }
}

/* ─── Lien d'évitement (accessibilité clavier) ─── */
.lh-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  color: var(--cream);
  font-family: 'Figtree', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 22px;
}
.lh-skip:focus { left: 8px; top: 8px; }
