/* =========================================================
   CEPF — Accueil « cinéma » : chapitres visuels plein écran
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

:root { --script: 'Great Vibes', cursive; }

body.cinema { background: #0a100e; color: var(--cream); }

/* ---------- film unique scrubbé ---------- */
.film { position: relative; height: 900vh; }
.film-stick {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; background: #0a100e;
}
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; }
.film-canvas.on { opacity: 1; }
.film-copy {
  position: absolute; left: clamp(22px, 5vw, 84px); bottom: clamp(26px, 6vh, 72px);
  z-index: 3; max-width: 30ch;
  opacity: 0; transform: translateY(30px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.film-copy.on { opacity: 1; transform: none; pointer-events: auto; }
.film-copy.seq:first-of-type { max-width: 21ch; bottom: auto; top: 50%; }
.film-copy.seq:first-of-type.on { transform: translateY(-50%); }
.film-copy.seq:first-of-type { transform: translateY(calc(-50% + 30px)); }

/* ---------- chapitres ---------- */
.chap { position: relative; height: 172vh; }
.chap-stick {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; background: #0a100e;
}
.chap-media {
  position: absolute; inset: -4% 0; will-change: transform;
  transform: scale(1.16);
}
.chap-media image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.chap-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* état vide : lisible sur fond sombre + ambiance crépuscule par chapitre */
.chap-media image-slot::part(frame) { background: transparent; }
.chap-media image-slot::part(empty) { color: rgba(233,240,235,.8); font-size: 15px; }
.chap-stick { background: radial-gradient(ellipse 90% 70% at 50% 38%, #14332f 0%, #0c1a18 55%, #070f0d 100%); }
.chap:nth-of-type(2) .chap-stick { background: radial-gradient(ellipse 90% 70% at 50% 42%, #2a1d10 0%, #171009 55%, #0a0806 100%); }
.chap:nth-of-type(3) .chap-stick { background: radial-gradient(ellipse 90% 70% at 50% 42%, #2b2212 0%, #17120a 55%, #0b0906 100%); }
.chap:nth-of-type(4) .chap-stick { background: radial-gradient(ellipse 90% 70% at 50% 42%, #26160e 0%, #140d08 55%, #090705 100%); }
.chap:nth-of-type(5) .chap-stick { background: radial-gradient(ellipse 90% 70% at 50% 42%, #102b33 0%, #0a181d 55%, #060d10 100%); }
.chap-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,12,10,.42) 0%, transparent 26%),
    linear-gradient(200deg, transparent 42%, rgba(4,10,9,.72) 96%);
}

/* ---------- texte de chapitre ---------- */
.chap-copy {
  position: absolute; left: clamp(22px, 5vw, 84px); bottom: clamp(26px, 6vh, 72px);
  z-index: 3; max-width: min(88vw, 640px);
}
.chap-tag {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--lagoon-br); display: block; margin-bottom: .4em;
}
.chap-script {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3.4rem, 8.5vw, 7.2rem); line-height: .95;
  color: var(--cream); text-shadow: 0 4px 40px rgba(0,0,0,.55);
  display: block;
}
.chap-line {
  font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 500;
  color: rgba(240,244,240,.85); margin-top: .55em; text-wrap: pretty; max-width: 34ch;
}
.chap-copy .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.chap-copy .rv.d1 { transition-delay: .12s; }
.chap-copy .rv.d2 { transition-delay: .24s; }
.chap.seen .chap-copy .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .chap-copy .rv { opacity: 1; transform: none; transition: none; }
  .chap-media { transform: none !important; }
}

/* ---------- hero ---------- */
.chap.hero .chap-copy {
  max-width: min(88vw, 760px);
  bottom: auto; top: max(50%, 300px); transform: translateY(-50%);
}
.hero-title {
  font-family: var(--serif); font-weight: 600; line-height: 1.02; letter-spacing: -.01em;
  font-size: clamp(2.8rem, 6.6vw, 6rem); color: var(--cream);
  text-shadow: 0 6px 60px rgba(0,0,0,.6);
  max-width: 13ch;
}
.hero-title .it { font-style: italic; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }
.hero-eyebrow {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--lagoon-br); display: block; margin-bottom: 1.3em;
}
.cin-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: .8em; white-space: nowrap;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(240,244,240,.6);
}
.cin-hint i { width: 1px; height: 34px; background: linear-gradient(var(--lagoon-br), transparent); display: block; animation: cinDrop 1.8s ease infinite; }
@keyframes cinDrop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { .cin-hint i { animation: none; } }

/* ---------- finale ---------- */
.finale {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; background: #0a100e; padding: 18vh 24px;
}
.finale .chap-script { font-size: clamp(3rem, 7vw, 5.6rem); color: var(--lagoon-br); }
.finale h2 {
  font-size: clamp(2.2rem, 4.6vw, 4rem); color: var(--cream); margin-top: .1em;
}
.finale .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 2.2em; }
.finale .fin-tel {
  display: block; margin-top: 2.6em;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: rgba(240,244,240,.55);
}
.finale .fin-tel a { color: var(--lagoon-br); }
.fin-prompts {
  display: inline-block; margin-top: 1.4em;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(240,244,240,.45); border-bottom: 1px dotted rgba(240,244,240,.35); padding-bottom: 2px;
}
.fin-prompts:hover { color: var(--lagoon-br); }

/* liens par défaut */
body.cinema a { color: var(--lagoon-br); }
body.cinema a:hover { color: var(--cream); }
body.cinema .btn, body.cinema .nav-links a, body.cinema .mobile-menu a { color: inherit; }

@media (max-width: 720px) {
  .chap { height: 150vh; }
  .chap-copy { max-width: 88vw; }
}
@media (max-height: 620px) {
  .chap.hero .chap-copy { top: auto; bottom: 60px; transform: none; }
}

.film-loading { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; font: 500 .72rem/1 var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); background: rgba(10,22,26,.55); backdrop-filter: blur(8px); padding: 10px 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); animation: filmLoadPulse 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes filmLoadPulse { 50% { opacity: .45; } }

/* Barre de chargement à pourcentage */
.film-loadbar { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 60; width: min(440px, 74vw); pointer-events: none; transition: opacity .6s ease; }
.film-loadbar.done { opacity: 0; }
.film-loadbar .flb-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font: 500 .68rem/1 var(--mono, monospace); letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.film-loadbar .flb-pct { font-family: var(--serif, Georgia, serif); font-size: 1.3rem; letter-spacing: 0; color: #fff; }
.film-loadbar .flb-track { position: relative; height: 1px; background: rgba(255,255,255,.18); overflow: hidden; }
.film-loadbar .flb-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--lagoon-br, #6fe3ec); box-shadow: 0 0 12px var(--lagoon-br, #6fe3ec); transition: width .25s cubic-bezier(.3,.8,.3,1); }
/* mots sympas près du curseur */
.film-loadword { position: fixed; left: 0; top: 0; z-index: 61; pointer-events: none; transform: translate(14px, 14px); font: 500 .66rem/1 var(--mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.9); text-shadow: 0 2px 12px rgba(0,0,0,.6); opacity: 0; transition: opacity .35s ease; white-space: nowrap; }
.film-loadword.on { opacity: 1; }
@media (hover: none) { .film-loadword { display: none; } }
