/* Imprimer en 3D : de zéro à autonome — feuille de style unique
   Mise en page : en-tête graphite collant, contenu centré (max 1200px),
   page module = sommaire latéral repliable + colonne de lecture (~70 caractères). */

:root {
  /* Couleurs — mode clair */
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --surface-2: #ECE9E3;
  --fg: #1E2328;
  --muted: #4A5057;
  --subtle: #5B6168;
  --line: #DEDAD3;
  --header-bg: #1E2328;
  --header-fg: #F6F5F2;
  --header-field: #2A3036;
  --header-line: #3A4149;
  --accent: #C2410C;          /* orange filament : boutons, liens forts */
  --accent-fg: #FFFFFF;
  --accent-deco: #F07A2E;     /* orange vif : décor uniquement */
  --cyan: #0B6E77;            /* repères, étiquettes */
  --cyan-deco: #22B3BF;
  --ok: #1B6B3A;
  --ok-fg: #FFFFFF;
  --link: #B4460A;
  --link-hover: #8A3508;
  --current: #FCE7DA;
  --code-bg: #1E2328;
  --code-fg: #F6F5F2;
  --code-comment: #9AA3AC;
  /* Encadrés */
  --tip-bg: #E3F3F4;   --tip-fg: #0B5560;
  --warn-bg: #FCE7DA;  --warn-fg: #8A3508;
  --safe-bg: #F9DEDC;  --safe-fg: #9B1C14;
  --check-bg: #E6F1E9; --check-fg: #1B5E33;
  --faq-bg: #ECE9F6;   --faq-fg: #4A3A8C;
  --bad-bg: #F9DEDC;   --bad-fg: #9B1C14;

  /* Typographie */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;

  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1200px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181C; --surface: #1C2126; --surface-2: #262C32; --fg: #E8E6E1; --muted: #B8BEC5; --subtle: #A3AAB2;
    --line: #333A41; --header-bg: #0F1215; --header-fg: #E8E6E1; --header-field: #1C2126; --header-line: #333A41;
    --accent: #F07A2E; --accent-fg: #14181C; --accent-deco: #F07A2E; --cyan: #5FD3DC; --cyan-deco: #22B3BF;
    --ok: #5CC489; --ok-fg: #0F1215; --link: #F7A35C; --link-hover: #FBC58F; --current: #3A2A20;
    --code-bg: #0F1215; --code-fg: #E8E6E1; --code-comment: #8A939C;
    --tip-bg: #12302F; --tip-fg: #8EE3E9; --warn-bg: #3A2A20; --warn-fg: #F7B98A; --safe-bg: #3A1F1D; --safe-fg: #F4A39C;
    --check-bg: #173022; --check-fg: #9AD9B1; --faq-bg: #27223F; --faq-fg: #C4B8F2; --bad-bg: #3A1F1D; --bad-fg: #F4A39C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14181C; --surface: #1C2126; --surface-2: #262C32; --fg: #E8E6E1; --muted: #B8BEC5; --subtle: #A3AAB2;
  --line: #333A41; --header-bg: #0F1215; --header-fg: #E8E6E1; --header-field: #1C2126; --header-line: #333A41;
  --accent: #F07A2E; --accent-fg: #14181C; --accent-deco: #F07A2E; --cyan: #5FD3DC; --cyan-deco: #22B3BF;
  --ok: #5CC489; --ok-fg: #0F1215; --link: #F7A35C; --link-hover: #FBC58F; --current: #3A2A20;
  --code-bg: #0F1215; --code-fg: #E8E6E1; --code-comment: #8A939C;
  --tip-bg: #12302F; --tip-fg: #8EE3E9; --warn-bg: #3A2A20; --warn-fg: #F7B98A; --safe-bg: #3A1F1D; --safe-fg: #F4A39C;
  --check-bg: #173022; --check-fg: #9AD9B1; --faq-bg: #27223F; --faq-fg: #C4B8F2; --bad-bg: #3A1F1D; --bad-fg: #F4A39C;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
code, kbd, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--cyan-deco); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-fg); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cyan); }
.muted { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--fg); background: transparent; color: var(--fg);
}
.btn:hover { color: var(--fg); background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-fg); filter: brightness(1.08); }
.btn-dark { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-dark:hover { background: var(--fg); color: var(--bg); filter: brightness(1.15); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: var(--ok-fg); }
.btn-ok:hover { background: var(--ok); color: var(--ok-fg); filter: brightness(1.08); }
.btn[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--ok-fg); }

/* ---------- En-tête ---------- */
.site-header { position: relative; z-index: 50; background: var(--header-bg); color: var(--header-fg); }
@media (min-width: 760px) { .site-header { position: sticky; top: env(safe-area-inset-top, 0px); } }
@media (max-width: 599px) { .hero-art { display: none; } }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--header-fg); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 19px; white-space: nowrap; }
.logo:hover { color: var(--header-fg); }
.search { position: relative; flex: 1 1 240px; min-width: 0; order: 3; }
@media (min-width: 760px) { .search { order: 0; } }
.search input {
  width: 100%; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--header-line);
  background: var(--header-field); color: var(--header-fg); padding: 0 14px 0 40px; font: inherit; font-size: 15px;
}
.search input::placeholder { color: #9AA3AC; }
.search .search-icon { position: absolute; left: 12px; top: 12px; pointer-events: none; color: #9AA3AC; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22); max-height: min(70vh, 480px); overflow-y: auto; padding: 6px;
}
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--surface-2); outline-offset: -3px; }
.search-results .kind { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cyan); }
.search-results .title { font-weight: 600; }
.search-results .excerpt { font-size: 14px; color: var(--muted); }
.search-results .empty { padding: 12px; color: var(--muted); font-size: 15px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav a { color: var(--header-fg); text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--header-field); color: var(--header-fg); }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--header-line); background: var(--header-field); color: var(--header-fg); cursor: pointer;
}
.header-progress { height: 4px; background: var(--header-field); }
.header-progress span { display: block; height: 100%; background: var(--accent-deco); width: 0; transition: width .4s ease; }

/* ---------- Barres de progression ---------- */
.progress { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .4s ease; }
.progress.thin { height: 6px; border-radius: 3px; }
.progress.done span { background: var(--ok); }

/* ---------- Accueil ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 40px; padding-block: 48px 32px; }
.hero-text { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -0.02em; line-height: 1.05; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.hero-art { flex: 1 1 300px; display: flex; justify-content: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.progress-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.progress-card .info { flex: 999 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.progress-card h2 { font-size: 22px; }
.progress-card .status { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

.section { padding-block: 40px; display: flex; flex-direction: column; gap: 20px; }
.section > h2 { font-size: clamp(26px, 3.4vw, 32px); }
.section-intro { color: var(--muted); max-width: 40em; }

.parts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.part-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 10px; color: var(--fg); text-decoration: none;
}
.part-card:hover { color: var(--fg); border-color: var(--subtle); }
.part-card .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.part-card h3 { font-size: 22px; }
.part-card p { font-size: 15px; color: var(--muted); line-height: 1.5; flex: 1; }
.state { font-size: 13px; font-weight: 600; color: var(--subtle); white-space: nowrap; font-variant-numeric: tabular-nums; }
.state.is-done { color: var(--ok); }
.state.is-active { color: var(--link); }

.tools { background: var(--header-bg); color: var(--header-fg); }
.tools .section-intro { color: #C9CDD2; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.tool-card { background: var(--header-field); color: var(--header-fg); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; border: 1px solid transparent; }
.tool-card:hover { color: var(--header-fg); border-color: var(--header-line); }
.tool-card span { font-size: 14px; color: #C9CDD2; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; font-size: 14px; color: var(--subtle); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Page module ---------- */
.module-layout { display: flex; flex-wrap: wrap; gap: 28px 36px; align-items: flex-start; padding-block: 24px 48px; }
.sidebar { flex: 1 1 260px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; font-size: 15px; }
@media (min-width: 900px) { .sidebar { max-width: 300px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); max-height: calc(100vh - 110px); overflow-y: auto; } }
.sidebar-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; }
.sidebar-toggle svg { transition: transform .2s ease; }
.sidebar-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.toc details { border-top: 1px solid var(--line); }
.toc summary { list-style: none; cursor: pointer; padding: 10px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--subtle); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0 0 8px; }
.toc a { display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { background: var(--surface-2); color: var(--fg); }
.toc a[aria-current="page"] { background: var(--current); color: var(--fg); font-weight: 600; }
.toc .num { font-family: var(--font-mono); font-size: 12px; min-width: 1.8em; color: var(--subtle); font-variant-numeric: tabular-nums; }
.toc .tick { margin-left: auto; color: var(--ok); font-weight: 700; }

.module-main { flex: 999 1 560px; min-width: 0; max-width: 46rem; display: flex; flex-direction: column; gap: 28px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--subtle); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--subtle); }
.module-head { display: flex; flex-direction: column; gap: 12px; }
.module-head h1 { font-size: clamp(32px, 4.5vw, 44px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 14px; padding: 5px 12px; border-radius: 999px; background: var(--tip-bg); color: var(--tip-fg); font-variant-numeric: tabular-nums; }
.tag.level-debutant { background: var(--check-bg); color: var(--check-fg); }
.tag.level-intermediaire { background: var(--warn-bg); color: var(--warn-fg); }
.tag.level-avance { background: var(--faq-bg); color: var(--faq-fg); }

.module-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.module-section > h2 { font-size: 26px; }
.module-section h3 { font-size: 20px; }
.module-section ul, .module-section ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.pending { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--subtle); font-size: 15px; }

/* Encadrés récurrents */
.callout { border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; }
.callout > svg { flex: none; margin-top: 2px; }
.callout .callout-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.callout .callout-title { font-weight: 700; }
.callout ul { margin: 0; padding-left: 18px; }
.callout-tip { background: var(--tip-bg); } .callout-tip .callout-title, .callout-tip > svg { color: var(--tip-fg); }
.callout-warn { background: var(--warn-bg); } .callout-warn .callout-title, .callout-warn > svg { color: var(--warn-fg); }
.callout-safety { background: var(--safe-bg); } .callout-safety .callout-title, .callout-safety > svg { color: var(--safe-fg); }
.callout-check { background: var(--check-bg); } .callout-check .callout-title, .callout-check > svg { color: var(--check-fg); }
.callout-faq { background: var(--faq-bg); } .callout-faq .callout-title, .callout-faq > svg { color: var(--faq-fg); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-list details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
.faq-list summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.faq-list details > div { padding-bottom: 14px; color: var(--muted); }

/* Checklist */
.checklist { list-style: none; padding: 0 !important; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; min-height: 36px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--ok); }

/* Code / G-code / paramètres */
.code { background: var(--code-bg); color: var(--code-fg); border-radius: 12px; padding: 16px 18px; font-family: var(--font-mono); font-size: 14px; line-height: 1.8; overflow-x: auto; }
.code .c { color: var(--code-comment); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
figcaption { font-size: 14px; color: var(--subtle); }

/* Quiz */
.quiz { display: flex; flex-direction: column; gap: 18px; }
.quiz-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.quiz-q .q-num { font-family: var(--font-mono); font-size: 12px; color: var(--subtle); }
.quiz-q .q-text { font-weight: 600; font-size: 17px; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opts button { text-align: left; min-height: 48px; padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; cursor: pointer; }
.quiz-opts button:hover:not(:disabled) { border-color: var(--subtle); }
.quiz-opts button:disabled { cursor: default; }
.quiz-opts button.is-right { border: 2px solid var(--ok); background: var(--check-bg); color: var(--fg); }
.quiz-opts button.is-wrong { border: 2px solid var(--bad-fg); background: var(--bad-bg); color: var(--fg); }
.quiz-expl { font-size: 15px; line-height: 1.55; }
.quiz-expl strong { display: block; }
.quiz-score { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Résumé et navigation bas de page */
.summary { border-top: 2px solid var(--fg); padding-top: 18px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; }
.pager .spacer { flex: 1; }

/* ---------- Glossaire ---------- */
.az { display: flex; flex-wrap: wrap; gap: 4px; }
.az a, .az span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-family: var(--font-mono); font-size: 14px; text-decoration: none; }
.az a { background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.az span { color: var(--subtle); opacity: .55; }
.filter { max-width: 420px; }
.filter input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 0 14px; font: inherit; }
.gloss-letter { font-size: 28px; padding-top: 12px; scroll-margin-top: 90px; }
.gloss-list { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.gloss-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; scroll-margin-top: 90px; }
.gloss-item:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.gloss-item dt { font-weight: 700; font-family: var(--font-display); font-size: 18px; }
.gloss-item dd { margin: 4px 0 0; color: var(--muted); }
.gloss-item .see { font-size: 14px; margin-top: 6px; }
.empty-state { border: 1.5px dashed var(--line); border-radius: 16px; padding: 32px 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty-state h2 { font-size: 22px; }

/* ---------- Page simple (outils à venir) ---------- */
.simple { padding-block: 48px; display: flex; flex-direction: column; gap: 16px; max-width: 46rem; }
.simple h1 { font-size: clamp(32px, 5vw, 46px); }

/* ---------- Schémas SVG (couleurs liées au thème) ---------- */
.diagram { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.diagram-scroll { overflow-x: auto; }
.diagram-scroll .diagram { min-width: 560px; }
.diagram .d-text { fill: var(--fg); font-family: var(--font-body); font-size: 15px; }
.diagram .d-small, .diagram .d-small text { fill: var(--muted); font-family: var(--font-body); font-size: 13px; }
.diagram .d-bold { font-weight: 700; font-family: var(--font-display); }
.diagram .d-fill-fg { fill: var(--fg); }
.diagram .d-fill-muted { fill: var(--subtle); }
.diagram .d-fill-line { fill: var(--line); }
.diagram .d-fill-surface { fill: var(--surface); }
.diagram .d-fill-surface2 { fill: var(--surface-2); }
.diagram .d-fill-orange, .diagram .d-fill-orange rect { fill: var(--accent-deco); }
.diagram .d-fill-cyan { fill: var(--cyan-deco); }
.diagram .d-fill-cyan-soft { fill: var(--cyan-deco); opacity: .35; }
.diagram .d-stroke-fg { stroke: var(--fg); }
.diagram .d-stroke-muted { stroke: var(--subtle); }
.diagram .d-stroke-line { stroke: var(--line); }
.diagram .d-stroke-orange, .diagram .d-stroke-orange path { stroke: var(--accent-deco); fill: none; }
.diagram .d-stroke-orange-dark { stroke: var(--accent); }
.diagram .d-stroke-cyan { stroke: var(--cyan-deco); }
.diagram .d-badge circle { fill: var(--accent); }
.diagram .d-badge text { fill: var(--accent-fg); font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.term { text-decoration-style: dotted; }

/* ---------- Pages outils et bonus ---------- */
.narrow { max-width: 52rem; }
.lead-sm { font-size: 18px; max-width: 40em; }
.small { font-size: 14px; }
.module-section h4 { font-family: var(--font-display); font-size: 18px; margin: 6px 0 0; }
.section-block { display: flex; flex-direction: column; gap: 12px; }
.section-block > h2 { font-size: 24px; }
.section-block + .section-block { margin-top: 12px; }
.see { font-size: 14px; }
.qnum { display: inline-block; min-width: 2em; font-family: var(--font-mono); font-size: 13px; color: var(--subtle); }
.res-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* Diagnostic */
.diag { display: flex; flex-direction: column; gap: 14px; }
.diag-body { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.diag-step { font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--cyan); }
.diag-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.diag-choice { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-height: 64px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.diag-choice:hover { border-color: var(--accent); }
.diag-choice span { font-size: 14px; color: var(--muted); }
.diag-title { font-size: 22px; }
.diag-causes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.diag-causes li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.diag-causes li p { margin-top: 4px; }
.diag-rank { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-fg); font-family: var(--font-mono); font-weight: 600; }
.diag-mod { font-size: 14px; }
.diag-back { align-self: flex-start; }

/* Formulaires d'outils */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; }
.field input[type="number"], .field input[type="search"], .field select { width: 100%; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 0 12px; font: inherit; }
.input-unit { display: flex; align-items: center; gap: 8px; }
.input-unit span { font-size: 14px; color: var(--subtle); white-space: nowrap; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checks { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.checks legend { width: 100%; margin-bottom: 4px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; font-weight: 400; font-size: 15px; }
.cmp-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; align-items: end; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--fg); cursor: pointer; white-space: nowrap; }
.cell-note { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; white-space: normal; min-width: 180px; }
.pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-family: var(--font-body); background: var(--warn-bg); color: var(--warn-fg); vertical-align: middle; }
.dots { color: var(--accent); letter-spacing: 2px; white-space: nowrap; }
td, tbody th { font-family: var(--font-body); }
.calcs { display: flex; flex-direction: column; gap: 20px; }
.calc { display: flex; flex-direction: column; gap: 14px; }
.calc h2 { font-size: 22px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.calc-out { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.out-line { display: flex; justify-content: space-between; gap: 12px; }
.out-line.total { font-size: 19px; border-top: 1px solid var(--line); padding-top: 8px; }
.chooser { display: flex; flex-direction: column; gap: 14px; }
.chooser .q { display: flex; flex-direction: column; gap: 4px; }
.chooser legend { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 6px; float: left; width: 100%; }
.opt { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; clear: both; }
.opt input { width: 20px; height: 20px; accent-color: var(--accent); }
.chooser-result:focus { outline: none; }
.result-card { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--accent); }
.result-card h2 { font-size: 26px; }

/* Projets */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.project { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.project h3 { font-size: 18px; }
.project p { margin-top: 4px; }
.pnum { flex: none; font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-weight: 600; padding-top: 2px; }

/* Fiches imprimables */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { font-size: 22px; }
td.blank { min-width: 110px; }
@media print {
  .site-header, .site-footer, .no-print, .skip-link, .sidebar, .pager, .header-progress { display: none !important; }
  :root { --bg: #fff; --surface: #fff; --fg: #000; --muted: #222; --subtle: #333; --line: #999; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  .sheet { border: 0; padding: 0; page-break-after: always; break-after: page; }
  .table-wrap { overflow: visible; border: 1px solid #999; }
  th { background: #eee !important; }
  .checklist input { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border: 1.5px solid #000; }
}
.field-error { font-size: 14px; color: var(--bad-fg); font-weight: 600; }
.field input[aria-invalid="true"] { border-color: var(--bad-fg); box-shadow: 0 0 0 1px var(--bad-fg); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.hero-alt { font-size: 15px; color: var(--muted); }
.callout a { color: var(--fg); text-decoration-thickness: 1.5px; }

/* ---------- Page de vente ---------- */
.sale-header { position: relative; }
@media (min-width: 760px) { .sale-header { position: sticky; top: env(safe-area-inset-top, 0px); } }
.sale-header .bar { justify-content: space-between; }
.sale-hero h1 { font-size: clamp(38px, 6.5vw, 64px); }
.reassure { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.reassure li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.pain-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.pain-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; line-height: 1.5; }
.sale-band { background: var(--surface-2); }
.outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.outcome { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 16px 18px; }
.programme { display: flex; flex-direction: column; gap: 10px; }
.programme details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
.programme summary { cursor: pointer; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.programme summary strong { font-family: var(--font-display); font-size: 19px; }
.programme ol { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.included { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.inc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.inc span { font-size: 14px; color: var(--muted); }
.excerpt-fig { max-width: 760px; }
.forwho { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.forwho h3 { font-size: 20px; margin-bottom: 8px; }
.forwho ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.steps li { display: flex; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 16px 18px; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.price-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 2px solid var(--accent); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.price-card h2 { font-size: 24px; }
.price .amount { font-family: var(--font-display); font-size: 52px; font-weight: 700; color: var(--fg); }
.checks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks-list li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.sale-final { text-align: left; }
.mono { font-family: var(--font-mono); font-size: .95em; }

/* ---------- Connexion ---------- */
.login-card { max-width: 460px; display: flex; flex-direction: column; gap: 16px; }
.login-card input[type="text"], .login-card input[type="password"] { width: 100%; height: 50px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 0 14px; font: inherit; font-size: 17px; }
.pass-row { display: flex; gap: 8px; }
.pass-row input { flex: 1; min-width: 0; }
.pass-toggle { min-height: 50px; padding: 0 14px; font-size: 15px; }
.login-msg { font-weight: 600; color: var(--bad-fg); background: var(--bad-bg); border-radius: 10px; padding: 10px 14px; }
.login-card .btn-primary:disabled { opacity: .7; cursor: wait; }
