:root {
  --nuit: #0e1430;
  --lapis: #1c2a5e;
  --or: #d6b25e;
  --or-encre: #7e5f17;
  --velin: #eceef4;
  --papier: #f7f8fb;
  --encre: #1a2140;
  --brume: #b4bcd8;
  --trait: #c9cee0;
  --hebreu: "Frank Ruhl Libre", "Noto Serif Hebrew", serif;
  --texte: "EB Garamond", Garamond, "Times New Roman", serif;
  --mesure: 36rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--texte); font-size: 1.1875rem; line-height: 1.6; color: var(--encre); background: var(--papier); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.enveloppe { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.lecture { max-width: var(--mesure); }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 600; }

/* entête */
.entete { background: var(--nuit); color: var(--velin); border-bottom: 1px solid rgba(214,178,94,.25); }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; flex-wrap: wrap; }
.marque { font-size: 1.35rem; text-decoration: none; color: var(--or); letter-spacing: .02em; }
.marque span { font-family: var(--hebreu); margin-left: .35em; font-size: 1.15em; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 1.05rem; }
.nav a { text-decoration: none; color: var(--velin); opacity: .85; padding: .25rem 0; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--or); }

/* boutons */
.bouton { display: inline-block; font: inherit; font-size: 1.1rem; padding: .7rem 1.4rem; border-radius: 2px; text-decoration: none; cursor: pointer; border: 1px solid var(--or); }
.bouton-plein { background: var(--or); color: var(--nuit); }
.bouton-plein:hover { background: #e4c57a; }
.bouton-trait { background: transparent; color: var(--or); }
.bouton-trait:hover { background: rgba(214,178,94,.12); }
.bouton[aria-disabled="true"] { opacity: .65; cursor: default; }

/* héros */
.heros { background: radial-gradient(120% 90% at 50% 0%, #22306a 0%, var(--nuit) 62%); color: var(--velin); padding: 3.5rem 0 4.5rem; overflow: hidden; }
.mot { direction: rtl; display: flex; justify-content: center; gap: clamp(.4rem, 2.2vw, 2rem); margin: 0 auto 3.25rem; padding: 0; list-style: none; }
.mot li { display: flex; flex-direction: column; align-items: center; min-width: 3.2rem; }
.mot .lettre { font-family: var(--hebreu); font-size: clamp(3.2rem, 2rem + 7vw, 8.5rem); line-height: 1; color: var(--velin); }
.mot .sens { direction: ltr; font-style: italic; font-size: clamp(.95rem, .85rem + .5vw, 1.2rem); color: var(--brume); margin-top: .6rem; }
.mot li:last-child .lettre, .mot li:last-child .sens { color: var(--or); }
.mot-legende { text-align: center; max-width: 34rem; margin: -2rem auto 3rem; color: var(--brume); font-size: 1.15rem; }
.heros-grille { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.heros-grille .couverture { box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); border: 1px solid rgba(214,178,94,.3); }
.surtitre { font-size: 1.3rem; color: var(--brume); margin: 0 0 .2rem; }
.heros h1 { font-size: clamp(3.4rem, 2rem + 6vw, 6rem); color: var(--or); font-weight: 500; margin: 0 0 .15em; line-height: 1; }
.heros h1 small { display: block; font-size: 1.3rem; color: var(--brume); font-weight: 400; margin-bottom: .4rem; line-height: 1.3; }
.soustitre { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-style: italic; margin: 0 0 .5rem; }
.auteur-nom { color: var(--brume); margin-bottom: 2rem; }
.actions { display: flex; gap: .9rem; flex-wrap: wrap; }
.prix-note { font-size: .98rem; color: var(--brume); margin-top: 1rem; }

/* animation d'ouverture : une seule séquence */
@media (prefers-reduced-motion: no-preference) {
  .mot li { opacity: 0; transform: translateY(.4rem); animation: lettre .7s ease forwards; }
  .mot li:nth-child(1) { animation-delay: .15s; } .mot li:nth-child(2) { animation-delay: .45s; }
  .mot li:nth-child(3) { animation-delay: .75s; } .mot li:nth-child(4) { animation-delay: 1.05s; }
  .mot li:nth-child(5) { animation-delay: 1.35s; } .mot li:nth-child(6) { animation-delay: 1.75s; }
  @keyframes lettre { to { opacity: 1; transform: none; } }
}

/* sections claires */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-claire { background: var(--papier); }
.section-velin { background: var(--velin); }
.citation { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); font-style: italic; line-height: 1.35; border-left: 3px solid var(--or); padding-left: 1.25rem; margin: 0 0 2rem; max-width: 40rem; }
.citation cite { display: block; font-style: normal; font-size: 1rem; color: var(--or-encre); margin-top: .5rem; }
.deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
.decouvertes { margin: 0; padding: 0; list-style: none; }
.decouvertes li { padding: .85rem 0; border-bottom: 1px solid var(--trait); }
.decouvertes li:first-child { border-top: 1px solid var(--trait); }

/* planches */
.planches { background: var(--nuit); color: var(--velin); padding: clamp(3.5rem, 7vw, 6rem) 0; }
.planches p.intro { color: var(--brume); max-width: 38rem; }
.galerie { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 19rem); gap: 1.25rem; overflow-x: auto; padding: 1rem max(1rem, (100% - 72rem) / 2) 1.5rem; scroll-snap-type: x mandatory; scrollbar-color: var(--lapis) transparent; }
.galerie figure { margin: 0; scroll-snap-align: start; }
.galerie img { aspect-ratio: 1838 / 2775; object-fit: cover; width: 100%; border: 1px solid rgba(214,178,94,.25); }
.galerie figcaption { margin-top: .6rem; font-size: 1.05rem; }
.galerie figcaption span { display: block; color: var(--brume); font-size: .95rem; font-style: italic; }

/* sommaire */
.sommaire { columns: 2 18rem; column-gap: 3rem; }
.partie { break-inside: avoid; margin-bottom: 1.75rem; }
.partie h3 { color: var(--or-encre); font-weight: 500; font-style: italic; font-size: 1.3rem; margin-bottom: .4rem; }
.partie ol { margin: 0; padding-left: 1.6rem; }
.partie li { margin-bottom: .25rem; }

/* chapitre gratuit */
.offre { background: var(--lapis); color: var(--velin); padding: clamp(3.5rem, 7vw, 6rem) 0; }
.offre-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 3rem; align-items: start; }
.offre p { color: #d9ddec; }
form .champ { margin-bottom: 1rem; }
form label { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
form input[type=text], form input[type=email], form select { width: 100%; font: inherit; font-size: 1.1rem; padding: .65rem .8rem; border: 1px solid #5a6699; background: #f4f5fa; color: var(--encre); border-radius: 2px; }
form .case { display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; margin-bottom: .6rem; }
form .case input { margin-top: .35rem; accent-color: var(--or); }
.erreur { color: #ffd2c4; font-size: 1rem; min-height: 1.4em; }
.petit { font-size: .95rem; color: var(--brume); }

/* auteur */
.auteur { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.auteur img { border: 1px solid var(--trait); }

/* articles */
.liste-articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; }
.liste-articles a { text-decoration: none; display: block; padding-top: 1rem; border-top: 2px solid var(--or); }
.liste-articles a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.liste-articles p { color: #4a5275; }

/* à venir */
.avenir { background: var(--nuit); color: var(--velin); padding: clamp(3rem, 6vw, 5rem) 0; }
.avenir dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem; margin: 1.5rem 0 0; }
.avenir dt { color: var(--or); font-size: 1.3rem; margin-bottom: .3rem; }
.avenir dd { margin: 0; color: var(--brume); }

/* contact */
.contact-grille { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.bouton-encre { color: var(--or-encre); border-color: var(--or-encre); }
.bouton-encre:hover { background: rgba(126,95,23,.08); }
@media (max-width: 760px) { .contact-grille { grid-template-columns: minmax(0, 1fr); } }

/* pied */
.pied { background: #0a0f26; color: var(--brume); padding: 2.5rem 0; font-size: 1rem; }
.pied .enveloppe { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pied a { color: var(--velin); }

/* pages article */
.article-tete { background: var(--nuit); color: var(--velin); padding: 3rem 0 3.5rem; }
.article-tete h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem); color: var(--or); max-width: 44rem; }
.article-tete p { color: var(--brume); max-width: 40rem; font-size: 1.25rem; }
.article-corps { padding: 3rem 0 4rem; }
.article-corps h2 { font-size: 1.75rem; margin-top: 2.2rem; }
.article-corps blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 3px solid var(--or); font-style: italic; }
.article-corps .heb { font-family: var(--hebreu); font-style: normal; font-size: 1.2em; }
.article-corps figure { margin: 2rem 0; max-width: 22rem; }
.article-corps figcaption { font-size: .95rem; color: #4a5275; margin-top: .5rem; font-style: italic; }
.encart { background: var(--velin); border-top: 2px solid var(--or); padding: 1.75rem; margin-top: 3rem; }
.encart p { margin-bottom: 1rem; }
.fil { font-size: 1rem; color: var(--brume); margin-bottom: 1rem; }
.fil a { color: var(--brume); }

@media (max-width: 760px) {
  body { font-size: 1.125rem; }
  .heros-grille, .deux, .offre-grille, .auteur { grid-template-columns: minmax(0, 1fr); }
  .heros-grille .couverture { max-width: 14rem; margin-inline: auto; }
  .heros-texte { text-align: center; }
  .actions { justify-content: center; }
  .auteur img { max-width: 10rem; }
  .nav { gap: .9rem; font-size: 1rem; }
  .mot li { min-width: 0; }
}

/* bouton retour en haut */
.haut { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--or); background: var(--nuit); color: var(--or); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.35);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s, background .2s; }
.haut.visible { opacity: 1; visibility: visible; transform: none; }
.haut:hover { background: var(--or); color: var(--nuit); }
.haut svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .haut { transition: none; } }

/* Textes justifiés partout (préférence de l'auteur) */
p, li, blockquote, dd, figcaption { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.mot-legende, .pied p { text-align: center; }
.heros-texte .auteur-nom, .heros-texte .prix-note { text-align: inherit; }
@media (max-width: 760px) { .heros-texte p { text-align: center; } }
