/* Le socle commun : remise à zéro, ciel, étoile guide, séance, vitesse lumière.
   Chaque univers pose ses couleurs et ses polices par-dessus, avec les mêmes noms de variables. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--fond); color: var(--texte); }
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Le ciel est derrière tout. */
.ciel { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ciel canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ciel__fond { transition: opacity .6s linear; }
main, header, footer, nav { position: relative; z-index: 2; }

/* L'étoile guide et la supernova. */
.guide { position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none; will-change: transform; transition: opacity .25s linear; }
.guide__etoile { position: absolute; left: 0; top: 0; width: 160px; height: 160px; max-width: none; transform-origin: 0 0; mix-blend-mode: screen; }
.guide__sillage { position: absolute; left: 0; top: 0; width: 1px; height: 180px; transform-origin: 50% 100%; background: linear-gradient(to top, rgba(235,238,255,.7), rgba(235,238,255,0)); }
.supernova { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; mix-blend-mode: screen; }

/* La vitesse lumière. */
.warp { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; }

/* La séance du film. */
.seance { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: #000; opacity: 0; transition: opacity .6s cubic-bezier(.2,.7,.2,1); }
.seance.est-ouverte { opacity: 1; }
.seance.se-ferme { opacity: 0; }
.seance__video { width: 100%; height: 100%; object-fit: cover; }
.seance__phrase { position: absolute; left: 50%; bottom: 17vh; width: min(92vw, 1100px); transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity .5s ease; text-wrap: balance; }
.seance__phrase.est-visible { opacity: 1; }
.seance__bas { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 18px; }
.seance__barre { flex: 1; height: 1px; background: rgba(255,255,255,.2); }
.seance__barre i { display: block; height: 100%; background: rgba(255,255,255,.85); transform-origin: 0 50%; transform: scaleX(0); }
.seance__passer { background: none; border: 1px solid rgba(255,255,255,.4); padding: 8px 16px; cursor: pointer; }
.seance__passer:hover { border-color: #fff; }
.seance__tc { font-variant-numeric: tabular-nums; }

/* Le décodage : chaque lettre garde sa largeur. */
.decode { display: inline-block; white-space: nowrap; }
.decode > span { display: inline-block; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Sur téléphone, le repère de maquette se fait discret. */
@media (max-width: 600px) {
  .maquette { left: 8px !important; bottom: 8px !important; padding: 5px 8px !important; font-size: .72rem !important; gap: 8px !important; white-space: nowrap; }
}
