:root {
  --bg: #F5F8F4;
  --surface: #FFFFFF;
  --fg: #15201A;
  --muted: #55645A;
  --line: #D3DCD4;
  --accent: #1B7A4B;
  --accent-fg: #FFFFFF;
  --accent-soft: #E3F1E8;
  --alert: #B23A2B;
  --alert-soft: #F8E6E2;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1712;
    --surface: #16211B;
    --fg: #E8EEE9;
    --muted: #9BAB9F;
    --line: #27372D;
    --accent: #4FCB88;
    --accent-fg: #08150D;
    --accent-soft: #163024;
    --alert: #F0806F;
    --alert-soft: #3A1E1A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1712;
  --surface: #16211B;
  --fg: #E8EEE9;
  --muted: #9BAB9F;
  --line: #27372D;
  --accent: #4FCB88;
  --accent-fg: #08150D;
  --accent-soft: #163024;
  --alert: #F0806F;
  --alert-soft: #3A1E1A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  padding-inline: 1rem;
  padding-block: 0 4rem;
}
.wrap { max-width: 68rem; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Barre de navigation */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 0.6rem 1.25rem; flex-wrap: wrap; align-items: center; font-size: 0.92rem; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.nav a.navbox { color: var(--accent-fg); background: var(--accent); border: 1px solid var(--accent); padding: 0.5rem 0.95rem; border-radius: 4px; font-weight: 600; }
.nav a.navbox:hover { color: var(--accent-fg); text-decoration: none; filter: brightness(1.1); }

/* Hero */
.hero { padding-block: 2.5rem 3.5rem; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0 -1rem; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 3.25rem 2.25rem;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
}
.fxbar {
  display: flex; align-items: stretch; max-width: 32rem;
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.85rem; overflow: hidden; margin-bottom: 2rem;
}
.fxbar .fx { padding: 0.55rem 0.8rem; background: var(--accent-soft); color: var(--accent); font-weight: 700; border-right: 1px solid var(--line); font-style: italic; }
.fxbar .formula { padding: 0.55rem 0.9rem; min-width: 0; overflow-wrap: anywhere; }
.fxbar .formula b { color: var(--accent); font-weight: 500; }
.caret { display: inline-block; width: 0.5ch; height: 1em; background: var(--fg); vertical-align: -0.15em; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-size: clamp(2.5rem, 8.5vw, 5.2rem); font-weight: 800; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { max-width: 40rem; margin-top: 1.5rem; font-size: 1.15rem; color: var(--muted); }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; align-items: center; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.4rem; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg);
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--fg); filter: none; }
.hero .who { margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted); }

/* Sections */
section { padding-block: 3.5rem; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 0.6rem; margin-bottom: 2rem; max-width: 42rem; }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.sec-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; }
.sec-head p { color: var(--muted); }
.note { margin-top: 1.25rem; font-size: 0.85rem; color: var(--muted); }

/* Capacités */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.cap-item { padding: 1.3rem; border-left: 1px solid var(--line); border-top: 1px solid var(--line); margin-left: -1px; margin-top: -1px; min-width: 0; }
.cap-item .f { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); font-weight: 500; overflow-wrap: anywhere; }
.cap-item h3 { font-size: 1.1rem; font-weight: 700; margin: 0.45rem 0 0.4rem; }
.cap-item p { font-size: 0.92rem; color: var(--muted); }

/* Avant / après : fichier chaotique contre tableau de bord */
.sheet .tag { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; font-weight: 500; }
.sheet.before .tag { color: var(--alert); }
.sheet.after .tag { color: var(--accent); }
.sheet .cap { margin-top: 0.7rem; font-size: 0.9rem; color: var(--muted); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table.grid { border-collapse: collapse; width: 100%; min-width: 17rem; font-family: var(--font-mono); font-size: 0.8rem; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; white-space: nowrap; }
table.grid thead th { background: var(--bg); color: var(--muted); font-weight: 500; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.before table.grid td { color: var(--muted); }
.before .bad { color: var(--alert); background: var(--alert-soft); font-weight: 700; }
.before .odd { background: var(--alert-soft); }
.ba { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.25rem; align-items: stretch; }
.ba .sheet { display: flex; flex-direction: column; min-width: 0; }
.frame { flex: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.before .frame { border-color: var(--alert); }
.after .frame { border-color: var(--accent); }
.tabs { display: flex; gap: 2px; padding: 0.4rem 0.4rem 0; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs span { font-family: var(--font-mono); font-size: 0.68rem; padding: 0.3rem 0.6rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; color: var(--muted); white-space: nowrap; }
.tabs span:first-child { background: var(--surface); color: var(--fg); }
.frame .scroll { border: 0; border-radius: 0; }
.files { padding: 0.8rem 1rem; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); display: grid; gap: 0.2rem; overflow-wrap: anywhere; margin-top: auto; }
.errchip { display: inline-block; margin: 0.8rem 1rem 0.8rem; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--alert); background: var(--alert-soft); padding: 0.2rem 0.6rem; border-radius: 4px; align-self: flex-start; }
.dash { padding: 1rem; display: grid; gap: 1.1rem; }
.dh { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.6rem, 1fr)); gap: 0.6rem; }
.kpi { background: var(--bg); border-radius: 6px; padding: 0.65rem 0.65rem; min-width: 0; }
.kpi .l { font-family: var(--font-mono); font-size: 0.64rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .n { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 0.15rem; white-space: nowrap; }
.kpi.ok .n { color: var(--accent); }
.kpi.warn .n { color: var(--alert); }
.chart { position: relative; height: 9.5rem; margin: 1.5rem 0 0 2.4rem; }
.gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.gl span { position: absolute; left: -2.4rem; top: -0.5rem; width: 2rem; text-align: right; font-family: var(--font-mono); font-size: 0.6rem; color: var(--muted); }
.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.4rem; }
.bar { flex: 1; min-width: 0; background: var(--accent); border-radius: 3px 3px 0 0; position: relative; opacity: 0.55; }
.bar.last { opacity: 1; }
.bar b { position: absolute; top: -1.05rem; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.6rem; color: var(--fg); font-weight: 500; white-space: nowrap; }
.months { display: flex; justify-content: space-between; gap: 0.4rem; margin: 0.35rem 0 0 2.4rem; font-family: var(--font-mono); font-size: 0.58rem; color: var(--muted); }
.months span { flex: 1; text-align: center; min-width: 0; }
.rows { display: grid; margin-top: 0.4rem; border-top: 1px solid var(--line); }
.li { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; flex-wrap: wrap; }
.li .amt { font-family: var(--font-mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.pill { font-family: var(--font-mono); font-size: 0.66rem; padding: 0.1rem 0.5rem; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.warn { background: var(--alert-soft); color: var(--alert); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem 1.5rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.stat .big { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .from { color: var(--alert); text-decoration: line-through; text-decoration-thickness: 2px; }
.stat .arrow { color: var(--muted); margin-inline: 0.25rem; font-weight: 500; }
.stat .to { color: var(--accent); }
.stat p { font-size: 0.9rem; color: var(--muted); }

/* Tarifs */
.rates { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.rate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; padding: 1.4rem 1.4rem; border-top: 1px solid var(--line); align-items: baseline; }
.rate:first-child { border-top: 0; }
.rate h3 { font-size: 1.35rem; font-weight: 700; }
.rate .desc { grid-column: 1; color: var(--muted); max-width: 40rem; }
.rate .price { grid-column: 2; grid-row: 1; font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rate .price small { font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; color: var(--muted); letter-spacing: 0; }
.rate .incl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin-top: 0.3rem; padding: 0; list-style: none; }
.rate .incl li { font-size: 0.82rem; padding: 0.15rem 0.6rem; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.rate.custom { background: var(--accent); color: var(--accent-fg); }
.rate.custom .desc { color: inherit; opacity: 0.9; }
.rate.custom .price small { color: inherit; opacity: 0.85; }
.rate.custom .incl li { background: transparent; border-color: currentColor; color: inherit; opacity: 0.9; }
.rate.custom .cust-btn { grid-column: 1 / -1; justify-self: start; margin-top: 0.6rem; background: var(--accent-fg); color: var(--accent); border-color: var(--accent-fg); }

/* Suivi mensuel */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; display: grid; gap: 0.9rem; align-content: start; min-width: 0; }
.plan.pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 1.25rem; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.plan .badge { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 500; }
.plan .p { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan .p small { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.plan li { padding-left: 1.4rem; position: relative; }
.plan li::before { content: "="; position: absolute; left: 0; font-family: var(--font-mono); color: var(--accent); font-weight: 700; }

/* Étapes */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.steps li { padding: 1.3rem; border-left: 1px solid var(--line); border-top: 1px solid var(--line); margin-left: -1px; margin-top: -1px; min-width: 0; }
.steps .n { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); font-weight: 700; }
.steps h3 { font-size: 1.1rem; font-weight: 700; margin: 0.3rem 0 0.4rem; }
.steps p { font-size: 0.92rem; color: var(--muted); }

/* Rendez-vous */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem; align-items: start; }
.contact .eyebrow { margin-bottom: 0.6rem; }
.contact h2 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; }
.contact .lead { margin-top: 1rem; color: var(--muted); max-width: 30rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; display: grid; gap: 1rem; min-width: 0; }
.card .k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card .v { font-family: var(--font-mono); font-size: 0.95rem; overflow-wrap: anywhere; }
.card .note { margin-top: 0; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.copied { font-size: 0.85rem; color: var(--accent); }
footer { padding-top: 2rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; }

@media (max-width: 34rem) {
  .rate { grid-template-columns: minmax(0, 1fr); }
  .rate .price { grid-column: 1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }
body { margin: 0; }
[hidden] { display: none !important; }
.brand { text-decoration: none; color: inherit; }
.nav a[aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.nav a.navbox[aria-current="page"] { color: var(--accent-fg); text-decoration: none; }
main > section:first-child { border-top: 0; padding-top: 2rem; }
.sec-head h1 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; }
.contact h1 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.linkcard { display: grid; gap: 0.5rem; align-content: start; padding: 1.4rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; min-width: 0; }
.linkcard:hover { border-color: var(--accent); }
.linkcard .k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.linkcard h3 { font-size: 1.25rem; font-weight: 700; }
.linkcard p { color: var(--muted); font-size: 0.95rem; }
.linkcard .go { color: var(--accent); font-weight: 600; margin-top: 0.3rem; }
.cta-band { display: grid; gap: 1rem; justify-items: start; }
.cta-band h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 800; max-width: 24ch; }
.cta-band p { color: var(--muted); max-width: 36rem; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal { max-width: 46rem; display: grid; gap: 1.1rem; }
.legal h2 { font-size: 1.3rem; font-weight: 700; margin-top: 1.2rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.legal mark { background: var(--alert-soft); color: var(--alert); padding: 0 0.3rem; border-radius: 3px; }
.legal strong { color: var(--fg); }
