/* Feuille unique, sans dépendance et sans JavaScript.
   Deux thèmes, décidés par le réglage système du lecteur. */

:root {
  --fond: #fbfaf8;
  --texte: #1f1d1a;
  --attenue: #6b6660;
  --trait: #e2ded7;
  --lien: #8a4b2a;
  --bloc: #f2efe9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #16151a;
    --texte: #e8e5df;
    --attenue: #9a948c;
    --trait: #2e2c33;
    --lien: #d99a6c;
    --bloc: #1f1e25;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.5rem;
  background: var(--fond);
  color: var(--texte);
  font: 1.05rem/1.65 Charter, Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

.entete, main, .pied { max-width: 40rem; margin: 0 auto; }

/* --- En-tête --- */

.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--trait);
}

.titre {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--texte);
  text-decoration: none;
}

.entete nav { margin-left: auto; display: flex; gap: 1.25rem; }

.entete nav a {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--attenue);
  text-decoration: none;
}

.entete nav a:hover { color: var(--lien); }

/* --- Corps --- */

main { padding: 2.5rem 0 4rem; }

a { color: var(--lien); text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }

.baseline {
  font-size: 1.2rem;
  color: var(--attenue);
  margin: 0 0 2.5rem;
}

.meta, .chapeau {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--attenue);
}

.chapeau { font-size: 0.95rem; line-height: 1.5; }

article .chapeau {
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 2rem;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--trait);
  color: var(--attenue);
}

/* --- Liste d'articles --- */

.liste { list-style: none; padding: 0; margin: 0; }

.liste li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--trait);
}

.liste li a { font-size: 1.15rem; text-decoration: none; }
.liste li a:hover { text-decoration: underline; }

.liste time {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--attenue);
  margin-top: 0.2rem;
}

.liste .chapeau { margin: 0.5rem 0 0; }

/* --- Code et tableaux --- */

pre, code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
}

code { background: var(--bloc); padding: 0.1em 0.35em; border-radius: 3px; }

pre {
  background: var(--bloc);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

pre code { background: none; padding: 0; }

/* Un tableau large défile dans son cadre : le corps de page ne défile jamais. */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--trait); }
th { font-family: system-ui, sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--attenue); }

img { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--trait); margin: 2.5rem 0; }

/* --- Pied --- */

.pied {
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--trait);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--attenue);
}
