/* Arpent Autodiag · Ma feuille de route réglementaire
   Design system aligned with arpent-lab.ai (brand book v1). No build step. */
:root {
  --anthracite: #1e242b;
  --ink-2: #3a424b;
  --gold: #c7a248;
  --gold-soft: #f4ecd8;
  --terra: #b5623e;
  --terra-dark: #8d472c;
  --paper: #fafaf8;
  --white: #ffffff;
  --grey: #ececec;
  --muted: #6f7881;
  --line: #dbdcd9;
  --vert: #2e7d4f;
  --orange: #c77a1e;
  --rouge: #b23a2e;
  --bleu: #3b6ea8;
  --violet: #6e4b9e;
  --gris: #8a8f94;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(30, 36, 43, .06), 0 6px 24px rgba(30, 36, 43, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--anthracite); background: var(--paper); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--terra-dark); }
a:hover { color: var(--terra); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--anthracite); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(250, 250, 248, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 6px; font-weight: 800; letter-spacing: .14em; text-decoration: none; color: var(--anthracite); }
.brand small { color: var(--gold); letter-spacing: .14em; font-weight: 700; }
.top nav { display: flex; gap: 8px; align-items: center; }
.top nav a { font-size: .9rem; text-decoration: none; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-dark); color: #fff; }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--anthracite); }
.btn-ghost:hover { border-color: var(--anthracite); color: var(--anthracite); }
.btn-link { background: none; border: 0; padding: 4px 0; color: var(--terra-dark); text-decoration: underline; cursor: pointer; min-height: auto; font-weight: 500; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--terra); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--ink-2); max-width: 62ch; margin: 0 0 26px; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.promise { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.promise li { display: flex; gap: 10px; align-items: flex-start; }
.promise li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--gold); }
.hero-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.hero-card h2 { font-size: 1rem; margin: 0 0 12px; }
.mini-card { border-left: 4px solid var(--rouge); background: var(--paper); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; font-size: .9rem; }
.mini-card.v { border-color: var(--vert); }
.mini-card.o { border-color: var(--orange); }
.mini-card b { display: block; }
.resume-box { margin-top: 18px; padding: 14px; border: 1px dashed var(--gold); border-radius: 8px; background: var(--gold-soft); }
.trial-cta { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 22px 0 8px; padding: 18px 20px; border: 1px solid var(--gold); border-radius: 10px; background: var(--gold-soft); }
.trial-cta h2 { font-size: 1.25rem; }
.trial-cta > div { flex: 1 1 380px; }
.ob-group { margin: 14px 0; }
.ob-group > summary { cursor: pointer; padding: 10px 0; }

/* Wizard */
.wizard { padding: 28px 0 60px; }
.progress { display: flex; gap: 6px; margin: 0 0 8px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--grey); }
.progress span.done { background: var(--gold); }
.progress span.current { background: var(--terra); }
.step-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.counter { font-family: var(--mono); font-size: .82rem; color: var(--ink-2); background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px; }
.counter b { color: var(--terra); }
.step-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step-card h2 { margin: 0 0 6px; font-size: 1.5rem; }
.step-card > p { margin: 0 0 22px; color: var(--muted); }
.field { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.field > legend, .field > label.q { display: block; font-weight: 600; margin: 0 0 10px; padding: 0; }
.field .aide { display: block; font-size: .86rem; color: var(--muted); margin: -4px 0 10px; font-weight: 400; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; transition: border-color .12s, background .12s; }
.opt input:checked + span { border-color: var(--terra); background: #fbf1ec; color: var(--terra-dark); font-weight: 600; }
.opt input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt span:hover { border-color: var(--anthracite); }
.opt.multi input:checked + span::before { content: "✓"; margin-right: 6px; }
.opt.nsp span { color: var(--muted); border-style: dashed; }
.num { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.input, select.input, textarea.input { width: 100%; max-width: 420px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.num .input { max-width: 200px; }
.input:focus, textarea.input:focus { border-color: var(--anthracite); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.unit { font-family: var(--mono); color: var(--muted); font-size: .9rem; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* Results */
.results { padding: 28px 0 70px; }
.results h2.section { font-size: 1.45rem; margin: 46px 0 6px; }
.results .section-intro { margin: 0 0 18px; color: var(--muted); max-width: 70ch; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .v { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; }
.kpi .l { font-size: .85rem; color: var(--muted); }
.kpi.accent .v { color: var(--terra); }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--grey); margin: 6px 0 10px; }
.bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .86rem; color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.c-vert .dot, .dot.vert { background: var(--vert); }
.dot.orange { background: var(--orange); }
.dot.rouge { background: var(--rouge); }
.dot.bleu { background: var(--bleu); }
.dot.violet { background: var(--violet); }
.dot.gris { background: var(--gris); }
.callout { background: var(--gold-soft); border: 1px solid #ead9ad; border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.callout.warn { background: #fdf0e9; border-color: #efcdb9; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.filters button { border: 1px solid var(--line); background: var(--white); border-radius: 16px; padding: 4px 12px; cursor: pointer; font-size: .86rem; }
.filters button[aria-pressed="true"] { background: var(--anthracite); color: #fff; border-color: var(--anthracite); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ob { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--bleu); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ob.c-vert { border-left-color: var(--vert); }
.ob.c-orange { border-left-color: var(--orange); }
.ob.c-rouge { border-left-color: var(--rouge); }
.ob.c-bleu { border-left-color: var(--bleu); }
.ob.c-violet { border-left-color: var(--violet); }
.ob.c-gris { border-left-color: var(--gris); }
.ob-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--grey); color: var(--ink-2); }
.badge.niveau { background: var(--anthracite); color: #fff; }
.badge.statut { background: transparent; border: 1px solid currentColor; }
.badge.ac { background: #fff3cf; color: #7a5a10; }
.ob h3 { margin: 0; font-size: 1.07rem; line-height: 1.3; }
.ob .resume { margin: 0; color: var(--ink-2); font-size: .94rem; }
.ob .facts { list-style: none; margin: 0; padding: 0; font-size: .88rem; display: grid; gap: 4px; }
.ob .facts b { font-weight: 600; }
.ob details { font-size: .88rem; border-top: 1px solid var(--grey); padding-top: 6px; }
.ob details summary { cursor: pointer; color: var(--terra-dark); font-weight: 600; }
.ob details h4 { margin: 10px 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ob details ul { margin: 0; padding-left: 18px; }
.alert { background: #f2edf8; border-radius: 6px; padding: 8px 10px; font-size: .9rem; color: #3d2a5c; }
.modes { border: 0; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--grey); }
.modes legend { font-size: .86rem; font-weight: 600; margin-bottom: 8px; padding: 0; }
.modes .options { gap: 6px; }
.modes .opt span { min-height: 36px; padding: 6px 10px; font-size: .85rem; }
.modes .opt.m-vert input:checked + span { border-color: var(--vert); background: #e9f4ee; color: #1f5a38; }
.modes .opt.m-orange input:checked + span { border-color: var(--orange); background: #fbf1e3; color: #7c4b0f; }
.modes .opt.m-rouge input:checked + span { border-color: var(--rouge); background: #f8e7e5; color: #7d2820; }
.ob-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); font-family: var(--mono); }

.complete { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.complete .field { margin-bottom: 16px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 4px 0; }
details.fold { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 12px; }
details.fold summary { cursor: pointer; font-weight: 600; }

.time-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { margin: 0 0 8px; font-size: 1.05rem; }
.big { font-size: 1.6rem; font-weight: 800; }
.hyp { font-size: .82rem; color: var(--muted); margin-top: 10px; }

.calendar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.month { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 92px; }
.month h4 { margin: 0 0 6px; font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.month ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.month li { font-size: .84rem; line-height: 1.3; }
.month li .d { font-family: var(--mono); font-weight: 600; margin-right: 6px; }
.month li.urgent { color: var(--rouge); font-weight: 600; }
.month li.proche { color: var(--orange); }
.month.empty { opacity: .55; }

.synth { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.synth .col { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--gris); border-radius: var(--radius); padding: 14px 16px; }
.synth .col.vert { border-top-color: var(--vert); }
.synth .col.orange { border-top-color: var(--orange); }
.synth .col.rouge { border-top-color: var(--rouge); }
.synth .col h3 { margin: 0 0 8px; font-size: 1rem; }
.synth .col ul { margin: 0; padding-left: 18px; font-size: .9rem; }
.synth-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.module h3 { margin: 0; font-size: 1rem; color: var(--terra-dark); }
.module .st { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.module .st.ok { color: var(--vert); }
.module .st.wip { color: var(--orange); }
.module p { margin: 0; font-size: .9rem; color: var(--ink-2); }

.send { background: var(--anthracite); color: #fff; border-radius: 14px; padding: 30px; margin-top: 46px; }
.send h2 { margin: 0 0 8px; font-size: 1.6rem; }
.send p.intro { color: #d7dbe0; margin: 0 0 20px; max-width: 70ch; }
.send .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.send label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.send .input { max-width: none; background: #fff; color: var(--anthracite); }
.send .full { grid-column: 1 / -1; }
.send .opt span { background: transparent; color: #fff; border-color: #5b646e; }
.send .opt input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--anthracite); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .9rem !important; color: #e3e6ea; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--gold); flex: 0 0 auto; }
.legal { font-size: .8rem; color: #b8bec6; margin-top: 14px; }
.legal a { color: var(--gold); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-size: .95rem; }
.form-msg.err { background: #f8e7e5; color: #7d2820; }
.form-msg.ok { background: #e9f4ee; color: #1f5a38; }
.done-panel { background: var(--white); color: var(--anthracite); border-radius: 10px; padding: 22px; }
.done-panel h3 { margin: 0 0 8px; }

.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: .84rem; color: var(--muted); }
.foot h2 { font-size: .95rem; color: var(--anthracite); margin: 18px 0 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

@media (max-width: 960px) {
  .hero-grid, .time-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .calendar { grid-template-columns: repeat(3, 1fr); }
  .modules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .cards, .synth, .synth-extra, .modules, .send .grid { grid-template-columns: 1fr; }
  .calendar { grid-template-columns: 1fr 1fr; }
  .step-card { padding: 18px; }
  .send { padding: 22px 18px; }
  .top nav a.hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  /* The full roadmap is delivered by e-mail (acquisition channel): printing shows a pointer only. */
  body > * { display: none !important; }
  body::after { content: "Votre feuille de route complète vous est envoyée par e-mail : arpent-lab.ai/diagnostic"; display: block; padding: 40px; font: 16px/1.5 sans-serif; }
}
