/* Le site reprend le monde de l'application : un bureau de bois clair, des
   feuilles de papier posées dessus, une écriture à l'encre. Rien n'y est
   décoratif — la spirale, la marge, le grain sont ce qui fait reconnaître
   un cahier avant d'avoir lu le titre. */

:root {
  color-scheme: light;
  --bois: #c8b291;
  --bois-veine: rgba(120, 92, 56, 0.09);
  --papier: #faf7ef;
  --papier-bord: rgba(60, 44, 22, 0.14);
  --encre: #221a10;
  --encre-douce: #5c4f3d;
  --manuscrit: #1b3a6b;
  --ocre: #9a6a12;
  --vert: #2f6d4f;
  --ombre: 0 10px 26px rgba(50, 34, 14, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bois: #2a2118;
    --bois-veine: rgba(255, 236, 200, 0.05);
    --papier: #f3 efe6;
    --papier: #f2ede3;
    --papier-bord: rgba(0, 0, 0, 0.4);
    --encre: #1c150c;
    --encre-douce: #5a4e3c;
    --ombre: 0 12px 34px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bois: #2a2118;
  --bois-veine: rgba(255, 236, 200, 0.05);
  --papier: #f2ede3;
  --papier-bord: rgba(0, 0, 0, 0.4);
  --encre: #1c150c;
  --encre-douce: #5a4e3c;
  --ombre: 0 12px 34px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* Les veines du bois, dessinées plutôt qu'images : net à toute taille,
     et le site pèse ce que pèse son texte. */
  background:
    repeating-linear-gradient(90deg,
      transparent 0 6px, var(--bois-veine) 6px 7px, transparent 7px 19px),
    var(--bois);
  color: var(--encre);
  font: 400 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-block: 0;
}

.desk {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 16px 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Une feuille posée sur le bureau. */
.sheet {
  position: relative;
  background: var(--papier);
  border-radius: 3px;
  box-shadow: var(--ombre);
  padding: 2rem 1.75rem 2rem 2.75rem;
}

/* La marge du cahier : brun clair, jamais le filet rouge du Seyès, qui
   ramène aussitôt à l'école primaire. */
.sheet::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 1.5rem;
  width: 1px;
  background: rgba(150, 110, 60, 0.35);
}

.sheet > * { position: relative; }

h1, h2, h3 {
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  color: var(--encre);
  text-wrap: balance;
  margin: 0;
  line-height: 1.15;
}

h1 { font-size: clamp(2.1rem, 7vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 4vw, 1.75rem); font-weight: 600; margin-top: 2.25rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1.5rem; }
h2:first-child, h3:first-child { margin-top: 0; }

p, li { color: var(--encre-douce); }
p { margin: 0.85rem 0 0; max-width: 34em; }
strong { color: var(--encre); font-weight: 600; }

.lede {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--encre);
  margin-top: 1.25rem;
}

/* La spirale : des anneaux qui enjambent le bord supérieur de la feuille,
   moitié dessus moitié dessous, comme sur un vrai cahier à reliure. C'est
   elle qui fait reconnaître un cahier avant qu'on ait lu le titre. */
.rings {
  position: absolute;
  top: -0.85rem;
  left: 2.5rem;
  right: 1.75rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.rings span {
  width: 1.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, #fbfcfe 0%, #c6ccd8 42%, #78808f 58%, #e2e6ee 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  flex: none;
}

/* Sur la feuille qui porte la spirale, le texte commence sous les anneaux. */
.sheet:has(.rings) { padding-top: 2.5rem; }

.steps { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 40rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step h3 { margin-top: 0; }
.step p { margin-top: 0.4rem; font-size: 0.95rem; }
.step .verb {
  display: block;
  font: 600 0.72rem/1 -apple-system, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocre);
  margin-bottom: 0.5rem;
}

/* Les intervalles réels de la répétition espacée. Ce ne sont pas des
   chiffres d'illustration : ce sont ceux que l'application applique. */
.days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}
.days li {
  font: 600 0.85rem/1 -apple-system, sans-serif;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  background: rgba(47, 109, 79, 0.1);
  color: #24553e;
  border: 1px solid rgba(47, 109, 79, 0.22);
}

.claim {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--vert);
  background: rgba(47, 109, 79, 0.07);
}
.claim p { margin: 0; color: #24553e; }

ul.plain { margin: 0.85rem 0 0; padding-left: 1.15rem; }
ul.plain li { margin-top: 0.4rem; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--encre-douce);
}
a { color: var(--manuscrit); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--manuscrit); outline-offset: 3px; border-radius: 2px; }

.back { font-size: 0.9rem; }
.date { font-size: 0.85rem; color: var(--encre-douce); margin-top: 0.35rem; }

@media (prefers-reduced-motion: no-preference) {
  .sheet { transition: box-shadow 0.3s ease; }
}
