/* ============================================================
   JARVIS CINEMATIC : vue casque.
   Plan 0 environnement · Plan 1 casque · Plan 2 noyau · Plan 3 panneaux.
   Remplace cinematic.css + cinematic-readable.css (fusionnés ici).
   Tailles minimales : texte 14px, secondaire 12px, micro-label 10px.
   ============================================================ */

:root {
  --cin-cyan: #63e7ff;
  --cin-cyan-light: #b8f7ff;
  --cin-blue: #168cff;
  --cin-orange: #ff6a2c;
  --cin-glass: rgba(3, 14, 22, 0.6);
  --cin-line: rgba(100, 225, 255, 0.3);
  --px: 0;
  --py: 0;
  /* Pour une photo réelle : déposer un fichier dans assets/backgrounds/ puis
     --env-photo: url("backgrounds/horizon.jpg"); elle passe sous les couches procédurales. */
  --env-photo: none;
}

/* ---------- Plan 0 : environnement ---------- */
.env { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #01060a var(--env-photo) center 60% / cover no-repeat; }
/* --look : rotation de tête lors d'un changement de page (-1 à 1). --sway : léger balancement permanent. */
@property --look { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --sway { syntax: "<number>"; inherits: true; initial-value: 0; }
.env, .helmet { transition: --look 0.75s cubic-bezier(.45, 0, .2, 1); animation: headSway 26s ease-in-out infinite; }
@keyframes headSway { 0%, 100% { --sway: -1; } 50% { --sway: 1; } }
.env__layer { position: absolute; inset: -8%; will-change: transform; transform: translate3d(calc(var(--px) * var(--d) * -1), calc(var(--py) * var(--d) * -0.6), 0); translate: calc((var(--look) * -9 + var(--sway) * 1.6) * var(--d)) calc(var(--sway) * var(--d) * -0.4); }
.env__layer--photo { --d: 5px; display: none; background: var(--env-photo) center 55% / cover no-repeat; animation: photoDrift 60s ease-in-out infinite alternate; }
.env--photo .env__layer--photo { display: block; }
.env--photo :is(.env__layer--sky, .env__layer--far, .env__layer--mid, .env__layer--city, .env__layer--near, .env__glow) { display: none; }
@keyframes photoDrift { from { scale: 1.04; } to { scale: 1.1; } }
/* Numérotation des panneaux de l'accueil */
.cin { counter-reset: hp; }
.hp { counter-increment: hp; }
.hp__label::before { content: counter(hp, decimal-leading-zero) "  "; color: var(--cin-orange); }
.env__layer canvas { width: 100%; height: 100%; display: block; }
.env__layer--sky { --d: 3px; }
.env__layer--far { --d: 4px; }
.env__layer--mid { --d: 6px; }
.env__layer--city { --d: 6px; }
.env__layer--near { --d: 8px; }
.env__layer--sky canvas { animation: envDrift 70s ease-in-out infinite alternate; }
.env__glow { position: absolute; left: 6%; right: 20%; top: 44%; height: 30%; background: radial-gradient(ellipse at 40% 55%, rgba(255, 196, 120, 0.3), transparent 62%); filter: blur(24px); mix-blend-mode: screen; animation: envGlow 9s ease-in-out infinite alternate; }
@keyframes envGlow { to { opacity: 0.7; } }
.env__fog { position: absolute; left: -20%; right: -20%; height: 26%; opacity: 0.55; background: radial-gradient(ellipse at 30% 50%, rgba(255, 226, 190, 0.22), transparent 60%), radial-gradient(ellipse at 75% 55%, rgba(235, 225, 215, 0.18), transparent 55%); filter: blur(14px); }
.env__fog--a { top: 55%; animation: envFog 46s ease-in-out infinite alternate; }
.env__fog--b { top: 66%; opacity: 0.4; animation: envFog 60s ease-in-out infinite alternate-reverse; }
.env__shade { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 48%, rgba(1, 6, 10, 0.1) 30%, rgba(1, 6, 10, 0.7) 100%), rgba(1, 8, 14, 0.5); transition: background 0.8s var(--ease); }
body.cinematic-home-active .env__shade { background: radial-gradient(ellipse 90% 80% at 45% 50%, transparent 45%, rgba(2, 10, 16, 0.55) 100%), linear-gradient(180deg, rgba(2, 10, 16, 0.3), transparent 22%, transparent 74%, rgba(2, 10, 16, 0.5)); }
@keyframes envDrift { from { transform: translateX(-10px); } to { transform: translateX(10px); } }
@keyframes envFog { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

/* L'ancienne grille et le plateau décoratif ne doivent plus masquer le paysage. */
body { background: #01060a; }
body::before { opacity: 0.35; }
.stage::before { display: none; }

/* ---------- Plan 1 : casque ---------- */
.helmet { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.9s var(--ease), --look 0.75s cubic-bezier(.45, 0, .2, 1); transform: translate3d(calc(var(--px) * 2px), calc(var(--py) * 1.5px), 0); translate: calc(var(--look) * 18px + var(--sway) * 2px) calc(var(--sway) * -1.5px); rotate: calc(var(--look) * -0.6deg); }
body.cinematic-home-active .helmet { opacity: 1; }
.helmet__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.helmet__plate { stroke: none; }
.helmet__edge { fill: none; stroke: rgba(99, 231, 255, 0.42); stroke-width: 1; vector-effect: non-scaling-stroke; }
.helmet__edge--inner { stroke: rgba(99, 231, 255, 0.14); }
.helmet__edge--strut { stroke: rgba(255, 214, 160, 0.45); stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(255, 180, 110, 0.45)); }
.helmet__seg { fill: none; stroke: var(--cin-cyan); stroke-width: 2; stroke-dasharray: 26 10; vector-effect: non-scaling-stroke; opacity: 0.7; filter: drop-shadow(0 0 4px rgba(99, 231, 255, 0.6)); }
.helmet__seg--orange { stroke: var(--cin-orange); stroke-dasharray: 14 18; opacity: 0.8; filter: drop-shadow(0 0 4px rgba(255, 106, 44, 0.6)); }
.helmet__led { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--cin-cyan); box-shadow: 0 0 10px var(--cin-cyan); animation: helmetLed 3.2s ease-in-out infinite; }
.helmet__led--orange { background: var(--cin-orange); box-shadow: 0 0 10px var(--cin-orange); animation-delay: 1.1s; }
.helmet__led--1 { left: 38.5%; top: 10.4%; } .helmet__led--2 { right: 38.5%; top: 10.4%; }
.helmet__led--3 { left: 2.6%; top: 50%; } .helmet__led--4 { right: 2.6%; top: 50%; }
@keyframes helmetLed { 50% { opacity: 0.35; } }

/* ---------- Coque en mode casque (desktop, accueil) ---------- */
@media (min-width: 981px) {
  body.cinematic-home-active .shell,
  body.cinematic-home-active .shell.rail-collapsed,
  body.cinematic-home-active .shell.context-hidden { grid-template-columns: var(--rail-w-collapsed) minmax(0, 1fr) 0; }
  body.cinematic-home-active .context,
  body.cinematic-home-active .hud-frame { display: none; }
  body.cinematic-home-active .sysbar { background: transparent; border-bottom-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.cinematic-home-active .sysbar::before { display: none; }
  body.cinematic-home-active .rail { margin: 64px 0 96px 10px; height: auto; background: rgba(2, 10, 16, 0.4); border-color: rgba(99, 231, 255, 0.14); }
  body.cinematic-home-active .rail .rail__label,
  body.cinematic-home-active .rail .rail__count { display: none; }
  body.cinematic-home-active .rail__item { justify-content: center; padding: 10px 0; }
  body.cinematic-home-active .rail__profile { justify-content: center; padding-left: 0; }
  body.cinematic-home-active .rail__top { justify-content: center; }
  body.cinematic-home-active #railToggle { display: none; }
  body.cinematic-home-active .rail__item.is-active::after { display: none; }

  body.cinematic-home-active .stage { position: relative; padding: 0; height: calc(100dvh - var(--sysbar-h)); overflow: hidden; perspective: 1500px; }
  body.cinematic-home-active .view { max-width: none; height: 100%; margin: 0; }

  /* Console de commande : pièce embarquée en bas du champ de vision */
  body.cinematic-home-active .core { position: absolute; z-index: 20; left: 50%; bottom: 30px; width: min(660px, 40vw); min-height: 0; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 8px; transform: translateX(-50%); text-align: left; }
  body.cinematic-home-active .core::before { display: none; }
  body.cinematic-home-active .core .visor,
  body.cinematic-home-active .core .visor__readouts { display: none; }
  body.cinematic-home-active .core .reply { order: -2; width: 100%; max-height: 22vh; overflow: auto; background: rgba(2, 12, 18, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  body.cinematic-home-active .core .core__feedback { order: -1; text-align: center; font-size: 11px; letter-spacing: 0.18em; }
  body.cinematic-home-active .core .command { position: relative; width: 100%; min-height: 60px; margin-top: 24px; overflow: visible; border: 1px solid rgba(99, 231, 255, 0.38); background: linear-gradient(180deg, rgba(4, 20, 30, 0.72), rgba(2, 10, 16, 0.62)); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 0 40px rgba(42, 192, 255, 0.12), inset 0 0 26px rgba(61, 198, 255, 0.05), 0 20px 50px rgba(0, 0, 0, 0.35); clip-path: none; }
  body.cinematic-home-active .core .command::before { content: "Commande vocale / texte"; position: absolute; top: -22px; left: 4px; width: auto; height: auto; background: none; box-shadow: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(184, 247, 255, 0.7); }
  body.cinematic-home-active .core .command::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -1px; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--cin-cyan) 0 3px, transparent 3px 7px); -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); opacity: 0.45; box-shadow: none; animation: cmdWave 2.4s linear infinite; }
  body.cinematic-home-active[data-core="listening"] .core .command::after,
  body.cinematic-home-active[data-core="thinking"] .core .command::after,
  body.cinematic-home-active[data-core="executing"] .core .command::after { opacity: 1; height: 3px; animation-duration: 0.8s; }
  body.cinematic-home-active .core .command__input { font-size: 16px; }
  body.cinematic-home-active .core .command__send { width: 44px; height: 44px; color: #021117; background: linear-gradient(135deg, var(--cin-cyan-light), var(--cin-cyan)); border: 0; box-shadow: 0 0 22px rgba(99, 231, 255, 0.35); }
}
@keyframes cmdWave { to { background-position: 28px 0; } }

/* ---------- Scène d'accueil ---------- */
.cin {
  position: relative; height: 100%;
  display: grid; grid-template-columns: minmax(280px, 23vw) minmax(0, 1fr) minmax(280px, 23vw); column-gap: clamp(20px, 2.4vw, 44px);
  padding: calc(11.6vh - var(--sysbar-h) + 12px) calc(4.4vw + 18px) 128px 14px;
  color: var(--jarvis-text);
}
.cin-col { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 0; perspective: 1400px; transform-style: preserve-3d; transform: translate3d(calc(var(--px) * -4px), calc(var(--py) * -3px), 0); }

/* ============================================================
   Allumage du casque : joué une fois, à l'ouverture du poste de commande.
   Le casque se referme, les arêtes se tracent, les segments s'amorcent,
   un balayage passe devant la visière, puis le paysage et les panneaux montent.
   ============================================================ */
.helmet__sweep { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(180deg, transparent 40%, rgba(99, 231, 255, 0.12) 47%, rgba(200, 248, 255, 0.55) 50%, rgba(99, 231, 255, 0.12) 53%, transparent 60%); }

body.hud-boot .helmet { animation: hudHelmetIn 1300ms cubic-bezier(.2, .8, .2, 1) both; }
body.hud-boot .helmet__sweep { animation: hudSweep 1400ms 700ms cubic-bezier(.4, 0, .2, 1) both; }
body.hud-boot .helmet__edge { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hudDraw 1600ms 260ms cubic-bezier(.6, .05, .3, 1) both; }
body.hud-boot .helmet__edge--inner { animation-delay: 560ms; }
body.hud-boot .helmet__edge--strut { animation-delay: 420ms; }
body.hud-boot .helmet__seg { animation: hudFlicker 1100ms 900ms both; }
body.hud-boot .helmet__led { animation: hudLed 520ms both; }
body.hud-boot .helmet__led--1 { animation-delay: 1180ms; }
body.hud-boot .helmet__led--2 { animation-delay: 1320ms; }
body.hud-boot .helmet__led--3 { animation-delay: 1460ms; }
body.hud-boot .helmet__led--4 { animation-delay: 1600ms; }
body.hud-boot .env { animation: hudEnvWake 2600ms ease-out both; }
body.hud-boot .globe { animation: hudGlobeIn 1500ms 1000ms cubic-bezier(.2, .8, .2, 1) both; }
body.hud-boot .sysbar { animation: hudBarIn 900ms 400ms cubic-bezier(.2, .8, .2, 1) both; }
body.hud-boot .core { animation: hudRise 1100ms 1750ms cubic-bezier(.2, .8, .2, 1) both; }
body.hud-boot .hp { animation: hudPanelIn 1000ms cubic-bezier(.2, .8, .2, 1) both, hpFloat 9s ease-in-out 2.9s infinite; }
body.hud-boot .cin-col--left .hp:nth-child(1) { animation-delay: 1350ms, 2.9s; }
body.hud-boot .cin-col--left .hp:nth-child(2) { animation-delay: 1500ms, 3s; }
body.hud-boot .cin-col--left .hp:nth-child(3) { animation-delay: 1650ms, 3.1s; }
body.hud-boot .cin-col--right .hp:nth-child(1) { animation-delay: 1420ms, 2.95s; }
body.hud-boot .cin-col--right .hp:nth-child(2) { animation-delay: 1570ms, 3.05s; }
body.hud-boot .cin-col--right .hp:nth-child(3) { animation-delay: 1720ms, 3.15s; }
body.hud-boot .cin-col--left .hp { --hp-from: -26px; }
body.hud-boot .cin-col--right .hp { --hp-from: 26px; }

@keyframes hudHelmetIn { 0% { opacity: 0; scale: 1.14; filter: brightness(2.4); } 30% { opacity: 1; } 100% { opacity: 1; scale: 1; filter: none; } }
@keyframes hudSweep { 0% { opacity: 0; translate: 0 -60%; } 18% { opacity: 1; } 100% { opacity: 0; translate: 0 60%; } }
@keyframes hudDraw { to { stroke-dashoffset: 0; } }
@keyframes hudFlicker { 0%, 10% { opacity: 0; } 16% { opacity: 1; } 26% { opacity: 0.12; } 42% { opacity: 0.95; } 56% { opacity: 0.2; } 100% { opacity: 0.75; } }
@keyframes hudLed { 0% { opacity: 0; scale: 0.2; } 60% { opacity: 1; scale: 1.7; } 100% { opacity: 1; scale: 1; } }
@keyframes hudEnvWake { 0% { filter: brightness(0.16) saturate(0.35); scale: 1.05; } 45% { filter: brightness(0.7) saturate(0.85); } 100% { filter: none; scale: 1; } }
@keyframes hudGlobeIn { from { opacity: 0; scale: 0.82; } to { opacity: 1; scale: 1; } }
@keyframes hudBarIn { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }
@keyframes hudRise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
@keyframes hudPanelIn { from { opacity: 0; translate: var(--hp-from, 0) 16px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Plan 3 : panneaux flottants ---------- */
.hp {
  position: relative; flex: 1 1 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px 12px;
  background: linear-gradient(150deg, rgba(99, 231, 255, 0.07), transparent 38%), var(--cin-glass);
  border: 1px solid var(--cin-line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 0 30px rgba(40, 170, 230, 0.05), 0 18px 40px rgba(0, 0, 0, 0.28);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  animation: hpFloat 9s ease-in-out infinite;
}
.hp::before { content: ""; position: absolute; top: 0; left: 18px; width: 64px; height: 2px; background: var(--cin-cyan); box-shadow: 0 0 10px rgba(99, 231, 255, 0.7); }
.hp::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 2px; background: var(--cin-orange); box-shadow: 0 0 8px rgba(255, 106, 44, 0.6); }
.cin-col--left .hp { transform: rotateY(3deg); transform-origin: right center; }
.cin-col--right .hp { transform: rotateY(-3deg); transform-origin: left center; }
.cin-col .hp:nth-child(2) { animation-delay: -3s; }
.cin-col .hp:nth-child(3) { animation-delay: -6s; }
.cin-col--right .hp { animation-duration: 11s; }
.hp--mission { flex-grow: 1.25; border-color: rgba(99, 231, 255, 0.46); }
.hp--alert { flex-grow: 1.2; border-color: rgba(255, 106, 44, 0.55); background: linear-gradient(150deg, rgba(255, 106, 44, 0.1), transparent 45%), var(--cin-glass); }
.hp--alert::before { background: var(--cin-orange); box-shadow: 0 0 10px rgba(255, 106, 44, 0.7); }
.hp--danger { border-color: rgba(255, 92, 108, 0.45); }
@keyframes hpFloat { 50% { translate: 0 -4px; } }

.hp__head { display: flex; align-items: center; gap: 10px; }
.hp__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cin-cyan-light); opacity: 0.85; }
.hp--alert .hp__label { color: #ffc2a4; }
.hp__value { margin-left: auto; font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: #eefcff; line-height: 1; }
.hp__value small { margin-left: 5px; font-size: 12px; color: var(--jarvis-text-muted); letter-spacing: 0.04em; }
.hp__status { margin-left: auto; padding: 3px 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid currentColor; color: var(--cin-cyan); white-space: nowrap; }
.hp__status--success { color: #54e3a2; } .hp__status--warning { color: #ffb070; } .hp__status--danger { color: #ff7a88; } .hp__status--muted { color: var(--jarvis-text-muted); }
.hp__title { font-size: 17px; font-weight: 600; line-height: 1.3; color: #f2fdff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp__text { font-size: 14px; line-height: 1.45; color: #a9c6d2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp__bar { height: 4px; margin-top: 2px; background: rgba(99, 231, 255, 0.1); }
.hp__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cin-blue), var(--cin-cyan)); box-shadow: 0 0 12px rgba(99, 231, 255, 0.6); }
.hp--danger .hp__bar i { background: linear-gradient(90deg, #b8324a, #ff5c6c); box-shadow: 0 0 12px rgba(255, 92, 108, 0.5); }
.hp--warning .hp__bar i { background: linear-gradient(90deg, #c2561f, var(--cin-orange)); }
.hp__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--jarvis-text-muted); }
.hp__foot b { color: #e6faff; font-weight: 600; }
.hp__link { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cin-cyan); white-space: nowrap; }
.hp__link::after { content: " →"; }
.hp__link:hover { color: var(--cin-cyan-light); text-shadow: 0 0 10px rgba(99, 231, 255, 0.6); }
.hp__list { display: grid; gap: 6px; min-height: 0; overflow: hidden; }
.hp__list li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; color: #c7e3ec; }
.hp__list li b { justify-self: end; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; color: var(--jarvis-text-muted); }
.hp__list li > span:first-of-type { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.hp--tools .hp__list li > span:first-of-type, .hp--activity .hp__list li > span { font-family: var(--font-ui); letter-spacing: 0; font-size: 13px; }
.hp--activity time { font-family: var(--font-mono); font-size: 12px; color: var(--jarvis-text-muted); }
.hp__list--stack li { grid-template-columns: 1fr; gap: 2px; }
.hp__kind { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cin-orange); }
.hp__clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp__list--stack .hp__clip { font-size: 14px; color: #dff6fc; }
.hp__grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-content: center; }
.hp__cell { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid rgba(99, 231, 255, 0.35); }
.hp__cell b { font-family: var(--font-mono); font-size: 26px; font-weight: 500; line-height: 1.05; color: #f2fdff; }
.hp__cell span { font-size: 12px; color: var(--jarvis-text-muted); }
.hp__cell.is-warn { border-left-color: var(--cin-orange); } .hp__cell.is-warn b { color: #ffc2a4; }
.hp__cell.is-danger { border-left-color: #ff5c6c; } .hp__cell.is-danger b { color: #ff9aa5; }
.hp-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--jarvis-text-dim); flex: none; }
.hp-dot--ok { background: #3ddc97; box-shadow: 0 0 8px rgba(61, 220, 151, 0.7); }
.hp-dot--degraded { background: var(--cin-orange); box-shadow: 0 0 8px rgba(255, 106, 44, 0.7); }
.hp-dot--down { background: #ff5c6c; box-shadow: 0 0 8px rgba(255, 92, 108, 0.7); }

/* Lignes de rappel des colonnes vers le noyau */
.cin-col--left::after, .cin-col--right::after { content: ""; position: absolute; top: 50%; width: clamp(20px, 2.4vw, 44px); height: 1px; background: linear-gradient(90deg, rgba(99, 231, 255, 0.6), rgba(99, 231, 255, 0.05)); }
.cin-col--left::after { left: 100%; }
.cin-col--right::after { right: 100%; transform: scaleX(-1); }

/* ---------- Plan 2 : noyau holographique ---------- */
.cin-core { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; text-align: center; }
.cin-core__head { display: grid; justify-items: center; gap: 4px; }
.cin-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--cin-cyan-light); opacity: 0.75; }
.cin-title { font-family: var(--font-mono); font-size: clamp(34px, 3vw, 48px); font-weight: 500; letter-spacing: 0.42em; margin-right: -0.42em; line-height: 1.05; color: #effdff; text-shadow: 0 0 28px rgba(99, 231, 255, 0.35); }
.cin-sub { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #a9c6d2; }
.cin-sub time { color: #effdff; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

.globe {
  --g: min(46vh, 30vw, 520px);
  --arc: var(--cin-cyan);
  position: relative; width: var(--g); height: var(--g); margin-top: clamp(8px, 2.5vh, 30px);
  transform-style: preserve-3d;
  transform: translate3d(calc(var(--px) * 6px), calc(var(--py) * 4px), 0) rotateX(calc(var(--py) * -4deg)) rotateY(calc(var(--px) * 5deg));
  transition: transform 0.2s linear;
}
.globe--warning { --arc: var(--cin-orange); } .globe--danger { --arc: #ff5c6c; } .globe--success { --arc: #3ddc97; }
.globe > i, .globe__canvas, .globe__orbit { position: absolute; border-radius: 50%; }
.globe__canvas { inset: 0; width: 100%; height: 100%; }
.globe__ticks { inset: -13%; background: repeating-conic-gradient(from 0deg, rgba(99, 231, 255, 0.55) 0 0.5deg, transparent 0.5deg 5deg); -webkit-mask: radial-gradient(circle, transparent 47.5%, #000 48%, #000 50%, transparent 50.5%); mask: radial-gradient(circle, transparent 47.5%, #000 48%, #000 50%, transparent 50.5%); opacity: 0.6; animation: spin 140s linear infinite; }
.globe__arc { inset: -9%; background: conic-gradient(var(--arc) calc(var(--p) * 1turn), rgba(99, 231, 255, 0.08) 0); -webkit-mask: radial-gradient(circle, transparent 48.4%, #000 48.8%, #000 50%, transparent 50.4%); mask: radial-gradient(circle, transparent 48.4%, #000 48.8%, #000 50%, transparent 50.4%); filter: drop-shadow(0 0 6px var(--arc)); }
.globe__ring { inset: -4%; border: 1px solid rgba(99, 231, 255, 0.3); box-shadow: 0 0 18px rgba(99, 231, 255, 0.08), inset 0 0 18px rgba(99, 231, 255, 0.05); }
.globe__ring--a { transform: rotateX(74deg); animation: ringA 26s linear infinite; border-top-color: rgba(255, 106, 44, 0.65); }
.globe__ring--b { inset: 2%; transform: rotateY(70deg); animation: ringB 34s linear infinite reverse; }
.globe__ring--c { inset: -18%; border-style: dashed; border-color: rgba(99, 231, 255, 0.18); transform: rotateX(64deg) rotateY(18deg); animation: ringC 48s linear infinite; }
@keyframes ringA { from { transform: rotateX(74deg) rotateZ(0); } to { transform: rotateX(74deg) rotateZ(360deg); } }
@keyframes ringB { from { transform: rotateY(70deg) rotateZ(0); } to { transform: rotateY(70deg) rotateZ(360deg); } }
@keyframes ringC { from { transform: rotateX(64deg) rotateY(18deg) rotateZ(0); } to { transform: rotateX(64deg) rotateY(18deg) rotateZ(360deg); } }
.globe__scan { inset: 6%; overflow: hidden; }
.globe__scan::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: linear-gradient(90deg, transparent, rgba(184, 247, 255, 0.85), transparent); box-shadow: 0 0 14px rgba(99, 231, 255, 0.7); animation: globeScan 5.5s ease-in-out infinite; }
@keyframes globeScan { 0%, 100% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translateY(calc(var(--g) * 0.88)); opacity: 1; } 60% { opacity: 0; } }
.globe__orbit { inset: -26%; animation: spin 60s linear infinite; }
.globe__orbit b { position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--cin-cyan); box-shadow: 0 0 12px var(--cin-cyan); }
.globe__orbit b:nth-child(1) { transform: rotate(20deg) translateX(calc(var(--g) * 0.76)); }
.globe__orbit b:nth-child(2) { transform: rotate(140deg) translateX(calc(var(--g) * 0.76)); background: var(--cin-orange); box-shadow: 0 0 12px var(--cin-orange); }
.globe__orbit b:nth-child(3) { transform: rotate(230deg) translateX(calc(var(--g) * 0.76)); width: 5px; height: 5px; }
.globe__orbit b:nth-child(4) { transform: rotate(310deg) translateX(calc(var(--g) * 0.76)); width: 4px; height: 4px; }
.globe__tag { position: absolute; display: grid; gap: 2px; padding: 6px 10px; text-align: left; white-space: nowrap; background: rgba(2, 12, 18, 0.55); border: 1px solid rgba(99, 231, 255, 0.28); border-left: 2px solid var(--cin-cyan); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transform: translateZ(40px); }
.globe__tag small { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #8fb6c4; }
.globe__tag b { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: #effdff; }
.globe__tag--nw { top: 6%; left: -22%; } .globe__tag--ne { top: 6%; right: -22%; }
.globe__tag--sw { bottom: 8%; left: -24%; } .globe__tag--se { bottom: 8%; right: -24%; border-left-color: var(--cin-orange); }

.cin-state { margin-top: clamp(10px, 2.2vh, 26px); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.34em; margin-right: -0.34em; color: var(--cin-cyan-light); text-shadow: 0 0 14px rgba(99, 231, 255, 0.5); }
.cin-state[data-state="awaiting"] { color: #ffc2a4; } .cin-state[data-state="error"] { color: #ff9aa5; } .cin-state[data-state="success"] { color: #8ff0c4; }
.cin-next { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; max-width: 100%; font-size: 14px; color: #dff6fc; }
.cin-next span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cin-orange); }
.cin-next small { font-size: 12px; color: var(--jarvis-text-muted); }

/* ---------- Hauteurs et largeurs réduites ---------- */
@media (max-height: 860px) and (min-width: 981px) {
  .cin-col .hp:nth-child(3) { display: none; }
  .globe { --g: min(44vh, 28vw, 440px); }
  .cin-next { display: none; }
}
@media (max-width: 1360px) and (min-width: 981px) {
  .cin { grid-template-columns: minmax(250px, 24vw) minmax(0, 1fr) minmax(250px, 24vw); }
  .globe__tag--nw, .globe__tag--sw { left: -12%; } .globe__tag--ne, .globe__tag--se { right: -12%; }
}

/* ---------- Pages fonctionnelles : paysage visible mais sourd ---------- */
body:not(.cinematic-home-active) .shell .panel,
body:not(.cinematic-home-active) .shell .mcard,
body:not(.cinematic-home-active) .shell .tool,
body:not(.cinematic-home-active) .shell .mem,
body:not(.cinematic-home-active) .shell .pnode,
body:not(.cinematic-home-active) .shell .approval,
body:not(.cinematic-home-active) .shell .row { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- Mobile : paysage fixe, pas de casque ---------- */
@media (max-width: 980px) {
  .helmet { display: none; }
  .env__layer { inset: 0; transform: none; }
  .env__layer--sky canvas, .env__fog, .env__glow { animation: none; }
  .env__shade { background: radial-gradient(ellipse 90% 60% at 50% 30%, rgba(1, 6, 10, 0.2), rgba(1, 6, 10, 0.72)); }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .env__layer, .helmet, .cin-col, .globe { transform: none !important; }
  .env__layer--sky canvas, .env__fog, .helmet__led, .hp, .globe__ticks, .globe__ring, .globe__scan::before, .globe__orbit { animation: none !important; }
}
html.no-motion .env__layer, html.no-motion .helmet, html.no-motion .cin-col, html.no-motion .globe { transform: none !important; }
html.no-motion .env__layer--sky canvas, html.no-motion .env__fog, html.no-motion .helmet__led, html.no-motion .hp, html.no-motion .globe__ticks, html.no-motion .globe__ring, html.no-motion .globe__scan::before, html.no-motion .globe__orbit { animation: none !important; }

/* Étapes dans le panneau Mission */
.hp__steps { flex: 1 1 auto; display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow: hidden; margin-top: 4px; }
.hp__foot { flex: none; }
.hp__step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 8px; font-size: 13px; color: #c7e3ec; border-left: 2px solid rgba(99, 231, 255, 0.18); background: rgba(99, 231, 255, 0.03); }
.hp__stepn { font-family: var(--font-mono); font-size: 11px; color: var(--jarvis-text-muted); }
.hp__step b { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--jarvis-text-muted); }
.hp__step--success b { color: #54e3a2; } .hp__step--success .hp__clip { color: #9fbac4; }
.hp__step--warning b { color: #ffb070; } .hp__step--danger b { color: #ff7a88; } .hp__step--primary b { color: var(--cin-cyan); }
.hp__step.is-current { border-left-color: var(--cin-cyan); background: rgba(99, 231, 255, 0.08); }
.hp__step--warning.is-current { border-left-color: var(--cin-orange); background: rgba(255, 106, 44, 0.08); }
.hp__step--danger.is-current { border-left-color: #ff5c6c; background: rgba(255, 92, 108, 0.08); }
.hp__step[hidden] { display: none; }

/* Scène en perspective pour l'entrée latérale des éléments */
.view { perspective: 1600px; }
@media (prefers-reduced-motion: reduce) { .env, .helmet, .env__layer--photo { animation: none !important; transition: none !important; } .env__layer, .helmet { translate: none !important; rotate: none !important; } }
html.no-motion .env, html.no-motion .helmet, html.no-motion .env__layer--photo { animation: none !important; }
html.no-motion .env__layer, html.no-motion .helmet { translate: none !important; rotate: none !important; }
/* Mobile : pas de rotation de tête ni de balancement, le paysage reste calé */
@media (max-width: 980px) { .env__layer, .helmet { translate: none; rotate: none; } .env, .helmet { animation: none; } }
