:root {
  --bg: #F7F7FB;
  --surface: #FFFFFF;
  --text: #1C2038;
  --muted: #565B77;
  --accent: #4638D6;
  --line: #DCDDEA;
  --lock: #CBCDDF;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131E;
    --surface: #181B2A;
    --text: #E6E8F5;
    --muted: #A2A7C4;
    --accent: #9D95FF;
    --line: #2A2E45;
    --lock: #3A3F5E;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.sans {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- En-tête et pied de page ---------- */
.site-header { border-bottom: 1px solid var(--line); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.site-footer p { margin: 0 0 0.4rem; }

/* ---------- Texte ---------- */
h1, h2, h3 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 2.5rem 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.meta {
  color: var(--muted);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
}

/* ---------- Tableaux ---------- */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

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

th { font-weight: 600; background: var(--surface); }
tr:last-child td { border-bottom: 0; }

/* ---------- Questions fréquentes ---------- */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }

summary {
  cursor: pointer;
  padding: 0.9rem 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  list-style-position: outside;
}

details > *:not(summary) { margin-left: 0; }
details[open] { padding-bottom: 0.5rem; }

/* ---------- Page d'accueil ---------- */
.hero { padding: 3.5rem 0 1rem; }

.hero h1 {
  font-size: clamp(3rem, 12vw, 5.5rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
}

.lead {
  font-size: 1.3rem;
  line-height: 1.5;
  max-width: 32rem;
  margin: 0 0 2rem;
}

.wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 7rem;
  margin: 0 0 3rem;
}

.wave span {
  flex: 1;
  height: var(--h);
  background: var(--lock);
  border-radius: 3px;
}

.wave span.on { background: var(--accent); }

.steps { padding-left: 1.25rem; }
.steps li { padding-left: 0.4rem; margin-bottom: 0.9rem; }

.status {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
}
