/* ============================================================
   JARVIS : cinématiques « Hyperespace » (.ch*) et « Broadcast » (.cb*) (Claude Code, 26/09/2026).
   L'aiguillage (assets/cinematics.js) pose #loading[data-cine] : chaque cinématique
   n'affiche que ses propres calques ; boutons Son / Passer et crochets restent communs.
   Vidéos du pack Envato en fusion lumineuse (screen) sur fond noir.
   ============================================================ */
#loading[data-cine="hyper"] :is(.rv__globe, .rv__cam, .rv__slots-wrap, .rv__welcome, #rvBeat, #rvSeq, #rvOnline, .rvp, .rvb, .rvl, .rvd, .rvs),
#loading[data-cine="broadcast"] :is(.rv__lofi, .rv__globe, .rv__cam, .rv__slots-wrap, .rv__welcome, #rvBeat, #rvSeq, #rvOnline, .rvp, .rvb, .rvl, .rvd, .rvs) { display: none !important; }
#loading:not([data-cine="hyper"]) .ch, #loading:not([data-cine="broadcast"]) .cb { display: none !important; }
.ch, .cb { visibility: hidden; opacity: 0; pointer-events: none; }

/* ---------- Hyperespace ---------- */
.ch { --core: min(52vh, 460px); position: absolute; inset: 0; z-index: 3; overflow: hidden; background: #020408; }
.ch__warp { position: absolute; inset: 0; width: 100%; height: 100%; }
.ch__vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; pointer-events: none; }
.ch__core { position: absolute; left: calc(50% - var(--core) / 2); top: calc(47% - var(--core) / 2); width: var(--core); height: var(--core); display: grid; place-items: center; }
.ch__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch__ring * { transform-box: view-box; transform-origin: 0 0; }
.ch__ticks line { stroke: rgba(170, 220, 255, .55); stroke-width: 1.2; }
.ch__c { fill: none; stroke: #dff4ff; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(127, 211, 255, .8)); }
.ch__c--thin { stroke-width: 1; opacity: .6; }
.ch__c--dash { stroke-dasharray: 2 8; opacity: .7; }
.ch__spin { animation: scSpin 12s linear infinite; }
.ch__ticks { animation: scSpin 60s linear infinite reverse; }
.ch__hex polygon { fill: rgba(223, 245, 255, .92); stroke: rgba(127, 211, 255, .9); stroke-width: 1; }
/* Le mot tient toujours sur une ligne : sans ce plafond, le S passait seul à la ligne sur un écran 1920 × 1080 (26/09). */
.ch__logo { position: relative; margin: 0; padding-left: .62em; font-family: var(--font-ui); font-size: min(clamp(34px, 6vh, 64px), calc(var(--core) * .1)); font-weight: 300; letter-spacing: .62em; white-space: nowrap; color: #f2fbff; text-shadow: 0 0 18px rgba(127, 211, 255, .9), 0 0 40px rgba(60, 160, 255, .5); }
.ch__logo span { display: inline-block; }
.ch__steps { position: absolute; left: calc(50% + var(--core) * .62); top: 47%; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; transform: translateY(-50%); font-family: var(--font-mono); text-transform: uppercase; }
.ch__steps li { display: flex; align-items: center; gap: 10px; min-width: 210px; font-size: 12px; letter-spacing: .18em; color: rgba(223, 245, 255, .82); }
.ch__steps li i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgba(223, 245, 255, .3); }
.ch__steps li.is-ok i { background: #8fdcaa; box-shadow: 0 0 8px #8fdcaa; }
.ch__steps b { margin-left: auto; padding-left: 14px; font-weight: 500; color: #8fdcaa; }
.ch__foot { position: absolute; left: 0; right: 0; top: calc(47% + var(--core) * .56); display: grid; gap: 8px; justify-items: center; padding: 0 16px; text-align: center; }
.ch__tag { margin: 0; font-family: var(--font-ui); font-size: clamp(18px, 2.4vw, 26px); font-weight: 300; color: #f2fbff; }
.ch__tag b { font-weight: 500; }
.ch__link { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: rgba(223, 245, 255, .7); }
.ch__link b { color: #ffb36b; font-weight: 500; }
.ch__online { position: absolute; left: 0; right: 0; top: calc(47% - var(--core) * .66); margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: .4em; text-align: center; text-transform: uppercase; color: #ffd8b0; text-shadow: 0 0 14px rgba(255, 138, 44, .8); }

/* ---------- Broadcast ---------- */
.cb { --rings: min(46vh, 480px); position: absolute; inset: 0; z-index: 3; overflow: hidden; background: #030405; font-family: var(--font-mono); color: #eef2f5; }
.cb__v { display: block; width: 100%; height: auto; mix-blend-mode: screen; }
.cb__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cb__stage { position: absolute; inset: 0; transform-origin: 50% 50%; }
.cb__el { position: absolute; margin: 0; }
.cb__el figcaption { margin-top: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(238, 242, 245, .78); }
.cb__el figcaption b { font-weight: 500; color: #ff8a2c; }
.cb__el--star { left: 3%; top: 13%; width: min(26vw, 380px); }
.cb__el--chart { left: 3%; bottom: 17%; width: min(28vw, 420px); }
.cb__el--nodes { right: 3%; top: 13%; width: min(28vw, 420px); }
.cb__el--grid { right: 4%; bottom: 17%; width: min(18vw, 280px); }
.cb__el--gauge { right: calc(4% + min(18vw, 280px) + 28px); bottom: 17%; width: min(11vw, 170px); }
.cb__el--rings { left: calc(50% - var(--rings) / 2); top: calc(48% - var(--rings) / 2); width: var(--rings); }
.cb__core { position: absolute; inset: 34%; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center; }
.cb__core small { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(238, 242, 245, .8); }
.cb__core b { font-size: clamp(30px, 5vh, 48px); font-weight: 500; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.cb__core b::after { content: "%"; margin-left: 2px; font-size: .4em; }
.cb__title { position: absolute; left: 3%; top: 4%; margin: 0; font-family: var(--font-ui); font-size: clamp(22px, 3.2vw, 44px); font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: #fff; }
.cb__slash { margin-right: 6px; color: #ff8a2c; }
.cb__caret { display: inline-block; width: .5em; height: .12em; margin-left: 6px; background: #ff8a2c; animation: cbBlink .8s steps(2, jump-none) infinite; }
@keyframes cbBlink { 50% { opacity: 0; } }
.cb__lower { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%); }
.cb__bar { position: absolute; left: 0; right: 0; bottom: -8px; height: 3px; background: #ff8a2c; transform-origin: left; box-shadow: 0 0 12px rgba(255, 138, 44, .7); }
.cb__lower p { display: grid; gap: 4px; margin: 0; padding: 10px 18px; border-left: 3px solid #ff8a2c; background: rgba(8, 10, 12, .72); }
.cb__lower small { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: rgba(238, 242, 245, .72); }
.cb__lower b { font-family: var(--font-ui); font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; white-space: nowrap; color: #fff; }
.cb__ticker { position: absolute; left: 0; right: 0; bottom: 5%; height: 34px; overflow: hidden; border-block: 1px solid rgba(255, 255, 255, .14); background: rgba(8, 10, 12, .6); }
.cb__ticker p { display: inline-flex; align-items: center; gap: 18px; height: 100%; margin: 0; white-space: nowrap; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.cb__ticker i { font-style: normal; color: #ff8a2c; }

/* Final « HUD Logo Reveal » : le matte hexagonal du pack, inversé, multiplie la régie vers le noir */
.cb__hex { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; pointer-events: none; }
.cb__fin { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.cb__dust { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.cb__mark { position: relative; display: grid; justify-items: center; gap: 20px; padding: 0 16px; text-align: center; }
.cb__emblem { width: clamp(44px, 6.5vh, 64px); height: auto; overflow: visible; }
.cb__emblem-out { fill: none; stroke: rgba(238, 242, 245, .85); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.cb__emblem-in { opacity: 0; }
.cb__emblem-in polygon { fill: #ff8a2c; filter: drop-shadow(0 0 6px rgba(255, 138, 44, .9)); }
.cb__logo-wrap { position: relative; }
/* Le mot reste d'un seul tenant (Alexandre : le S ne doit jamais se détacher) : un seul nœud texte, jamais de retour à la ligne. */
.cb__logo { position: relative; margin: 0; padding-left: .14em; font-family: var(--font-ui); font-size: clamp(48px, 11vw, 136px); font-weight: 600; line-height: 1; letter-spacing: .14em; white-space: nowrap; color: #fff; opacity: 0; text-shadow: 0 0 2px rgba(255, 255, 255, .6), 0 0 32px rgba(255, 138, 44, .35); }
.cb__flare { position: absolute; left: 50%; top: 50%; width: 90vw; height: 140px; margin: -70px 0 0 -45vw; opacity: 0; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 226, 196, .95), rgba(255, 138, 44, .5) 16%, rgba(255, 138, 44, .1) 46%, transparent 72%); }
.cb__flare::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: linear-gradient(90deg, transparent, rgba(255, 190, 130, .9) 35%, #fff 50%, rgba(255, 190, 130, .9) 65%, transparent); }
.cb__rule { display: block; width: min(56vw, 620px); height: 2px; background: linear-gradient(90deg, transparent, #ff8a2c 20%, #ffd2a8 50%, #ff8a2c 80%, transparent); box-shadow: 0 0 12px rgba(255, 138, 44, .6); transform: scaleX(0); }
.cb__connect { display: inline-flex; align-items: center; gap: 14px; margin: 4px 0 0; font-size: 15px; letter-spacing: .42em; text-transform: uppercase; color: rgba(238, 242, 245, .88); }
.cb__spin { flex: none; width: 34px; height: 34px; overflow: visible; }
.cb__spin circle { fill: none; transform-box: fill-box; transform-origin: 50% 50%; }
.cb__spin-track { stroke: rgba(238, 242, 245, .16); stroke-width: 2; }
.cb__spin-arc { stroke: #ff8a2c; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 26 74; filter: drop-shadow(0 0 4px rgba(255, 138, 44, .8)); animation: cbSpin 1.1s linear infinite; }
.cb__spin-in { stroke: rgba(238, 242, 245, .75); stroke-width: 1.5; stroke-dasharray: 10 15; animation: cbSpin 2.4s linear infinite reverse; }
@keyframes cbSpin { to { transform: rotate(360deg); } }
.cb__dots { display: inline-flex; gap: 5px; margin-left: -.3em; }
.cb__dots b { width: 4px; height: 4px; border-radius: 50%; background: #ff8a2c; animation: cbDot 1.2s ease-in-out infinite; }
.cb__dots b:nth-child(2) { animation-delay: .2s; }
.cb__dots b:nth-child(3) { animation-delay: .4s; }
@keyframes cbDot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.cb.is-online .cb__spin-arc { stroke-dasharray: 100 0; animation: none; }
.cb.is-online :is(.cb__spin-in, .cb__dots) { opacity: 0; animation: none; }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  .ch { --core: min(78vw, 330px); }
  .ch__core { top: calc(38% - var(--core) / 2); }
  .ch__online { top: calc(38% - var(--core) * .66); }
  .ch__foot { top: calc(38% + var(--core) * .56); }
  .ch__steps { left: 50%; top: auto; bottom: 96px; grid-template-columns: 1fr 1fr; column-gap: 18px; transform: translateX(-50%); }
  .ch__steps li { min-width: 0; font-size: 10px; letter-spacing: .12em; }
  .cb { --rings: min(78vw, 340px); }
  .cb__el--chart, .cb__el--grid, .cb__el--gauge, .cb__el--nodes { display: none; }
  .cb__el--star { left: calc(50% - min(35vw, 150px)); top: 58%; width: min(70vw, 300px); }
  .cb__el--rings { top: calc(34% - var(--rings) / 2); }
  .cb__title { left: 16px; top: 64px; font-size: 20px; }
  .cb__lower { left: 16px; right: 16px; bottom: 16%; transform: none; }
  .cb__lower b { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .ch__spin, .ch__ticks, .cb__caret, .cb__spin circle, .cb__dots b { animation: none !important; } }
html.no-motion :is(.ch__spin, .ch__ticks, .cb__caret, .cb__spin circle, .cb__dots b) { animation: none !important; }
