/* Jetons du lecteur de diaporamas */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
:root { --police-poeme: "Literata", Georgia, serif; --police-ui: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --fond: #0f0e0d; --papier: #f3ede2; --encre: #1d1a17; --rouge: #B8412F; --rouge-vif: #d8553f; }
body { margin: 0; background: var(--fond); color: var(--papier); font-family: var(--police-ui); }
/* Rature manuscrite (ui/rature.js) : le mot est barré d'un trait à la main, la correction écrite au-dessus */
.rature { position: relative; display: inline-block; white-space: nowrap; }
.rature s { text-decoration: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6C20 4.2 40 6.8 60 4.6S88 5.4 99 3.8' fill='none' stroke='%23B8412F' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") 0 55% / 0 .6em no-repeat;
  animation: rature-trait .7s ease-out 1.2s forwards; }
.rature .ajout { position: absolute; left: 50%; bottom: 82%; transform: translateX(-50%) rotate(-2deg); font: 600 .95em/1 "Caveat", cursive; color: #B8412F; white-space: nowrap; opacity: 0; animation: rature-ajout .6s ease-out 1.9s forwards; }
@keyframes rature-trait { to { background-size: 100% .6em; } }
@keyframes rature-ajout { to { opacity: 1; } }

/* Diaporama (moteur/diaporama.js) et cartons typographiques (moteur/carton.js) */
.diaporama { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #000; color: #f3ede2; font-family: var(--police-ui); cursor: pointer;
  --dp-corps: clamp(1rem, .6rem + 1.1vh, 1.2rem); --h-cart: 0px; }
.diaporama.sous-titres { --h-cart: calc(3 * 1.5 * var(--dp-corps) + 2.9rem + 1px); }
/* L'écran : une scène 16:9 (format HD 1920 × 1080), centrée, à bandes noires si la fenêtre a un autre format.
   Tout ce qui s'y trouve est mesuré en cqw (centième de sa largeur) : même rendu en classe et à l'export vidéo. */
.dp-ecran { grid-row: 1; grid-column: 1; align-self: center; justify-self: center; position: relative; width: min(100vw, calc((100vh - var(--h-cart)) * 16 / 9)); width: min(100vw, calc((100dvh - var(--h-cart)) * 16 / 9)); aspect-ratio: 16 / 9;
  overflow: hidden; container-type: inline-size; background: #0f0e0d; isolation: isolate; }
.dp-pause { grid-row: 1; grid-column: 1; }
.dp-scene { position: absolute; inset: 0; overflow: hidden; }
.dp-plan.voie { padding: 0 calc(25 * var(--cq, 1cqw)) 0 calc(2 * var(--cq, 1cqw)); }   /* voie des mots-clés : la colonne de droite reste libre */
.dp-plan { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1) .5s; }
.dp-plan.visible { opacity: 1; }
.dp-plan.sortie { opacity: 0; transition: opacity 1s cubic-bezier(.4, 0, .6, 1); }
/* Lente avancée de caméra sur le plan entier : les effets d'entrée animent le tirage sans l'interrompre. */
.dp-plan.dp-seule, .dp-plan.dp-table { animation: var(--kb-nom, kb0) var(--kb) linear forwards; }
.kb0 { --kb-nom: kb0; } .kb1 { --kb-nom: kb1; } .kb2 { --kb-nom: kb2; } .kb3 { --kb-nom: kb3; }
@keyframes kb0 { from { scale: 1; } to { scale: 1.06; } }
@keyframes kb1 { from { scale: 1.06; translate: -1% 0; } to { scale: 1; translate: 0 0; } }
@keyframes kb2 { from { scale: 1.01; translate: 1% .6%; } to { scale: 1.07; translate: -.6% -.6%; } }
@keyframes kb3 { from { scale: 1.07; translate: 0 -.8%; } to { scale: 1.01; translate: 0 .8%; } }
.en-pause .dp-tirage, .en-pause .dp-plan, .en-pause .carton, .en-pause .carton * { animation-play-state: paused; }

/* Tirages : l'image et sa légende accolée (ce que l'on voit) ; en table, plusieurs tirages posés de travers */
.dp-tirage { margin: 0; display: flex; flex-direction: column; align-items: center; rotate: var(--incl, 0deg); }
.dp-tirage .dp-vue { display: block; visibility: hidden; box-shadow: 0 calc(1.2 * var(--cq, 1cqw)) calc(3 * var(--cq, 1cqw)) rgb(0 0 0 / .55); }
.dp-vue > img, .dp-vue > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.dp-restaure { position: relative; }
.dp-restaure > img + img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; box-shadow: none; visibility: visible; opacity: 0; animation: restaure 2.5s ease-in-out 2.5s forwards; }
@keyframes restaure { to { opacity: 1; } }
.en-pause .dp-restaure > img + img { animation-play-state: paused; }
.dp-tirage figcaption { margin-top: calc(1 * var(--cq, 1cqw)); padding: calc(.4 * var(--cq, 1cqw)) calc(1 * var(--cq, 1cqw)); max-width: calc(44 * var(--cq, 1cqw)); background: #f3ede2; color: #1d1a17; font: italic calc(1.2 * var(--cq, 1cqw))/1.3 var(--police-poeme); text-align: center; box-shadow: 0 6px 16px rgb(0 0 0 / .4); }
.dp-plan.dp-table { display: grid; grid-template-rows: 100%; align-items: center; justify-items: center; padding: 0 calc(3 * var(--cq, 1cqw)); }
.dp-pile > .dp-tirage { grid-area: 1 / 1; translate: calc(var(--i) * 14px) calc(var(--i) * -9px); opacity: 0; animation: pile-pose .9s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * 1.1s) forwards; }
.dp-tirage figcaption:empty { display: none; }
@keyframes pile-pose { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
.en-pause .dp-pile > .dp-tirage { animation-play-state: paused; }
.dp-slot { display: grid; place-items: center; width: 100%; height: 100%; }
.dp-slot > .dp-tirage { grid-area: 1 / 1; transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1); }
.dp-slot > .dp-tirage.entre, .dp-slot > .dp-tirage.sortie { opacity: 0; }
.dp-slot:nth-child(odd) { margin-bottom: calc(2.81 * var(--cq, 1cqw)); } .dp-slot:nth-child(even) { margin-top: calc(3.94 * var(--cq, 1cqw)); }


.dp-cartouche { display: none; height: calc(3 * 1.5 * var(--dp-corps) + 2.9rem); overflow: auto; padding: .8rem max(1.5rem, (100% - 64rem) / 2) .9rem; background: #171513; border-top: 1px solid rgb(243 237 226 / .08); cursor: auto; --dp-corps: clamp(1rem, .6rem + 1.1vh, 1.2rem); }
.dp-titre { margin: 0 0 .35rem; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #d8553f; }
.dp-titre:empty { display: none; }
.dp-texte { margin: 0; font: var(--dp-corps)/1.5 var(--police-poeme); color: #f3ede2; }
.dp-texte span { transition: color .6s; }
.dp-texte .qui-C { font-style: italic; }

.dp-pause { z-index: 3; display: flex; align-items: center; justify-content: center; gap: min(12vw, 9rem); transition: opacity .6s; }
.dp-pause[hidden] { display: none; }
.dp-pause button { display: grid; place-items: center; padding: .9rem; border: 1px solid rgb(243 237 226 / .25); border-radius: 50%; background: rgb(15 14 13 / .3); color: rgb(243 237 226 / .75); cursor: pointer; }
.dp-pause [data-a="lire"] { padding: 1.5rem; }
.dp-pause button:hover { color: #fff; background: rgb(15 14 13 / .6); }
.diaporama.repos { cursor: none; }
.diaporama.repos .dp-pause { opacity: 0; }
/* Muet : lecture à son rythme, une flèche sur chaque bord, pas de bouton lecture */
.dp-bords { display: none; }
.diaporama.muet .dp-pause { display: none; }
.diaporama.muet .dp-bords { display: contents; }
.dp-bords button { position: fixed; top: 40%; z-index: 3; display: grid; place-items: center; padding: .8rem; border: 0; border-radius: 50%; background: rgb(15 14 13 / .3); color: rgb(243 237 226 / .7); cursor: pointer; transition: opacity .6s; }
.dp-bords [data-a="prec"] { left: 1.2vw; }
.dp-bords [data-a="suiv"] { right: 1.2vw; }
.dp-bords button:hover { color: #fff; background: rgb(15 14 13 / .6); }
.diaporama.repos .dp-bords button { opacity: 0; }

.dp-coin { position: fixed; top: .7rem; right: .7rem; z-index: 4; display: flex; gap: .3rem; opacity: .3; transition: opacity .3s; }
.dp-coin:hover, .dp-coin:focus-within { opacity: 1; }
.dp-coin button { display: grid; place-items: center; padding: .35rem; border: 0; background: none; color: #f3ede2; cursor: pointer; }

/* Cartons : fonds unis, grain de papier, typographie Literata */
.carton { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(3.38 * var(--cq, 1cqw)) calc(8 * var(--cq, 1cqw)); text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .1 0 0 0 0 .08 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: carton-souffle 12s ease-out forwards; }
.carton > * { animation: carton-monte 1.3s cubic-bezier(.2, .7, .2, 1) both; }
.carton > :nth-child(2) { animation-delay: .15s; } .carton > :nth-child(3) { animation-delay: .35s; } .carton > :nth-child(4) { animation-delay: .5s; }
@keyframes carton-monte { from { opacity: 0; transform: translateY(1.2rem); } }
@keyframes carton-souffle { from { background-size: 220px; } to { background-size: 240px; } }
.c-filet { display: block; width: calc(38 * var(--cq, 1cqw)); height: 2px; background: #B8412F; }
.c-sous { margin: calc(1.97 * var(--cq, 1cqw)) 0 0; font-size: calc(1.07 * var(--cq, 1cqw)); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; opacity: .7; }

.carton-date { background-color: #f3ede2; color: #1d1a17; }
.c-date { display: flex; flex-direction: column; align-items: center; margin: calc(1.97 * var(--cq, 1cqw)) 0; font-family: var(--police-poeme); line-height: .95; }
.c-jour { font-size: calc(9.56 * var(--cq, 1cqw)); font-weight: 600; color: #B8412F; }
.c-jour sup { font-size: .32em; vertical-align: top; margin-left: .05em; }
.c-mois { font-size: calc(3.66 * var(--cq, 1cqw)); font-style: italic; }
.c-mois.grand { font-size: calc(6.75 * var(--cq, 1cqw)); color: #B8412F; }
.c-an { margin: calc(0.79 * var(--cq, 1cqw)) -.5em 0 0; font-size: calc(2.02 * var(--cq, 1cqw)); letter-spacing: .5em; }
.c-evt { margin: 0 0 calc(1.97 * var(--cq, 1cqw)); font-size: calc(1.29 * var(--cq, 1cqw)); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; }

.carton-citation { background-color: #1d1a17; color: #f3ede2; }
.carton-citation blockquote { display: block; margin: 0; max-width: 30ch; font: italic 400 calc(3.04 * var(--cq, 1cqw))/1.3 var(--police-poeme); text-wrap: balance; }
.carton-citation blockquote.vers { max-width: none; white-space: nowrap; text-align: left; font-size: calc(2.59 * var(--cq, 1cqw)); } /* un vers = une ligne */
.carton-citation .g { font-style: normal; font-size: 1.35em; line-height: 0; color: #d8553f; }

.carton-titre { background-color: #fbf8f1; color: #1d1a17; }
.carton-manuscrit img { width: calc(70 * var(--cq, 1cqw)); height: auto; margin-bottom: calc(1.69 * var(--cq, 1cqw)); clip-path: inset(0 100% 0 0); animation: trace 3.2s cubic-bezier(.45, .05, .35, 1) .6s forwards; }
@keyframes trace { to { clip-path: inset(0 0 0 0); } }
.carton-titre h2 { margin: 0 0 calc(1.69 * var(--cq, 1cqw)); font: 600 calc(5.62 * var(--cq, 1cqw))/1.05 var(--police-poeme); }

.carton-liste { background-color: #f3ede2; color: #1d1a17; }
.c-tete { margin: 0 0 calc(1.41 * var(--cq, 1cqw)); font-size: calc(1.24 * var(--cq, 1cqw)); font-weight: 600; letter-spacing: .25em; text-transform: uppercase; }
.c-tete .c-mois { font: italic 400 calc(2.81 * var(--cq, 1cqw)) var(--police-poeme); letter-spacing: 0; text-transform: none; color: #B8412F; margin-right: .4em; }
.c-titres { margin: calc(1.69 * var(--cq, 1cqw)) 0 0; padding: 0; list-style: none; font: italic clamp(.9rem, calc(1.35 * var(--cq, 1cqw)), 1.7rem)/1.45 var(--police-poeme); text-align: left; counter-reset: t; }
.c-titres.deux { columns: 2; column-gap: calc(2.5 * var(--cq, 1cqw)); }
.c-titres li { white-space: nowrap; }
.c-titres li { break-inside: avoid; animation: carton-monte .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * .2s + .6s); }
.c-titres li::before { counter-increment: t; content: counter(t) ". "; font-style: normal; font-size: .75em; color: #B8412F; }
.c-titres li.actuel { color: #B8412F; font-weight: 600; }

.dp-encart { position: absolute; z-index: 2; top: calc(1.6 * var(--cq, 1cqw)); left: calc(1.6 * var(--cq, 1cqw)); max-width: calc(30 * var(--cq, 1cqw)); padding: calc(.8 * var(--cq, 1cqw)) calc(1 * var(--cq, 1cqw)); border-left: calc(.25 * var(--cq, 1cqw)) solid #d8553f; background: rgb(23 21 19 / .85); color: rgb(243 237 226 / .92); font: italic calc(1.2 * var(--cq, 1cqw))/1.45 var(--police-poeme); cursor: default; }
.dp-encart:empty { display: none; }
@container (max-width: 700px) { .dp-encart { display: none; } }   /* sur téléphone, pas de notes */

/* Jauge de progression : trait très fin en haut de l'écran */
.dp-jauge { position: fixed; top: 0; left: 0; z-index: 4; height: 2px; width: 0; background: rgb(243 237 226 / .35); pointer-events: none; }

/* Sous-titres : masqués quand la voix parle (image plein écran) ; visibles son coupé, la scène rétrécit d'autant */
.diaporama.sous-titres .dp-cartouche { display: block; }

/* Carton sur fond d'image (plan.fond) : l'image, estompée, reste visible derrière le texte */
.carton.avec-fond { isolation: isolate; }
.carton.avec-fond::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fond) center / cover no-repeat; opacity: .3; filter: saturate(.6); animation: fond-avance 14s linear forwards; }
.carton-date.avec-fond::before { opacity: .2; }
@keyframes fond-avance { from { scale: 1; } to { scale: 1.06; } }

/* À retenir : incrustation lisible en bas de l'image, le temps de la phrase */
.dp-retenir { position: absolute; z-index: 5; top: calc(3.2 * var(--cq, 1cqw)); right: calc(2.4 * var(--cq, 1cqw)); display: grid; justify-items: end; gap: calc(.5 * var(--cq, 1cqw)); max-width: calc(22 * var(--cq, 1cqw)); pointer-events: none; }
.dp-retenir p { margin: 0; padding: .5em .9em .55em; border-right: calc(.35 * var(--cq, 1cqw)) solid var(--rouge-vif); background: rgb(15 14 13 / .85); box-shadow: 0 6px 20px rgb(0 0 0 / .45);
  font: calc(1.8 * var(--cq, 1cqw))/1.2 var(--police-ui); color: #fff; text-align: right; animation: retenir-entre .6s cubic-bezier(.2, .7, .2, 1) both; }
.dp-retenir p:nth-child(2) { animation-delay: .25s; }
.dp-retenir b { font-weight: 700; }
.dp-retenir span { display: block; margin-top: .15em; font-size: .72em; font-weight: 400; color: rgb(243 237 226 / .85); }
@keyframes retenir-entre { from { opacity: 0; transform: translateX(calc(2 * var(--cq, 1cqw))); } }
.en-pause .dp-retenir p { animation-play-state: paused; }

/* Récapitulatif d'un chapitre (carton style « recap ») */
.carton-recap { background-color: #f3ede2; color: #1d1a17; justify-content: center; }
.c-notions { margin: calc(1.69 * var(--cq, 1cqw)) 0 0; padding: 0; list-style: none; text-align: left; font: calc(2.02 * var(--cq, 1cqw))/1.3 var(--police-ui); }
.c-notions.deux { columns: 2; column-gap: calc(4 * var(--cq, 1cqw)); }
.c-notions li { break-inside: avoid; margin-bottom: calc(0.73 * var(--cq, 1cqw)); padding-left: .8em; border-left: 4px solid #B8412F; animation: carton-monte .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * .25s + .5s); }
.c-notions b { font-weight: 700; }
.c-notions span { color: #5a534c; }

/* Effets photographiques (moteur/effets.js) */
.fx-revelateur.visible .dp-tirage img { animation: fx-bain 3.2s ease-out both; }
@keyframes fx-bain { from { filter: brightness(2.6) contrast(.25) sepia(.5); } 60% { filter: brightness(1.2) contrast(.8) sepia(.2); } to { filter: none; } }
.fx-flash::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.fx-flash.visible::after { animation: fx-eclair .7s ease-out; }
.fx-flash.visible .dp-tirage { animation: fx-declic .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fx-eclair { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes fx-declic { from { scale: 1.04; } }
.fx-planche .dp-tirage img { border: solid #141210; border-width: 22px 10px; outline: 1px solid #000;
  background: #141210; box-shadow: 0 18px 50px rgb(0 0 0 / .55); }
.fx-planche .dp-tirage { position: relative; }
.fx-planche .dp-tirage::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 10px; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgb(243 237 226 / .75) 10px 22px, transparent 22px 30px); width: var(--l, auto); }
.fx-viseur.visible .dp-tirage img { animation: fx-netteté 1.6s ease-out both; }
@keyframes fx-netteté { from { filter: blur(10px); } to { filter: none; } }
.fx-cadre { position: absolute; inset: 7% 10% 12%; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s .3s; }
.visible .fx-cadre { opacity: 1; }
.fx-cadre i { position: absolute; width: 4vmin; height: 4vmin; border: 2px solid rgb(255 255 255 / .85); }
.fx-cadre i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; } .fx-cadre i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
.fx-cadre i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; } .fx-cadre i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
.fx-cadre span { position: absolute; left: 0; right: 0; bottom: -2.2em; text-align: center; font: 600 calc(0.90 * var(--cq, 1cqw)) var(--police-ui); letter-spacing: .12em; color: rgb(255 255 255 / .85); }
.dp-cadre { position: relative; display: block; }
.dp-marque { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dp-marque ellipse { fill: none; stroke: #e0342a; stroke-width: .9; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 4;
  stroke-dasharray: 100; stroke-dashoffset: 100; animation: fx-crayon 1.2s ease-in-out var(--retard, 1.4s) forwards; }
@keyframes fx-crayon { to { stroke-dashoffset: 0; } }
.en-pause .fx-cadre b, .en-pause .dp-marque ellipse, .en-pause .dp-tirage img { animation-play-state: paused; }

/* Habillages par époque (donnée `habillage` d'un chapitre → classe .hb-<nom> sur l'écran 16:9), cadres d'image, effets et plans composés.
   Mesures en cqw. Les mots-clés (.dp-retenir) et le récapitulatif gardent le même aspect partout. Images « sobre » : fondu lent, aucun effet. */

/* ---------- Socle : grain, zoom, sobriété ---------- */
.dp-grain { position: absolute; inset: -10%; z-index: 4; pointer-events: none; display: none; opacity: .16; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: hb-grain .5s steps(4) infinite; }
@keyframes hb-grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
.hb-plaque .dp-grain, .hb-albumine .dp-grain, .hb-ia .dp-grain { display: block; }
.dp-plan.sobre { transition-duration: 2.6s; }
.dp-plan.sobre, .dp-plan.sobre .dp-tirage { animation: none !important; }
.dp-plan.zoome { animation: none; }
.dp-zoom { position: relative; overflow: hidden; }
.dp-zoom > * { transform-origin: var(--zx) var(--zy); }
.dp-plan.visible .dp-zoom > * { animation: zoom-detail var(--zd) cubic-bezier(.5, 0, .3, 1) var(--zr) both; }
@keyframes zoom-detail { to { scale: var(--zs); } }
.dp-marque { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fenetre .dp-marque { z-index: 2; }

/* ---------- Cadres d'image (moteur/cadres.js) ---------- */
.cadre-plaque, .cadre-carte { position: relative; box-shadow: none !important; }
.cadre-plaque { filter: drop-shadow(0 calc(1.5 * var(--cq, 1cqw)) calc(2.5 * var(--cq, 1cqw)) rgb(0 0 0 / .7)); }
.cadre-carte { filter: drop-shadow(0 calc(1.2 * var(--cq, 1cqw)) calc(1.8 * var(--cq, 1cqw)) rgb(0 0 0 / .6)); rotate: var(--incl, -1.5deg); }
.cadre-plaque > .motif, .cadre-carte > .motif { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.fenetre { position: absolute; overflow: hidden; background: #111; }
.fenetre > img, .fenetre > .dp-cadre > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; }
.fenetre > .dp-cadre { position: absolute; inset: 0; }
.cadre-plaque .fenetre { left: 15.4%; top: 21.8%; width: 68.8%; height: 60%; border-radius: 50%; }
.cadre-plaque .fenetre img { filter: grayscale(1) sepia(.12) contrast(1.15) brightness(1.08); }
.cadre-plaque .fenetre .neg { filter: grayscale(1) invert(1) contrast(1.2) sepia(.25) hue-rotate(170deg) saturate(1.6); z-index: 1;
  -webkit-mask: linear-gradient(105deg, transparent 38%, #000 47%, #000 53%, transparent 62%) 120% 0 / 300% 100% no-repeat;
          mask: linear-gradient(105deg, transparent 38%, #000 47%, #000 53%, transparent 62%) 120% 0 / 300% 100% no-repeat; }
.dp-plan.visible .cadre-plaque .neg { animation: hb-reflet 5s ease-in-out 3.6s both; }
@keyframes hb-reflet { from { -webkit-mask-position: 120% 0; mask-position: 120% 0; } to { -webkit-mask-position: -20% 0; mask-position: -20% 0; } }
.dp-plan.zoome .cadre-plaque .neg { display: none; }
.cadre-carte .fenetre { left: 11.4%; top: 12.4%; width: 77%; height: 72.6%; }
.cadre-carte .fenetre img { filter: sepia(.8) contrast(1.05) brightness(1.03) saturate(1.1); }
.cadre-verre { position: relative; border: calc(.5 * var(--cq, 1cqw)) solid #c9cfd2; outline: calc(.15 * var(--cq, 1cqw)) solid #6c7377; background: #ddd; }
.cadre-page { position: relative; padding: calc(1.6 * var(--cq, 1cqw)) calc(1.6 * var(--cq, 1cqw)) calc(3.4 * var(--cq, 1cqw)); background: url("/habillages/papier.webp") center / cover, #ece2c8; }
.cadre-page > img { filter: grayscale(.2) contrast(1.05); }
.flipbook { background: var(--sprite) 0 0 / calc(var(--n) * 100%) 100% no-repeat; filter: sepia(.25) contrast(1.1); }
.dp-plan.visible .flipbook { animation: hb-galop calc(var(--n) * .1s) steps(var(--n), jump-none) .8s infinite; }
@keyframes hb-galop { to { background-position: 100% 0; } }
.stereo { position: relative; background: var(--stereo) center / 100% 100% no-repeat; }
/* Relief : une vue seule, au centre de la carte, alterne brièvement avec l'autre (environ 1,7 s), puis la carte double revient. */
.stereo span { position: absolute; inset: 0 25%; background: var(--stereo) 0 0 / 200% 100% no-repeat; opacity: 0; }
.stereo .d { background-position: 100% 0; }
.dp-plan.visible .stereo .g { animation: st-relief 1.7s linear 2.6s; }
.dp-plan.visible .stereo .d { animation: st-relief 1.7s linear 2.6s, st-bascule .28s steps(1) 2.6s 6; }
@keyframes st-relief { 0%, 100% { opacity: 0; } 4%, 96% { opacity: 1; } }
@keyframes st-bascule { 50% { opacity: 0; } }
.cadre-ia { position: relative; }
.cadre-ia .bruit { position: absolute; inset: 0; background: #777 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='1.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / calc(12 * var(--cq, 1cqw)); }
.dp-plan.visible .cadre-ia .bruit { animation: ia-debruite 4.5s steps(9) .4s both, hb-grain .4s steps(3) infinite; }
.dp-plan.visible .cadre-ia > img { animation: ia-net 4.5s steps(9) .4s both; }
@keyframes ia-debruite { from { opacity: 1; } to { opacity: 0; } }
@keyframes ia-net { from { filter: blur(calc(2.4 * var(--cq, 1cqw))) saturate(.3); } to { filter: none; } }
.badge-ia { position: absolute; left: calc(1.2 * var(--cq, 1cqw)); top: calc(1.2 * var(--cq, 1cqw)); z-index: 2; padding: calc(.5 * var(--cq, 1cqw)) calc(1 * var(--cq, 1cqw)); background: #d23b2a; color: #fff; font: 700 calc(1.5 * var(--cq, 1cqw)) var(--police-ui); letter-spacing: .12em; text-transform: uppercase; }
.dp-plan.visible .badge-ia { animation: ia-badge .5s ease-out 4.6s both, ia-clignote 1.2s ease-in-out 5.2s 3; }
@keyframes ia-badge { from { opacity: 0; } }
@keyframes ia-clignote { 50% { opacity: .35; } }
.cadre-ia + figcaption { background: #d23b2a !important; color: #fff !important; font-style: normal !important; font-weight: 700; }

/* ---------- Effets d'entrée (moteur/effets.js) ---------- */
.fx-iris.visible .dp-vue { animation: fx-iris 1.6s cubic-bezier(.6, 0, .3, 1) .2s both; }
@keyframes fx-iris { from { clip-path: circle(0% at 50% 45%); } to { clip-path: circle(75% at 50% 45%); } }
.fx-pas.visible .dp-tirage { animation: fx-pas 1.2s steps(6) both; }
@keyframes fx-pas { from { opacity: 0; filter: brightness(1.8); } }
.fx-diagonale.visible .dp-tirage { animation: fx-diag 1.2s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes fx-diag { from { transform: translate(calc(40 * var(--cq, 1cqw)), calc(25 * var(--cq, 1cqw))) rotate(-6deg); opacity: 0; } }
.fx-tourne { perspective: calc(160 * var(--cq, 1cqw)); }
.fx-tourne.visible .dp-tirage { animation: fx-tourne 1.5s cubic-bezier(.5, 0, .2, 1) .3s both; transform-origin: 0 50%; }
@keyframes fx-tourne { from { transform: rotateY(-100deg); } }
.fx-scan.visible .dp-vue { animation: fx-scan 2.6s linear .4s both; }
.fx-ligne { position: absolute; left: 0; right: 0; top: 0; height: calc(.4 * var(--cq, 1cqw)); background: #bfe3ff; box-shadow: 0 0 calc(2 * var(--cq, 1cqw)) calc(.6 * var(--cq, 1cqw)) rgb(150 210 255 / .8); opacity: 0; pointer-events: none; }
.fx-scan .dp-tirage { position: relative; }
.fx-scan.visible .fx-ligne { animation: fx-ligne 2.6s linear .4s both; }
@keyframes fx-scan { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fx-ligne { 0% { top: 0; opacity: 1; } 98% { top: calc(100% - calc(4 * var(--cq, 1cqw))); opacity: 1; } 100% { opacity: 0; } }

/* ---------- Plans composés (moteur/plans.js) ---------- */
.dp-schema { place-items: center; }
.schema { width: calc(92 * var(--cq, 1cqw)); }
.voie .schema { width: calc(70 * var(--cq, 1cqw)); }   /* voie des mots-clés : le schéma laisse la colonne de droite */
.schema svg { width: 100%; height: auto; max-height: calc(50 * var(--cq, 1cqw)); display: block; }   /* graphe recadré : jamais plus haut que la scène */
.schema .sc-objet, .schema .sc-boite, .schema .sc-soleil { opacity: 0; }
.visible .schema .sc-soleil { animation: sc-apparait .8s ease-out .2s forwards; }
.visible .schema .sc-objet { animation: sc-apparait .8s ease-out .5s forwards; }
.visible .schema .sc-boite { animation: sc-apparait .8s ease-out 1s forwards; }
.schema .sc-rayons path { stroke-dasharray: 100; stroke-dashoffset: 100; }
.visible .schema .sc-rayons path { animation: sc-trace 2.4s ease-in-out 1.8s forwards; }
.visible .schema .sc-rayons path:nth-child(2) { animation-delay: 2.2s; } .visible .schema .sc-rayons path:nth-child(3) { animation-delay: 2.6s; }
.schema .sc-image { opacity: 0; }
.visible .schema .sc-image { animation: sc-apparait 1.2s ease-out 4.4s forwards; }
.schema .sc-textes text { opacity: 0; }
.visible .schema .t1 { animation: sc-apparait .6s ease-out 1s forwards; } .visible .schema .t2 { animation: sc-apparait .6s ease-out 2.4s forwards; } .visible .schema .t3 { animation: sc-apparait .6s ease-out 5s forwards; }
@keyframes sc-apparait { to { opacity: 1; } }
@keyframes sc-trace { to { stroke-dashoffset: 0; } }
/* Graphe (moteur/graphe.js) : nœuds déjà vus, nœud et lien nouveaux animés, absents cachés */
.graphe .gr-noeud rect { fill: #1d1a17; stroke: #cbb994; stroke-width: 3; }
.graphe .gr-centre rect { fill: #B8412F; stroke: #f3ede2; } .graphe .gr-groupe rect { fill: #3a3129; stroke: #e2c878; stroke-width: 4; }
.graphe .gr-noeud text { fill: #f3ede2; text-anchor: middle; font-weight: 700; } .graphe .gr-sous { font-weight: 400; fill: #d9cfbd; }
.graphe .gr-lien path { fill: none; stroke: #cbb994; stroke-width: 4; stroke-linecap: round; } .graphe .gr-fort path { stroke: #d8553f; stroke-width: 7; }
.graphe .gr-etiquette { fill: #e2c878; text-anchor: middle; font-style: italic; }
.graphe .sc-absent { display: none; }
.graphe .sc-nouveau { opacity: 0; } .visible .graphe .gr-noeud.sc-nouveau { animation: sc-apparait .9s ease-out .9s forwards; }
.visible .graphe .gr-lien.sc-nouveau { animation: sc-apparait .3s ease-out .2s forwards; }
.graphe .gr-lien.sc-nouveau path { stroke-dasharray: 100; stroke-dashoffset: 100; } .visible .graphe .gr-lien.sc-nouveau path { animation: sc-trace 1s ease-in-out .3s forwards; }
.fx-loupe { position: relative; overflow: hidden; }
.fx-loupe > img { transform-origin: var(--lx) var(--ly); }
.fx-loupe > .detail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.visible .fx-loupe > img:first-child { animation: loupe-plonge 9s cubic-bezier(.5, 0, .5, 1) 1.2s both; }
.visible .fx-loupe > .detail { animation: loupe-detail 9s cubic-bezier(.5, 0, .5, 1) 1.2s both; }
@keyframes loupe-plonge { 0%, 10% { transform: scale(1); opacity: 1; } 24% { opacity: 1; } 28%, 100% { transform: scale(5); opacity: 0; } }
@keyframes loupe-detail { 0%, 18% { opacity: 0; transform: scale(.7); } 30%, 100% { opacity: 1; transform: scale(1); } }
.planche-cadre { position: relative; }
.planche-cadre .dp-vue { box-shadow: 0 calc(1 * var(--cq, 1cqw)) calc(2.5 * var(--cq, 1cqw)) rgb(0 0 0 / .35); }
@property --lx { syntax: "<percentage>"; inherits: true; initial-value: 20%; }
@property --ly { syntax: "<percentage>"; inherits: true; initial-value: 60%; }
.loupe { position: absolute; left: var(--lx); top: var(--ly); width: calc(15 * var(--cq, 1cqw)); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: calc(.9 * var(--cq, 1cqw)) solid #1a1a1a; z-index: 2;
  box-shadow: 0 calc(1.5 * var(--cq, 1cqw)) calc(2.5 * var(--cq, 1cqw)) rgb(0 0 0 / .45), inset 0 0 calc(1.5 * var(--cq, 1cqw)) rgb(0 0 0 / .4); background: var(--planche) var(--lx) var(--ly) no-repeat; }
.visible .loupe { animation: loupe-parcours 6s cubic-bezier(.45, 0, .3, 1) .8s both, loupe-part .6s ease-in 7s forwards; }
@keyframes loupe-parcours { 0% { --lx: 18%; --ly: 64%; } 35% { --lx: 40%; --ly: 40%; } 65% { --lx: 55%; --ly: 82%; } 100% { --lx: var(--cx); --ly: var(--cy); } }
@keyframes loupe-part { to { opacity: 0; } }
.visible .planche-cadre { animation: planche-plonge 2.4s cubic-bezier(.6, 0, .2, 1) 7.2s both; transform-origin: var(--cx) var(--cy); }
.visible .sans-puis.planche-cadre { animation: none; } .visible .sans-puis .loupe { animation: loupe-parcours 6s cubic-bezier(.45, 0, .3, 1) .8s both; }
@keyframes planche-plonge { to { transform: scale(5); opacity: 0; } }
.planche-puis { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.dp-planche.voie .planche-puis { padding: 0 calc(25 * var(--cq, 1cqw)) 0 calc(2 * var(--cq, 1cqw)); }
.visible .planche-puis { animation: sc-apparait 1.2s ease-out 8.8s forwards; }
.telephone { position: relative; width: calc(22 * var(--cq, 1cqw)); aspect-ratio: 9 / 18.5; border-radius: calc(3 * var(--cq, 1cqw)); padding: calc(1 * var(--cq, 1cqw)); background: #1c1f24; box-shadow: 0 0 0 calc(.25 * var(--cq, 1cqw)) #3a3f47, 0 calc(2 * var(--cq, 1cqw)) calc(4 * var(--cq, 1cqw)) rgb(0 0 0 / .6); }
.ecran-tel { position: relative; height: 100%; border-radius: calc(2.2 * var(--cq, 1cqw)); overflow: hidden; background: #fff; }
.flux { display: grid; gap: calc(.5 * var(--cq, 1cqw)); padding: calc(3.4 * var(--cq, 1cqw)) calc(.6 * var(--cq, 1cqw)) 0; animation: tel-defile 12s linear infinite; }
.flux img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(.6 * var(--cq, 1cqw)); }
@keyframes tel-defile { to { transform: translateY(-50%); } }
.barre-tel { position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: calc(3 * var(--cq, 1cqw)); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(1.2 * var(--cq, 1cqw)); background: rgb(255 255 255 / .92); color: #111; font: 700 calc(1.1 * var(--cq, 1cqw)) var(--police-ui); }
.coeurs { position: absolute; right: calc(-11 * var(--cq, 1cqw)); top: 40%; font: calc(2.4 * var(--cq, 1cqw)) "VT323", monospace; color: #ff5a7a; }
.dp-mosaique { place-items: center; }
.mosaique { display: grid; grid-template-columns: repeat(14, 1fr); gap: calc(.35 * var(--cq, 1cqw)); width: calc(94 * var(--cq, 1cqw)); padding: calc(1.2 * var(--cq, 1cqw)); background: #f1ede4; box-shadow: 0 calc(1 * var(--cq, 1cqw)) calc(3 * var(--cq, 1cqw)) rgb(0 0 0 / .4); }
.mosaique img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1) contrast(1.05); border: calc(.25 * var(--cq, 1cqw)) solid #141210; opacity: 0; }
.visible .mosaique img { animation: mosaique-pose .5s ease-out calc(var(--i) * .07s) forwards; }
@keyframes mosaique-pose { from { opacity: 0; transform: scale(1.3); } to { opacity: 1; transform: none; } }

/* ---------- 1. Plaque argentée (1826-1850) ---------- */
.hb-plaque { background: radial-gradient(ellipse at 50% 45%, #2b211a 0%, #120d0a 60%, #080605 100%); }
.hb-plaque .carton { background: radial-gradient(ellipse at 50% 50%, #1b1511, #070504 75%); color: #e8d29a; }
.hb-plaque .carton-titre h2 { font: 400 calc(8 * var(--cq, 1cqw))/1 "IM Fell English SC", Georgia, serif; letter-spacing: .04em;
  background: linear-gradient(100deg, #8a6a35 0%, #e8d29a 35%, #fff4cf 45%, #c9a35a 55%, #7a5a2a 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb-plaque .visible .carton-titre h2 { animation: hb-dorure 4.5s ease-in-out .4s both; }
@keyframes hb-dorure { from { background-position: 100% 0; opacity: 0; } 20% { opacity: 1; } to { background-position: 0 0; } }
.hb-plaque .c-filet { width: calc(26 * var(--cq, 1cqw)); height: calc(.7 * var(--cq, 1cqw)); background: none; border-block: calc(.12 * var(--cq, 1cqw)) solid #b59a6a; }
.hb-plaque .c-sous, .hb-plaque .c-evt, .hb-plaque .c-an { font-family: "IM Fell English SC", Georgia, serif; color: #d9c393; opacity: 1; }
.hb-plaque .c-jour, .hb-plaque .c-mois { font-family: "IM Fell English", Georgia, serif; color: #e8d29a; }
.hb-plaque .carton-citation blockquote { font-family: "IM Fell English", Georgia, serif; }
.hb-plaque .dp-tirage figcaption { background: #e6d6b0; }

/* ---------- 2. Carte de visite albuminée (1851-1865) ---------- */
.hb-albumine { background: radial-gradient(ellipse at 50% 40%, #4a3523 0%, #24180f 55%, #120b06 100%); }
.hb-albumine .carton { inset: calc(7 * var(--cq, 1cqw)) calc(20 * var(--cq, 1cqw)); height: auto; background: #efe4cc; color: #3a2a1a; border-radius: calc(.6 * var(--cq, 1cqw));
  box-shadow: 0 calc(1.5 * var(--cq, 1cqw)) calc(3 * var(--cq, 1cqw)) rgb(0 0 0 / .6), inset 0 0 0 calc(1.2 * var(--cq, 1cqw)) #efe4cc, inset 0 0 0 calc(1.32 * var(--cq, 1cqw)) #a8864e, inset 0 0 0 calc(1.6 * var(--cq, 1cqw)) #efe4cc, inset 0 0 0 calc(1.68 * var(--cq, 1cqw)) #a8864e; }
.hb-albumine .visible .carton { animation: hb-pose 1.3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hb-pose { from { transform: translateY(calc(8 * var(--cq, 1cqw))) rotate(-4deg); opacity: 0; } }
.hb-albumine .carton-titre h2, .hb-albumine .carton-citation blockquote { font-family: "Bodoni Moda", Didot, serif; font-style: italic; font-weight: 500; font-size: calc(5 * var(--cq, 1cqw)); max-width: calc(50 * var(--cq, 1cqw)); }
.hb-albumine .carton-citation blockquote { font-size: calc(3.4 * var(--cq, 1cqw)); }
.hb-albumine .c-jour, .hb-albumine .c-mois, .hb-albumine .c-an { font-family: "Bodoni Moda", Didot, serif; }
.hb-albumine .c-filet { width: calc(6 * var(--cq, 1cqw)); height: calc(.14 * var(--cq, 1cqw)); background: #a8864e; }
.hb-albumine .c-sous, .hb-albumine .c-evt { font-family: "Bodoni Moda", Didot, serif; }
.hb-albumine .dp-tirage figcaption { background: #efe4cc; font-family: "Bodoni Moda", Didot, serif; }

/* ---------- 3. Plaque de verre, affiche 1900 (1878-1914) ---------- */
.hb-verre { background: radial-gradient(ellipse at 50% 50%, #3a3a33 0%, #1a1a16 70%); }
.hb-verre .carton { background-color: #efe3c4; color: #46542a; }
.hb-verre .carton-titre, .hb-verre .carton-date { background: #efe3c4 url("/habillages/affiche.webp") center / cover; animation: none; padding-top: calc(10 * var(--cq, 1cqw)); }
.hb-verre .carton-titre h2, .hb-verre .carton-citation blockquote { font: calc(5 * var(--cq, 1cqw))/1.05 "Amarante", serif; max-width: calc(62 * var(--cq, 1cqw)); color: #46542a; }
.hb-verre .carton-citation blockquote { font-size: calc(3.4 * var(--cq, 1cqw)); }
.hb-verre .c-jour, .hb-verre .c-mois, .hb-verre .c-an { font-family: "Amarante", serif; }
.hb-verre .c-filet { width: calc(12 * var(--cq, 1cqw)); height: calc(.25 * var(--cq, 1cqw)); background: #8a3d2a; border-radius: calc(1 * var(--cq, 1cqw)); }
.hb-verre .c-sous, .hb-verre .c-evt { font-family: "Amarante", serif; color: #6a5a3a; }
.hb-verre .visible .carton > * { animation: hb-litho 1.6s ease-out both; }
@keyframes hb-litho { from { opacity: 0; filter: blur(calc(.5 * var(--cq, 1cqw))); } }

/* ---------- 4. Avant-gardes, Bauhaus (1918-1939) ---------- */
.hb-bauhaus { background: #e9e4d8; color: #111; }
.hb-bauhaus .carton { isolation: isolate; background: #e9e4d8 linear-gradient(-10deg, transparent 0 74%, #111 74% 80%, transparent 80%); color: #111; overflow: hidden; }
.hb-bauhaus .carton::after { content: ""; position: absolute; width: calc(24 * var(--cq, 1cqw)); aspect-ratio: 1; border-radius: 50%; background: #d23b2a; right: calc(12 * var(--cq, 1cqw)); top: calc(6 * var(--cq, 1cqw)); z-index: -1; }
.hb-bauhaus .carton-titre h2, .hb-bauhaus .carton-citation blockquote { font: 800 calc(6.4 * var(--cq, 1cqw))/.95 "Jost", "Futura", sans-serif; text-transform: uppercase; rotate: -10deg; }
.hb-bauhaus .carton-citation blockquote { font-size: calc(3.4 * var(--cq, 1cqw)); text-transform: none; }
.hb-bauhaus .c-jour, .hb-bauhaus .c-mois, .hb-bauhaus .c-an, .hb-bauhaus .c-sous, .hb-bauhaus .c-evt { font-family: "Jost", sans-serif; }
.hb-bauhaus .c-filet { background: #d23b2a; height: calc(.5 * var(--cq, 1cqw)); }
.hb-bauhaus .visible .carton > * { animation: fx-diag 1.1s cubic-bezier(.2, .9, .2, 1) both; }
.hb-bauhaus .dp-tirage .dp-vue { filter: grayscale(.3) contrast(1.15); box-shadow: calc(1.2 * var(--cq, 1cqw)) calc(1.2 * var(--cq, 1cqw)) 0 #d23b2a; }
.hb-bauhaus .dp-tirage figcaption { margin-top: calc(2 * var(--cq, 1cqw)); }
.hb-bauhaus .dp-tirage figcaption { background: #111; color: #e9e4d8; font: 500 calc(1.2 * var(--cq, 1cqw)) "Jost", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.hb-bauhaus .solarise .dp-vue { filter: url(#solarise); }

/* ---------- 5. Magazine illustré (1928-1945) ---------- */
.hb-magazine { background: #2a2622; }
.hb-magazine .carton { background: url("/habillages/papier.webp") center / cover, #ece2c8; color: #1f1b16; }
.hb-magazine .carton-titre h2, .hb-magazine .carton-citation blockquote { font: calc(5.2 * var(--cq, 1cqw))/1.02 "Limelight", "Poiret One", serif; max-width: calc(62 * var(--cq, 1cqw)); }
.hb-magazine .carton-citation blockquote { font-size: calc(3.2 * var(--cq, 1cqw)); }
.hb-magazine .c-jour, .hb-magazine .c-mois, .hb-magazine .c-an { font-family: "Limelight", serif; }
.hb-magazine .c-sous, .hb-magazine .c-evt { font-family: "Poiret One", sans-serif; letter-spacing: .35em; }
.hb-magazine .c-filet { background: #1f1b16; }
.hb-magazine .dp-tirage figcaption { background: #ece2c8; color: #1f1b16; font: 500 calc(1.15 * var(--cq, 1cqw)) "Jost", sans-serif; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }   /* Poiret One, trop maigre, rendait la légende illisible */

/* ---------- 6. Planche contact (1945-1972) ---------- */
.hb-planche { background: radial-gradient(ellipse at 50% 50%, #3a3733 0%, #1a1816 100%); }
.hb-planche .carton { background: #f4efe2; color: #1d1a17; }
.hb-planche .carton-titre h2, .hb-planche .carton-citation blockquote, .hb-planche .c-evt, .hb-planche .c-sous { font-family: "Special Elite", "Courier New", monospace; font-weight: 400; }
.hb-planche .carton-titre h2 { font-size: calc(5.4 * var(--cq, 1cqw)); }
.hb-planche .c-jour, .hb-planche .c-mois, .hb-planche .c-an { font-family: "Special Elite", monospace; }
.hb-planche .visible .carton-titre h2, .hb-planche .visible .c-evt { animation: hb-frappe 1.6s steps(24) both; }
@keyframes hb-frappe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hb-planche .dp-tirage figcaption { font-family: "Special Elite", monospace; font-style: normal; }

/* ---------- 7. Numérique (1975-2023) ---------- */
.hb-numerique { background: #080a0d; color: #e6ecf5; }
.hb-numerique::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .18;
  background: linear-gradient(90deg, rgb(255 255 255 / .12) 1px, transparent 1px) 0 0 / calc(.5 * var(--cq, 1cqw)) calc(.5 * var(--cq, 1cqw)), linear-gradient(rgb(255 255 255 / .12) 1px, transparent 1px) 0 0 / calc(.5 * var(--cq, 1cqw)) calc(.5 * var(--cq, 1cqw)); }
.hb-numerique .carton { background: #080a0d; color: #e6ecf5; }
.hb-numerique .carton-titre h2 { font: calc(5.6 * var(--cq, 1cqw))/1 "VT323", monospace; text-wrap: nowrap; white-space: nowrap; }
.hb-numerique .visible .carton-titre h2 { animation: hb-frappe 2.2s steps(28) .3s both; }
.hb-numerique .carton-citation blockquote, .hb-numerique .c-jour, .hb-numerique .c-mois, .hb-numerique .c-an, .hb-numerique .c-sous, .hb-numerique .c-evt { font-family: "VT323", monospace; }
.hb-numerique .c-sous { color: #6fd2ff; letter-spacing: .3em; }
.hb-numerique .c-filet { background: #6fd2ff; }
.hb-numerique .dp-tirage figcaption { background: #10151c; color: #e6ecf5; font: calc(1.5 * var(--cq, 1cqw)) "VT323", monospace; }

/* ---------- 8. Et maintenant ? (2023-2039) ---------- */
.hb-ia { background: radial-gradient(ellipse at 50% 45%, #2b211a, #080605 75%); }
.hb-ia .carton { background: radial-gradient(ellipse at 50% 50%, #1b1511, #070504 75%); color: #e8d29a; }
.hb-ia .carton-titre h2 { font: 400 calc(7 * var(--cq, 1cqw))/1 "IM Fell English SC", Georgia, serif; color: #e8d29a; }
.hb-ia .carton-citation blockquote { font-family: "IM Fell English", Georgia, serif; color: #f3ede2; }
.hb-ia .c-sous, .hb-ia .c-evt, .hb-ia .c-an { font-family: "IM Fell English SC", Georgia, serif; color: #d9c393; opacity: 1; }
.hb-ia .c-jour, .hb-ia .c-mois { font-family: "IM Fell English", Georgia, serif; color: #e8d29a; }
.hb-ia .c-filet { width: calc(26 * var(--cq, 1cqw)); height: calc(.7 * var(--cq, 1cqw)); background: none; border-block: calc(.12 * var(--cq, 1cqw)) solid #b59a6a; }
.hb-ia .dp-tirage figcaption { background: #e6d6b0; }

/* Le récapitulatif garde partout le même aspect, lisible. */
.dp-ecran .carton-recap { background: #f3ede2; color: #1d1a17; inset: 0; border-radius: 0; box-shadow: none; animation: none; }
.dp-ecran .carton-recap .c-filet { width: min(calc(38 * var(--cq, 1cqw)), 20rem); height: 2px; background: #B8412F; border: 0; }
.en-pause .dp-plan, .en-pause .dp-plan *, .en-pause .dp-plan *::before, .en-pause .dp-plan *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .dp-ecran *, .dp-ecran *::before, .dp-ecran *::after { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; } }

/* Sommaire des chapitres */
.sommaire { max-width: 78rem; margin: 0 auto; padding: 6vh 1rem 4rem; }
.sommaire header { text-align: center; margin-bottom: 5vh; }
.s-auteur { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--rouge-vif); }
.sommaire h1 { margin: .5rem 0; font: 600 clamp(2rem, 5vw, 3.6rem)/1.1 var(--police-poeme); }
.s-sous { margin: 0; font: italic 1.15rem var(--police-poeme); opacity: .75; }
.s-chapitres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.4rem; }
.s-carte { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0 0 1rem; border: 1px solid rgb(243 237 226 / .1); border-radius: 4px; background: #171513; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: transform .25s, border-color .25s; }
.s-carte:hover, .s-carte:focus-visible { transform: translateY(-3px); border-color: rgb(243 237 226 / .35); }
.s-carte.suivant { border-color: var(--rouge-vif); }
.s-carte img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 25%; margin-bottom: .9rem; background: #25221f; }
.s-carte.vu img { filter: saturate(.4); opacity: .75; }
.s-num { padding: 0 1rem; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--rouge-vif); }
.s-titre { padding: .3rem 1rem .2rem; font: 600 1.3rem/1.25 var(--police-poeme); }
.s-dates { padding: 0 1rem; font-size: .9rem; opacity: .65; }
.s-aide { margin: 4vh auto 0; max-width: 60ch; text-align: center; font-size: .9rem; line-height: 1.5; opacity: .6; }
.s-liens { list-style: none; padding: 0; text-align: center; font: 1.3rem/2 var(--police-poeme); }
.s-liens a { color: var(--papier); }
.s-credits { margin: 5vh auto 0; max-width: 60rem; font-size: .85rem; line-height: 1.5; opacity: .7; }
.s-credits summary { cursor: pointer; text-align: center; }
.s-credits ul { padding-left: 1.2rem; }
.s-credits a { color: var(--papier); }
.s-retour { margin-bottom: 2vh; font-size: .9rem; }
.s-retour a { color: var(--papier); opacity: .7; text-decoration: none; }
.s-retour a:hover { opacity: 1; }
.s-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 0 0 4vh; }
.s-actions .s-recap { margin: 0; }
.s-tout { padding: .7rem 1.6rem; border: 1px solid var(--rouge-vif); border-radius: 2rem; background: var(--rouge-vif); color: #1d1a17; font: 600 1rem var(--police-ui); cursor: pointer; }
.s-tout small { font-weight: 400; opacity: .75; margin-left: .3rem; }
.s-tout:hover { filter: brightness(1.1); }
/* Accueil : surtitre lien vers le site principal, une carte par diaporama */
.s-auteur a { color: inherit; text-decoration: none; }
.s-auteur a:hover, .s-auteur a:focus-visible { text-decoration: underline; text-underline-offset: .3em; }
a.s-carte { text-decoration: none; }
.s-presentation { padding: .4rem 1rem 0; font-size: .95rem; line-height: 1.45; opacity: .75; }
/* Grand récapitulatif */
.s-recap { display: block; margin: 0 auto 3vh; padding: .7rem 1.6rem; border: 1px solid var(--rouge-vif); border-radius: 2rem; background: none; color: var(--papier); font: 600 1rem var(--police-ui); cursor: pointer; }
.s-recap:hover { background: var(--rouge-vif); color: #1d1a17; }
.r-chapitres { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 32rem), 1fr)); gap: 2rem 3rem; }
.recap h2 { margin: 0 0 .8rem; font: 600 1.35rem/1.25 var(--police-poeme); }
.recap h2 span { display: block; font: 600 .72rem var(--police-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--rouge-vif); }
.recap h2 small { font: 400 .95rem var(--police-ui); opacity: .6; }
.recap ul { margin: 0; padding: 0; list-style: none; }
.recap li { margin-bottom: .6rem; padding-left: .8rem; border-left: 3px solid var(--rouge-vif); font-size: 1.15rem; line-height: 1.35; }
.recap li span { opacity: .75; }
.r-bas { text-align: center; margin-top: 4vh; }
.r-retour { padding: .7rem 1.6rem; border: 1px solid rgb(243 237 226 / .4); border-radius: 2rem; background: none; color: var(--papier); font: 1rem var(--police-ui); cursor: pointer; }

/* Fenêtre de transition entre deux chapitres (moteur/rebours.js) */
.rebours { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1rem; background: rgb(15 14 13 / .75); animation: rb-entre .4s ease both; }
.rb-fenetre { width: min(34rem, 100%); padding: 1.6rem 1.8rem; border: 1px solid rgb(216 85 63 / .5); border-radius: .8rem; background: #1d1a17; color: #f3ede2; box-shadow: 0 1rem 3rem rgb(0 0 0 / .5); }
.rb-fin { margin: 0 0 1rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rouge-vif); }
.rb-corps { display: flex; align-items: center; gap: 1.3rem; }
.rb-annonce { margin: 0; font: 1.35rem/1.25 var(--police-poeme); }
.rb-annonce small { display: block; margin-top: .2rem; font-size: .95rem; color: var(--rouge-vif); }
.rb-detail { margin: .5rem 0 0; font: italic 1rem/1.35 var(--police-poeme); opacity: .8; }
.rb-aide { margin: .7rem 0 0; font-size: .85rem; opacity: .7; }
.rb-cercle { position: relative; flex: none; width: 76px; height: 76px; }
.rb-cercle svg { width: 100%; height: 100%; rotate: -90deg; }
.rb-cercle circle { fill: none; stroke-width: 2.5; }
.rb-fond { stroke: rgb(243 237 226 / .15); }
.rb-plein { stroke: var(--rouge-vif); stroke-dasharray: 106.8; stroke-dashoffset: 106.8; animation: rb-plein var(--duree) linear forwards; }
.rb-n { position: absolute; inset: 0; display: grid; place-items: center; font: 1.7rem var(--police-poeme); }
.rb-boutons { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.rb-boutons button { flex: 1; padding: .7rem 1rem; border-radius: 2rem; font: .95rem var(--police-ui); cursor: pointer; }
.rb-go { border: 1px solid var(--rouge-vif); background: var(--rouge-vif); color: #1d1a17; }
.rb-stop { border: 1px solid rgb(243 237 226 / .4); background: none; color: #f3ede2; }
.rb-boutons button:hover, .rb-boutons button:focus-visible { outline: 2px solid #f3ede2; outline-offset: 2px; }
@keyframes rb-plein { to { stroke-dashoffset: 0; } }
@keyframes rb-entre { from { opacity: 0; } }
