/* Cairn — feuille de style du site.
   Aucune ressource externe : ni police distante, ni CDN. Le site se charge
   entièrement depuis GitHub Pages, ce qui évite de faire fuiter la visite
   vers un tiers. */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-alt: #f3efe9;
  --text: #22262b;
  --muted: #666e78;
  --border: #e4ded4;
  --accent: #b4552a;
  --accent-soft: #f7ece5;
  --shadow: 0 1px 2px rgb(34 38 43 / 6%), 0 8px 24px rgb(34 38 43 / 5%);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1b1f24;
    --surface-alt: #21262c;
    --text: #e8e4dd;
    --muted: #9aa3ad;
    --border: #2c3238;
    --accent: #e8834a;
    --accent-soft: #2a211c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 22%);
  }
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- en-tête ---------- */

header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.brand img { width: 30px; height: 30px; border-radius: 8px; }

header nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 15px;
}

header nav a { color: var(--muted); text-decoration: none; }
header nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */

/* padding-block seulement : un `padding` complet écraserait la gouttière
   horizontale héritée de .wrap et collerait le titre au bord. */
.hero { padding-block: 72px 56px; }

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.hero .lede {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 32px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 550;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */

section { padding: 44px 0; border-top: 1px solid var(--border); }

/* L'en-tête est collant : sans cette marge, un lien d'ancre amène le titre
   de section juste dessous, hors de vue. */
section[id] { scroll-margin-top: 68px; }

h2 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

section > .wrap > p:first-of-type { color: var(--muted); margin-top: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 { margin: 0 0 8px; font-size: 1.02rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- code ---------- */

pre {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

p code, li code, td code {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.88em;
}

/* ---------- téléchargements ---------- */

.table-scroll { overflow-x: auto; margin-top: 24px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 480px;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

th { font-weight: 600; font-size: 13.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
td a { color: var(--accent); font-weight: 550; text-decoration: none; }
td a:hover { text-decoration: underline; }
td .note { color: var(--muted); font-size: 13.5px; }

/* ---------- état d'avancement ---------- */

.status { display: grid; gap: 10px; margin-top: 22px; padding: 0; list-style: none; }

.status li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tag {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

.tag-ok { background: var(--accent-soft); color: var(--accent); }
.tag-wip { background: var(--surface-alt); color: var(--muted); }

.callout {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
}

.callout p { margin: 0; }

/* ---------- pied ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 56px;
  color: var(--muted);
  font-size: 14.5px;
}

footer a { color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding-block: 48px 36px; }
  header nav { gap: 12px; font-size: 14px; }
}
