/* Long Story, page « Générique de film » */

/* ---------- ouverture ---------- */
.opening { min-height: 100svh; display: flex; flex-direction: column; padding-top: var(--header-h); }
.opening .screen { position: relative; height: clamp(250px, 47svh, 600px); overflow: hidden; background: var(--ink-2); }
.opening .frame { position: absolute; inset: 0; }
.opening .frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 46%; transform: scale(1.12); }
.js .opening .frame img { animation: settle 9s var(--ease-out) .3s forwards; }
@keyframes settle { from { transform: scale(1.12); } to { transform: scale(1.0); } }
.opening .screen::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to bottom, rgba(14,13,12,0), rgba(14,13,12,.55)); pointer-events: none; }

.bar { display: none; }
.js .bar { display: block; position: absolute; left: 0; right: 0; height: 50.5%; background: var(--ink); z-index: 3;
  transition: transform 1.7s var(--ease-in-out); }
.js .bar.top { top: 0; }
.js .bar.bottom { bottom: 0; }
.opened .bar.top { transform: translateY(-101%); }
.opened .bar.bottom { transform: translateY(101%); }

.slate { position: absolute; left: var(--gutter); bottom: 18px; z-index: 2; margin: 0; font-size: 16px; color: var(--cream-2); letter-spacing: .01em; }
.js .slate { opacity: 0; transition: opacity 1s var(--ease-out) 1.6s; }
.opened .slate { opacity: 1; }

.opening-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0; padding: clamp(28px, 5svh, 64px) var(--gutter) clamp(36px, 6svh, 72px); max-width: var(--max); width: 100%; margin: 0 auto; }
.opening h1 { font-size: clamp(42px, 6.3vw, 96px); max-width: 15.5ch; }
.lede { margin: clamp(16px, 2.4svh, 26px) 0 0; font-size: clamp(17px, 1.55vw, 21px); color: var(--cream-2); max-width: 44ch; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 30px; margin-top: clamp(24px, 4svh, 40px); }
.offer { margin: 0; max-width: 36ch; font-size: 16px; line-height: 1.45; color: var(--cream-dim); }

.js .opening-copy > * { opacity: 0; transform: translateY(20px); filter: blur(6px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out); }
.opened .opening-copy > * { opacity: 1; transform: none; filter: none; }
.opened .opening-copy > :nth-child(1) { transition-delay: 1.15s; }
.opened .opening-copy > :nth-child(2) { transition-delay: 1.35s; }
.opened .opening-copy > :nth-child(3) { transition-delay: 1.5s; }

/* ---------- le film ---------- */
.film { position: relative; border-top: 1px solid var(--line); }
.film-track { --n: 10; --step: 64svh; position: relative; height: calc(var(--n) * var(--step) + 100svh); }
.stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header-h) + 12px) 0 clamp(24px, 5svh, 56px); overflow: hidden; }
.scenes { position: relative; height: min(41.8vw, 56svh); min-height: 220px; background: var(--ink-2); overflow: hidden; }
.scene { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.3s var(--ease-out); }
.scene.on { opacity: 1; }
.scene img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; transform: scale(1.08); transition: transform 2.4s var(--ease-out); }
.scene.on img { transform: scale(1); }
.scene[data-scene="city"] img { object-position: center 48%; }
.scene[data-scene="run"] img { object-position: center 55%; }
.scene[data-scene="cook"] img { object-position: center 35%; }
.scene.night img { filter: blur(16px) brightness(.62) saturate(1.25); transform: scale(1.22); }
.scene.night.on img { transform: scale(1.14); }
.scene::after { content: ""; position: absolute; inset: auto 0 0 0; height: 42%; background: linear-gradient(to bottom, rgba(14,13,12,0), rgba(14,13,12,.6)); }
.scene figcaption { position: absolute; left: var(--gutter); bottom: 16px; z-index: 1; font-size: 16px; color: var(--cream-2); letter-spacing: .01em; }

.reel { height: 1px; margin: 18px var(--gutter) 0; background: var(--line); position: relative; }
.reel span { position: absolute; inset: 0; background: var(--cream); transform: scaleX(var(--p, 0)); transform-origin: left center; }

.subtitles { list-style: none; margin: clamp(26px, 5svh, 52px) auto 0; padding: 0 var(--gutter); position: relative; width: 100%; max-width: 1100px; height: clamp(140px, 23svh, 230px); }
.subtitles li { position: absolute; left: var(--gutter); right: var(--gutter); top: 0; text-align: center; font-family: var(--serif); font-size: clamp(30px, 4.3vw, 60px); line-height: 1.06; letter-spacing: -.012em; text-wrap: balance;
  opacity: 0; transform: translateY(16px); filter: blur(8px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out); }
.subtitles li.on { opacity: 1; transform: none; filter: none; }
.subtitles li.big { font-size: clamp(54px, 8vw, 96px); }

/* sans défilement épinglé : la suite des phrases se lit simplement */
html:not(.js) .film-track, .no-pin .film-track { height: auto; }
html:not(.js) .stage, .no-pin .stage { position: static; height: auto; padding: 72px 0; }
html:not(.js) .scene:first-child, .no-pin .scene:first-child { opacity: 1; }
html:not(.js) .subtitles, .no-pin .subtitles { height: auto; }
html:not(.js) .subtitles li, .no-pin .subtitles li { position: static; opacity: 1; transform: none; filter: none; margin-bottom: 30px; }
.no-pin .reel { display: none; }

/* ---------- générique ---------- */
.credits { padding: clamp(120px, 17vw, 220px) var(--gutter) clamp(60px, 8vw, 110px); }
.credits-inner { max-width: 1000px; margin: 0 auto; }
.credits h2 { margin: 0 0 clamp(44px, 6vw, 72px); text-align: center; font-size: clamp(40px, 6vw, 80px); line-height: 1; }
.credits .crew-title { margin-top: clamp(120px, 15vw, 190px); }
.roll { margin: 0; }
.roll > div { display: grid; grid-template-columns: 1fr 1.5fr; gap: 0 40px; align-items: baseline; padding: 10px 0; }
.roll dt { text-align: right; font-size: 16px; color: var(--cream-dim); letter-spacing: .01em; }
.roll dd { margin: 0; font-family: var(--serif); font-size: clamp(25px, 2.7vw, 36px); line-height: 1.16; letter-spacing: -.01em; text-wrap: balance; }
.roll dd em { font-style: italic; }
.roll.crew > div { padding: 16px 0; border-top: 1px solid var(--line); }
.roll.crew > div:last-child { border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  .opening .screen { height: clamp(220px, 36svh, 380px); }
  .scenes { height: 57svh; }
  .subtitles { height: 150px; margin-top: 26px; }
  .stage { padding-bottom: 18px; }
  .scene figcaption, .slate { bottom: 12px; }
  .roll > div { grid-template-columns: 1fr; text-align: center; padding: 6px 0; }
  .roll dt { text-align: center; margin-bottom: 4px; }
  .roll dt:empty { display: none; }
  .roll.crew > div { padding: 18px 0; }
}
@media (max-height: 640px) and (max-width: 760px) {
  .scenes { height: 44svh; }
  .subtitles li { font-size: 28px; }
}

/* ordinateur : titre à gauche, appel à droite, tout dans le premier écran */
@media (min-width: 1000px) {
  .opening .screen { height: clamp(280px, 42svh, 560px); }
  .opening-copy { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: clamp(40px, 5vw, 88px); align-content: center; align-items: end; }
  .opening h1 { grid-column: 1; grid-row: 1 / 3; font-size: clamp(56px, 5.9vw, 92px); max-width: 15.5ch; }
  .lede { grid-column: 2; grid-row: 1; margin: 0; align-self: end; }
  .cta-row { grid-column: 2; grid-row: 2; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 28px; }
}

/* la phrase de renversement, en grand */
.opening .lede { font-family: var(--serif); font-size: clamp(24px, 2.5vw, 36px); line-height: 1.16; letter-spacing: -.01em; color: var(--cream); max-width: 24ch; text-wrap: balance; }
@media (min-width: 1000px) { .opening .lede { max-width: 20ch; } }

/* sous-titres empilés dans une seule case : la hauteur suit la phrase la plus longue et chaque phrase est centrée */
.subtitles { display: grid; height: auto; min-height: 2.3em; }
.subtitles li { position: relative; left: auto; right: auto; top: auto; grid-area: 1 / 1; align-self: center; }
.film .subtitles { font-size: clamp(30px, 4.3vw, 60px); }
@media (max-width: 760px) { .subtitles { height: auto; min-height: 150px; margin-top: 24px; } }

.final .fun { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.6vw, 34px); color: var(--cream); margin: 26px auto 0; max-width: 30ch; line-height: 1.2; }
.final .fun + p { margin-top: 26px; }
