/* MYOSOTIS — Dossier de direction artistique
   Version sobre : quasi monochrome, une idée par écran, images en fond (fondu enchaîné),
   ouvertures de chapitre où l'image s'agrandit. Titres Epilogue Black, texte Instrument Serif.
   (ancienne feuille : data/backups/styles-avant-refonte-mono.css) */

:root {
  --bg: #0a0a0a;
  --ink: #ece9e4;
  --ink2: rgba(236, 233, 228, .74);
  --mute: rgba(236, 233, 228, .46);
  --line: rgba(236, 233, 228, .14);
  --title: 'Epilogue', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --max: 1200px;
  --pad: clamp(20px, 6vw, 96px);
  --gap: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 21px/1.5 var(--serif); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--bg); }
.print-only { display: none; }
.loading { padding: 45vh var(--pad); font: 500 12px var(--title); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); text-align: center; }

/* ---------- typographie ---------- */
.label, .chap-n, .chap-k, .scene-h, .char-a, .loc-s, .cover-k, .cover-date, .cover-genre, .q-s, .q-d, .point-n, .tl-c, .frag-c, .index-n, .index-k, .mr-count, .hud, .overlay-k, .overlay-x, .myo-form, .budget th, .pal-sw em, .ad-note {
  font-family: var(--title); font-weight: 500; font-size: 12px; line-height: 1.4; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); font-style: normal;
}
.chap-t, .scene-t, .ref-n, .char-n, .loc-n, .cover-t, .heading h3, .ct-t, .tl-h, .cam-n, .point-t, .person-n, .contact-big, .index-t, .overlay-list b, .frag-t, .ad-s, .strobe-l {
  font-family: var(--title); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: .95; color: var(--ink);
}
.prose { color: var(--ink2); font-size: clamp(19px, 1.45vw, 23px); line-height: 1.45; }
.prose p + p { margin-top: .9em; }
.prose strong { color: var(--ink); font-weight: 400; font-style: italic; }

/* ---------- fond d'images en fondu enchaîné ---------- */
#backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#backdrop i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1.4s ease; filter: saturate(.75); }
#backdrop i.on { opacity: .26; }
#backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, rgba(10, 10, 10, .15), rgba(10, 10, 10, .85)); }
#app { position: relative; z-index: 1; }
#lamp { display: none; }
#grain { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#flash { position: fixed; inset: 0; z-index: 95; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: strobe 1s ease-out; }
#flash.soft { animation: soft 1.4s ease; }
@keyframes strobe { 0% { opacity: 0; } 6% { opacity: 1; } 18% { opacity: 0; } 34% { opacity: .95; } 50% { opacity: 0; } 62% { opacity: .6; } 100% { opacity: 0; } }
@keyframes soft { 0%, 100% { opacity: 0; } 40% { opacity: .5; } }

/* ---------- repères : MYOSOTIS + chapitre en cours + index ---------- */
.hud--top { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--bar); display: flex; align-items: center; gap: 20px; padding: 0 var(--pad); background: linear-gradient(180deg, rgba(10, 10, 10, .75), rgba(10, 10, 10, 0)); }
.hud--bot { display: none; }
.hud-brand { font-weight: 900; letter-spacing: .22em; color: var(--ink); text-decoration: none; }
.hud-here { flex: 1; text-align: center; background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--mute); }
.hud-here span { margin-right: 10px; color: var(--ink); }
.hud-idx { background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); }
.hud-here:hover { color: var(--ink); }

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 10, .97); padding: calc(var(--bar) + 6vh) var(--pad) 6vh; overflow-y: auto; opacity: 0; transition: opacity .4s ease; }
.overlay[hidden] { display: none; }
.overlay.open { opacity: 1; }
.overlay-x { position: absolute; top: 22px; right: var(--pad); background: none; border: 0; color: var(--ink); }
.overlay-k { margin: 0 auto 4vh; max-width: var(--max); }
.overlay-list { max-width: var(--max); margin: 0 auto; }
.overlay-list a { display: grid; grid-template-columns: 48px 1fr auto; align-items: baseline; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; transition: opacity .3s; }
.overlay-list span { font: 500 12px var(--title); color: var(--mute); }
.overlay-list b { font-size: clamp(24px, 3.2vw, 44px); }
.overlay-list em { font: italic 400 19px var(--serif); color: var(--mute); }
.overlay-list:hover a { opacity: .45; } .overlay-list a:hover { opacity: 1; }

/* ---------- un écran par idée ---------- */
.sec { position: relative; }
.blk { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--bar) + 6vh) var(--pad) 8vh; }
.blk > :not(.blk-tools):not(.add-item):not(.blk-opts) { width: 100%; max-width: var(--max); margin-inline: auto; }

/* apparition : simple fondu, rien d'autre */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.chap .bg.rv, .cover .bg.rv { opacity: 1; transform: none; transition: none; }

/* ---------- images ---------- */
.slot { position: relative; min-width: 0; }
.slot-box { position: relative; overflow: hidden; background: #141414; }
.r-16-9 .slot-box { aspect-ratio: 16 / 9; } .r-4-3 .slot-box { aspect-ratio: 4 / 3; } .r-3-4 .slot-box { aspect-ratio: 3 / 4; }
.r-1-1 .slot-box { aspect-ratio: 1; } .r-2-39-1 .slot-box { aspect-ratio: 2.39 / 1; } .r-libre.is-empty .slot-box { aspect-ratio: 16 / 9; }
.slot-box img { width: 100%; height: 100%; object-fit: cover; }
.r-libre:not(.is-empty) .slot-box img { height: auto; }
.slot figcaption { margin-top: 10px; font: italic 400 16px/1.3 var(--serif); color: var(--mute); }
.is-empty .slot-box { border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.slot-ph { position: absolute; inset: 0; display: grid; place-items: center; font: 500 11px var(--title); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.bg { position: absolute; inset: 0; overflow: hidden; background: #000; }
.bg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- couverture ---------- */
.blk--cover { padding: 0; }
.cover { position: relative; height: 100svh; min-height: 560px; max-width: none !important; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--bar) + 4vh) var(--pad) 9vh; overflow: hidden; }
.cover .bg img { opacity: .55; }
.cover .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .1) 30%, rgba(10, 10, 10, .9)); }
.cover > :not(.bg) { position: relative; z-index: 1; }
.cover-top { position: absolute !important; top: calc(var(--bar) + 2vh); left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; }
.cover-t { font-size: clamp(56px, 11vw, 176px); letter-spacing: -.035em; line-height: .86; margin: 14px 0 22px; }
.cover-tag { font: italic 400 clamp(22px, 2.2vw, 32px)/1.25 var(--serif); color: var(--ink); max-width: 30ch; }
.cover-billing { margin-top: 5vh; font-size: 17px; line-height: 1.5; color: var(--ink2); }
.cover-down { position: absolute !important; right: var(--pad); bottom: 9vh; width: 1px; height: 64px; background: var(--line); overflow: hidden; }
.cover-down span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { to { top: 110%; } }

/* ---------- ouverture de chapitre : l'image s'agrandit jusqu'au plein écran ---------- */
.chap { position: relative; height: 100svh; }
.chap-stage { position: relative; height: 100svh; overflow: hidden; display: flex; align-items: flex-end; }
.chap .bg img { opacity: .6; }
.chap .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 35%, rgba(10, 10, 10, .9)); }
.chap-in { position: relative; z-index: 1; width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad) 11vh; }
.chap-n i { font-style: normal; opacity: .6; }
.chap-t { font-size: clamp(44px, 7vw, 112px); margin: 16px 0 18px; letter-spacing: -.03em; }
.chap-k { color: var(--ink2); }
@supports (animation-timeline: view()) {
  body:not(.editing):not(.no-anim) .chap { height: 210svh; view-timeline: --chap block; }
  body:not(.editing):not(.no-anim) .chap-stage { position: sticky; top: 0; }
  body:not(.editing):not(.no-anim) .chap .bg { animation: chap-grow linear both; animation-timeline: --chap; animation-range: contain 0% contain 60%; }
  body:not(.editing):not(.no-anim) .chap .bg::after { animation: chap-dim linear both; animation-timeline: --chap; animation-range: contain 20% contain 70%; }
  body:not(.editing):not(.no-anim) .chap-in { animation: chap-title linear both; animation-timeline: --chap; animation-range: contain 40% contain 75%; }
}
@keyframes chap-grow { from { scale: .5; } to { scale: 1; } }
@keyframes chap-dim { from { opacity: 0; } to { opacity: 1; } }
@keyframes chap-title { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }

/* ---------- textes ---------- */
.lead { font: 400 clamp(36px, 4.6vw, 72px)/1.08 var(--serif); color: var(--ink); max-width: 22ch; letter-spacing: -.01em; }
.heading-rule { display: block; width: 48px; height: 1px; background: var(--ink); margin-bottom: 28px; }
.heading h3 { font-size: clamp(36px, 5vw, 80px); }
.text { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); }
.text > .label { grid-column: 1; padding-top: .5em; }
.text > .prose { grid-column: 2; max-width: 40em; }
.text:not(:has(> .label)) > .prose { grid-column: 1 / -1; max-width: 36em; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.35; color: var(--ink); }

/* citations */
.q-t { font: italic 400 clamp(28px, 2.6vw, 40px)/1.2 var(--serif); color: var(--ink); }
.q-t::before { content: "« "; } .q-t::after { content: " »"; }
.q-solo .q-t { font-size: clamp(40px, 5.4vw, 88px); line-height: 1.05; max-width: 20ch; }
.q footer { margin-top: 12px; display: flex; gap: 14px; }
.q-d { text-transform: none; letter-spacing: 0; font: italic 400 16px var(--serif); }

/* ---------- références ---------- */
.ref { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.ref.alt .ref-imgs { order: 2; }
.ref-imgs { display: grid; gap: 12px; }
.ref-imgs.n2 { grid-template-columns: 1fr 1fr; }
.ref-n { font-size: clamp(32px, 3.8vw, 60px); margin: 14px 0 26px; }

/* ---------- galeries ---------- */
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; }

/* ---------- moodboard ---------- */
.moodreel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.mr-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.mr-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.mr-slide.on { opacity: 1; }
.mr-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.mr-slide.on img { transform: scale(1); transition: transform 5s ease-out; }
.mr-slide figcaption { position: absolute; left: 18px; bottom: 16px; font: italic 400 22px var(--serif); color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .9); }
.mr-bar { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.mr-count { color: var(--mute); } .mr-count b { font-weight: 500; color: var(--ink); }
.mr-prog { flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.mr-prog i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
@keyframes mrprog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.mr-slider:hover .mr-prog i { animation-play-state: paused !important; }
.mr-nav { background: none; border: 1px solid var(--line); width: 36px; height: 30px; font: 500 13px var(--title); color: var(--ink2); }
.mr-nav:hover { border-color: var(--ink); color: var(--ink); }
.mr-scene .label { margin-bottom: 14px; }
.mr-player { position: relative; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.mr-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mr-player-btn { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: #000 center / cover no-repeat; }
.mr-player-btn::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 10, .4); transition: background .3s; }
.mr-player-btn:hover::after { background: rgba(10, 10, 10, .1); }
.yt-play { position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .3); font-size: 18px; color: #fff; transition: background .3s, color .3s; }
.mr-player-btn:hover .yt-play, .yt:hover .yt-play { background: #fff; color: #000; }
.mr-list { margin-top: 14px; }
.mr-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.mr-item { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: border-color .25s, background .25s; }
.mr-item:hover, .mr-item:focus-visible { border-color: var(--mute); outline: none; }
.mr-item.on { border-color: var(--ink); background: rgba(236, 233, 228, .08); }
.mr-n { font: 500 10px var(--title); color: var(--mute); }
.mr-t { font: 500 14px/1 var(--title); white-space: nowrap; }
.mr-tabs .print-only { display: none; }
.editing .mr-item { display: grid; grid-template-columns: 30px 1fr auto; border-radius: 0; border-width: 1px 0 0; cursor: default; }
.editing .mr-body { display: grid; gap: 2px; }
.mr-g { font: italic 400 15px var(--serif); color: var(--mute); } .mr-url { font: 400 12px var(--title); color: var(--mute); } .mr-src { font: 500 10px var(--title); color: var(--mute); }

/* vidéo */
.video .yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #111 center / cover no-repeat; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.yt-empty { border: 1px solid var(--line) !important; background: rgba(255, 255, 255, .02) !important; }
.video figcaption { margin-top: 10px; font: italic 400 16px var(--serif); color: var(--mute); }

/* ---------- listes ---------- */
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(28px, 4vw, 64px); }
.point { position: relative; padding-top: 20px; border-top: 1px solid var(--line); }
.point-t { font-size: clamp(22px, 2vw, 30px); line-height: 1.05; margin: 14px 0 16px; }
.point .prose { font-size: 19px; }
.tl-h { font-size: clamp(28px, 3vw, 48px); margin-bottom: 4vh; }
.tl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.tl-row { position: relative; display: grid; align-content: start; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.tl-dot { display: none; }
.tl-t { font: 400 24px/1.15 var(--serif); color: var(--ink); }
.tl-x { font-size: 16px; line-height: 1.4; color: var(--ink2); }

/* réalité / souvenirs */
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); }
.ct-t { font-size: clamp(32px, 4vw, 64px); margin-bottom: 4vh; }
.ct li { padding: 14px 0; border-top: 1px solid var(--line); font-size: clamp(19px, 1.6vw, 24px); color: var(--ink2); }
.ct-warm .ct-t { font-family: var(--serif); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; }

/* caméras */
.cams-frame { display: grid; grid-template-columns: 16fr 12fr; gap: clamp(16px, 2.4vw, 36px); align-items: end; }
.cam-img { position: relative; }
.cam-a .slot-box { aspect-ratio: 16 / 9 !important; } .cam-b .slot-box { aspect-ratio: 4 / 3 !important; }
.cam-img .slot-box img { height: 100% !important; }
.hud-rec, .hud-meta { position: absolute; z-index: 2; font: 500 11px var(--title); letter-spacing: .14em; color: #fff; text-shadow: 0 0 8px rgba(0, 0, 0, .9); pointer-events: none; }
.hud-rec { top: 14px; left: 16px; } .hud-meta { bottom: 14px; right: 16px; opacity: .8; }
.cams-text { display: grid; grid-template-columns: 16fr 12fr; gap: 0 clamp(16px, 2.4vw, 36px); margin-top: 4vh; }
.cam-n { font-size: clamp(28px, 3vw, 48px); margin: 12px 0 18px; }
.cam-txt .prose { font-size: 19px; }
.cam-note { grid-column: 1 / -1; margin-top: 4vh; font: italic 400 clamp(20px, 1.8vw, 26px)/1.3 var(--serif); color: var(--ink); max-width: 46em; }

/* ---------- transitions : blanc, puis noir ---------- */
.blk--strobe { min-height: 80svh; background: #f2f1ee; --ink: #0a0a0a; }
.blk--strobe:has(.strobe--noir) { background: #000; --ink: #ece9e4; }
.strobe { text-align: center; }
.strobe-l { font-size: clamp(48px, 9vw, 150px); letter-spacing: -.03em; }

/* ---------- scènes : images d'un côté, texte de l'autre, en alternance ---------- */
.scene { position: relative; }
.scene-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.scene-media { grid-column: 1 / span 6; display: grid; gap: 20px; }
.scene-body { grid-column: 8 / -1; position: relative; }
.scene--split.flip .scene-media { grid-column: 7 / -1; grid-row: 1; }
.scene--split.flip .scene-body { grid-column: 1 / span 5; grid-row: 1; }
.scene-media .slot-box { aspect-ratio: 16 / 9 !important; }
.scene-media .slot-box img { height: 100% !important; }
.scene-media .slot figcaption { margin-top: 6px; font-size: 14px; }
.scene-h { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.scene-n { color: var(--ink); }
.scene-t { font-size: clamp(30px, 3.4vw, 54px); margin: 18px 0 24px; }
.scene-x { font-size: clamp(19px, 1.45vw, 22px); }
.scene-q { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.scene-q .q-t { font-size: clamp(22px, 1.9vw, 28px); }
.scene-q .q footer { margin-top: 6px; }
.stamp { display: inline-block; margin-top: 32px; padding: 7px 16px; border: 1.5px solid var(--ink); rotate: -6deg; font: 600 12px var(--title); letter-spacing: .26em; text-transform: uppercase; }
.myo-form { display: flex; justify-content: space-between; padding-bottom: 10px; margin-bottom: 4vh; border-bottom: 1px solid var(--line); }
/* scène sans image (son seul) */
.scene-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.scene-grid.solo { grid-template-columns: minmax(0, 1fr); max-width: 42em; }
.scene-grid > .scene-q { margin-top: 0; padding-top: 0; border-top: 0; }
.scene-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6vh; }
.scene-imgs.n0 { display: none; }
/* fragments de souvenirs */
.frags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin-top: 6vh; }
.frag { position: relative; padding-top: 14px; border-top: 1px solid var(--line); display: grid; align-content: start; gap: 6px; }
.frag-t { font-size: 20px; line-height: 1.05; }
.frag-x { font-size: 17px; line-height: 1.4; color: var(--ink2); }

/* ambiances : tout reste noir et blanc, avec deux exceptions franches */
.th-noir { background: #000; }
.th-noir .scene-x::before { content: "Pas d'image · son seul"; display: block; margin-bottom: 18px; font: 500 12px var(--title); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.th-extraction { background: #f2f1ee; color: #0a0a0a; --ink: #0a0a0a; --ink2: rgba(10, 10, 10, .74); --mute: rgba(10, 10, 10, .5); --line: rgba(10, 10, 10, .14); }
.th-extraction .slot-box { background: rgba(0, 0, 0, .04); }
.th-souvenir .scene-t { font-family: var(--serif); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; font-size: clamp(40px, 4.4vw, 68px); }
.th-vide { --ink: rgba(236, 233, 228, .62); --ink2: rgba(236, 233, 228, .48); }

/* ---------- publicité ---------- */
.ad { display: grid; justify-items: center; gap: 3vh; }
.ad-screen { position: relative; width: min(calc(68svh * 4 / 3), 100%); aspect-ratio: 4 / 3; background: #000; overflow: hidden; }
.ad-screen video { width: 100%; height: 100%; object-fit: cover; }
.ad-sound { position: absolute; right: 14px; bottom: 14px; z-index: 2; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .4); color: #fff; font: 500 11px var(--title); letter-spacing: .14em; text-transform: uppercase; }
.ad-sound:hover { background: #fff; color: #000; }
.ad-screen:not(.ad-screen--video) { display: grid; place-content: center; gap: 16px; padding: 6%; text-align: center; background: #f2f1ee; color: #0a0a0a; }
.ad-logo svg { width: 64px; margin: 0 auto 6px; fill: currentColor; } .ad-logo span { font: 900 13px var(--title); letter-spacing: .3em; }
.ad-s { font-size: clamp(24px, 3vw, 44px); color: inherit; } .ad-x { font-size: 18px; } .ad-small { font-size: 13px; opacity: .6; }
.ad-note { text-align: center; max-width: 52ch; text-transform: none; letter-spacing: 0; font: italic 400 clamp(19px, 1.6vw, 24px)/1.35 var(--serif); color: var(--ink2); }

/* ---------- personnages ---------- */
.char { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.char-photo, .char-absent { grid-column: 1 / span 5; }
.char-txt { grid-column: 7 / -1; }
.char.alt .char-photo, .char.alt .char-absent { grid-column: 8 / -1; grid-row: 1; }
.char.alt .char-txt { grid-column: 1 / span 6; grid-row: 1; }
.char-photo .slot-box { aspect-ratio: 4 / 5; } .char-photo .slot-box img { height: 100% !important; }
.char-absent { aspect-ratio: 4 / 5; display: grid; place-items: center; border: 1px solid var(--line); }
.char-absent span { font: 500 12px var(--title); letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.char-n { font-size: clamp(40px, 5vw, 80px); margin: 14px 0 10px; }
.char-a { margin-bottom: 28px; }
.char-toggle { margin-top: 10px; }

/* ---------- lieux ---------- */
.loc { display: grid; gap: 16px; }
.loc-hero { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.loc-hero .bg { position: relative; inset: auto; aspect-ratio: 16 / 10; }
.loc-n { font-size: clamp(36px, 4.2vw, 68px); margin: 14px 0 10px; }
.loc-s { margin-bottom: 24px; color: var(--ink2); }
.loc-strip { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 16px; width: calc(7 / 12 * 100% - 16px); }
.loc-strip.n2 { --n: 2; } .loc-strip.n3 { --n: 3; } .loc-strip.n4 { --n: 4; }
.loc-strip .slot figcaption { display: none; }

/* ---------- portraits ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--gap); }
.person { position: relative; }
.person-n { font-size: 22px; margin: 16px 0 6px; }

/* ---------- palettes ---------- */
.pal { display: grid; gap: 5vh; margin-top: 4vh; }
.pal-g { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: var(--gap); align-items: center; }
.pal-sw { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.pal-sw span { display: block; height: 88px; background: var(--c); position: relative; }
.pal-sw em { position: absolute; left: 0; bottom: -22px; font-size: 10px; }

/* ---------- budget ---------- */
.budget-note { font: italic 400 clamp(22px, 2vw, 30px)/1.3 var(--serif); max-width: 34em; margin-bottom: 5vh; }
.budget { width: 100%; border-collapse: collapse; }
.budget th { text-align: left; padding: 0 0 14px; font-weight: 500; }
.budget td { padding: 20px 0; border-top: 1px solid var(--line); font-size: 22px; position: relative; }
.budget td:not(:first-child) { color: var(--mute); }
.budget tfoot td { border-top: 1px solid var(--ink); font: 600 13px var(--title); letter-spacing: .18em; text-transform: uppercase; }

/* ---------- index ---------- */
.index { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 4vw, 64px); }
.index a { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; transition: opacity .3s; }
.index-t { font-size: clamp(22px, 2.2vw, 34px); }
.index-k { grid-column: 2; text-transform: none; letter-spacing: 0; font: italic 400 16px var(--serif); }
.index:hover a { opacity: .45; } .index a:hover { opacity: 1; }

/* ---------- merci ---------- */
.contact { display: grid; gap: 3vh; }
.contact-big { font-size: clamp(64px, 12vw, 200px); letter-spacing: -.04em; line-height: .85; }
.contact-x { font: italic 400 clamp(22px, 2vw, 30px) var(--serif); color: var(--ink2); }
.contact-mail { font: 900 clamp(18px, 2vw, 28px) var(--title); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; border-bottom: 1px solid var(--line); justify-self: start; padding-bottom: 6px; }
.contact-mail:hover { border-color: var(--ink); }
.contact-cred { font-size: 17px; color: var(--mute); }
.contact-end { margin-top: 6vh; font: 900 13px var(--title); letter-spacing: .5em; color: var(--mute); }

/* ---------- ÉDITION (touche E, en local) ---------- */
.tools { position: fixed; right: 14px; bottom: 14px; z-index: 70; display: flex; gap: 6px; align-items: center; }
.tools[hidden] { display: none; }
.tool, .save { background: rgba(20, 20, 20, .94); border: 1px solid rgba(236, 233, 228, .14); border-radius: 4px; padding: 8px 12px; font: 500 11px var(--title); letter-spacing: .1em; text-transform: uppercase; color: #ece9e4; }
.tool--main { background: #ece9e4; color: #0a0a0a; }
.save { color: rgba(236, 233, 228, .5); } .save.ok { color: #9fd3a8; } .save.err { color: #ff8a80; }
[contenteditable] { outline: 1px dashed transparent; outline-offset: 4px; cursor: text; min-width: 2ch; white-space: pre-wrap; }
.editing [contenteditable]:hover { outline-color: rgba(128, 128, 128, .5); }
.editing [contenteditable]:focus { outline: 1px solid currentColor; }
[contenteditable]:empty::before { content: attr(data-ph); opacity: .35; pointer-events: none; }
.editing .slot-box { cursor: pointer; }
.slot-tools { position: absolute; top: 8px; right: 8px; z-index: 5; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.slot:hover .slot-tools, .is-empty .slot-tools, .slot.drop .slot-tools, .bg:hover .slot-tools { opacity: 1; }
.is-empty .slot-tools { top: auto; bottom: 8px; left: 8px; right: 8px; justify-content: center; }
.bg-tools { top: auto; bottom: 14px; right: 14px; }
.slot-tools button, .blk-tools button, .blk-tools select, .sec-tools button, .item-tools button, .blk-opts button {
  background: rgba(10, 10, 10, .9); color: #ece9e4; border: 1px solid rgba(236, 233, 228, .25); border-radius: 3px; font: 500 10.5px var(--title); padding: 5px 8px; letter-spacing: .04em;
}
.slot-tools button:hover, .blk-tools button:hover, .sec-tools button:hover, .item-tools button:hover, .blk-opts button:hover { background: #ece9e4; color: #0a0a0a; }
.slot.drop .slot-box { outline: 2px solid #fff; outline-offset: -2px; }
.editing .blk { outline: 1px dashed rgba(128, 128, 128, .25); outline-offset: -6px; }
.editing .blk:hover { outline-color: rgba(128, 128, 128, .6); }
.blk-tools { position: absolute; top: calc(var(--bar) + 6px); right: 14px; z-index: 20; display: flex; gap: 4px; align-items: center; opacity: .4; transition: opacity .15s; }
.blk:hover > .blk-tools, .blk-tools:focus-within { opacity: 1; }
.blk-type { font: 600 10.5px var(--title); text-transform: uppercase; letter-spacing: .1em; color: #0a0a0a; background: #ece9e4; padding: 5px 8px; border-radius: 3px; }
.blk-opts { display: flex; gap: 6px; margin-bottom: 10px; }
.add-blk { height: 0; position: relative; z-index: 25; display: flex; justify-content: center; }
.add-blk button, .add-sec button, .add-item { background: #0a0a0a; border: 1px dashed rgba(236, 233, 228, .5); color: #ece9e4; border-radius: 3px; font: 500 11px var(--title); padding: 6px 14px; letter-spacing: .08em; text-transform: uppercase; }
.add-blk button { translate: 0 -50%; opacity: .45; }
.add-blk:hover button, .add-blk button:focus { opacity: 1; }
.add-blk button:hover, .add-sec button:hover, .add-item:hover { background: #ece9e4; color: #0a0a0a; border-style: solid; }
.add-item { margin-top: 14px; justify-self: start; }
.add-sec { display: flex; justify-content: center; padding: 14px 0; background: #000; position: relative; z-index: 1; }
.sec-tools { position: absolute; top: calc(var(--bar) + 6px); left: var(--pad); z-index: 20; display: flex; gap: 6px; align-items: center; font: 500 11px var(--title); color: rgba(236, 233, 228, .6); }
.sec-tools label { display: flex; gap: 6px; align-items: center; background: rgba(10, 10, 10, .9); padding: 4px 8px; border-radius: 3px; }
.item-tools { position: absolute; top: 4px; right: 0; z-index: 6; display: none; gap: 3px; }
.editing *:hover > .item-tools { display: flex; }
.menu { position: fixed; z-index: 90; width: 290px; max-height: 70vh; overflow-y: auto; padding: 8px; background: #141414; border: 1px solid rgba(236, 233, 228, .14); border-radius: 6px; box-shadow: 0 24px 70px rgba(0, 0, 0, .7); color: #ece9e4; }
.menu[hidden] { display: none; }
.menu p { margin: 4px 8px 8px; font: 600 10.5px var(--title); text-transform: uppercase; letter-spacing: .12em; color: rgba(236, 233, 228, .5); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 3px; font: 400 17px var(--serif); }
.menu button:hover { background: #ece9e4; color: #0a0a0a; }
.editing .rv, .no-anim .rv { opacity: 1; transform: none; transition: none; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .blk { min-height: auto; padding-top: 14vh; padding-bottom: 14vh; }
  .blk--cover, .blk--strobe { min-height: 100svh; }
  .text, .ref, .moodreel, .contrast, .scene-grid, .loc-hero, .index, .cams-frame, .cams-text, .frags { grid-template-columns: minmax(0, 1fr); }
  .text > .prose, .text > .label { grid-column: 1; }
  .ref.alt .ref-imgs { order: 0; }
  .scene-split, .char { grid-template-columns: minmax(0, 1fr); }
  .scene-media, .scene-body, .scene--split.flip .scene-media, .scene--split.flip .scene-body,
  .char-photo, .char-absent, .char-txt, .char.alt .char-photo, .char.alt .char-absent, .char.alt .char-txt { grid-column: 1; grid-row: auto; }
  .scene-body { order: -1; }
  .loc-strip { width: 100%; }
  .pal-g { grid-template-columns: 1fr; }
  .hud-here { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  #backdrop i { transition: none; }
  .chap { height: 100svh !important; }
  .chap .bg, .chap .bg::after, .chap-in { animation: none !important; }
}

/* ---------- PDF (Cmd+P) ---------- */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #0a0a0a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hud, .tools, .overlay, #backdrop, #grain, #flash, .menu, .add-blk, .add-sec, .add-item, .slot-tools, .blk-tools, .sec-tools, .item-tools, .cover-down, .char-toggle, .mr-bar, .mr-player { display: none !important; }
  .print-only, .mr-tabs .print-only { display: block; font-size: 10px; color: var(--mute); }
  .rv { opacity: 1 !important; transform: none !important; }
  .blk, .chap { min-height: 100vh; height: auto !important; break-inside: avoid; break-after: page; }
  .chap-stage { position: relative !important; }
  .chap .bg, .chap .bg::after, .chap-in { animation: none !important; }
  .mr-slide { position: static; opacity: 1; display: none; } .mr-slide:first-child { display: block; }
}

/* ---------- ajustements ---------- */
/* repères lisibles sur fond noir comme sur fond blanc */
.hud--top { background: none; mix-blend-mode: difference; color: #fff; }
.hud--top .hud-brand, .hud--top .hud-idx, .hud--top .hud-here span { color: #fff; }
.hud--top .hud-here { color: rgba(255, 255, 255, .55); }
#backdrop i.on { opacity: .2; }
/* trois images : une grande, deux petites, pour tenir dans l'écran */
.scene-media:has(> .slot:nth-of-type(3)) { grid-template-columns: 1fr 1fr; gap: 14px; }
.scene-media:has(> .slot:nth-of-type(3)) > .slot:first-of-type { grid-column: 1 / -1; }
.scene-media:has(> .slot:nth-of-type(3)) .slot:not(:first-of-type) figcaption { font-size: 13px; }
/* beaucoup de répliques : plus compactes */
.scene-q:has(> .q:nth-of-type(3)) { gap: 12px; }
.scene-q:has(> .q:nth-of-type(3)) .q-t { font-size: clamp(19px, 1.5vw, 23px); }

/* ---------- deux caméras : un écran par caméra, en miroir, puis la conclusion ---------- */
.blk--cameras { padding: 0; min-height: 0; }
.blk--cameras > .cams { max-width: none; }
.cam-screen { min-height: 100svh; padding: calc(var(--bar) + 6vh) var(--pad) 8vh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.cam-screen .cam-img { grid-column: 1 / span 7; }
.cam-screen .cam-txt { grid-column: 9 / -1; }
.cam-screen.flip .cam-img { grid-column: 6 / -1; grid-row: 1; }
.cam-screen.flip .cam-txt { grid-column: 1 / span 4; grid-row: 1; }
.cam-screen .slot-box img { height: 100% !important; }
.cam-screen .cam-n { font-size: clamp(36px, 4.4vw, 68px); margin: 14px 0 26px; }
.cam-screen .cam-txt .prose { font-size: clamp(18px, 1.35vw, 21px); }
.cam-concl { grid-template-columns: minmax(0, 1fr); }
.cam-concl .cam-note { grid-column: 1; margin: 0; max-width: 30ch; font: italic 400 clamp(30px, 3.4vw, 54px)/1.15 var(--serif); color: var(--ink); }
@media (max-width: 900px) {
  .cam-screen { min-height: auto; padding-top: 14vh; padding-bottom: 14vh; grid-template-columns: minmax(0, 1fr); }
  .cam-screen .cam-img, .cam-screen .cam-txt, .cam-screen.flip .cam-img, .cam-screen.flip .cam-txt { grid-column: 1; grid-row: auto; }
}
@media print { .cam-screen { break-after: page; } }

/* ---------- blocs texte : image modifiable à gauche, texte à droite ---------- */
.text { display: block; }
.text.has-img { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.text-img .slot-box img { height: 100% !important; }
.text-img .r-libre .slot-box img { height: auto !important; }
.text-body > .label { margin-bottom: 22px; }
.text-body > .prose { max-width: 40em; }
.text:not(.has-img) .text-body > .prose { max-width: 36em; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.35; color: var(--ink); }
@media (max-width: 900px) { .text.has-img { grid-template-columns: minmax(0, 1fr); } }

/* ---------- moodboard : deux diaporamas côte à côte, puis les vidéos qui glissent au scroll ---------- */
.blk--moodreel { padding: 0; min-height: 0; }
.blk--moodreel > .moodreel { display: block; max-width: none !important; }
.mr-pair { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 28px); align-items: center; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: calc(var(--bar) + 6vh) var(--pad) 8vh; }
.mr-pair .mr-frame { aspect-ratio: 16 / 9; }
.mv { position: relative; }
.mv-stage { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 4vh; padding: calc(var(--bar) + 4vh) 0 6vh; overflow-x: auto; }
.mv-k { padding: 0 var(--pad); }
.mv-track { display: flex; gap: clamp(24px, 3vw, 48px); width: max-content; padding: 0 var(--pad); }
.mv-card { width: min(62vw, 860px); flex: none; display: grid; gap: 22px; }
.mv-card .mr-player { aspect-ratio: 16 / 9; }
.mv-card .slot-ph { background: #111; }
.mv-txt { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: baseline; }
.mv-txt .mr-n { grid-row: 1 / span 3; font: 500 12px var(--title); letter-spacing: .14em; }
.mv-t { font: 900 clamp(26px, 2.6vw, 40px)/1 var(--title); text-transform: uppercase; letter-spacing: -.02em; }
.mv-why { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.4; color: var(--ink2); max-width: 44em; }
/* défilement horizontal piloté par le scroll (navigateurs récents) ; sinon, bande défilable à la main */
@supports (animation-timeline: view()) {
  body:not(.editing):not(.no-anim) .mv { height: calc(var(--n) * 75svh + 100svh); view-timeline: --mv block; }
  body:not(.editing):not(.no-anim) .mv-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
  body:not(.editing):not(.no-anim) .mv-track { animation: mv-slide linear both; animation-timeline: --mv; animation-range: contain 0% contain 100%; }
}
@keyframes mv-slide { from { translate: 0 0; } to { translate: calc(-100% + 100vw) 0; } }
/* édition */
.moodreel--edit { display: grid; gap: 3vh; }
.moodreel--edit .mr-why { font: italic 400 17px var(--serif); color: var(--ink2); }
@media (max-width: 900px) {
  .mr-pair { grid-template-columns: 1fr; min-height: auto; }
  .mv-card { width: 82vw; }
}
@media (prefers-reduced-motion: reduce) { .mv { height: auto !important; } .mv-stage { position: static !important; overflow-x: auto !important; } .mv-track { animation: none !important; } }
@media print { .mv { height: auto !important; } .mv-stage { position: static !important; } .mv-track { animation: none !important; flex-wrap: wrap; width: auto; } .mv-card { width: 45%; } .mr-pair .mr-slider:last-child { display: none; } }

.mr-side { display: grid; gap: 14px; }

/* ---------- bande d'images : défile de gauche à droite au scroll ---------- */
.blk--strip { padding: 0; min-height: 0; }
.blk--strip > .strip { max-width: none !important; }
.strip { position: relative; }
.strip-item { width: min(52vw, 760px); flex: none; }
.strip-item .slot-box img { height: 100% !important; }
.strip-edit { display: grid; gap: 3vh; padding: calc(var(--bar) + 6vh) 0 8vh; }
@supports (animation-timeline: view()) {
  body:not(.editing):not(.no-anim) .strip { height: calc(var(--n) * 55svh + 100svh); view-timeline: --strip block; }
  body:not(.editing):not(.no-anim) .strip .mv-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
  body:not(.editing):not(.no-anim) .strip-track { animation: strip-slide linear both; animation-timeline: --strip; animation-range: contain 0% contain 100%; }
}
@keyframes strip-slide { from { translate: calc(-100% + 100vw) 0; } to { translate: 0 0; } }
@media (max-width: 900px) { .strip-item { width: 82vw; } }
@media (prefers-reduced-motion: reduce) { .strip { height: auto !important; } .strip .mv-stage { position: static !important; overflow-x: auto !important; } .strip-track { animation: none !important; } }
@media print { .strip { height: auto !important; } .strip .mv-stage { position: static !important; } .strip-track { animation: none !important; flex-wrap: wrap; width: auto; } .strip-item { width: 30%; } }
