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

html { background: #000; }
body {
  background: #000;
  overflow-x: hidden;
}

/* ── Canvas plein écran ── */
#canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
}

/* ── Loader ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  transition: opacity 0.6s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
#loader-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px; width: 0%;
  background: #fff;
  transition: width 0.1s ease;
}

/* ── Scroll container ── */
#scroll-container {
  position: relative;
  height: 500vh;
}


/* ══════════════════════════════════════════
   TEXTE — blocs fixes sur la vidéo
════════════════════════════════════════════ */

/* Base bloc texte */
.tb {
  position: fixed;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
  /* transition gérée en JS via RAF */
}
.tb-cta { pointer-events: auto; }

/* Ombrage pour lisibilité sur vidéo */
.tb h1, .tb h2, .tb p, .tb a {
  text-shadow: 0 2px 20px rgba(0,0,0,0.65), 0 0 60px rgba(0,0,0,0.35);
}


/* ── Positions ── */
.pos-center {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90vw;
}

.pos-bottom-left {
  bottom: 15%; left: 8%;
  max-width: 48ch;
}

.pos-left {
  top: 30%; left: 8%;
  max-width: 45ch;
}

.pos-right {
  top: 35%; right: 8%;
  text-align: right;
  max-width: 38ch;
}

.pos-center-bottom {
  bottom: 16%; left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 90vw;
}

.pos-top-right {
  top: 12%; right: 8%;
  text-align: right;
}

.pos-center-left {
  top: 50%; left: 8%;
  transform: translateY(-50%);
}

.pos-bottom-right {
  bottom: 15%; right: 8%;
  text-align: right;
}


/* ══════════════════════════════════════════
   TYPOGRAPHIE
════════════════════════════════════════════ */

/* Hero title — PLAN 0 */
.t-hero {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 10vw, 11rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
}

/* Section title — PLAN 1A, 3A, 4C */
.t-section {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.03em;
  color: #fff;
  text-transform: uppercase;
}

/* Corps narratif */
.t-body {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  font-weight: 400;
  line-height: 1.65;
  color: #fff;
}
.t-body.t-large {
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  line-height: 1.6;
}
.t-italic  { font-style: italic; }
.t-center  { text-align: center; }
.t-right   { text-align: right; }

/* Sous-titre plan 0 */
.t-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.3rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
  margin-top: 1.8rem;
}

/* Noms */
.t-names {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  margin-top: 1.2rem;
  letter-spacing: 0.03em;
}

/* Monospace gros chiffre */
.t-mono-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(3.5rem, 12vw, 14rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  -webkit-text-stroke: 1px rgba(0,0,0,0.1);
}
/* Monospace moyen */
.t-mono-med {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 5.5vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}
.t-accent { color: #FF4500; }

/* Itinéraire */
.t-route {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.75rem, 1vw, 1rem);
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.08em;
  margin-top: 1.5rem;
  line-height: 1.8;
}

/* Transition stagger — enfants invisibles par défaut */
.tb-transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.t-stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.t-stagger.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── Scroll hint (PLAN 0) ── */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
}
.scroll-arrow {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.5);
  animation: arrowBounce 1.8s ease-in-out infinite;
}
.scroll-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(6px); opacity: 1; }
}


/* ── CTA final ── */
.tb-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}
.cta-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.75rem, 1vw, 1rem);
  color: #FF4500;
  pointer-events: auto;
  text-shadow: 0 2px 20px rgba(0,0,0,0.65);
  transition: opacity 0.2s;
}
.cta-email:hover { opacity: 0.8; }
.cta-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.85rem, 1vw, 1rem);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.7);
  padding: 14px 36px;
  pointer-events: auto;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  text-shadow: none;
  letter-spacing: 0.05em;
}
.cta-btn:hover {
  background: #fff;
  color: #0B1D3A;
}


/* ── Mobile ── */
@media (max-width: 768px) {
  .pos-left, .pos-right,
  .pos-bottom-left, .pos-bottom-right,
  .pos-center-left {
    left: 5%;
    right: 5%;
    top: auto;
    bottom: 12%;
    max-width: 100%;
    text-align: left;
  }
  .pos-top-right {
    top: 8%; right: 5%;
  }
  .t-body { font-size: 1rem; }
  .t-route { font-size: 0.7rem; letter-spacing: 0.04em; }
  .t-mono-big { font-size: clamp(3rem, 18vw, 7rem); }
  .t-mono-med { font-size: clamp(1.8rem, 8vw, 4rem); }
}
