/* Charte « Chemin & repères » transposée au web lu : filets 1px, pas de cartes
   pour le contenu éditorial, radius <= 8px. Le blog est une surface de lecture
   longue, pas une interface : la mesure de ligne prime sur tout le reste. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--lin);
  color: var(--foreground);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 42rem; margin: 0 auto; padding: 0 1rem 4rem; }

/* Chrome */
.chrome {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.marque {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}
.chrome nav a, .pied a { color: var(--terra-dark); }
.pied {
  display: block;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--gris-mid);
}
.pied p { margin: 0.35rem 0; }

/* Ligne mono en capitales, le jalon du proto */
.jalon {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris-mid);
  margin: 0 0 0.75rem;
}

/* Titres */
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
/* Jamais d'italique sur le display : deux voix empilées, signature d'une page
   générée. Un test de charte l'interdit côté app, la règle vaut ici aussi. */
h1, h2, h3 { font-style: normal; }
h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 2.75rem 0 0.75rem;
}
h3 {
  font-family: 'Satoshi', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

.chapo {
  font-size: 1.15rem;
  color: var(--charbon);
  margin: 0 0 1.5rem;
}

.meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gris-mid);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  margin: 0 0 2rem;
}

/* Corps */
article p { margin: 0 0 1.15rem; }
article a { color: var(--terra-dark); text-underline-offset: 2px; }
article ul, article ol { margin: 0 0 1.15rem; padding-left: 1.2rem; }
article li { margin: 0 0 0.4rem; }
article strong { font-weight: 700; }
article hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
article blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--terra);
  color: var(--charbon);
}
article figure { margin: 2rem 0; }
article img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
article figcaption { font-size: 0.85rem; color: var(--gris-mid); margin-top: 0.5rem; }
.encadre {
  background: var(--muted);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.encadre p { margin: 0; }

/* Avertissement médical, obligatoire sur du contenu de santé non relu */
.avertissement {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 2.5rem 0 0;
  font-size: 0.9rem;
  color: var(--charbon);
}
.avertissement p { margin: 0; }

/* Porte vers l'app : un seul bouton plein par écran */
.porte {
  display: inline-block;
  background: var(--terra);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  margin: 1rem 0 0;
}

/* Index et listes d'articles : filets, pas de cartes */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.liste li:last-child { border-bottom: 1px solid var(--border); }
.liste h2 { font-size: 1.3rem; margin: 0.35rem 0 0.4rem; }
.liste a { color: var(--foreground); text-decoration: none; }
.liste a:hover h2 { color: var(--terra-dark); }
.liste p { margin: 0; color: var(--charbon); }

.themes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.themes a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  color: var(--charbon);
  text-decoration: none;
}
.themes a:hover { border-color: var(--terra); color: var(--terra-dark); }

.lies { border-top: 1px solid var(--border); margin-top: 3rem; padding-top: 1.5rem; }

/* Un brouillon ne sort jamais en production, mais en local il doit se voir */
.brouillon {
  background: var(--danger);
  color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  text-align: center;
}
