/* ═══════════════════════════════════════════════
   style.css — ANOMALIA
   ═══════════════════════════════════════════════ */

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  cursor: none;
}

/* ── Canvas particules ambiantes ─────────────────
   Légèrement oversizé (+ PAD px de chaque côté)
   pour que le parallaxe ne révèle pas les bords. */
#c-ambient {
  position: fixed;
  left: -72px;
  top:  -72px;
  width:  calc(100% + 144px);
  height: calc(100% + 144px);
  pointer-events: none;
  z-index: 1;
  /* transform appliqué par parallax.js */
}

/* ── Canvas hyperespace ──────────────────────────
   Au-dessus des particules, en dessous du vignette.
   Caché par défaut, opacity géré par particles.js */
#c-hyper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity .4s ease;
}

/* ── Vignette radiale ────────────────────────────
   Encadre la scène, donne la sensation d'espace. */
#vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.7) 100%);
  pointer-events: none;
  z-index: 4;
}

/* ── Lumières divines ────────────────────────────
   Gérées dynamiquement par lights.js            */
/* (z-index: 5, inséré en ligne dans le DOM)     */

/* ── Texte principal ─────────────────────────────
   Centré, flottant, intemporel.                  */
#t {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-size: clamp(.98rem, 2.1vw, 1.55rem);
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1.9;
  color: rgba(232, 234, 255, .87);
  text-align: center;
  max-width: min(600px, 88vw);
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  z-index: 10;
  /* transition géré dynamiquement par text.js */
}

/* Voix des dieux — italique, teinte bleue-violette */
#t.italic {
  font-style: italic;
  color: rgba(160, 170, 255, .62);
  font-size: clamp(.88rem, 1.85vw, 1.28rem);
  letter-spacing: .13em;
}

/* Texte final de l'Acte III */
#t.final {
  font-size: clamp(.68rem, 1.32vw, .9rem);
  letter-spacing: .3em;
  color: rgba(192, 198, 218, .4);
  font-weight: 300;
  line-height: 2.4;
}

/* Animation de tremblement — organique, pas mécanique */
@keyframes tremble {
  0%,  100% { transform: translate(-50%, -50%) translate(   0,     0  ); }
  12%        { transform: translate(-50%, -50%) translate(-1.8px,  .6px); }
  27%        { transform: translate(-50%, -50%) translate( 1.2px, -.9px); }
  43%        { transform: translate(-50%, -50%) translate(  -.6px, 1.4px); }
  58%        { transform: translate(-50%, -50%) translate( 1.7px, -.5px); }
  73%        { transform: translate(-50%, -50%) translate( -.9px,  .9px); }
  88%        { transform: translate(-50%, -50%) translate(  .7px, -.7px); }
}

#t.shake {
  animation: tremble 1.3s ease-in-out infinite;
}

/* ── Boutons de choix ────────────────────────────
   Invisibles jusqu'à l'Acte II.
   Les deux options mènent au même résultat.      */
#ch {
  position: fixed;
  top: 64%; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(2.5rem, 6vw, 5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s ease;
  z-index: 15;
}

#ch.on {
  opacity: 1;
  pointer-events: all;
}

.btn {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.36);
  font-family: 'Palatino Linotype', Palatino, serif;
  font-size: clamp(.6rem, 1.1vw, .78rem);
  letter-spacing: .26em;
  text-transform: uppercase;
  padding: .28rem .4rem .38rem;
  cursor: pointer;
  transition: color .32s, border-color .32s;
  white-space: nowrap;
}

.btn:hover {
  color: rgba(255,255,255,.82);
  border-color: rgba(255,255,255,.42);
}

/* ── Indice fugace ───────────────────────────────
   Apparaît brièvement au début, puis disparaît.  */
#hint {
  position: fixed;
  bottom: 8vh; left: 50%;
  transform: translateX(-50%);
  font-family: 'Palatino Linotype', Palatino, serif;
  font-size: .56rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: rgba(255,255,255,.1);
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  user-select: none;
  z-index: 10;
}

/* ── Curseur personnalisé ────────────────────────*/
#dot {
  position: fixed;
  width: 3px; height: 3px;
  background: rgba(255,255,255,.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
}
