/* Effets du menu holo (étapes 1B, 1C, 1F), séparés de /menu-holo.css (partie critique) ; voir menu-holo.js (.is-ready). */
/* =====================================================================
   ÉTAPE 1B — ANIMATIONS (transform et opacity uniquement)
   ===================================================================== */

/* --- couches injectées par menu-holo.js dans chaque panneau --- */
.hl-glow, .hl-fx, .hl-pulse { position: absolute; pointer-events: none; }
.hl-glow { /* halo rouge sang : n'apparaît que par l'opacité */
  inset: -1px;
  border: 1px solid var(--sang-vif);
  /* verre sombre teinté de rouge : le centre reste foncé pour que le texte rouge ressorte */
  background:
    radial-gradient(ellipse 75% 70% at 45% 55%, rgba(12, 2, 3, 0.9), rgba(30, 4, 7, 0.82) 60%, rgba(70, 6, 12, 0.7)),
    rgba(14, 3, 5, 0.85);
  box-shadow:
    inset 0 0 18px rgba(225, 6, 0, 0.45),
    inset 0 1px 0 rgba(255, 120, 120, 0.25),
    0 0 18px rgba(225, 6, 0, 0.55),
    0 0 46px rgba(225, 6, 0, 0.28);
  opacity: 0;
  transition: opacity 0.55s var(--ease-io);
}
.hl-pane.is-hot .hl-glow { opacity: 1; transition-duration: 0.35s; }

.hl-fx { inset: 0; overflow: hidden; opacity: 0; transition: opacity 0.3s var(--ease-out); }
.hl-fx::before { /* scanlines nettes qui défilent */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 200%;
  background: repeating-linear-gradient(to bottom, rgba(255, 60, 66, 0.17) 0 1px, transparent 1px 3px);
  animation: scan-roll 1.4s linear infinite;
  animation-play-state: paused;
}
.hl-fx::after { /* bande de balayage à l'entrée du survol */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(255, 90, 96, 0.28) 70%, rgba(255, 220, 220, 0.5) 92%, transparent);
  transform: translateY(-110%);
}
.hl-pane.is-hot .hl-fx { opacity: 1; }
.hl-pane.is-hot .hl-fx::before { animation-play-state: running; }
.hl-pane.is-glitch .hl-fx::after { animation: band 0.42s var(--ease-io) both; }

.hl-pulse { inset: -1px; border: 2px solid var(--sang-vif); box-shadow: 0 0 22px rgba(255, 42, 51, 0.7), inset 0 0 18px rgba(255, 42, 51, 0.4); opacity: 0; }
.hl-pane.is-pulsing .hl-pulse { animation: pulse-ring 0.75s var(--ease-out) both; }

/* texte : couleur rouge au survol, dédoublement « glitch » bref */
.hl-pane.is-hot .hl-label { color: var(--sang-vif); text-shadow: 0 0 1px rgba(0, 0, 0, 0.95), 0 0 9px rgba(255, 42, 51, 0.75), 0 0 20px rgba(225, 6, 0, 0.45); }
.hl-label, .hl-sub, .hl-idx, .hl-sub::before { transition: color 0.5s var(--ease-io), text-shadow 0.5s var(--ease-io); }
.hl-pane.is-hot .hl-label, .hl-pane.is-hot .hl-sub, .hl-pane.is-hot .hl-idx, .hl-pane.is-hot .hl-sub::before { transition-duration: 0.3s; }
/* double « glitch » : texte de remplacement vide (« / "" ») pour qu'il ne soit jamais lu ; sans cette syntaxe, pas de double du tout */
.hl-label::after {
  content: none; position: absolute; left: 0; top: 0;
  color: #ff2a33; mix-blend-mode: screen; opacity: 0.01; pointer-events: none; /* 0,01 : voir « LCP » en fin de fichier */
}
@supports (content: "x" / "") {
  .hl-label::after { content: attr(data-text) / ""; }
}
.hl-pane.is-glitch .hl-label { animation: jitter 0.36s steps(2, end) both; }
.hl-pane.is-glitch .hl-label::after { animation: ghost 0.36s steps(3, end) both; }
/* en mode « live », le ressort JS lisse déjà le transform : pas de transition CSS dessus */
.holo.is-live .hl-pane { transition: color 0.3s ease, opacity 0.45s var(--ease-out); }

/* --- respiration : flottement lent (propriété translate, indépendante du transform JS) --- */
@media (min-width: 900px) {
  .hl-pane {
    animation: breathe 7s ease-in-out var(--br, 0s) infinite, holo-on 1.1s var(--ease-out) var(--on, 0s) backwards;
  }
  .hl-pane.is-pulsing {
    animation: breathe 7s ease-in-out var(--br, 0s) infinite, holo-on 1.1s var(--ease-out) var(--on, 0s) backwards, press 0.55s var(--ease-out);
  }
  .hl-deck::before { transform-origin: left center; animation: line-on 0.9s var(--ease-io) 0.05s backwards; }
  .hl-search, .hl-crumb-row { animation: fade-up 0.8s var(--ease-out) backwards; }
  .hl-search { animation-delay: 1.15s; }
  .hl-link { animation: fade-up 0.6s var(--ease-out) 0.95s backwards; }
  .hl-crumb-row { animation-delay: 1.3s; }
  /* panneaux voisins : un peu atténués pendant un survol */
  .hl-deck.has-hot .hl-pane:not(.is-hot) { opacity: 0.62; }
  /* flux du geste vers le résultat */
  .hl-link::before {
    content: ""; position: absolute; top: -1.5px; left: 0; width: 4px; height: 4px;
    background: var(--sang-vif); box-shadow: 0 0 8px var(--sang-vif);
    opacity: 0; animation: flow 1.6s var(--ease-io) infinite; animation-play-state: paused;
  }
  .hl-pair.is-flow .hl-link::before { animation-play-state: running; }
}

/* --- balayage de scanline sur tout le header --- */
.holo-sweep { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.holo-sweep::before, .holo-sweep::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 100%;
  transform: translateY(-101%);
}
.holo-sweep::before { /* balayage lent et périodique */
  background: linear-gradient(to bottom, transparent 80%, rgba(225, 6, 0, 0.035) 95%, rgba(255, 200, 200, 0.09) 99.6%, transparent);
  animation: sweep 9s var(--ease-io) 2.6s infinite;
}
.holo-sweep::after { /* passage d'allumage du projecteur */
  background: linear-gradient(to bottom, transparent 60%, rgba(225, 6, 0, 0.08) 94%, rgba(255, 220, 220, 0.22) 99.6%, transparent);
  animation: sweep 1.3s var(--ease-io) 0.05s 1 both;
}
.holo-bar, .holo-top, .hl-crumb-row { position: relative; z-index: 2; }

/* --- fil d'Ariane --- */
.hl-crumb-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 0.95rem; }
.hl-crumb-row .hl-crumb { margin: 0; }
.hl-crumb.is-swap > * { display: inline-block; animation: crumb-in 0.55s var(--ease-out) backwards; }
.hl-crumb.is-swap > :nth-child(2) { animation-delay: 0.05s; }
.hl-crumb.is-swap > :nth-child(3) { animation-delay: 0.12s; }
/* caret « ▌ » : span aria-hidden posé par menu-holo.js à côté (hors) de la zone aria-live */
.hl-caret { display: none; margin-right: auto; margin-left: -0.65rem; color: var(--sang-vif); font-size: 0.72rem; line-height: 14px; }
.hl-caret.is-swap { display: inline-block; animation: caret 0.9s steps(1) 2 both; }
.holo-crumb-sep { margin: 0; }
/* --- images clés --- */
@keyframes breathe { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2.5px; } }
@keyframes holo-on { /* projecteur qui s'allume : scintillement puis stabilisation (fin = valeur au repos) */
  0% { opacity: 0.01; scale: 0.94 0.6; } /* 0,01 et non 0 : voir « LCP (fix/csp-blob-maquette) » en fin de fichier */
  18% { opacity: 0.75; scale: 1.01 1.02; }
  26% { opacity: 0.12; }
  40% { opacity: 0.9; scale: 1 1; }
  48% { opacity: 0.35; }
}
@keyframes line-on { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes fade-up { from { opacity: 0; translate: 0 6px; } }
@keyframes press { 0% { scale: 1; } 25% { scale: 0.94; } 60% { scale: 1.05; } 100% { scale: 1; } }
@keyframes pulse-ring { 0% { opacity: 0.95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.32, 1.6); } }
@keyframes scan-roll { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes band { from { transform: translateY(-110%); } to { transform: translateY(260%); } }
@keyframes jitter { 0% { translate: 2px 0; } 33% { translate: -2px 0; } 66% { translate: 1px 0; } 100% { translate: 0 0; } }
@keyframes ghost { 0% { opacity: 0.9; translate: -3px 0; } 50% { opacity: 0.6; translate: 3px -1px; } 100% { opacity: 0; translate: 0 0; } }
@keyframes sweep { from { transform: translateY(-101%); } to { transform: translateY(101%); } }
@keyframes flow { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(calc(1.6rem - 4px)); } }
@keyframes crumb-in { 0% { opacity: 0; translate: -8px 0; } 40% { opacity: 1; } 55% { opacity: 0.4; } 100% { opacity: 1; translate: 0 0; } }
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* --- mobile : pas de couches holo animées --- */
@media (max-width: 899px) {
  .hl-glow, .hl-fx, .hl-pulse, .holo-sweep { display: none; }
  .hl-label::after { display: none; }
  .hl-pane.is-hot .hl-label { text-shadow: none; }
}

/* --- mouvement réduit : plus de flottement, cascade, glitch ni parallaxe ; l'actif reste visible --- */
@media (prefers-reduced-motion: reduce) {
  .hl-pane, .hl-pane.is-pulsing, .hl-deck::before, .hl-search, .hl-crumb-row,
  .hl-glow, .hl-fx::before, .hl-pane.is-glitch .hl-fx::after,
  .hl-pane.is-glitch .hl-label, .hl-pane.is-glitch .hl-label::after, .hl-pane.is-pulsing .hl-pulse,
  .holo-sweep::before, .holo-sweep::after, .hl-crumb.is-swap > *, .hl-caret.is-swap,
  .hl-link::before { animation: none; }
  .hl-pane, .hl-glow, .hl-fx, .hl-pane::before { transition-duration: 0.01s; }
  .holo-sweep { display: none; }
}

/* =====================================================================
   ÉTAPE 1C — PROFONDEUR : scène 3D, tranches, brume, reflets, grille, poussière
   (actif sur bureau quand menu-holo.js a posé .is-3d ; le mobile garde le menu classique)
   ===================================================================== */
@media (min-width: 900px) {
  .holo.is-3d { padding-bottom: 0.8rem; overflow-x: clip; }

  /* --- scène --- */
  .is-3d .hl-stage {
    position: relative; z-index: 2;
    perspective: 900px;
    perspective-origin: var(--ox, 120px) var(--oy, 30px);
    /* reflet des panneaux sur le sol sombre, masqué en dégradé */
    -webkit-box-reflect: below 4px linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.07) 72%, rgba(0, 0, 0, 0.3));
  }
  .is-3d .hl-deck {
    transform-style: preserve-3d;
    transform-origin: var(--ox, 120px) 50% -90px;
    transform: rotateX(var(--srx, 0deg)) rotateY(var(--sry, 0deg));
    padding: 1.3rem 0.4rem 1rem;
  }
  .is-3d .hl-deck::before { bottom: 2px; }
  .is-3d .hl-formats, .is-3d .hl-pair { transform-style: preserve-3d; }
  /* les plans conteneurs (z = 0) ne doivent pas intercepter la souris devant les panneaux lointains */
  .is-3d .hl-deck, .is-3d .hl-formats, .is-3d .hl-pair, .is-3d .hl-slot { pointer-events: none; }
  .is-3d .hl-pane { pointer-events: auto; }
  .is-3d .hl-formats { padding: 0.85rem 0.8rem 0.85rem 3.4rem; } /* marge sous l'Atrium : son bord ne touche jamais le libellé Séquence */
  .is-3d .hl-deck { gap: 1.1rem; }

  /* --- socles 3D (transform piloté par le ressort) --- */
  .is-3d .hl-slot {
    position: relative; display: flex;
    transform-style: preserve-3d;
    transform:
      translate3d(calc(var(--tx, 0px) + var(--jx, 0px)), var(--jy, 0px), calc(var(--z) + var(--jz, 0px)))
      rotateX(var(--jrx, 0deg)) rotateY(calc(var(--rot) + var(--jry, 0deg)))
      scale(var(--js, 1));
    animation: breathe 7s ease-in-out var(--br, 0s) infinite;
  }
  .is-3d .hl-slot.is-pulsing { animation: breathe 7s ease-in-out var(--br, 0s) infinite, press 0.55s var(--ease-out); }
  .holo.is-3d:not(.is-live) .hl-slot { transition: transform 0.5s var(--ease-out); }
  .is-3d .hl-slot-format + .hl-slot-format { margin-left: -0.15rem; }
  .is-3d .hl-slot-duo { margin: 0; }
  .is-3d .hl-pair { gap: 0.25rem; margin-left: -0.2rem; }
  .holo.is-3d .hl-duo { min-width: 7.4rem; padding-right: 0.9rem; }

  /* le panneau devient la face avant du socle */
  .holo.is-3d .hl-pane {
    transform: none; margin: 0;
    animation: holo-on 1.1s var(--ease-out) var(--on, 0s) backwards;
  }
  .holo.is-3d .hl-pane.is-pulsing { animation: holo-on 1.1s var(--ease-out) var(--on, 0s) backwards; }
  .holo.is-3d .hl-format { min-width: 6.4rem; padding-left: 0.95rem; padding-right: 0.8rem; }
  .holo.is-3d .hl-format .hl-label { font-size: 15px; letter-spacing: 0.12em; }

  /* brume de profondeur : plus loin = plus pâle, plus flou (un seul flou par panneau : filter OU backdrop) */
  .holo.is-3d .hl-format { opacity: calc(0.96 - var(--i) * 0.04); }
  /* verre proche désaturé : au repos tous les panneaux restent neutres, sans teinte rouge reprise du fond */
  .holo.is-3d .hl-pane:not(.is-far) {
    -webkit-backdrop-filter: blur(7px) saturate(35%); backdrop-filter: blur(7px) saturate(35%);
    background:
      linear-gradient(160deg, rgba(247, 241, 241, 0.085), rgba(247, 241, 241, 0.02) 45%, rgba(201, 184, 184, 0.02)),
      rgba(14, 8, 10, 0.74);
  }
  .holo.is-3d .hl-pane.is-far {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background:
      linear-gradient(160deg, rgba(247, 241, 241, 0.085), rgba(247, 241, 241, 0.02) 45%, rgba(225, 6, 0, 0.03)),
      rgba(14, 8, 10, 0.72);
    filter: blur(calc((var(--i, 1) - 1) * 0.14px));
  }
  .holo.is-3d .hl-pane.is-far.is-hot { filter: none; }
  .holo.is-3d .hl-format .hl-label { color: rgba(226, 212, 212, calc(1 - var(--i) * 0.035)); }
  .holo.is-3d .hl-format.is-hot .hl-label { color: var(--sang-vif); }
  .holo.is-3d .hl-deck.has-hot .hl-pane:not(.is-hot) { opacity: 0.55; }

  /* tranches lumineuses (épaisseur réelle en Z) */
  .is-3d .hl-edge {
    position: absolute; pointer-events: none;
    background: linear-gradient(to bottom, rgba(247, 241, 241, 0.22), rgba(201, 184, 184, 0.07));
    animation: edge-on 1.1s var(--ease-out) var(--on, 0s) backwards;
    transition: opacity 0.4s var(--ease-out);
  }
  .is-3d .hl-el { left: 0; top: 0; width: var(--t); height: 100%; transform-origin: left center; transform: rotateY(90deg); }
  .is-3d .hl-er { right: 0; top: 0; width: var(--t); height: 100%; transform-origin: right center; transform: rotateY(-90deg); }
  .is-3d .hl-et { left: 0; top: 0; height: var(--t); width: 100%; transform-origin: center top; transform: rotateX(-90deg);
    background: linear-gradient(to right, rgba(247, 241, 241, 0.22), rgba(201, 184, 184, 0.07)); }
  .is-3d .hl-eb { left: 0; bottom: 0; height: var(--t); width: 100%; transform-origin: center bottom; transform: rotateX(90deg);
    background: linear-gradient(to right, rgba(201, 184, 184, 0.18), rgba(201, 184, 184, 0.05)); }
  .is-3d .hl-edge::after { /* version rouge sang, révélée par l'opacité */
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(255, 70, 76, 1), rgba(225, 6, 0, 0.55));
    opacity: 0; transition: opacity 0.55s var(--ease-io);
  }
  .is-3d .hl-slot.is-hot .hl-edge::after { opacity: 1; transition-duration: 0.3s; }
  .is-3d .hl-slot-format .hl-edge { opacity: calc(1 - var(--i) * 0.08); }
  .is-3d .hl-edge.hl-eb { display: none; }

  /* reflet spéculaire qui glisse sur le verre */
  .hl-spec { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .hl-spec i {
    position: absolute; top: -30%; bottom: -30%; left: 50%; width: 46%; margin-left: -23%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 240, 240, 0.2) 48%, rgba(255, 255, 255, 0.06) 60%, transparent 100%);
    transform: translateX(var(--spx, -90px)) skewX(-14deg);
  }
  .hl-pane.is-hot .hl-spec i {
    background: linear-gradient(100deg, transparent 0%, rgba(255, 90, 96, 0.08) 30%, rgba(255, 210, 210, 0.3) 48%, rgba(255, 90, 96, 0.08) 60%, transparent 100%);
  }
  .is-3d .hl-pane::after { background: var(--scan-pane), var(--noise-pane); background-size: auto, 180px 180px; opacity: 1; } /* scanlines + grain fixe du verre */

  /* --- espace : grille au sol, lueur du point de fuite, poussière --- */
  .holo-space {
    position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
    perspective: 900px; perspective-origin: var(--sox, 200px) var(--soy, 110px);
  }
  .hl-space-glow {
    /* placé par translate (et non left/top) : le recalage par menu-holo.js n'est pas un décalage de mise en page (CLS) */
    position: absolute; left: -560px; top: -10px; translate: calc(var(--sox, 200px) - 200px) calc(var(--soy, 110px) - 110px);
    width: 1520px; height: 260px;
    background: radial-gradient(ellipse 16% 45% at 50% 50%, rgba(225, 6, 0, 0.08), transparent 75%);
    animation: fade-in 1.6s var(--ease-out) 0.1s backwards;
  }
  .hl-space-grid {
    position: absolute; left: -800px; top: 150px; translate: calc(var(--sox, 200px) - 200px) calc(var(--floor, 150px) - 150px);
    width: 2000px; height: 1300px; overflow: hidden;
    transform-origin: 50% 0; transform: translateZ(480px) rotateX(-90deg);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 30%, transparent 62%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 30%, transparent 62%);
    animation: grid-on 1.4s var(--ease-out) 0.15s backwards, grid-breathe 6s ease-in-out 1.6s infinite;
  }
  .hl-space-grid i {
    position: absolute; inset: 0;
    background:
      repeating-linear-gradient(90deg, rgba(225, 6, 0, 0.3) 0 2px, transparent 2px 110px),
      repeating-linear-gradient(0deg, rgba(225, 6, 0, 0.22) 0 2px, transparent 2px 110px);
  }
  .hl-space-dust i {
    position: absolute; left: 0; top: 0; width: 2px; height: 2px; border-radius: 50%;
    background: #ff4d55; box-shadow: 0 0 6px rgba(255, 42, 51, 0.9);
    transform: translate3d(var(--mx, 0px), var(--my, 0px), var(--dz, -200px)); /* --mx / --my : menu-holo.js */
    opacity: 0;
    animation: mote var(--dd, 9s) ease-in-out var(--dl, 0s) infinite;
  }
  .hl-space-dust i.hl-pale { background: #f7f1f1; box-shadow: 0 0 6px rgba(247, 241, 241, 0.7); }

  /* sol sombre où se pose le reflet */
  .is-3d .hl-floor {
    position: relative; z-index: 1; height: 2.4rem; margin-top: -0.2rem;
    background: linear-gradient(to bottom, rgba(225, 6, 0, 0.05), transparent 70%);
    border-top: 1px solid rgba(225, 6, 0, 0.18);
  }
  .is-3d .hl-crumb-row { margin-top: 0.2rem; }
  .is-3d .holo-bar { margin-top: 0.6rem; }
}
.hl-floor { display: none; }
@media (min-width: 900px) { .is-3d .hl-floor { display: block; } }

@keyframes edge-on { 0% { opacity: 0; } 30% { opacity: 0.8; } 40% { opacity: 0.1; } 60% { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes grid-on { 0% { opacity: 0; } 40% { opacity: 0.9; } 50% { opacity: 0.2; } 100% { opacity: 1; } }
@keyframes grid-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes mote {
  0% { opacity: 0; translate: 0 0; }
  20% { opacity: 0.85; }
  70% { opacity: 0.5; }
  100% { opacity: 0; translate: var(--dx, 8px) var(--dy, -24px); }
}

/* --- repli sans backdrop-filter : verre plus opaque, mêmes couches --- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hl-pane { background: linear-gradient(160deg, rgba(247, 241, 241, 0.1), rgba(247, 241, 241, 0.02) 45%, rgba(225, 6, 0, 0.04)), rgba(16, 9, 11, 0.86); }
}

/* --- mobile : socles transparents pour la mise en page --- */
@media (max-width: 899px) {
  .hl-slot { display: contents; }
  .hl-edge, .hl-spec, .holo-space { display: none; }
}

/* --- mouvement réduit : la profondeur reste (statique), plus rien ne bouge --- */
@media (prefers-reduced-motion: reduce) {
  .is-3d .hl-slot, .is-3d .hl-slot.is-pulsing, .holo.is-3d .hl-pane, .holo.is-3d .hl-pane.is-pulsing, .is-3d .hl-edge,
  .hl-space-glow, .hl-space-grid, .hl-space-grid i, .hl-space-dust i { animation: none; }
  .hl-space-dust { display: none; }
  .is-3d .hl-slot, .is-3d .hl-edge, .is-3d .hl-edge::after { transition-duration: 0.01s; }
}
@media (min-width: 900px) {
  .is-3d .hl-crumb { text-shadow: 0 0 6px #000, 0 0 2px #000; }
}
@media (min-width: 1600px) {
  .is-3d .hl-stage { perspective: 1050px; }
  .is-3d .hl-deck { gap: 1.8rem; }
  .holo.is-3d .hl-format { min-width: 7.6rem; padding-left: 1.2rem; padding-right: 1rem; }
  .holo.is-3d .hl-format .hl-label { font-size: 16px; }
  .holo.is-3d .hl-duo { min-width: 9.2rem; padding-right: 1.3rem; }
  .is-3d .hl-pair { gap: 0.5rem; }
}

/* =====================================================================
   ÉTAPE 1F — EFFETS HOLO : grain, bords irisés, voile de lumière, ondulation
   ===================================================================== */
/* grain global : bruit SVG (feTurbulence) rastérisé une fois, décalé par pas (transform seulement) */
.holo-grain {
  position: absolute; inset: -90px; z-index: 3; pointer-events: none;
  background: var(--noise); background-size: 180px 180px;
  opacity: 0.09;
  animation: grain 0.9s steps(1) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-37px, 22px); } 33% { transform: translate(51px, -14px); }
  50% { transform: translate(-19px, -48px); } 67% { transform: translate(63px, 31px); } 83% { transform: translate(-58px, 9px); }
}

/* bords irisés : anneau d'1,5 px en dégradé conique cyan / magenta / blanc froid, désaturé */
.hl-iris {
  position: absolute; inset: -1px; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ia, 0deg),
    rgba(150, 232, 255, 0.75), rgba(240, 246, 255, 0.25) 14%, rgba(255, 140, 230, 0.6) 30%,
    rgba(255, 255, 255, 0.08) 46%, rgba(130, 220, 255, 0.55) 62%, rgba(250, 250, 255, 0.3) 76%,
    rgba(255, 150, 235, 0.5) 88%, rgba(150, 232, 255, 0.75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.78;
  transition: opacity 0.5s var(--ease-io);
}
.hl-pane.is-hot .hl-iris { opacity: 0.4; } /* reste visible sur le bord, le rouge domine */

/* voile de lumière : faisceau du projecteur + halo diffus derrière le verre (neutres) */
.hl-space-beam {
  position: absolute; left: -700px; top: -210px; translate: calc(var(--sox, 200px) - 200px) calc(var(--floor, 150px) - 150px);
  width: 1800px; height: 400px;
  background: conic-gradient(from 18deg at 50% 100%,
    transparent 0deg, rgba(240, 236, 236, 0.035) 10deg, rgba(240, 236, 236, 0.075) 22deg, rgba(255, 230, 230, 0.05) 34deg,
    rgba(240, 236, 236, 0.07) 44deg, rgba(240, 236, 236, 0.03) 56deg, transparent 66deg);
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 85%);
  animation: fade-in 1.6s var(--ease-out) 0.2s backwards, beam 7s ease-in-out 1.8s infinite;
}
.hl-space-halo {
  position: absolute; left: 220px; top: 40px; translate: calc(var(--sox, 200px) - 200px) calc(var(--soy, 110px) - 110px);
  width: 900px; height: 180px;
  background: radial-gradient(ellipse 50% 50% at 45% 55%, rgba(236, 230, 230, 0.07), transparent 72%);
  animation: fade-in 1.8s var(--ease-out) 0.4s backwards;
}
@keyframes beam { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }

/* ondulation : rare et courte, filtre de déplacement par bandes + petits décalages + aberration chromatique */
.holo.is-3d .hl-pane.is-wave { animation: holo-on 1.1s var(--ease-out) var(--on, 0s) backwards, wave-shift 0.38s steps(1) both; }
@keyframes wave-shift {
  0% { filter: url(#holo-wave-a); translate: 3px 0; }
  25% { filter: url(#holo-wave-b); translate: -2px 0; }
  50% { filter: url(#holo-wave-a); translate: 1px 0; }
  75% { filter: none; translate: -1px 0; }
  100% { filter: none; translate: 0 0; }
}
.hl-pane.is-wave .hl-label, .hl-pane.is-aberr .hl-label {
  text-shadow: -1.5px 0 rgba(0, 235, 255, 0.55), 1.5px 0 rgba(255, 0, 170, 0.55);
  transition: none;
}
.hl-pane.is-hot.is-wave .hl-label, .hl-pane.is-hot.is-aberr .hl-label {
  text-shadow: -1.5px 0 rgba(0, 235, 255, 0.45), 1.5px 0 rgba(255, 0, 170, 0.45), 0 0 9px rgba(255, 42, 51, 0.75);
}
.hl-pane.is-aberr .hl-iris { opacity: 0.8; transition: none; }

/* mobile : pas d'irisé ni de voile ; grain fixe */
@media (max-width: 899px) {
  .hl-iris, .hl-space-beam, .hl-space-halo { display: none; }
  .holo-grain { animation: none; opacity: 0.05; }
}
/* mouvement réduit : grain fixe, pas d'ondulation, irisé immobile */
@media (prefers-reduced-motion: reduce) {
  .holo-grain, .hl-space-beam, .hl-space-halo { animation: none; }
  .holo.is-3d .hl-pane.is-wave { animation: none; }
  .hl-pane.is-wave .hl-label, .hl-pane.is-aberr .hl-label { text-shadow: none; }
}

