/* Menu holo du site (en-tête des pages /singularity, /iteration, /iteration/:id) — menu-holo.js.
   Validé en prototype (étape 1f) : panneaux de verre en profondeur, neutres au repos ; rouge sang au survol (un seul à la fois).
   Tout est préfixé .holo / .hl- pour ne rien toucher du reste des pages. Recherche : recherche-menu.js/.css (même composant). */
.holo {
  color-scheme: dark;
  /* palette du site */
  --sang: #e10600;        /* rouge principal (.cat actif, CORP, barres) */
  --sang-vif: #ff2a33;    /* coins des portes, survols */
  --sang-clair: #ff4d55;
  --sang-texte: #ff4d55;  /* texte rouge sur verre sombre (≥ 4,5:1 mesuré) */
  --blanc: #f7f1f1;
  --gris: #8a8082;        /* rubriques inactives */
  --gris-texte: #a9a0a2;  /* liens d’en-tête et FR/EN inactif : ≥ 4,5:1 même sur le halo rouge (1920, WebKit) */
  --pale: #c9b8b8;
  --nuit: #070304;
  --mono: "Share Tech Mono", "Share Tech Mono Repli", ui-monospace, monospace;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  /* holo */
  --verre: rgba(201, 184, 184, 0.045);
  --verre-fort: rgba(201, 184, 184, 0.075);
  --fil: rgba(214, 200, 200, 0.22);
  --fil-fort: rgba(230, 218, 218, 0.42);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --scan: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
  --scan-pane: repeating-linear-gradient(to bottom, rgba(236, 228, 228, 0.06) 0 1px, transparent 1px 3px);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-pane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* ---------- Barre ---------- */
.holo {
  position: relative;
  z-index: 10;
  padding: 1.1rem clamp(1.25rem, 3vw, 3rem) 0.9rem;
  background:
    linear-gradient(to bottom, rgba(225, 6, 0, 0.05), transparent 60%),
    #000;
  border-bottom: 1px solid rgba(225, 6, 0, 0.28);
  box-shadow: 0 1px 0 rgba(225, 6, 0, 0.08), 0 18px 40px rgba(0, 0, 0, 0.8);
}
.holo::after { /* scanlines sur toute la barre, très discrètes */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--scan); opacity: 0.35; mix-blend-mode: screen;
}
.holo-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
/* logo, liens, langue, FICHE : les éléments du site, posés dans la rangée haute du menu */
.holo .logo { font-size: clamp(1.9rem, 2.6vw, 2.5rem); text-decoration: none; }
.holo-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.15rem; min-width: 0; }
.holo-tools { display: flex; align-items: center; gap: 1.2rem; }
.holo .lang { color: var(--gris-texte); }
.holo .lang button { cursor: pointer; }
.holo .profile-btn { white-space: nowrap; }
.hl-burger { display: none; }
.holo-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* ---------- Pont holo ---------- */
.hl-deck {
  position: relative;
  display: flex; align-items: center;
  flex: 0 0 auto;
  gap: 1.7rem;
  padding: 0.9rem 0.4rem 0.7rem;
}
.hl-deck::before { /* faisceau du projecteur : fine ligne au sol + halo */
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(225, 6, 0, 0.55) 18%, rgba(247, 241, 241, 0.18) 55%, transparent);
  box-shadow: 0 0 14px rgba(225, 6, 0, 0.45);
}

.hl-pane {
  --rot: 0deg; --z: 0px;
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 3.6rem;
  padding: 0.55rem 1rem 0.5rem 1rem;
  color: var(--pale);
  text-decoration: none;
  text-transform: uppercase;
  background:
    linear-gradient(160deg, rgba(247, 241, 241, 0.09), rgba(247, 241, 241, 0.015) 45%, rgba(225, 6, 0, 0.03)),
    var(--verre);
  border: 1px solid var(--fil);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(201, 184, 184, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(7px) saturate(115%);
  backdrop-filter: blur(7px) saturate(115%);
  /* --j* : valeurs pilotées par le ressort JS (parallaxe, magnétisme, survol) ; 0 au repos */
  transform: perspective(900px)
    translate3d(var(--jx, 0px), var(--jy, 0px), 0)
    rotateX(var(--jrx, 0deg)) rotateY(calc(var(--rot) + var(--jry, 0deg)))
    translateZ(calc(var(--z) + var(--jz, 0px))) scale(var(--js, 1));
  transition: transform 0.45s var(--ease-out), color 0.3s ease, opacity 0.45s var(--ease-out);
  opacity: 0.86;
  white-space: nowrap;
}
.hl-pane::after { /* scanlines + reflet du verre */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    var(--scan),
    linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.06) 38%, transparent 46%);
  opacity: 0.8;
}
.hl-idx {
  position: absolute; top: 0.3rem; right: 0.45rem;
  color: rgba(201, 184, 184, 0.4);
  font-size: 0.56rem; letter-spacing: 0.12em;
}
.hl-label { position: relative; font-size: 14px; letter-spacing: 0.16em; line-height: 1.2; }
.hl-sub {
  position: relative; margin-top: 0.3rem;
  color: rgba(201, 184, 184, 0.62);
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: none;
}
.hl-sub::before { content: "// "; content: "// " / ""; color: rgba(201, 184, 184, 0.45); }
.hl-pane .hl-c { position: absolute; width: 9px; height: 9px; border: 0 solid rgba(247, 241, 241, 0.55); }
.hl-pane .hl-c.hl-tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.hl-pane .hl-c.hl-br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.hl-pane:hover, .hl-pane:focus-visible, .hl-pane.is-hot {
  color: var(--blanc);
  opacity: 1;
  outline: none;
}
.holo:not(.is-live) .hl-pane:hover, .holo:not(.is-live) .hl-pane:focus-visible { --jz: 14px; }
.hl-pane:focus-visible { box-shadow: 0 0 0 1px var(--sang-vif), 0 8px 24px rgba(0, 0, 0, 0.55); }


/* formats : rangée de calques derrière l'Atrium (le libellé « FORMATS 06 » a été retiré) */
.hl-formats {
  position: relative;
  z-index: 2;
  display: flex; align-items: center;
  padding: 0.85rem 1rem 0.85rem 4rem;
}
.hl-format {
  --rot: -16deg;
  --z: calc(var(--i) * -9px);
  z-index: calc(10 - var(--i));
  min-width: 6.6rem;
  margin-left: -0.55rem; /* chaque calque glisse sous le précédent */
  padding-left: 1.1rem;
  opacity: calc(0.9 - var(--i) * 0.05);
}
.hl-format:first-of-type { margin-left: 0; }
/* calque fantôme décalé derrière chaque format et chaque panneau du duo */
.hl-format,
.hl-duo {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(201, 184, 184, 0.04),
    6px -6px 0 -1px rgba(0, 0, 0, 0.9),
    6px -6px 0 0 rgba(214, 200, 200, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.55);
}
.hl-format:hover, .hl-format:focus-visible, .hl-format.is-hot { z-index: 20; }
.hl-duo.is-hot { z-index: 4; }

/* Itération / Remix : deux panneaux séparés */
.hl-pair {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 0.2rem;
}
.hl-duo { --rot: 12deg; min-width: 8rem; padding-right: 1.4rem; }
.hl-remix { --rot: 18deg; --z: -8px; }
.hl-link {
  position: relative; width: 1.6rem; height: 1px;
  background: linear-gradient(90deg, rgba(201, 184, 184, 0.15), rgba(225, 6, 0, 0.6));
}
.hl-link::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  border: 3.5px solid transparent; border-left: 5px solid rgba(225, 6, 0, 0.7); border-right: 0;
}

/* ---------- Panneau actif : rouge sang ---------- */
/* rouge sang : uniquement pendant le survol (étape 1e) ; l'actif reste neutre */
.hl-pane.is-hot {
  color: var(--sang-vif);
  opacity: 1;
}
.hl-pane.is-hot .hl-label { text-shadow: 0 0 10px rgba(255, 42, 51, 0.85), 0 0 22px rgba(225, 6, 0, 0.5); }
/* texte au même rouge sang que le panneau : nom, sous-titre et numéro */
.hl-pane.is-hot .hl-idx, .hl-pane.is-hot .hl-sub, .hl-pane.is-hot .hl-sub::before { color: var(--sang-vif); }
.hl-pane.is-hot .hl-sub, .hl-pane.is-hot .hl-idx { text-shadow: 0 0 1px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 42, 51, 0.6); }
.hl-pane.is-hot .hl-c { border-color: var(--sang-vif); }
.hl-pane::before { /* barre d'état en tête de panneau (visible sur l'actif) */
  content: ""; position: absolute; z-index: 2; left: -1px; right: -1px; top: -1px; height: 2px;
  background: var(--sang-vif); box-shadow: 0 0 10px var(--sang-vif);
  opacity: 0; transform: scaleX(0.2); transform-origin: left;
  transition: opacity 0.35s var(--ease-out), transform 0.6s var(--ease-out);
}
.hl-pane.is-hot::before { opacity: 1; transform: none; }

/* zone de recherche (recherche-menu.js y pose .rm) */
.hl-search { position: relative; z-index: 40; flex: 0 0 auto; display: flex; align-items: center; }
.holo .rm { margin-left: 0; }
/* ---------- Fil d'Ariane ---------- */
.hl-crumb {
  position: relative;
  margin: 0.95rem 0 0;
  color: var(--gris);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.hl-crumb b { color: var(--sang); font-weight: 400; }
@keyframes flicker {
  0%, 100% { opacity: 1; }
  91% { opacity: 1; } 92% { opacity: 0.82; } 93% { opacity: 1; } 95% { opacity: 0.9; } 96% { opacity: 1; }
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- Desktop étroit : on serre ---------- */
@media (max-width: 1360px) and (min-width: 900px) {
  .hl-deck { gap: 1.3rem; }
  .hl-pane { padding-left: 0.8rem; padding-right: 0.8rem; }
  .hl-format { min-width: 6.2rem; padding-left: 0.9rem; }
  .hl-label { font-size: 13px; letter-spacing: 0.13em; }
  .hl-duo { min-width: 7.4rem; padding-right: 1.3rem; }
  .hl-formats { padding-left: 3.5rem; padding-right: 0.8rem; }
}
/* Grand écran : on donne plus d'ampleur aux plans */
@media (min-width: 1600px) {
  .hl-deck { gap: 2.4rem; }
  .hl-pane { min-height: 4rem; }
  .hl-label { font-size: 15px; }
  .hl-format { min-width: 7.8rem; padding-left: 1.3rem; }
  .hl-formats { padding: 0.95rem 1.3rem 0.95rem 4.6rem; }
  .hl-duo { min-width: 9.4rem; }
  .hl-pair { gap: 0.5rem; }
  .hl-link { width: 2.2rem; }
}
/* ---------- Mobile (< 900 px) : menu classique, sans 3D ni flou ---------- */
@media (max-width: 899px) {
  .holo { padding: 0.9rem 1rem 0.75rem; }
  .holo .logo { font-size: clamp(1.7rem, 8vw, 2rem); }
  .holo-top { align-items: flex-start; flex-wrap: wrap; row-gap: 0.2rem; }
  .holo-brand { gap: 0 1rem; }
  .holo-tools { gap: 0.35rem; margin-left: auto; }
  .holo .lang { gap: 0; }
  .holo .lang button { min-width: 44px; min-height: 44px; }
  .holo .profile-btn { min-height: 44px; }
  .holo .head-charter, .holo .head-registre { display: inline-flex; align-items: center; min-height: 44px; }
  .holo-bar { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.4rem; }
  .hl-burger {
    display: inline-flex; align-items: center; gap: 0.6rem;
    min-width: 44px; min-height: 44px; padding: 0 0.85rem;
    border: 1px solid rgba(138, 128, 130, 0.5); background: transparent; color: var(--pale);
    font: 0.72rem var(--mono); letter-spacing: 0.18em; cursor: pointer;
  }
  .hl-burger[aria-expanded="true"], .hl-burger:hover, .hl-burger:focus-visible { color: var(--sang-vif); border-color: var(--sang-vif); outline: none; }
  .hl-burger-lines { display: grid; gap: 3px; }
  .hl-burger-lines i { display: block; width: 14px; height: 1px; background: currentColor; }
  /* menu ouvert : liste opaque en surimpression sous la barre (la page ne bouge pas) */
  .hl-stage {
    display: none; position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; z-index: 55;
    max-height: calc(100dvh - 9rem); overflow: auto;
    background: #070304; border: 1px solid rgba(225, 6, 0, 0.45); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
  }
  .holo.is-open .hl-stage { display: block; }
  .hl-deck { flex-direction: column; align-items: stretch; gap: 0; padding: 0.2rem 0.9rem; }
  .hl-deck::before { display: none; }
  .hl-formats, .hl-pair { display: contents; }
  .hl-link, .hl-pane .hl-c, .hl-idx { display: none; }
  .hl-pane, .hl-atrium, .hl-format, .hl-duo {
    --rot: 0deg; --z: 0px;
    transform: none; margin: 0; min-height: 44px; min-width: 0;
    padding: 0.7rem 0.2rem;
    flex-direction: row; justify-content: space-between; align-items: center; gap: 0.8rem;
    background: none; border: 0; border-bottom: 1px solid rgba(225, 6, 0, 0.45); box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; filter: none;
    opacity: 1; animation: none;
  }
  .hl-pane:last-child { border-bottom: 0; }
  .hl-pane::after, .hl-pane::before { display: none; }
  .hl-label { font-size: 15px; }
  .hl-sub { margin: 0; }
  .hl-pane:hover, .hl-pane:focus-visible, .hl-pane:hover .hl-sub, .hl-pane:focus-visible .hl-sub { color: var(--sang-vif); }
  .hl-pane:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--sang-vif); }
  .hl-crumb { font-size: 0.64rem; letter-spacing: 0.18em; }
}


/* Coupure critique / effets (perf18) : les étapes 1B, 1C et 1F (animations, profondeur 3D, effets holo) sont dans
   /menu-holo-effets.css, chargée sans bloquer le rendu (la suite, intégration au site, est dans /menu-holo-site.css) ; menu-holo.js n'affiche la scène (.is-ready) qu'une fois chargée.
   Ces règles mobiles en restent copiées ici : sans elles, les couches injectées par menu-holo.js toucheraient la mise en
   page avant l'arrivée des effets. */
@media (max-width: 899px) {
  .hl-glow, .hl-fx, .hl-pulse, .holo-sweep { display: none; }
  .hl-label::after { display: none; }
  .hl-slot { display: contents; }
  .hl-edge, .hl-spec, .holo-space { display: none; }
  .hl-iris, .hl-space-beam, .hl-space-halo { display: none; }
}

