/* LoopHunter — palette « Capsule » de l'app (AppStyle.swift) : encre sur papier en clair,
   vert d'action pour les liens, terracotta du tracé pour la marque.
   Polices du système (SF Pro sur les appareils Apple), aucune ressource externe. */
:root {
  color-scheme: light dark;
  --fond: #F5F2E6;
  --feuille: #FBFAF4;
  --ligne: #FFFFFF;
  --texte: #26261F;
  --second: #5A5A4E;
  --attenue: #686858;
  --lien: #33693A;
  --trace: #C4602F;
  --filet: rgba(38, 38, 31, 0.13);
  --surligne: #F1D9A6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1F211D;
    --feuille: #282A25;
    --ligne: #30332D;
    --texte: #EBEBE0;
    --second: #ABAB9C;
    --attenue: #909082;
    --lien: #92C796;
    --trace: #E08455;
    --filet: rgba(235, 235, 224, 0.11);
    --surligne: #5C4A24;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  padding: 0 16px;
}
a { color: var(--lien); text-decoration-thickness: 1px; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }

.haut, .texte, .bas, .brouillon { max-width: 42rem; margin: 0 auto; }
.haut {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding: 1.5rem 0 1rem; border-bottom: 1px solid var(--filet);
}
.marque {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 650; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; color: var(--texte);
}
/* Une boucle : anneau couleur du tracé. */
.marque::before {
  content: ""; width: 0.8rem; height: 0.8rem; border-radius: 50%;
  border: 0.17rem solid var(--trace); flex: none;
}
.haut nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.9375rem; }
.haut nav a { color: var(--second); text-decoration: none; }
.haut nav a:hover, .haut nav a[aria-current="page"] { color: var(--texte); }

.texte { padding: 2rem 0 3rem; }
h1 { font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 1.25rem; }
h2 { font-size: 1.1875rem; line-height: 1.3; margin: 2.25rem 0 0.6rem; }
h3 { font-size: 1.0625rem; line-height: 1.35; margin: 1.5rem 0 0.4rem; }
p, ul, ol { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.45rem; }
strong { font-weight: 620; }
code { font: 0.92em ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }

.chapeau { font-size: 1.1875rem; color: var(--second); }
.liens { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: 0.6rem; }
.liens a {
  display: block; padding: 0.9rem 1rem; border-radius: 14px; background: var(--feuille);
  text-decoration: none; color: var(--texte); border: 1px solid var(--filet);
}
.liens a span { display: block; color: var(--second); font-size: 0.9375rem; }
.liens a:hover { background: var(--ligne); }

.tableau { overflow-x: auto; margin: 0 0 1rem; border-radius: 14px; background: var(--feuille); }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.9375rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--filet); }
thead th { color: var(--second); font-weight: 600; font-size: 0.875rem; }
tbody th { font-weight: 500; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.bas { padding: 1.25rem 0 2rem; border-top: 1px solid var(--filet); color: var(--attenue); font-size: 0.875rem; }
.bas a { color: var(--attenue); }

/* Brouillon seulement (outils/pages.py --brouillon) : jamais déployé, voir le Dockerfile. */
.brouillon {
  margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 14px;
  background: var(--surligne); color: var(--texte); font-size: 0.9375rem;
}
mark { background: var(--surligne); color: var(--texte); border-radius: 4px; padding: 0 0.2em; }
mark.vide { outline: 1px dashed var(--trace); }
.variante { margin: 0 0 0.3rem; color: var(--second); font-size: 0.875rem; font-weight: 600; }
