/* Guides statiques (scripts/seo-pages.ts) : mêmes couleurs et typo que l'appli. */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #737373;
  --line: #e5e5e5;
  --soft: #f5f5f5;
  --accent: #22c55e;
  --accent-strong: #16a34a;
  --accent-soft: rgb(34 197 94 / 0.12);
  --warn-bg: #fffbeb;
  --warn-line: #f59e0b;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #fafafa;
    --muted: #a3a3a3;
    --line: #262626;
    --soft: #171717;
    --accent-strong: #22c55e;
    --warn-bg: rgb(245 158 11 / 0.1);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-strong); text-underline-offset: 3px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }
@media (min-width: 1024px) { .wrap { padding: 0 48px; } }
@media (min-width: 1536px) { .wrap { max-width: 1440px; } }

.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); padding-top: env(safe-area-inset-top); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.links { display: none; }
@media (min-width: 900px) {
  .links { display: flex; gap: 28px; margin-left: auto; }
  .links a { color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; transition: color 0.2s; }
  .links a:hover { color: var(--fg); }
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand img { border-radius: 8px; }
.brand b { color: var(--accent-strong); }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: #0a0a0a; font-weight: 600; text-decoration: none; padding: 14px 24px; margin: 4px 6px 4px 0; transition: background 0.2s; }
.btn:hover { background: var(--accent-strong); }
.btn.small { padding: 8px 16px; font-size: 14px; margin: 0; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--soft); }

.crumbs { margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }

h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; margin: 18px 0 0; }
h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 750; margin: 44px 0 10px; }
.lead { font-size: 19px; color: var(--muted); margin: 18px 0 0; max-width: 760px; }
.hero h1 { max-width: 980px; }
@media (min-width: 1024px) {
  h1 { font-size: clamp(44px, 4.4vw, 64px); }
  .hero { padding-bottom: 12px; }
  .hero .lead { font-size: 21px; }
}

/* Article + sommaire : une colonne sur téléphone, deux sur ordinateur. */
.content { min-width: 0; }
.side { display: none; }
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; align-items: start; }
  .content { max-width: 820px; }
  .side { display: grid; gap: 20px; position: sticky; top: 96px; margin-top: 28px; max-height: calc(100vh - 120px); overflow-y: auto; }
}
@media (min-width: 1280px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 96px; } }
.toc p { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-size: 14.5px; line-height: 1.4; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.toc a:hover { color: var(--fg); border-left-color: var(--accent); }
.side-cta { padding: 20px; border-radius: 18px; background: #0a0a0a; color: #fafafa; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.side-cta p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; color: #a3a3a3; }
.side-cta p:first-child { color: #fafafa; font-size: 16px; }
.side-cta .btn { margin-top: 10px; }
h2[id], .faq { scroll-margin-top: 88px; }
ul { padding-left: 1.2em; }
li { margin: 6px 0; }

.notice { margin: 28px 0 0; padding: 16px 18px; border-left: 4px solid var(--warn-line); border-radius: 12px; background: var(--warn-bg); font-size: 15px; line-height: 1.55; }

.table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
caption { text-align: left; padding: 12px 14px 0; font-size: 13px; color: var(--muted); }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }
td { font-variant-numeric: tabular-nums; }

.examples li { margin: 10px 0; }

.cta { margin: 72px 0 0; padding: 28px; border-radius: 24px; background: #0a0a0a; color: #fafafa; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.cta h2 { margin-top: 0; }
.cta p { color: #a3a3a3; }
.cta .btn.ghost { color: #fafafa; box-shadow: inset 0 0 0 1px #404040; }
.cta .btn.ghost:hover { background: #171717; }
@media (min-width: 1024px) {
  .cta { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 8px; align-items: center; padding: 48px 56px; border-radius: 32px; background: radial-gradient(90% 140% at 100% 0%, rgb(34 197 94 / 0.18), transparent 60%), #0a0a0a; }
  .cta h2 { font-size: 32px; grid-column: 1; }
  .cta p { grid-column: 1; margin: 0; padding-right: 40px; max-width: 680px; font-size: 18px; }
  .cta .btn { grid-column: 2; grid-row: 1 / span 2; }
  .cta .btn.ghost { grid-column: 3; }
}

.more { margin: 48px 0 64px; }
.more ul { list-style: none; padding: 0; }
.more li { border-top: 1px solid var(--line); margin: 0; }
.more a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; color: var(--fg); font-weight: 600; text-decoration: none; }
.more a span { color: var(--muted); transition: transform 0.2s, color 0.2s; }
.more a:hover { color: var(--accent-strong); }
.more a:hover span { color: var(--accent-strong); transform: translateX(3px); }
@media (min-width: 720px) {
  .more { margin: 72px 0 96px; }
  .more ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .more li { border: 1px solid var(--line); border-radius: 16px; }
  .more a { height: 100%; padding: 18px 20px; line-height: 1.4; border-radius: 16px; transition: background 0.2s, color 0.2s; }
  .more a:hover { background: var(--soft); }
}
@media (min-width: 1024px) { .more ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.foot { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 13.5px; color: var(--muted); }
.foot a { color: var(--muted); }
.foot p { margin: 8px 0; }
@media (min-width: 1024px) { .foot .disclaimer { max-width: 820px; } }
.foot .disclaimer { color: var(--fg); font-weight: 500; }

h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 700; margin: 28px 0 6px; }
.summary { margin: 28px 0 0; padding: 18px 20px; border-radius: 16px; background: var(--soft); }
.summary p { margin: 0 0 6px; font-weight: 700; }
.summary ul { margin: 0; }

/* FAQ (balisée FAQPage) */
.faq { margin: 48px 0 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 22px; font-weight: 500; color: var(--muted); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Simulateur (simulateur-indemnites-kilometriques) */
.sim { margin: 32px 0 0; display: grid; gap: 0; border-radius: 24px; overflow: hidden; background: #0a0a0a; color: #fafafa; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.sim-form { padding: 24px; display: grid; gap: 18px; }
.sim .field { display: grid; gap: 8px; }
.sim label, .sim .label { font-size: 14px; font-weight: 500; color: #a3a3a3; }
.sim select, .sim input[type='number'] { width: 100%; font: inherit; font-size: 17px; color: #fafafa; background: #171717; border: 1px solid #262626; border-radius: 12px; padding: 12px 14px; }
.sim select:focus, .sim input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sim input[type='range'] { width: 100%; accent-color: var(--accent); }
.sim .check { display: flex; align-items: center; gap: 10px; color: #fafafa; font-size: 15.5px; cursor: pointer; }
.sim .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.sim .helper { border: 1px solid #262626; border-radius: 14px; padding: 4px 16px; }
.sim .helper summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 600; color: #fafafa; }
.sim .helper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 0 14px; }
.sim .helper-grid label { font-size: 12.5px; }
.sim .helper p { font-size: 14px; color: #a3a3a3; margin: 0 0 14px; }
.sim .helper button { font: inherit; font-size: 14px; font-weight: 600; border: 0; border-radius: 999px; padding: 8px 14px; margin-left: 6px; background: var(--accent); color: #0a0a0a; cursor: pointer; }
.sim-result { padding: 24px; border-top: 1px solid #262626; background: radial-gradient(120% 100% at 0% 0%, rgb(34 197 94 / 0.16), transparent 60%); }
.sim-result .amount { margin: 4px 0 0; font-size: clamp(44px, 12vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.sim-result .formula { margin: 12px 0 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); word-break: break-word; }
.sim-result .per { margin: 8px 0 0; font-size: 15px; color: #a3a3a3; }
.sim-result .btn { margin-top: 18px; }
@media (min-width: 720px) {
  .sim { grid-template-columns: 1.1fr 0.9fr; }
  .sim-result { border-top: 0; border-left: 1px solid #262626; display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 420px) { .sim .helper-grid { grid-template-columns: 1fr; } }
