/* PROMPT — design épuré et moderne.
   Schibsted Grotesk pour le titre et l'interface, Literata pour lire. Un seul accent : l'or du curseur. */
@font-face { font-family: "Grotesk"; src: url("../fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Grotesk"; src: url("../fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Grotesk"; src: url("../fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "OpenDyslexic"; src: url("../fonts/opendyslexic-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #f5f5f2; --surface: #ffffff; --surface-2: #ecebe7; --ink: #1b1b1f; --ink-2: #5d5d66; --muted: #6b6b73; --rule: #e2e1dc;
  --gold: #b08a4e; --gold-text: #7d6136;
  --ui: "Grotesk", "Helvetica Neue", Arial, sans-serif; --read: "Literata", Georgia, serif;
  --r: 12px; --gutter: clamp(20px, 5vw, 64px); --max: 72rem; color-scheme: light;
}
html[data-theme="sepia"] { --bg: #f2e8d6; --surface: #faf3e6; --surface-2: #e9dcc4; --ink: #3a2e22; --ink-2: #6b5a45; --muted: #6b5a45; --rule: #ddcdb1; --gold-text: #7a5c30; }
html[data-theme="nuit"] { --bg: #131417; --surface: #1b1c20; --surface-2: #23252a; --ink: #e4e1da; --ink-2: #a6a39c; --muted: #a6a39c; --rule: #2c2e33; --gold: #cfae78; --gold-text: #cfae78; color-scheme: dark; }
html[data-theme="contraste"] { --bg: #ffffff; --surface: #ffffff; --surface-2: #f0f0f0; --ink: #000000; --ink-2: #1f1f1f; --muted: #2e2e2e; --rule: #000000; --gold: #6b4e1f; --gold-text: #5a4119; }
html[data-font="lisible"] { --read: "Atkinson", Verdana, sans-serif; --ui: "Atkinson", Verdana, sans-serif; }
html[data-font="dys"] { --read: "OpenDyslexic", Verdana, sans-serif; --ui: "OpenDyslexic", Verdana, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
html[data-motion="off"] *, html[data-motion="off"] *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[data-size="l"] body { font-size: 1.12rem; } html[data-size="xl"] body { font-size: 1.24rem; }
html[data-lh="aere"] body { line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 99; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: var(--r); }
.skip:focus { left: .5rem; top: .5rem; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 40rem; }

/* Le curseur doré — l'unique élément animé */
.cur { display: inline-block; width: .09em; height: .74em; margin-left: .06em; background: var(--gold); border-radius: 1px; vertical-align: baseline; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.4rem; font: 500 .98rem var(--ui); text-decoration: none; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; transition: transform .15s, background .2s, color .2s, border-color .2s; }
.btn:hover { color: var(--bg); background: color-mix(in srgb, var(--ink) 85%, var(--gold)); }
.btn:active { transform: scale(.98); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.line:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn:disabled { opacity: .6; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: .7rem; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; position: relative; }
.brand { font: 700 1.3rem var(--ui); letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.top nav { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 1.8rem); }
.top nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.aa { min-width: 2.6rem; height: 2.4rem; padding: 0 .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); font-weight: 700; cursor: pointer; }
.aa:hover, .aa[aria-expanded="true"] { border-color: var(--ink); }

/* Panneau Affichage et accessibilité */
.prefs { position: absolute; right: var(--gutter); top: calc(100% + 8px); width: min(25rem, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 90px); 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,.35); padding: 1.1rem 1.2rem 1rem; display: grid; gap: .9rem; }
.prefs[hidden] { display: none; }
.pref p { margin: 0 0 .4rem; font-size: .82rem; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: .35rem; }
.seg button { min-height: 2.4rem; padding: .3rem .85rem; border-radius: 999px; background: var(--bg); color: var(--ink); border: 1px solid var(--rule); cursor: pointer; font-size: .9rem; }
.seg button:hover { border-color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.f-lisible { font-family: "Atkinson", sans-serif !important; } .f-dys { font-family: "OpenDyslexic", sans-serif !important; }
.pref-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: .7rem; }
.pref-foot button { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: .4rem 0; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }

/* Accueil : le titre, puis le temps */
.hero { min-height: calc(100svh - 64px); display: grid; align-content: center; gap: clamp(1.6rem, 4vh, 2.6rem); padding: clamp(3rem, 8vh, 6rem) var(--gutter) clamp(3rem, 7vh, 5rem); max-width: var(--max); margin-inline: auto; }
.title { font: 700 clamp(5rem, 21vw, 17rem)/.86 var(--ui); letter-spacing: -.065em; margin: 0 0 0 -.05em; color: var(--ink); }
.title .cur { width: .075em; height: .7em; margin-left: .05em; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); gap: 0; justify-content: start; font-variant-numeric: tabular-nums; }
.countdown p { margin: 0; padding: .2rem clamp(1rem, 3vw, 2.4rem) .2rem 0; display: grid; gap: .25rem; }
.countdown p + p { padding-left: clamp(1rem, 3vw, 2.4rem); border-left: 1px solid var(--rule); }
.countdown b { font: 500 clamp(2rem, 5.6vw, 3.6rem)/1 var(--ui); letter-spacing: -.03em; }
.countdown p:last-of-type b { color: var(--gold); }
.countdown span { font-size: .85rem; color: var(--muted); }
.countdown .sep { display: none; }
.continue[hidden] { display: none; }

/* Compteurs */
.stats { display: flex; flex-wrap: wrap; gap: .4rem clamp(1.6rem, 5vw, 3.6rem); max-width: var(--max); margin-inline: auto; padding: 1.4rem var(--gutter); border-top: 1px solid var(--rule); }
.stat { margin: 0; display: flex; align-items: baseline; gap: .45rem; }
.stat b { font: 500 1.35rem var(--ui); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .95rem; }

/* Sections */
.sec { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec.alt { background: var(--surface); border-block: 1px solid var(--rule); }
.mini { font: 700 clamp(1.6rem, 3.6vw, 2.4rem)/1.1 var(--ui); letter-spacing: -.03em; margin: 0 0 1.6rem; color: var(--ink); }

/* Sommaire */
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { border-top: 1px solid var(--rule); }
.toc li:last-child { border-bottom: 1px solid var(--rule); }
.toc a, .toc .locked { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1.25rem .2rem; text-decoration: none; color: inherit; border-radius: var(--r); transition: background .2s; }
.toc a:hover { background: var(--surface-2); color: inherit; }
.toc .num { font: 500 .95rem var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.toc .t { font: 500 1.25rem var(--ui); letter-spacing: -.01em; }
.toc .m { display: block; font-size: .88rem; color: var(--muted); margin-top: .15rem; }
.cs { display: inline-flex; gap: .9rem; }
.toc .go { font-weight: 500; color: var(--ink); }
.toc .locked { color: var(--muted); }
.toc .locked .t { filter: blur(4px); user-select: none; }
.toc .locked .go { color: var(--muted); }
.toc li.done .num::after { content: " ✓"; color: var(--gold-text); }

/* Abonnement */
form.mail { display: grid; gap: .6rem; }
.field { display: flex; gap: .5rem; padding: .35rem; background: var(--bg); border: 1px solid var(--rule); border-radius: 999px; }
.field:focus-within { border-color: var(--ink); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .55rem .9rem; font: inherit; font-size: 1rem; color: var(--ink); outline: none; }
.field .btn { min-height: 2.7rem; }
.small { font-size: .86rem; color: var(--muted); margin: 0; }
.note { min-height: 1.4em; margin: 0; font-size: .9rem; color: var(--gold-text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

/* Pied */
.foot { padding: 2.6rem 0 3rem; border-top: 1px solid var(--rule); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.foot .brand { font-size: 1.15rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot nav a { text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.foot nav a:hover { color: var(--ink); }

/* ——— Lecture ——— */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gold); z-index: 40; border-radius: 0 3px 3px 0; }
.chap-head { max-width: 40rem; margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) var(--gutter) .5rem; }
.chap-head h1 { font: 700 clamp(2.6rem, 8vw, 4.6rem)/.95 var(--ui); letter-spacing: -.05em; margin: 0 0 1.1rem; }
.chap-head .meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0; color: var(--muted); font-size: .92rem; }
.chap-head .meta b { color: var(--ink); font-weight: 500; }
.tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.tools button { min-height: 2.5rem; padding: .35rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); cursor: pointer; font-size: .92rem; display: inline-flex; align-items: center; gap: .4rem; }
.tools button:hover { border-color: var(--ink); }
.tools svg { width: 15px; height: 15px; }
.vote[aria-pressed="true"], #listen[aria-pressed="true"] { background: var(--ink) !important; color: var(--bg) !important; border-color: var(--ink) !important; }
.vote[aria-pressed="true"] svg { color: var(--gold); }

.reading { --fs: 1.16rem; max-width: 40rem; margin: 0 auto; padding: 2.2rem var(--gutter) 2.5rem; font-family: var(--read); font-size: var(--fs); line-height: 1.8; }
html[data-size="s"] .reading { --fs: 1.02rem; } html[data-size="l"] .reading { --fs: 1.32rem; } html[data-size="xl"] .reading { --fs: 1.52rem; }
html[data-lh="aere"] .reading { line-height: 2.1; }
html[data-sp="large"] .reading, html[data-sp="large"] .c-text { letter-spacing: .06em; word-spacing: .16em; }
.reading p { margin: 0; text-indent: 1.5em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 6 3 2; orphans: 2; widows: 2; position: relative; }
.reading p.first { text-indent: 0; }
.reading p.first::first-letter { float: left; font: 700 3.9em/.78 var(--ui); letter-spacing: -.04em; padding: .06em .12em 0 0; }
.reading p.first + p { clear: left; }
.reading p.scene { text-indent: 0; text-align: center; color: var(--gold); letter-spacing: .5em; margin: 2rem 0; }
.reading p.scene + p { text-indent: 0; }
.reading p.demo { text-indent: 0; text-align: center; font: .82rem var(--ui); color: var(--muted); background: var(--surface-2); border-radius: var(--r); padding: .6rem; margin-bottom: 2rem; }
html[data-align="gauche"] .reading p, html[data-font="lisible"] .reading p, html[data-font="dys"] .reading p { text-align: left; hyphens: manual; }
html[data-font="lisible"] .reading p.first::first-letter, html[data-font="dys"] .reading p.first::first-letter { float: none; font: inherit; padding: 0; }
@media (max-width: 420px) { .reading p { text-align: left; hyphens: manual; } }
@media (max-width: 640px) { .reading { --fs: 1.08rem; line-height: 1.74; } }

/* Bulles par paragraphe */
.bubble { position: absolute; right: -2.8rem; top: .25em; min-width: 1.9rem; height: 1.7rem; display: inline-grid; place-items: center; padding: 0 .35rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--muted); font: 500 .74rem var(--ui); text-indent: 0; letter-spacing: 0; cursor: pointer; opacity: .45; transition: opacity .15s, border-color .15s, color .15s; }
.bubble::before { content: ""; position: absolute; inset: -9px; }
.reading p:hover .bubble, .bubble:focus-visible, .bubble.has { opacity: 1; }
.bubble.has { color: var(--ink); border-color: var(--gold); }
.bubble:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 900px) { .bubble { position: relative; right: auto; top: -.1em; margin-left: .35rem; opacity: .7; } }

/* Fin de chapitre */
.after { max-width: 40rem; margin: 0 auto; padding: 2rem var(--gutter) 2.6rem; display: grid; gap: 1.2rem; justify-items: center; }
.reactions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.rx { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.9rem; min-width: 3.3rem; justify-content: center; padding: .4rem .85rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; font: 500 .88rem var(--ui); color: var(--ink); transition: transform .12s, border-color .15s; }
.rx .e { font-size: 1.3rem; line-height: 1; }
.rx:hover { border-color: var(--ink); }
.rx:active { transform: scale(.94); }
.rx[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.after-act { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.after .vote { display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .6rem 1.3rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--ink); color: var(--ink); cursor: pointer; font-weight: 500; }
.after .vote svg { width: 17px; height: 17px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 40rem; margin: 0 auto; padding: 0 var(--gutter) 3.5rem; }
.pager a, .pager span { display: block; padding: 1rem 1.2rem; border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; background: var(--surface); }
.pager a:hover { border-color: var(--ink); color: inherit; }
.pager small { display: block; font-size: .82rem; color: var(--muted); }
.pager b { font-weight: 500; font-size: 1.05rem; }
.pager .nxt { text-align: right; }
.pager span { color: var(--muted); background: transparent; }

/* Commentaires */
.comments .wrap { max-width: 44rem; }
.c-form { display: grid; gap: .5rem; }
.c-row { display: grid; grid-template-columns: 10rem minmax(0, 1fr) auto; gap: .5rem; align-items: start; }
.c-row input, .c-row textarea { font: inherit; font-size: 1rem; padding: .75rem .9rem; background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r); min-height: 3rem; }
.c-row textarea { resize: vertical; }
.c-row input:focus, .c-row textarea:focus { border-color: var(--ink); outline: none; }
.btn.send { width: 3rem; min-width: 3rem; padding: 0; font-size: 1.15rem; border-radius: 50%; }
.replying { font-size: .85rem; color: var(--ink-2); margin: 0; }
.replying button { background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--ink-2); }
.spoil-opt { display: inline-flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.spoil-opt input { accent-color: var(--gold); }
.c-list { list-style: none; margin: 1.8rem 0 0; padding: 0; }
.c-item { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .9rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.c-av { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; }
.c-meta { margin: 0; }
.c-meta b { font-weight: 700; }
.c-meta time { font-size: .82rem; color: var(--muted); margin-left: .5rem; }
.c-text { margin: .2rem 0 0; font-family: var(--read); }
.c-act { display: flex; gap: 1.1rem; margin: .4rem 0 0; }
.c-act button { background: none; border: 0; padding: .25rem 0; cursor: pointer; font-size: .86rem; font-weight: 500; color: var(--muted); }
.c-act button:hover, .like[aria-pressed="true"] { color: var(--gold-text); }
.c-replies { list-style: none; margin: .5rem 0 0; padding: 0 0 0 .9rem; border-left: 2px solid var(--rule); }
.c-replies .c-item { border-top: 0; padding: .7rem 0 .2rem; grid-template-columns: 2rem minmax(0, 1fr); }
.c-replies .c-av { width: 2rem; height: 2rem; font-size: .85rem; }
.c-empty { color: var(--muted); }
.spoiler { filter: blur(5px); cursor: pointer; user-select: none; border-radius: 6px; background: var(--surface-2); transition: filter .2s; }
.spoiler.shown { filter: none; user-select: auto; background: none; cursor: auto; }
.spoil-tag { font-size: .76rem; font-weight: 500; color: var(--gold-text); margin-left: .5rem; }

/* Panneau d'un passage */
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(15,15,18,.32); display: flex; justify-content: flex-end; }
.sheet[hidden] { display: none; }
.sheet-in { width: min(30rem, 100%); height: 100%; overflow-y: auto; background: var(--surface); padding: 1.4rem 1.4rem 2rem; display: flex; flex-direction: column; box-shadow: -30px 0 60px -40px rgba(0,0,0,.4); animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head .mini { font-size: 1.15rem; margin: 0; }
#s-close { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--rule); font-size: 1.3rem; cursor: pointer; color: var(--ink); line-height: 1; }
.sheet blockquote { margin: 1.1rem 0 0; padding: .8rem 1rem; border-radius: var(--r); background: var(--bg); font-family: var(--read); font-style: italic; color: var(--ink-2); font-size: .98rem; }
.sheet .c-list { flex: 1; }
.sheet .c-row { grid-template-columns: minmax(0, 1fr) auto; }
.sheet .c-row input { grid-column: 1 / -1; }

/* Reprise et temps restant */
.resume { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: .4rem; padding: .45rem .45rem .45rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .92rem; box-shadow: 0 18px 40px -20px rgba(0,0,0,.6); white-space: nowrap; }
.resume[hidden] { display: none; }
.resume button { background: none; border: 0; color: inherit; cursor: pointer; padding: .4rem .7rem; border-radius: 999px; }
.resume .go { background: var(--gold); color: #1b1b1f; font-weight: 500; }
.left { position: fixed; right: .9rem; bottom: .9rem; z-index: 35; font-size: .8rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: .3rem .7rem; opacity: 0; transition: opacity .3s; pointer-events: none; }
.left.on { opacity: .95; }

/* Lire la suite */
.gate { position: relative; max-width: 40rem; margin: -7rem auto 0; padding: 8rem var(--gutter) 3rem; background: linear-gradient(transparent, var(--bg) 6.5rem); }
.gate[hidden] { display: none; }
.gate h2 { font: 700 clamp(1.8rem, 4.5vw, 2.4rem)/1.1 var(--ui); letter-spacing: -.03em; margin: 0 0 1.2rem; }
.reading.locked > p:nth-of-type(n+4) { display: none; }
.reading.locked ~ .after, .reading.locked ~ .pager, .reading.locked ~ .comments, .reading.locked ~ #recevoir { display: none; }

/* Pages simples */
.doc { max-width: 42rem; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.doc h1 { font: 700 clamp(2.2rem, 6vw, 3.2rem)/1 var(--ui); letter-spacing: -.04em; margin: 0 0 1.6rem; }
.doc h2 { font: 700 1.2rem var(--ui); margin: 2.2rem 0 .6rem; }
.doc p { color: var(--ink-2); }
.doc .eyebrow { display: none; }

@media (max-width: 640px) {
  .prefs { right: 10px; left: 10px; width: auto; }
  .countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .countdown p { padding-right: .6rem; }
  .countdown p + p { padding-left: .7rem; }
  .countdown b { font-size: clamp(1.6rem, 8.6vw, 2.4rem); }
  .countdown span { font-size: .74rem; }
  .c-row { grid-template-columns: minmax(0, 1fr) auto; }
  .c-row input { grid-column: 1 / -1; }
  .sheet { align-items: flex-end; }
  .sheet-in { height: 84vh; border-radius: 20px 20px 0 0; animation-name: up; }
  @keyframes up { from { transform: translateY(24px); opacity: 0; } }
  .pager { grid-template-columns: 1fr; }
  .pager .nxt { text-align: left; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .toc a, .toc .locked { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .hero .btns .btn { width: 100%; }
}
.title { margin-bottom: .12em; }
form.mail, .field { min-width: 0; max-width: 100%; }
.field .btn { flex: none; padding: .55rem 1.15rem; }
.field input { width: 100%; }
@media (max-width: 640px) {
  .hero { min-height: 72svh; }
  .title { font-size: clamp(4.4rem, 25vw, 7rem); }
}

/* ——— Diagnostic lisibilité et navigation ——— */
:root { --edge: #8f8d86; }
html[data-theme="sepia"] { --edge: #8a7558; }
html[data-theme="nuit"] { --edge: #6a6c73; }
html[data-theme="contraste"] { --edge: #000000; }
/* Contours des éléments cliquables : contraste ≥ 3:1 */
.btn.line, .tools button, .rx, .pager a, .aa, .seg button, .field, .c-row input, .c-row textarea, .after .vote, #s-close { border-color: var(--edge); }
.pager span { border-color: var(--rule); }
/* Zones à toucher ≥ 44 px */
.top nav a { padding: .7rem .15rem; }
.aa { height: 2.75rem; min-width: 2.9rem; }
.foot nav a { display: inline-block; padding: .65rem 0; }
.small a { display: inline-block; padding: .35rem 0; }
.brand { padding: .55rem 0; display: inline-block; }
.tools button { min-height: 2.75rem; }
.c-act button { min-height: 2.5rem; padding: .3rem .1rem; }
.spoil-opt { min-height: 2.75rem; }
.spoil-opt input { width: 1.2rem; height: 1.2rem; }
/* Bulles de commentaire : visibles et faciles à toucher */
.bubble { min-width: 2.4rem; height: 2rem; gap: .25rem; grid-auto-flow: column; padding: 0 .5rem; opacity: 1; border-color: var(--rule); color: var(--muted); }
.bubble svg { width: 14px; height: 14px; }
.bubble .n:empty { display: none; }
.bubble::before { inset: -8px -6px; }
.reading p:hover .bubble { border-color: var(--edge); color: var(--ink); }
.bubble.has { border-color: var(--gold); color: var(--ink); }
/* Bouton Publier lisible */
.btn.send { width: auto; min-width: 0; padding: .6rem 1.2rem; border-radius: 999px; font-size: .95rem; }
/* Chapitre suivant : l'action principale en fin de lecture */
.next-cta { min-height: 3.4rem; padding: .8rem 2rem; font-size: 1.05rem; }
.after-note { margin: 0; color: var(--muted); font-size: .92rem; text-align: center; }
.sub { margin: -.4rem 0 0; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-2); }
.titling { display: grid; gap: .2rem; }
.genre { margin: 0; font-family: var(--read); font-style: italic; font-size: clamp(1.3rem, 3vw, 2rem); color: var(--ink-2); letter-spacing: .01em; }
.rdv { display: inline-flex; align-items: center; gap: .6rem; justify-self: start; margin: 0; padding: .55rem 1rem; border: 1px solid var(--edge); border-radius: 999px; background: var(--surface); font-size: .95rem; color: var(--ink); }
.rdv .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.hero .btns:empty { display: none; }

/* ——— Prochain chapitre ——— */
.next { display: grid; gap: .9rem; justify-items: start; padding-top: clamp(1.2rem, 3vh, 2rem); border-top: 1px solid var(--rule); }
.next-k { margin: 0; display: inline-flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.next-k .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--gold); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
html[data-motion="off"] .next-k .dot { animation: none; }
@media (prefers-reduced-motion: reduce) { .next-k .dot { animation: none; } }
.next-rdv { margin: 0; font-size: .95rem; color: var(--muted); }

/* ——— Échanges avec Babil ——— */
.reading p.msg { text-indent: 0; text-align: left; hyphens: manual; -webkit-hyphens: manual; font-family: var(--ui); font-size: .9em; line-height: 1.55; margin: 1.3rem 0; padding: .75rem 1rem .85rem; border-radius: 16px; clear: both; }
.reading p.msg + p.msg { margin-top: .7rem; }
.msg .who { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.msg .ln { display: block; }
.msg .ln + .ln { margin-top: .6em; }
.msg .ln.tight { margin-top: 0; }
.msg .ln b { font-weight: 700; }
.reading p.msg.me { width: fit-content; max-width: 85%; margin-left: auto; background: var(--surface-2); border-bottom-right-radius: 4px; }
.reading p.msg.me .who { text-align: right; }
.reading p.msg.ai { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-bottom-left-radius: 4px; }
.msg.ai .who::after { content: ""; display: inline-block; width: 2px; height: .95em; margin-left: .3em; vertical-align: -.12em; background: var(--gold); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
html[data-motion="off"] .msg.ai .who::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .msg.ai .who::after { animation: none; } }
.reading p.msg + p:not(.msg) { text-indent: 1.5em; }
.chap-head .ch-label { margin: 0 0 .7rem; font-size: .95rem; font-weight: 600; letter-spacing: .02em; color: var(--gold-text); }
.toc .lab { display: block; font-size: .8rem; font-weight: 600; color: var(--gold-text); margin-bottom: .1rem; letter-spacing: .02em; }
@media (max-width: 640px) { .reading p.msg.me { max-width: 92%; } }
@media (max-width: 900px) {
  .reading p.msg { padding-right: 3.4rem; min-width: 9rem; }
  .reading p.msg .bubble { position: absolute; top: .45rem; right: .45rem; margin: 0; }
  .reading p.msg.me .who { text-align: left; }
}
.reading p.first.short::first-letter { float: none; font: inherit; padding: 0; letter-spacing: inherit; }
.reading p.first.short + p { text-indent: 1.5em; }
/* Bandeau du menu : opaque et bien détaché du texte */
.top { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid var(--edge); box-shadow: 0 6px 18px -12px rgba(0,0,0,.35); }
.top nav a { color: var(--ink); }
.top nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ——— Prologue : une voix, pas un récit ——— */
.reading.prologue { padding-top: 3.2rem; padding-bottom: 3.5rem; }
.reading.prologue p { text-indent: 0 !important; text-align: left; hyphens: manual; font-style: italic; font-size: 1.1em; line-height: 1.75; margin: 0 0 1.5em; }
.reading.prologue p.first::first-letter { float: none; font: inherit; padding: 0; }
.reading.prologue p:last-of-type { margin-bottom: 0; }
.reading.prologue::before { content: ""; display: block; width: 2.4rem; height: 2px; background: var(--gold); margin: 0 0 2.4rem; }

/* ——— Bulles de commentaire : discrètes ——— */
.bubble { border-color: transparent !important; background: transparent; color: var(--muted); }
.bubble.has { color: var(--gold-text); }
.bubble.has .n { font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .reading p .bubble { opacity: 0; transition: opacity .2s; }
  .reading p:hover .bubble, .reading .bubble:focus-visible { opacity: .85; }
  .reading p .bubble.has { opacity: .85; }
  .reading p .bubble:hover { opacity: 1; color: var(--ink); background: var(--surface-2); }
}
@media (hover: none), (max-width: 900px) {
  .reading p .bubble { opacity: .38; min-width: 1.8rem; height: 1.6rem; padding: 0 .2rem; }
  .reading p .bubble.has { opacity: 1; }
  .reading p.msg { padding-right: 2.6rem; }
  .reading p.msg .bubble { top: .35rem; right: .3rem; }
}
.reading.prologue p { max-width: 31em; }

/* ——— Accueil plus compact : les chapitres arrivent vite ——— */
.hero { min-height: 0 !important; gap: clamp(1.1rem, 2.6vh, 1.8rem); padding: clamp(2.2rem, 6vh, 4rem) var(--gutter) clamp(2rem, 5vh, 3rem); align-content: start; }
.title { font-size: clamp(4.2rem, 13vw, 10.5rem); }
.titling { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: clamp(.8rem, 2vw, 1.6rem); row-gap: .2rem; }
.genre { font-size: clamp(1.7rem, 4vw, 3rem); color: var(--gold-text); font-weight: 400; }
.next { padding-top: 1rem; gap: .6rem; }
.countdown b { font-size: clamp(1.8rem, 4.2vw, 2.8rem); }
.hero + .sec { padding-top: clamp(1.6rem, 4vw, 2.6rem); }
.stats { border-top: 0; padding-bottom: 2.4rem; }
@media (max-width: 640px) {
  .title { font-size: clamp(4rem, 23vw, 6rem); }
  .genre { font-size: 1.7rem; }
  .countdown b { font-size: clamp(1.5rem, 8vw, 2.1rem); }
}

/* ——— Bulles de commentaire : visibles mais légères ——— */
.reading p .bubble { opacity: 1 !important; color: var(--ink-2); border: 1px solid var(--rule) !important; background: var(--surface); }
.reading p .bubble:hover, .reading p:hover .bubble { border-color: var(--edge) !important; color: var(--ink); }
.reading p .bubble.has { border-color: var(--gold) !important; color: var(--gold-text); }
.reading p.msg .bubble { background: transparent; }
.hint { display: flex; align-items: center; gap: .55rem; margin: 1.1rem 0 0; font-size: .88rem; color: var(--ink-2); }
.hint svg { flex: none; width: 1.6rem; height: 1.25rem; padding: .2rem .35rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); box-sizing: content-box; width: 13px; height: 13px; }
/* Courriel cité dans le récit */
.reading p.msg.mail { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--edge); border-radius: 6px; font-style: normal; }

/* ——— Inscription à partir du chapitre 3 ——— */
[data-subs-hide][hidden] { display: none !important; }
.toc .toc-gate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin: .8rem 0; padding: 1.2rem 1.4rem; background: var(--surface); border: 1px solid var(--edge); border-left: 3px solid var(--gold); border-radius: var(--r); }
.toc-gate p { margin: 0; display: grid; gap: .2rem; }
.toc-gate b { font: 700 1.1rem var(--ui); }
.toc-gate span { color: var(--ink-2); font-size: .95rem; }
.cap { max-width: 40rem; margin: 1rem auto 0; padding: 2rem var(--gutter) 2.4rem; border-top: 3px solid var(--gold); }
.cap h2 { font: 700 clamp(1.7rem, 4.5vw, 2.3rem)/1.1 var(--ui); letter-spacing: -.03em; margin: 0 0 .7rem; }
.cap > p { margin: 0 0 1.3rem; color: var(--ink-2); }
.toc .toc-gate a.btn { display: inline-flex; grid-template-columns: none; padding: .75rem 1.5rem; color: var(--bg); background: var(--ink); border-radius: 999px; font-weight: 500; }
.toc .toc-gate a.btn:hover { background: var(--ink); opacity: .9; }
@media (max-width: 560px) { .toc .toc-gate a.btn { width: 100%; justify-content: center; } }

/* ——— Bouton Installer l'appli ——— */
.inst { display: inline-flex; align-items: center; gap: .4rem; height: 2.75rem; padding: 0 .95rem 0 .8rem; border-radius: 999px; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); font: 500 .9rem var(--ui); cursor: pointer; }
.inst[hidden] { display: none; }
.inst svg { width: 18px; height: 18px; }
.inst:hover { opacity: .9; }
.inst-tip ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .7rem; font-size: .95rem; line-height: 1.45; }
.inst-tip .it-t { margin: 0; font-weight: 700; font-size: 1.05rem; }
.inst-tip .ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; margin: 0 .1em; color: var(--gold-text); }
@media (max-width: 560px) {
  .inst { width: 2.75rem; padding: 0; justify-content: center; }
  .inst span { display: none; }
  .top nav { gap: .7rem; }
  .top nav a { font-size: .9rem; }
}
.brand { white-space: nowrap; flex: none; }
.top nav { min-width: 0; }
@media (max-width: 420px) {
  .top-in { gap: .6rem; }
  .top nav { gap: .55rem; }
  .top nav a { font-size: .88rem; padding-inline: .05rem; }
  .aa { min-width: 2.75rem; padding: 0 .5rem; }
}
@media (max-width: 370px) { .top nav a[href$="#recevoir"] { display: none; } }

/* Bandeaux : état « inscrit » */
[data-subs] .sub-yes { display: none; }
[data-subs].is-sub .sub-no { display: none !important; }
[data-subs].is-sub .sub-yes { display: flex; align-items: center; gap: .9rem; margin: 0; }
.sub-yes > span { display: grid; gap: .15rem; }
.sub-yes b { font: 700 1.05rem var(--ui); }
.sub-yes span span { color: var(--ink-2); font-size: .95rem; }
.sub-yes .ok, .merci-ok svg { flex: none; width: 2.2rem; height: 2.2rem; padding: .45rem; border-radius: 50%; background: var(--gold); color: #fff; box-sizing: border-box; }
.cap.is-sub { border-top-width: 1px; padding-top: 1.6rem; padding-bottom: 1.6rem; }

/* Fenêtre de confirmation */
.merci { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.2rem; background: rgba(15,15,18,.45); animation: fadein .2s ease; }
.merci-in { width: min(26rem, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 22px; padding: 2rem 1.6rem 1.6rem; text-align: center; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); animation: pop .25s ease; }
.merci-ok { margin: 0 0 .8rem; display: flex; justify-content: center; }
.merci-ok svg { width: 3.2rem; height: 3.2rem; padding: .7rem; }
.merci h2 { font: 700 1.6rem/1.15 var(--ui); letter-spacing: -.02em; margin: 0 0 .7rem; }
.merci p { margin: 0 0 .8rem; color: var(--ink-2); }
.merci .merci-small { font-size: .85rem; color: var(--muted); }
.merci .btn { margin-top: .6rem; min-width: 12rem; }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
html[data-motion="off"] .merci, html[data-motion="off"] .merci-in { animation: none; }
@media (prefers-reduced-motion: reduce) { .merci, .merci-in { animation: none; } }
.sub-yes b { color: var(--ink); } .sub-yes span span { color: var(--ink-2); }
.inst-tip .it-and { margin: 0; font-size: .95rem; line-height: 1.5; } .inst-tip [hidden] { display: none; }

/* ——— Note de 1 à 5 étoiles ——— */
.rate { display: grid; justify-items: center; gap: .4rem; margin-bottom: .6rem; }
.rate-t { margin: 0; font-weight: 700; font-size: 1.05rem; }
.stars { display: flex; gap: .25rem; }
.stars button { width: 3rem; height: 3rem; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; color: var(--edge); border-radius: 50%; }
.stars button svg { width: 2.1rem; height: 2.1rem; }
.stars button.on { color: var(--gold); }
.stars:hover button { color: var(--gold); }
.stars button:hover ~ button { color: var(--edge); }
.stars button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.stars-note { margin: 0; font-size: .88rem; color: var(--muted); }
.rate-link svg { width: 15px; height: 15px; }
@media (hover: none) { .stars:hover button { color: var(--edge); } .stars:hover button.on { color: var(--gold); } }

/* ——— Réactions emoji sur chaque passage ——— */
.bubble .rx-top { font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.bubble .rx-top:empty { display: none; }
.reading p .bubble.has-rx { opacity: 1 !important; }
html[data-rx="off"] .bubble .rx-top { display: none; }
.s-rx-t { margin: .9rem 0 .4rem; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.s-rx { justify-content: flex-start; margin: 0; }
.s-rx .rx[disabled] { opacity: .6; }
@media (min-width: 901px) { .reading p .bubble { right: auto; left: calc(100% + .55rem); } }
