/* PROMPT V15 : identité « porte de lumière ».
   Héros sombre avec le visuel du roman, le reste reste clair et sobre. Le curseur doré clignote partout. */
:root { --night: #0c0b0a; --gold-hi: #e3bd7a; --paper: #f7f3ea; }
html, body { overflow-x: clip; max-width: 100%; }

/* ——— En-tête transparent sur le visuel, plein quand on défile ——— */
.top-home { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .25s, border-color .25s; }
.top-home .brand, .top-home nav a { color: var(--paper); }
.top-home nav a:hover { color: var(--gold-hi); }
.top-home .aa, .top-home .inst, .top-home .bell { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: var(--paper); }
.top-home.scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--rule); }
.top-home.scrolled .brand { color: var(--ink); }
.top-home.scrolled nav a { color: var(--ink-2); } .top-home.scrolled nav a:hover { color: var(--ink); }
.top-home.scrolled .aa, .top-home.scrolled .bell { background: var(--surface); border-color: var(--rule); color: var(--ink); }
.top-home.scrolled .inst { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.top .inst { height: 2.4rem; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; padding: 0; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.bell[hidden] { display: none; }
.bell svg { width: 19px; height: 19px; }
.bell-n { position: absolute; top: -5px; right: -5px; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: var(--gold-hi); color: #14110c; font: 700 .72rem/1.2rem var(--ui); text-align: center; }
.bell-n[hidden] { display: none; }
.bell-panel { position: absolute; right: var(--gutter); top: calc(100% + 8px); width: min(24rem, calc(100vw - 2 * var(--gutter))); max-height: min(70vh, 30rem); overflow-y: auto; z-index: 70; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); padding: .5rem; }
.bell-panel[hidden] { display: none; }
.bell-panel h2 { margin: .6rem .7rem .3rem; font: 700 1rem var(--ui); }
.bell-panel .empty { margin: .4rem .7rem 1rem; color: var(--muted); font-size: .92rem; }
.bn-list { list-style: none; margin: 0; padding: 0; }
.bn-list a { display: grid; grid-template-columns: 2.2rem 1fr; gap: .7rem; padding: .7rem; border-radius: 12px; text-decoration: none; color: inherit; }
.bn-list a:hover { background: var(--surface-2); color: inherit; }
.bn-list .ic { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 1.05rem; }
.bn-list .tx { font-size: .92rem; line-height: 1.35; }
.bn-list .tx small { display: block; color: var(--muted); margin-top: .15rem; }
.bn-list li.new a { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.bn-list li.auth .ic { background: var(--ink); color: var(--gold-hi); }
@media (max-width: 700px) { .top .nl { display: none; } .top .inst { width: 2.4rem; padding: 0; justify-content: center; } .top .inst span { display: none; } .top nav { gap: .5rem; } }

/* ——— Héros ——— */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(100svh, 820px); padding: 0; margin: 0; max-width: none; gap: 0; background: var(--night); color: var(--paper); overflow: hidden; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-bg img { object-fit: cover; object-position: 72% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,7,6,.82) 0%, rgba(8,7,6,.5) 38%, rgba(8,7,6,0) 68%), linear-gradient(0deg, rgba(8,7,6,.7) 0%, rgba(8,7,6,0) 38%); }
.hero-in { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 7rem var(--gutter) clamp(2.2rem, 6vh, 4rem); }
.kicker { margin: 0 0 1.1rem; font: 600 .78rem var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-hi); }
.hero h1 { margin: 0; font-weight: inherit; }
.hero .title { display: block; margin: 0; font: 400 clamp(3rem, 8.2vw, 6.4rem)/.95 var(--read); letter-spacing: .17em; text-transform: uppercase; color: var(--paper); text-shadow: 0 2px 40px rgba(0,0,0,.45); }
.hero .title .cur { width: .07em; height: .74em; margin-left: .03em; background: var(--gold-hi); box-shadow: 0 0 18px rgba(227,189,122,.6); }
.hero .genre { margin: .5rem 0 0; font: italic 400 clamp(1.1rem, 3vw, 1.6rem) var(--read); letter-spacing: .3em; color: var(--gold-hi); }
.hook { margin: clamp(1.6rem, 5vh, 2.6rem) 0 .8rem; max-width: 20ch; font: italic 400 clamp(1.7rem, 5vw, 2.9rem)/1.18 var(--read); letter-spacing: -.01em; color: var(--paper); text-wrap: balance; }
.hook em { color: var(--gold-hi); }
.lead { margin: 0 0 1.6rem; max-width: 30rem; font-size: 1.05rem; color: rgba(247,243,234,.82); }
.hero .btns { margin-bottom: 1.8rem; }
.btn.gold { background: var(--gold-hi); border-color: var(--gold-hi); color: #14110c; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(227,189,122,.55); }
.btn.gold:hover { background: #f0cf96; border-color: #f0cf96; color: #14110c; }
.btn.ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.4); color: var(--paper); }
.btn.ghost:hover { background: rgba(255,255,255,.14); color: var(--paper); border-color: var(--paper); }
.btn small { font-size: .8em; opacity: .7; font-weight: 400; }
.next { display: inline-grid; gap: .55rem; padding: .9rem 1.2rem 1rem; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(12,11,10,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.next-k { margin: 0; display: flex; align-items: center; gap: .55rem; font: 600 .75rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: rgba(247,243,234,.75); }
.next-k .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold-hi); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.hero .countdown { display: flex; gap: 0; }
.hero .countdown p { margin: 0; padding: 0 clamp(.7rem, 2.6vw, 1.4rem); display: grid; gap: .1rem; text-align: left; }
.hero .countdown p:first-child { padding-left: 0; }
.hero .countdown p + p { border-left: 1px solid rgba(255,255,255,.2); }
.hero .countdown b { font: 500 clamp(1.6rem, 6vw, 2.4rem)/1 var(--ui); color: var(--paper); font-variant-numeric: tabular-nums; }
.hero .countdown p:last-of-type b { color: var(--gold-hi); }
.hero .countdown span { font-size: .72rem; color: rgba(247,243,234,.65); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 700px) {
  .hero { display: block; min-height: 0; }
  .hero::after { display: none; }
  .hero-bg { position: relative; display: block; height: min(56svh, 520px); z-index: 0; }
  .hero-bg img { object-position: 50% 28%; }
  .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--night) 0%, rgba(12,11,10,.55) 22%, rgba(12,11,10,0) 55%); }
  .hero-in { margin-top: -6.2rem; padding: 0 var(--gutter) 2.4rem; }
  .hero .title { font-size: clamp(2.8rem, 14vw, 4.2rem); letter-spacing: .15em; }
  .hook { max-width: none; margin: 1.2rem 0 1.1rem; font-size: clamp(1.55rem, 7vw, 2rem); }
  .lead { display: none; }
  .hero .btns { margin-bottom: 1.3rem; }
  .hero .btns .btn { flex: 1 1 100%; }
}

/* ——— L'histoire ——— */
.eyebrow { margin: 0 0 .8rem; font: 600 .78rem var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); }
.story { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.story-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(2rem, 7vw, 5.5rem); align-items: center; }
.cover { margin: 0; }
.cover img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 40px 70px -28px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.08); }
.story h2 { margin: 0 0 1.2rem; font: 600 clamp(1.9rem, 4.6vw, 3rem)/1.08 var(--read); letter-spacing: -.02em; text-wrap: balance; }
.story-tx p { margin: 0 0 1rem; font: 400 clamp(1.08rem, 2.2vw, 1.22rem)/1.65 var(--read); color: var(--ink-2); max-width: 36rem; }
.story-tx p.story-q { color: var(--ink); font-style: italic; }
.story-tx .btns { margin-top: 1.8rem; }
@media (max-width: 760px) { .story-in { grid-template-columns: 1fr; } .cover { width: 58%; max-width: 260px; margin: 0 auto; } }

/* ——— Chapitres ——— */
.chapters { background: var(--surface); border-block: 1px solid var(--rule); }
.sec-lead { margin: -.8rem 0 2rem; color: var(--ink-2); max-width: 36rem; }
.toc a, .toc .locked { grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: start; padding: 1.4rem .4rem; }
.toc .num { font: 400 1.9rem/1 var(--read); color: var(--gold-text); padding-top: .15rem; }
.toc .lab { display: block; font: 600 .74rem var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.toc .t { display: block; font: 600 clamp(1.25rem, 3vw, 1.6rem)/1.2 var(--read); letter-spacing: -.01em; }
.toc .x { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .4rem; font: italic 400 1rem/1.5 var(--read); color: var(--ink-2); }
.toc .m { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .6rem; font-size: .86rem; }
.toc .go { align-self: center; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--rule); transition: background .2s, border-color .2s, transform .2s; }
.toc .go svg { width: 18px; height: 18px; }
.toc a:hover .go { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateX(3px); }
.toc li.soon a { color: var(--muted); }
.toc li.soon .t { font-weight: 400; font-style: italic; }
.toc li.soon .go { width: auto; border: 0; font-size: .88rem; font-weight: 600; color: var(--gold-text); }
.toc li.soon a:hover .go { background: none; color: var(--ink); transform: none; }
@media (max-width: 560px) { .toc a { grid-template-columns: 2.4rem minmax(0, 1fr); } .toc .go { display: none; } .toc li.soon .go { display: block; grid-column: 2; } }

/* ——— Lire ensemble ——— */
.part { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.part-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.part h2 { margin: 0 0 1rem; font: 600 clamp(1.7rem, 4vw, 2.5rem)/1.1 var(--read); letter-spacing: -.02em; }
.part-tx p { margin: 0; color: var(--ink-2); font-size: 1.08rem; max-width: 34rem; }
.part .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; padding: 0; border: 0; max-width: none; }
.part .stat { display: grid; gap: .1rem; padding: 1.1rem 1rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); text-align: center; }
.part .stat b { font: 400 clamp(1.9rem, 5vw, 2.8rem)/1 var(--read); color: var(--ink); }
.part .stat span { font-size: .82rem; color: var(--muted); }
@media (max-width: 760px) { .part-in { grid-template-columns: 1fr; } }

/* ——— Bandeau d'inscription ——— */
.band { position: relative; isolation: isolate; background: var(--night); color: var(--paper); overflow: hidden; padding: clamp(3rem, 8vw, 5.5rem) 0; }
.band::before { content: ""; position: absolute; z-index: -1; right: 8%; top: -10%; bottom: -10%; width: min(14rem, 34vw); background: linear-gradient(180deg, transparent, rgba(255,236,190,.9) 18%, rgba(255,236,190,.9) 82%, transparent); filter: blur(34px); opacity: .55; }
.band-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.6rem, 5vw, 4rem); align-items: center; }
.band .eyebrow { color: var(--gold-hi); }
.band h2 { margin: 0 0 .7rem; font: 600 clamp(1.6rem, 4vw, 2.4rem)/1.12 var(--read); letter-spacing: -.02em; text-wrap: balance; }
.band-s { margin: 0; color: rgba(247,243,234,.7); }
.band .field { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.band .field:focus-within { border-color: var(--gold-hi); }
.band .field input { color: var(--paper); } .band input::placeholder { color: rgba(247,243,234,.6); }
.band .field .btn { background: var(--gold-hi); border-color: var(--gold-hi); color: #14110c; font-weight: 600; }
.band .small, .band .small a { color: rgba(247,243,234,.7); } .band .note { color: var(--gold-hi); }
@media (max-width: 760px) { .band-in { grid-template-columns: 1fr; } .band .field { flex-direction: column; border-radius: 22px; } .band .field .btn { width: 100%; } }
#recevoir { scroll-margin-top: 80px; }

/* ——— Pied ——— */
.foot-tag { margin: 0; font: italic 400 1rem var(--read); color: var(--ink-2); }
.foot .socs { display: inline-flex; gap: .4rem; }

/* ——— Page de lecture : bandeau d'en-tête ——— */
.chap-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(250px, 42svh, 380px); background: var(--night); color: var(--paper); overflow: hidden; }
.chap-bg, .chap-bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.chap-bg img { object-fit: cover; object-position: 75% 40%; }
.chap-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,7,6,.85), rgba(8,7,6,.35) 60%, rgba(8,7,6,.1)), linear-gradient(0deg, rgba(8,7,6,.6), transparent 55%); }
.chap-hero-in { position: relative; z-index: 1; width: 100%; max-width: 40rem; margin: 0 auto; padding: 6rem var(--gutter) 1.8rem; }
.chap-hero .ch-label { margin: 0 0 .6rem; font: 600 .78rem var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); }
.chap-hero h1 { margin: 0; font: 600 clamp(2rem, 7.4vw, 3.3rem)/1.06 var(--read); letter-spacing: -.02em; color: var(--paper); text-wrap: balance; }
.chap-head { padding-top: 1.6rem; }
body.read .progress { z-index: 45; }

/* ——— Réponses de l'auteur ——— */
.c-item.is-author { border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); border-radius: 0 12px 12px 0; padding-left: 1rem; }
.badge-author { display: inline-flex; align-items: center; gap: .3rem; margin-left: .45rem; padding: .1rem .55rem; border-radius: 999px; background: var(--ink); color: var(--gold-hi); font: 700 .68rem var(--ui); letter-spacing: .1em; text-transform: uppercase; vertical-align: middle; }

/* Lisibilité des liens de l'en-tête sur le visuel */
.top-home::before { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none; background: linear-gradient(rgba(8,7,6,.72), rgba(8,7,6,0)); transition: opacity .25s; }
.top-home.scrolled::before { opacity: 0; }
.top-home:not(.scrolled) nav a, .top-home:not(.scrolled) .brand { text-shadow: 0 1px 14px rgba(0,0,0,.85); }
.c-item.flash { animation: cflash 3.5s ease-out; }
@keyframes cflash { 0%, 55% { background: color-mix(in srgb, var(--gold) 28%, transparent); } 100% { background: transparent; } }

/* ——— Identité de la couverture : le mot PROMPT est celui de la couverture, partout ——— */
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
:root { --display: "Playfair Display", Georgia, serif; --tagline: "Cormorant Garamond", "Playfair Display", Georgia, serif; }
.logo { display: inline-block; vertical-align: middle; height: 1.2rem; aspect-ratio: 795 / 123; background: currentColor; -webkit-mask: url("../img/logo-prompt.webp") center / contain no-repeat; mask: url("../img/logo-prompt.webp") center / contain no-repeat; }
.brand { display: inline-flex; align-items: center; gap: .18rem; }
.brand .cur { height: 1.05rem; width: .13rem; margin: 0; }
.hero .title { --lw: min(80vw, 36rem); display: flex; align-items: center; gap: .6rem; font-size: 1rem; letter-spacing: 0; line-height: 1; }
.logo.logo-xl { height: calc(var(--lw) * .1547); width: var(--lw); aspect-ratio: auto; flex: none; }
.hero .title .cur { height: calc(var(--lw) * .13); width: calc(var(--lw) * .012); min-width: 4px; margin: 0; }
.hero .genre { font-family: var(--tagline); font-weight: 500; letter-spacing: .32em; }
.hook { font-family: var(--tagline); font-weight: 500; font-size: clamp(1.9rem, 5.4vw, 3.2rem); }
.story-tx h2, .sec h2.mini, .chap-hero h1 { font-family: var(--display); font-weight: 400; }
.top-socs { display: inline-flex; gap: .1rem; margin-right: .2rem; }
.top-home:not(.scrolled) .soc { color: var(--paper); }
.top .soc:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
@media (max-width: 600px) { .top .nl { display: none; } .logo { height: 1.05rem; } }
@media (max-width: 700px) { .hero .title { --lw: min(88vw, 24rem); } }

/* Passages qui font réagir les lecteurs */
.reading p.hot { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 85%); border-radius: 8px; box-shadow: -.7rem 0 0 color-mix(in srgb, var(--gold) 14%, transparent); }
.reading p[data-p] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.reading p.msg { cursor: pointer; }

/* Le curseur qui clignote : la marque de fabrique, visible partout à côté du mot PROMPT */
.brand .cur { width: .2rem; height: 1.25rem; margin-left: .2rem; }
.top-home:not(.scrolled) .brand .cur { background: var(--gold-hi); box-shadow: 0 0 10px rgba(227,189,122,.55); }
.hero .title .cur { width: calc(var(--lw) * .022); min-width: 5px; height: calc(var(--lw) * .14); margin-left: calc(var(--lw) * .02); }
@media (max-width: 700px) { .hero .title { --lw: min(84vw, 24rem); } }

/* Texte justifié aussi sur téléphone, avec coupures de mots propres */
.reading p:not(.msg):not(.scene):not(.part-k) { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.reading .prologue p:not(.part-k) { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
html[data-align="gauche"] .reading p:not(.msg), html[data-font="lisible"] .reading p:not(.msg), html[data-font="dys"] .reading p:not(.msg) { text-align: left; hyphens: manual; -webkit-hyphens: manual; }

/* Émojis : teintés or, comme la couverture ; en couleur au toucher et une fois choisis */
.rx .e, .qe > span, .bubble .rx-top { filter: grayscale(1) sepia(1) saturate(2.6) hue-rotate(-14deg) brightness(1.02); transition: filter .2s; }
.rx:hover .e, .rx[aria-pressed="true"] .e, .qe:hover > span, .qe[aria-pressed="true"] > span, .qe.pop > span { filter: none; }
.rx { font-family: var(--tagline); font-weight: 500; font-size: 1.05rem; border-radius: 999px; }
.rx .n { font-variant-numeric: tabular-nums; }
.after-note { font-family: var(--tagline); font-style: italic; font-weight: 500; font-size: 1.25rem; color: var(--ink-2); }

/* Titres : la même écriture partout (celle de la couverture) */
main h1, main h2, main h3, .toc .t, .suite h2, .band h2, .cap h2, .doc h1, .doc h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.005em; }
.toc .t { font-size: 1.28em; }
.suite h2 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.15; }
.band h2 { line-height: 1.12; }
#part-t, .part h2, section h2 { font-family: var(--display); font-weight: 400; }

/* Commentaires juste après la fin du chapitre */
.comments { padding-top: 2rem; }
.comments .wrap { position: relative; }
.skip-c { display: inline-block; margin: -.2rem 0 1rem; font-size: .92rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.after2 { padding-top: 2.2rem; }
/* Première lettre : toujours mise en valeur, même quand la première phrase est courte */
.reading p.first.short::first-letter { float: none; font: 700 2.1em/1 var(--ui); letter-spacing: -.02em; padding: 0 .04em 0 0; }
html[data-font="lisible"] .reading p.first.short::first-letter, html[data-font="dys"] .reading p.first.short::first-letter { font: inherit; padding: 0; color: inherit; }
.reading p.ctr { text-align: center; }
.reading p.ctr:not(.msg):not(.scene):not(.part-k) { text-align: center; text-indent: 0; hyphens: manual; }
.reading p.ctr::first-letter { font: inherit; float: none; }

/* ——— Zones à toucher d'au moins 44 px sur écran tactile ——— */
@media (pointer: coarse) {
  .top .soc, .foot .soc { width: 44px; height: 44px; }
  .top .inst { width: 44px; height: 44px; }
  .top .aa { min-width: 44px; height: 44px; }
  .skip-c { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ——— V17 : progression, temps restant, fin de chapitre ——— */
.vprog { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; pointer-events: none; }
.vprog i { display: block; height: 100%; width: 0; background: var(--gold-text, #d9ad4c); transition: width .12s linear; }
.vchip { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 55; padding: .4rem .75rem; border-radius: 999px; font: 500 .8rem/1 var(--ui); background: var(--bg); color: var(--muted); border: 1px solid var(--line, rgba(128,128,128,.35)); pointer-events: none; }
.vstart { margin: .8rem 0 0; font-size: .95rem; color: var(--muted); }
.vstart a { color: var(--gold-text, inherit); text-underline-offset: 3px; }
.fin { padding: 2.2rem 0 1rem; }
.fin .wrap { max-width: 40rem; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 1rem; }
.fin-b { display: flex; flex-wrap: wrap; gap: .6rem; }
.fin-b .btn { min-height: 44px; }
.fin-b [hidden] { display: none !important; }
.fin-n { margin: 0; font-size: .9rem; color: var(--muted); min-height: 1.2em; }
@media (prefers-reduced-motion: reduce) { .vprog i { transition: none; } }

/* ——— V17 : version imprimée d'un chapitre ——— */
@page { size: A5; margin: 20mm 17mm 22mm; @top-center { content: "P R O M P T"; font: 7.5pt Literata, Georgia, serif; color: #777; letter-spacing: .12em; } @bottom-center { content: counter(page); font: 9.5pt Literata, Georgia, serif; color: #555; } @bottom-right { content: "promptroman.fr"; font: 7pt Literata, Georgia, serif; color: #999; } }
@page :first { @top-center { content: none; } @bottom-right { content: none; } }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .top, .foot, .chap-bg, .tools, .hint, .meta, .after, .after2, .comments, .suite, .pager, .band, .fin, .vprog, .vchip, .vstart, .vtools, .bubble, .skip-c, .prefs, .sheet, .bell-panel, .qbar, #install-tip, .skip { display: none !important; }
  .chap-hero, .chap-hero *, .chap-hero::before, .chap-hero::after, .chap-hero-in::before, .chap-hero-in::after { background: none !important; text-shadow: none !important; }
  .chap-hero { background: none !important; min-height: 0 !important; padding: 34mm 0 0 !important; height: auto !important; text-align: center !important; }
  .chap-hero-in { padding: 0 !important; position: static !important; color: #000 !important; text-align: center !important; }
  .chap-hero .ch-label { font: 500 8pt Literata, Georgia, serif !important; letter-spacing: .32em !important; text-transform: uppercase; color: #777 !important; margin: 0 0 12pt !important; }
  .chap-hero h1, .chap-head h1 { font: italic 400 21pt/1.22 "Cormorant Garamond", "Playfair Display", Georgia, serif !important; color: #000 !important; letter-spacing: 0 !important; margin: 0 0 4pt !important; text-align: center !important; }
  .chap-hero-in::after { content: "\2766"; display: block !important; font: 13pt Georgia, serif; color: #888; text-align: center; margin: 14pt 0 30pt; }
  .chap-head { padding: 0 !important; }
  .reading { max-width: none !important; padding: 0 !important; margin: 0 !important; font: 10.3pt/1.52 Literata, Georgia, "Times New Roman", serif !important; color: #111 !important; hyphens: auto; -webkit-hyphens: auto; font-variant-ligatures: common-ligatures; text-rendering: optimizeLegibility; }
  .reading p { margin: 0 !important; text-indent: 1.35em; text-align: justify; orphans: 3; widows: 3; }
  .reading p.first, .reading h2 + p, .reading h3 + p, .reading hr + p, .reading .sep + p, .reading .msg + p { text-indent: 0; }
  .reading p.first::first-letter { float: none !important; font: inherit !important; padding: 0 !important; letter-spacing: 0 !important; }
  .reading p.first::first-line { font-variant: small-caps; letter-spacing: .05em; }
  .reading h2, .reading h3, .reading .part-k { break-after: avoid; color: #000 !important; text-align: center; font: italic 400 12.5pt "Cormorant Garamond", Georgia, serif !important; margin: 20pt 0 10pt !important; }
  .reading hr, .reading .sep, .reading .scene { break-after: avoid; border: 0 !important; text-align: center !important; text-indent: 0 !important; margin: 13pt 0 !important; height: auto !important; }
  .reading hr::after, .reading .sep::after { content: "\2217\00a0\00a0\2217\00a0\00a0\2217"; color: #777; font-size: 9pt; }
  .msg { break-inside: avoid; border: 0 !important; border-left: 1.1pt solid #888 !important; background: none !important; color: #000 !important; box-shadow: none !important; border-radius: 0 !important; padding: 1pt 0 1pt 9pt !important; margin: 7pt 0 7pt 12pt !important; text-indent: 0 !important; text-align: left !important; hyphens: manual; font-size: 9.6pt; line-height: 1.45; opacity: 1 !important; transform: none !important; min-height: 0 !important; }
  .msg.me { border-left-style: dotted !important; margin-left: 28pt !important; }
  .msg, .msg .ln { font-family: Literata, Georgia, serif !important; }
  .msg .who { display: block; font: 600 6.8pt Literata, Georgia, serif !important; letter-spacing: .16em; text-transform: uppercase; color: #666 !important; margin: 0 0 2pt !important; text-align: left !important; }
  .msg .who::after { content: none !important; }
  .mail { break-inside: avoid; border: .5pt solid #999 !important; background: #f6f6f6 !important; color: #000 !important; box-shadow: none !important; border-radius: 2pt; padding: 5pt 9pt; margin: 8pt 6pt !important; text-indent: 0 !important; font-size: 9.6pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000 !important; text-decoration: none !important; }
  .reading::after { content: "\2766"; display: block; margin-top: 28pt; font: 13pt Georgia, serif; color: #888; text-align: center; }
}

.vtools{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 0}
.vt-b{font:inherit;font-size:.82rem;min-height:44px;padding:.5rem 1rem;border-radius:999px;border:1px solid currentColor;background:transparent;color:inherit;opacity:.85;cursor:pointer}
.vt-b:hover{opacity:1}
.vt-b[hidden]{display:none!important}

/* V19 : bouton d'impression bien visible */
.vtools{margin:1.4rem 0 0}
.vt-b{display:inline-flex;align-items:center;gap:.55rem;font:inherit;font-size:.9rem;font-weight:600;min-height:48px;padding:.6rem 1.15rem;border-radius:999px;border:1.5px solid var(--gold,#e3bd7a);background:transparent;color:inherit;opacity:1;cursor:pointer}
.vt-b.vt-main{background:var(--gold,#e3bd7a);color:#14110d;border-color:var(--gold,#e3bd7a);box-shadow:0 6px 18px -8px rgba(227,189,122,.7)}
.vt-b.vt-main:hover{filter:brightness(1.06)}
.vt-b:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.fin-steps{margin:.6rem 0 0;padding-left:1.2rem;display:grid;gap:.35rem;text-align:left}
/* V19 : échanges animés */
.reading p.msg{transition:opacity .4s ease,transform .4s ease}
.reading p.msg.mx-wait{opacity:0;transform:translateY(12px)}
.reading p.msg.mx-in{opacity:1;transform:none}
.mx-dots{display:inline-flex;gap:5px;align-items:center;height:1.2em;vertical-align:middle}
.mx-dots i{width:6px;height:6px;border-radius:50%;background:var(--gold,#e3bd7a);display:block;animation:mxb 1s ease-in-out infinite}
.mx-dots i:nth-child(2){animation-delay:.15s}.mx-dots i:nth-child(3){animation-delay:.3s}
@keyframes mxb{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-5px);opacity:1}}
@media (prefers-reduced-motion:reduce){.reading p.msg{transition:none}.reading p.msg.mx-wait{opacity:1;transform:none}}
html[data-motion="off"] .reading p.msg.mx-wait{opacity:1;transform:none}
/* V20 : « Chapitre suivant » visible juste après le texte */
.nextnow { max-width: 40rem; margin: 2.2rem auto 1rem; padding: 0 var(--gutter); display: grid; gap: .6rem; justify-items: center; }
.nextnow-a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .2rem 1rem; width: 100%; padding: 1.15rem 1.4rem; border-radius: var(--r); background: var(--ink); color: var(--bg); text-decoration: none; box-shadow: 0 6px 22px rgb(0 0 0 / .16); }
.nextnow-a:hover, .nextnow-a:focus-visible { color: var(--bg); box-shadow: 0 0 0 3px var(--gold); }
.nextnow-k { grid-column: 1; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.nextnow-a b { grid-column: 1; font-weight: 600; font-size: 1.15rem; line-height: 1.25; }
.nextnow-go { grid-column: 2; grid-row: 1 / span 2; font-size: 1.8rem; color: var(--gold); }
.nextnow-c { font-size: .92rem; color: var(--muted); text-decoration: none; }
.nextnow-c:hover { color: var(--ink); }
@media print { .nextnow { display: none; } }
/* V20 : page mode d'emploi */
.guide { max-width: 56rem; }
.gd-lead { font-size: 1.15rem; max-width: 40rem; }
.gd-video { margin: 1.6rem auto 2.4rem; max-width: 22rem; }
.gd-video video { width: 100%; height: auto; border-radius: 18px; background: #000; box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.gd-video figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .6rem; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.6rem; }
.gd-step { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1.6rem 2rem; align-items: center; }
.gd-step:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); }
.gd-step:nth-child(even) figure { order: 2; }
.gd-step figure { margin: 0; }
.gd-step img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--rule); box-shadow: 0 8px 24px rgb(0 0 0 / .18); display: block; }
.gd-n { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.gd-step h2 { margin: .2rem 0 .5rem; font-size: 1.5rem; text-wrap: balance; }
.gd-step p { margin: 0; }
.gd-end { text-align: center; margin: 3rem 0 1rem; }
@media (max-width: 640px) { .gd-step, .gd-step:nth-child(even) { grid-template-columns: 1fr; } .gd-step figure, .gd-step:nth-child(even) figure { order: 0; max-width: 15rem; margin: 0 auto; } }
/* V22 */
.help-b { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.4rem; min-width: 2.4rem; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 .9rem var(--ui, inherit); }
.help-b:hover { border-color: var(--ink); color: var(--ink); }
.hb-q { font-weight: 700; font-size: 1.05rem; line-height: 1; }
.top-home .help-b { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: var(--paper); }
.top-home.scrolled .help-b { background: var(--surface); border-color: var(--rule); color: var(--ink); }
@media (max-width: 900px) { .help-b { width: 2.4rem; padding: 0; } .hb-t { display: none; } }
.resume-home { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; align-items: center; max-width: 40rem; margin: 0 auto 1.6rem; padding: 1rem 1.3rem; border-radius: var(--r); background: var(--ink); color: var(--bg); text-decoration: none; box-shadow: 0 6px 22px rgb(0 0 0 / .16); }
.resume-home:hover { color: var(--bg); box-shadow: 0 0 0 3px var(--gold); }
.rh-k { grid-column: 1; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.resume-home b { grid-column: 1; font-weight: 600; font-size: 1.1rem; }
.rh-p { grid-column: 1; height: 4px; border-radius: 2px; background: rgb(255 255 255 / .25); overflow: hidden; margin-top: .3rem; }
.rh-p i { display: block; height: 100%; background: var(--gold); }
.rh-m { grid-column: 1; font-size: .82rem; opacity: .8; }
.rh-go { grid-column: 2; grid-row: 1 / span 4; font-size: 1.7rem; color: var(--gold); }
.new-b { display: inline-block; margin-left: .6rem; padding: .1rem .55rem; border-radius: 999px; background: var(--gold); color: #1a1510; font: 700 .72rem var(--ui, inherit); letter-spacing: .08em; text-transform: uppercase; vertical-align: .15em; }
.prev-sum { max-width: 40rem; margin: 0 auto 1.8rem; padding: .9rem 1.2rem; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; font-size: .95rem; color: var(--ink-2); }
.prev-sum p { margin: 0; } .prev-sum a { color: var(--ink); text-decoration: none; }
.ps-k { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .3rem !important; }
.nudge { position: relative; max-width: 40rem; margin: 1.8rem auto 0; padding: 1.2rem 1.4rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.nudge p { margin: 0 0 .5rem; } .nu-t { font-weight: 700; }
.nu-b { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem !important; }
.nu-x { position: absolute; top: .4rem; right: .6rem; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.c-sort { font: inherit; font-size: .92rem; margin: -.4rem 0 1rem; padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); }
.focus-exit { display: none; position: fixed; top: max(.6rem, env(safe-area-inset-top, 0px)); right: .8rem; z-index: 60; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: 600 .85rem var(--ui, inherit); cursor: pointer; opacity: .85; }
body.focus .focus-exit { display: block; }
body.focus .top, body.focus .chap-hero, body.focus .chap-head, body.focus .prev-sum, body.focus .resume { display: none; }
body.focus .reading { padding-top: 3rem; }
#focus-b[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media print { .help-b, .nudge, .prev-sum, .focus-exit, .c-sort { display: none; } }
.ps-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.ps-list li { padding: 1.2rem 1.4rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.ps-list h2 { margin: 0 0 .4rem; font-size: 1.4rem; } .ps-list p { margin: 0; }
.gd-rss { text-align: center; margin: 2rem 0 0; color: var(--ink-2); }
/* V24 : En marge, style « Carnet » (même fond, mêmes polices et même or que Prompt) */
.mg-hero { max-width: 40rem; margin: 0 auto; padding: clamp(2.6rem, 7vw, 4.4rem) var(--gutter, 1.2rem) 1.6rem; border-bottom: 1px solid var(--rule); }
.mg-tag { margin: 0 0 .5rem; font: 600 .76rem var(--ui, inherit); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }
.mg-tag a { color: inherit; text-decoration: none; }
.mg-tag a:hover { text-decoration: underline; }
.mg-hero h1 { margin: 0 0 .7rem; font: italic 500 clamp(2.7rem, 9vw, 4.4rem)/1.02 var(--tagline); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.mg-hero-p h1 { font-size: clamp(2.3rem, 7.5vw, 3.6rem); }
.mg-lead { margin: 0; font: italic 500 1.4rem/1.35 var(--tagline); color: var(--ink-2); max-width: 30rem; }
.mg-sub { margin: 0; color: var(--muted); font-size: .95rem; }
.mg-wrap { max-width: 40rem; padding-bottom: 3rem; }
.mg-list { list-style: none; margin: 0; padding: 0; }
.mg-list li + li { border-top: 1px solid var(--rule); }
.mg-row { display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 .9rem; padding: 1.3rem 0; text-decoration: none; color: var(--ink); align-items: start; }
.mg-n { font: italic 500 2.6rem/.9 var(--tagline); color: var(--gold); }
.mg-b { display: grid; gap: .3rem; min-width: 0; }
.mg-t { font: 400 1.5rem/1.2 var(--display); text-wrap: balance; }
.mg-row:hover .mg-t { color: var(--gold-text); }
.mg-x { font: italic 500 1.2rem/1.35 var(--tagline); color: var(--ink-2); }
.mg-m { color: var(--muted); font-size: .86rem; }
.mg-empty { padding: 1.5rem; text-align: center; color: var(--muted); border: 1px dashed var(--rule); border-radius: var(--r); }
.mg-back { text-align: center; margin: 2rem 0 0; display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.mg-pn { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 2rem auto 0; max-width: 40rem; text-align: left; }
.mg-pn[hidden] { display: none; }
.mg-pn-a { display: grid; gap: .15rem; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--surface); }
.mg-pn-a:hover { border-color: var(--gold); }
.mg-pn-a small { color: var(--muted); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.mg-pn-a b { font: 400 1.1rem/1.25 var(--display); }
.mg-pn-n { text-align: right; }
@media (max-width: 520px) { .mg-pn { grid-template-columns: 1fr; } .mg-pn-n { text-align: left; } }
/* poème */
.reading p.poem { text-indent: 0; text-align: center; hyphens: manual; -webkit-hyphens: manual; margin: 2rem auto; max-width: 28rem; font-style: italic; }
.poem .ln { display: block; }
.poem .ln.ptitle { font: 400 .8rem var(--ui); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 1.1rem; }
.poem .ln.gap { height: .9rem; }
@media (max-width: 700px) { .mg-row { grid-template-columns: 2.4rem 1fr; } .mg-n { font-size: 2.1rem; } }
/* V25 : En marge, esprit « carnet de crayons » (fond crème, écriture à la main, dessins de l'auteur) */
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root { --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive; --paper: #f8f3e8; }
html:not([data-theme]) body.marge { background: var(--paper); }
html:not([data-theme]) body.marge .top { background: rgb(248 243 232 / .92); }
.mg-tag { font: 400 .8rem var(--display); letter-spacing: .34em; color: var(--ink); }
.mg-hero { text-align: center; max-width: 40rem; }
.mg-hero h1 { font: 700 clamp(3rem, 11vw, 5rem)/1 var(--hand); letter-spacing: 0; margin-bottom: .5rem; }
.mg-hero-p h1 { font-size: clamp(2.6rem, 9vw, 4rem); }
.mg-lead { margin: 0 auto; font: 600 1.6rem/1.25 var(--hand); color: var(--gold-text); max-width: 26rem; }
.mg-sub { font: 600 1.25rem var(--hand); color: var(--gold-text); }
.mg-n { font: 700 3rem/.85 var(--hand); color: var(--gold); }
.mg-t { font: 700 clamp(1.9rem, 6vw, 2.3rem)/1.05 var(--hand); letter-spacing: 0; }
.mg-x { font: italic 500 1.2rem/1.35 var(--tagline); }
.mg-row { grid-template-columns: 3rem 1fr; }
.mg-pn-a b { font: 700 1.5rem/1.1 var(--hand); }
/* menu : pastille « En marge » toujours visible, même sur téléphone */
@media (max-width: 560px) { .top .top-socs { display: none; } }

/* V26 : lien « En marge » du menu (écriture à la main, discret) */
.top nav a.nl-marge { font: 700 1.3rem/1 var(--hand); color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; padding-block: .5rem; white-space: nowrap; }
.top nav a.nl-marge:hover { color: var(--gold-text); }
@media (max-width: 700px) { .top .nl.nl-marge { display: inline-block; } }
.top .nl-marge.is-new::after { content: ""; display: inline-block; width: .5rem; height: .5rem; margin: 0 0 .55rem .25rem; border-radius: 50%; background: var(--gold); }
/* accueil : « L'histoire » en deux côtés, Prompt et En marge */
.story-in.has-marge { grid-template-columns: minmax(0, 230px) minmax(0, 1fr) minmax(0, 21rem); gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.story-in.has-marge .cover { max-width: 230px; }
.story-marge { position: relative; padding: 1.6rem 1.5rem 1.4rem; border-radius: var(--r); background: #f8f3e8; color: #2a2118; border: 1px solid #e3d6b8; box-shadow: 0 14px 34px rgb(60 40 10 / .12); display: grid; gap: .55rem; align-content: start; }
.story-marge .sm-k { margin: 0; font: 400 .78rem var(--display); letter-spacing: .34em; text-transform: uppercase; color: #7d6136; }
.story-marge .sm-h { margin: 0; font: 700 clamp(2.3rem, 5vw, 3rem)/.95 var(--hand); letter-spacing: 0; color: #1d1a16; }
.story-marge .sm-x { margin: 0; font: italic 500 1.25rem/1.35 var(--tagline); color: #4a3f31; }
.story-marge .sm-m { margin: 0; font-size: .86rem; color: #6b5a45; }
.story-marge .sm-b { margin: .4rem 0 0; }
.story-marge .btn { background: #1d1a16; color: #fff; }
.story-marge .sm-all { margin: 0; font: 700 1.25rem var(--hand); }
.story-marge .sm-all a { color: #7d6136; text-decoration: none; } .story-marge .sm-all a:hover { text-decoration: underline; }
.story-marge .sm-n { margin: .2rem 0 0; padding-top: .7rem; border-top: 1px solid #e3d6b8; font: 600 1.15rem/1.2 var(--hand); color: #7d6136; }
html[data-theme="nuit"] .story-marge { background: var(--surface); color: var(--ink); border-color: var(--rule); box-shadow: none; }
html[data-theme="nuit"] .story-marge .sm-h, html[data-theme="nuit"] .story-marge .sm-x { color: var(--ink); }
html[data-theme="nuit"] .story-marge .sm-k, html[data-theme="nuit"] .story-marge .sm-all a, html[data-theme="nuit"] .story-marge .sm-n { color: var(--gold); }
html[data-theme="nuit"] .story-marge .btn { background: var(--gold); color: #1d1a16; }
html[data-theme="contraste"] .story-marge { background: #fff; color: #000; border-color: #000; }
@media (max-width: 1000px) { .story-in.has-marge { grid-template-columns: minmax(0, 230px) minmax(0, 1fr); } .story-marge { grid-column: 1 / -1; } }
@media (max-width: 760px) { .story-in.has-marge { grid-template-columns: 1fr; } .story-in.has-marge .cover { margin: 0 auto; } }
.top-home:not(.scrolled) nav a.nl-marge { color: var(--paper); text-decoration-color: var(--gold-hi); }
.top-home:not(.scrolled) nav a.nl-marge:hover { color: var(--gold-hi); }
.top-home.scrolled nav a.nl-marge { color: var(--ink); }

.story-marge .sm-last { margin: .3rem 0 0; padding-top: .7rem; border-top: 1px solid #e3d6b8; display: grid; gap: .1rem; }
.story-marge .sm-last small { font: 400 .72rem var(--display); letter-spacing: .24em; text-transform: uppercase; color: #7d6136; }
.story-marge .sm-last a { font: 700 1.5rem/1.1 var(--hand); color: #1d1a16; text-decoration: none; }
.story-marge .sm-last a:hover { text-decoration: underline; }
.story-marge .sm-all { margin: 0; }
html[data-theme="nuit"] .story-marge .sm-last, html[data-theme="nuit"] .story-marge .sm-last small { border-color: var(--rule); color: var(--gold); }
html[data-theme="nuit"] .story-marge .sm-last a { color: var(--ink); }

/* V28 : menu sur téléphone (Chapitres + En marge) ; page suivante / précédente juste sous le texte */
@media (max-width: 700px) { .top nav a.nl[href$="#chapitres"] { display: inline-block; font-weight: 600; } .top nav { gap: .55rem; } }
@media (max-width: 560px) { .top .help-b { display: none; } }
.mg-pn { display: grid; grid-template-columns: 1fr; gap: .7rem; margin: 2.4rem auto 1rem; max-width: 40rem; padding: 0 var(--gutter, 1.2rem); text-align: left; }
.mg-pn.two { grid-template-columns: 1fr; }
.mg-pn-a { position: relative; }
.mg-pn-n { background: #f8f3e8; border: 1.5px solid var(--gold); padding: 1rem 3rem 1rem 1.2rem; color: #2a2118; box-shadow: 0 8px 22px rgb(60 40 10 / .12); text-align: left; }
.mg-pn-n small { color: #7d6136; } .mg-pn-n b { font: 700 1.8rem/1.05 var(--hand); }
.mg-pn-n i { position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 1.6rem; color: #7d6136; }
.mg-pn-n:hover { background: #fff; color: #2a2118; }
.mg-pn-p { background: none; border-style: dashed; }
html[data-theme="nuit"] .mg-pn-n { background: var(--surface); color: var(--ink); } html[data-theme="nuit"] .mg-pn-n small, html[data-theme="nuit"] .mg-pn-n i { color: var(--gold); }

/* ═══════════ JE SAIGNE ENCORE : identité « soirée d'été, guirlandes » ═══════════
   Papier crème, ambre des guirlandes, rose et denim de la couverture. Titre : trait de pinceau de la couverture. */
@font-face { font-family: "Caveat Brush"; src: url("../fonts/caveat-brush-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --bg: #f6eddf; --surface: #fffaf0; --surface-2: #efe3d0; --ink: #2b1b15; --ink-2: #5b463b; --muted: #6a5448; --rule: #e4d5bd; --edge: #9a8570;
  --gold: #d98a2f; --gold-text: #94461f; --night: #150e0b; --gold-hi: #f2b25f; --paper: #fbf1de;
  --rose: #d9667f; --rose-text: #a52f4b; --denim: #5b7fa6;
  --display: "Caveat Brush", "Literata", Georgia, serif; --hand: "Caveat Brush", cursive;
}
html[data-theme="sepia"] { --bg: #f1e3cb; --surface: #f9efdc; --surface-2: #e8d6b6; --ink: #35241a; --ink-2: #66503f; --muted: #66503f; --rule: #dcc7a2; --edge: #8a7152; --gold-text: #8a4a1c; }
html[data-theme="nuit"] { --bg: #150e0b; --surface: #1f1511; --surface-2: #2b1d17; --ink: #f1e6d3; --ink-2: #c9b69c; --muted: #bba88f; --rule: #3a2a22; --edge: #7a6657; --gold: #f2a03d; --gold-text: #f2b25f; --rose-text: #f08aa2; }
html[data-theme="contraste"] { --gold: #7a3a12; --gold-text: #6b3010; }
.wordmark { font: 400 1.75rem/1 "Caveat Brush", cursive; letter-spacing: .01em; text-transform: none; white-space: nowrap; }
.foot .wordmark { font-size: 2rem; }
.logo { aspect-ratio: 707 / 322; height: auto; width: 4rem; -webkit-mask-image: url("../img/titre.png"); mask-image: url("../img/titre.png"); }
.hero .title { --lw: min(84vw, 31rem); }
.logo.logo-xl { width: var(--lw); height: calc(var(--lw) * .4554); aspect-ratio: auto; }
.hero .title { filter: drop-shadow(0 4px 30px rgba(0,0,0,.5)); }
@media (max-width: 700px) { .hero .title { --lw: min(88vw, 20rem); } }
.hero .genre { color: var(--gold-hi); letter-spacing: .24em; text-transform: uppercase; font-size: clamp(.9rem, 2.4vw, 1.15rem); font-style: normal; font-family: var(--ui); font-weight: 600; }
.hook { font-style: italic; font-weight: 500; }
.story h2, .sec h2.mini, .chap-hero h1, .band h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0; }
.story h2 { font-size: clamp(2.5rem, 6vw, 3.9rem); line-height: 1; }
.sec h2.mini { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.chap-hero h1 { font-size: clamp(3rem, 8vw, 5.6rem); line-height: .98; color: var(--paper); text-shadow: 0 3px 30px rgba(0,0,0,.5); }
.band h2 { font-size: clamp(2rem, 4.8vw, 3rem); line-height: 1.05; }
.eyebrow { color: var(--rose-text); }
.story-tx p.story-q { color: var(--ink); font-style: normal; border-left: 3px solid var(--rose); padding-left: 1rem; }
.cover img { border-radius: 4px; box-shadow: 0 40px 70px -28px rgba(30,10,0,.7), 0 0 0 1px rgba(0,0,0,.1); transform: rotate(-1.4deg); }
.btn.gold { background: var(--gold-hi); border-color: var(--gold-hi); color: #1d120c; }
.btn.gold:hover { background: #ffd08a; border-color: #ffd08a; color: #1d120c; }
.chap-hero .ch-label { color: var(--gold-hi); }
.band::before { right: 6%; width: min(30rem, 70vw); top: -30%; bottom: -30%; background: radial-gradient(closest-side, rgba(242,160,61,.75), rgba(217,102,127,.25) 55%, transparent 80%); filter: blur(30px); opacity: .45; }

/* Vidéo d'en-tête (accueil) */
.hero-bg .hero-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; opacity: 0; transition: opacity 1.2s ease; z-index: 0; }
.hero-bg .hero-vid.on { opacity: 1; }
@media (max-width: 700px) { .hero-bg .hero-vid { object-position: 50% 30%; } }
@media (min-width: 701px) { .hero-bg .hero-vid { left: auto; right: 0; width: 66%; object-position: 50% 38%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); } }

/* Bande-annonce a cote de la presentation */
.story-in.has-trailer { grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 250px); gap: clamp(1.6rem, 4vw, 3.2rem); }
.story-in.has-trailer .cover { max-width: 260px; }
.trailer { margin: 0; order: 3; display: grid; gap: .6rem; }
.trailer video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r, 14px); background: #120d0a; box-shadow: 0 18px 40px rgb(40 20 10 / .28); }
.trailer figcaption { font: 600 .74rem var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
@media (max-width: 1000px) { .story-in.has-trailer { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); } .story-in.has-trailer .trailer { grid-column: 1 / -1; order: 4; width: min(100%, 320px); margin: 1rem auto 0; } }
@media (max-width: 760px) { .story-in.has-trailer { grid-template-columns: 1fr; } .story-in.has-trailer .trailer { order: 0; } }
