
:root {
  --fond: #f7f4ee;
  --fond-carte: #fffdf9;
  --encre: #24211d;
  --encre-douce: #6b645b;
  --trait: #e0d9cc;
  --accent: #8a5a3b;
  --largeur: 34rem;
}
:root:not([data-theme="clair"]) { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --fond: #16151a;
    --fond-carte: #1e1d23;
    --encre: #ded8cf;
    --encre-douce: #948d84;
    --trait: #2e2c34;
    --accent: #c9a37e;
    color-scheme: dark;
  }
}
:root[data-theme="sombre"] {
  --fond: #16151a;
  --fond-carte: #1e1d23;
  --encre: #ded8cf;
  --encre-douce: #948d84;
  --trait: #2e2c34;
  --accent: #c9a37e;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--accent); }

/* ---------------------------------------------------------------- accueil */

.couverture {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--trait);
}
.marque {
  margin: 0 0 1.2rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
.couverture h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.9rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.chapeau {
  margin: 1.2rem auto 0;
  max-width: 30rem;
  color: var(--encre-douce);
  font-size: 1rem;
}

.grille {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
  display: grid;
  gap: 1rem;
}

.carte {
  display: block;
  padding: 1.6rem 1.5rem;
  background: var(--fond-carte);
  border: 1px solid var(--trait);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.carte:hover { border-color: var(--accent); transform: translateY(-2px); }
.carte h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.25;
}
.carte-sous {
  margin: .5rem 0 0;
  font-style: italic;
  font-size: .95rem;
  color: var(--encre-douce);
}
.carte-extrait {
  margin: .9rem 0 0;
  font-size: .97rem;
  color: var(--encre-douce);
  line-height: 1.6;
}
.carte-pied {
  margin: 1.1rem 0 0;
  display: flex;
  gap: .5rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.vide { text-align: center; color: var(--encre-douce); }

.pied {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .8rem;
  color: var(--encre-douce);
}

/* ---------------------------------------------------------------- lecture */

.progression {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 10;
}
.progression span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.barre-haute {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.5rem;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait);
}
.retour, .barre-haute button {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  color: var(--encre-douce);
  text-decoration: none;
}
.barre-haute button {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.05rem;
  padding: .2rem .4rem;
}
.retour:hover, .barre-haute button:hover { color: var(--accent); }

.lecture {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
}
.lecture-entete {
  margin-bottom: 3rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--trait);
}
.lecture-entete h1 {
  margin: 0;
  font-size: clamp(1.9rem, 6.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
}
.lecture-sous {
  margin: 1rem 0 0;
  font-style: italic;
  color: var(--encre-douce);
  font-size: 1rem;
}
.lecture-meta {
  margin: 1rem 0 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.lecture figure.image {
  margin: 2.5rem 0;
}
.lecture figure.image img {
  display: block;
  width: 100%;
  border-radius: 8px;
}
.lecture figure.image figcaption {
  margin-top: .6rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .8rem;
  font-style: italic;
  color: var(--encre-douce);
  text-align: center;
}

.lecture p { margin: 0 0 1.5em; }
.lecture p.dialogue { margin-bottom: 1em; }
.lecture h2 {
  margin: 3rem 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 400;
}

.jalon {
  margin: 3.5rem 0 2.5rem;
  text-align: center;
}
.jalon span {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--encre-douce);
  padding: 0 1rem;
  position: relative;
}
.jalon span::before, .jalon span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2.2rem;
  height: 1px;
  background: var(--trait);
}
.jalon span::before { right: 100%; }
.jalon span::after { left: 100%; }

hr.sep {
  border: 0;
  margin: 2.5rem auto;
  width: 4rem;
  border-top: 1px solid var(--trait);
}

.fin {
  margin: 3rem 0 0;
  text-align: center;
  color: var(--accent);
  letter-spacing: .3em;
}

.nav-textes {
  max-width: var(--largeur);
  margin: 2rem auto 0;
  padding: 2rem 1.5rem 0;
  border-top: 1px solid var(--trait);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .88rem;
}
.nav-textes a { text-decoration: none; }
.nav-textes a:hover { text-decoration: underline; }
.nav-suiv { margin-left: auto; text-align: right; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .couverture { padding-top: 3.5rem; }
  .lecture { padding-top: 2.5rem; }
}
