/* 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; }
