/* SOLIS APPS — feuille de style unique du site.
   Sobre, une colonne, lisible. Thème clair/sombre automatique. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #22201d;
  --text-muted: #6b6660;
  --rule: #e4e0da;
  --accent: #b4761f;
  --accent-soft: #f6efe3;
  --max: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1e1d1a;
    --text: #e8e5e0;
    --text-muted: #a09a92;
    --rule: #34322e;
    --accent: #e0a955;
    --accent-soft: #2a251c;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover { color: var(--accent); }

.lang {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.lang a { color: var(--text-muted); }

.lang a:hover { color: var(--accent); }

.lang [aria-current] {
  color: var(--text);
  font-weight: 600;
}

.lang span[aria-hidden] { opacity: 0.4; padding: 0 0.35rem; }

/* ---------- Structure ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer p { margin: 0.35rem 0; }

/* ---------- Typographie ---------- */

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}

p, ul, ol { margin: 0 0 1rem; }

li { margin-bottom: 0.4rem; }

a { color: var(--accent); text-underline-offset: 2px; }

strong { font-weight: 600; }

.updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ---------- Sommaire ---------- */

.toc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.9375rem;
}

.toc h2 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  padding: 0;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
}

.toc li { margin-bottom: 0.3rem; break-inside: avoid; }

@media (max-width: 34rem) {
  .toc ol { columns: 1; }
}

/* ---------- Tableaux ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.875rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

th {
  background: var(--accent-soft);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }

/* ---------- Encadré d'avertissement ---------- */

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.callout p:last-child { margin-bottom: 0; }

/* ---------- Page d'index ---------- */

.doc-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.doc-list li { margin-bottom: 0.75rem; }

.doc-list a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}

.doc-list a:hover { border-color: var(--accent); }

.doc-list .title { font-weight: 600; }

.doc-list .meta {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
