/* KMB Library : bleu nuit (confiance) + turquoise (accent). Mode clair / sombre automatique, ou choisi avec le bouton ☀️/🌙. */
:root {
  --bg: #f3f6fb; --bg2: #e9eef7; --panel: #ffffff; --fg: #0f1b2d; --muted: #56647d; --line: #dfe6f0;
  --brand: #0f2a4a; --brand2: #123a63; --accent: #0a7c87; --accent-fg: #ffffff; --accent-soft: #e0f4f5;
  --critique: #c62828; --eleve: #d9541b; --moyen: #a77a00; --faible: #2a7d4f; --info: #66748a; --ok: #2a7d4f;
  --term-bg: #0d1626; --term-fg: #d7f3ee; --term-bar: #18243a;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
  --shadow-hover: 0 2px 4px rgba(15, 27, 45, .08), 0 10px 28px rgba(15, 27, 45, .12);
  --radius: 14px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Cascadia Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1120; --bg2: #0f1a2e; --panel: #111c30; --fg: #e6edf7; --muted: #94a3bb; --line: #22314b;
    --brand: #0b1730; --brand2: #0e2a4d; --accent: #2dd4bf; --accent-fg: #04201d; --accent-soft: #0f2f36;
    --critique: #ff6b63; --eleve: #ff9152; --moyen: #e8b730; --faible: #5cc98c; --info: #98a6bd; --ok: #5cc98c;
    --term-bg: #060c18; --term-bar: #111b2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1120; --bg2: #0f1a2e; --panel: #111c30; --fg: #e6edf7; --muted: #94a3bb; --line: #22314b;
  --brand: #0b1730; --brand2: #0e2a4d; --accent: #2dd4bf; --accent-fg: #04201d; --accent-soft: #0f2f36;
  --critique: #ff6b63; --eleve: #ff9152; --moyen: #e8b730; --faible: #5cc98c; --info: #98a6bd; --ok: #5cc98c;
  --term-bg: #060c18; --term-bar: #111b2e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.01em; }
code, pre { font-family: var(--mono); font-size: 13px; }
code { background: var(--bg2); padding: 1px 6px; border-radius: 5px; }
pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; white-space: pre-wrap; margin: 6px 0; }
pre code { background: none; padding: 0; }
.sr { position: absolute; left: -9999px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ===================================================== barre du haut */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--fg); }
.brand strong { font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.logo { width: 38px; height: 38px; flex: none; display: block; }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mainnav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.mainnav a:hover { background: var(--bg2); color: var(--fg); }
.mainnav a.active { color: var(--fg); background: var(--bg2); }
.mainnav a.cta { background: var(--accent); color: var(--accent-fg); }
.mainnav a.cta:hover { filter: brightness(1.08); }
.theme-btn { border: 1px solid var(--line); background: var(--panel); color: var(--fg); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 17px; line-height: 1; }
.theme-btn:hover { background: var(--bg2); }

/* ===================================================== boutons, champs */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
select, input[type=search] { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font: inherit; max-width: 100%; }
.btn { background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-block; transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { filter: brightness(1.06); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel); color: var(--accent); border: 1px solid var(--line); }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ===================================================== pages */
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; animation: fade-up .35s ease both; }
.page h1 { font-size: 30px; margin: 8px 0 8px; }
.page > h2, .section-title { font-size: 22px; margin: 36px 0 6px; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 18px; max-width: 640px; }
.lead { font-size: 17px; color: var(--muted); max-width: 760px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===================================================== accueil : bandeau */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center;
  padding: 44px 40px; border-radius: 22px; color: #fff;
  background: radial-gradient(1200px 400px at 110% -20%, rgba(45, 212, 191, .35), transparent 60%),
              linear-gradient(135deg, var(--brand) 0%, var(--brand2) 60%, #0b5563 100%); box-shadow: var(--shadow-hover); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 75%); -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 75%); }
.hero > * { position: relative; }
.hero .kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8ff0e2;
  background: rgba(45, 212, 191, .14); border: 1px solid rgba(45, 212, 191, .35); padding: 4px 12px; border-radius: 99px; }
.hero h1 { font-size: 40px; margin: 14px 0 12px; color: #fff; }
.hero h1 em { font-style: normal; color: #5eead4; }
.hero .lead { color: #c9d6ea; margin: 0 0 22px; }
.hero .lead b { color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn { background: #2dd4bf; color: #04201d; }
.hero .btn.ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; color: #c9d6ea; }
.trust li::before { content: "✓"; color: #5eead4; font-weight: 800; margin-right: 6px; }
.reassure { color: var(--ok); font-size: 14px; margin-top: 14px; }

/* aperçu du rapport dans le bandeau */
.preview { background: rgba(255, 255, 255, .97); color: #0f1b2d; border-radius: 16px; padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  transform: rotate(1.5deg); transition: transform .3s; }
.preview:hover { transform: rotate(0); }
.preview .pv-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #56647d; margin-bottom: 10px; }
.preview .pv-head b { color: #0f1b2d; font-size: 14px; }
.preview .pv-body { display: flex; gap: 16px; align-items: center; }
.preview .ring text { fill: #0f1b2d; }
.preview .pv-bars { flex: 1; display: grid; gap: 8px; font-size: 12px; }
.preview .pv-bars div { display: grid; grid-template-columns: 82px 1fr 26px; gap: 8px; align-items: center; }
.preview .pv-bars i { display: block; height: 7px; border-radius: 99px; background: #e5ebf3; overflow: hidden; }
.preview .pv-bars i span { display: block; height: 100%; border-radius: 99px; }
.preview .pv-item { margin-top: 12px; font-size: 12px; border-left: 4px solid #d9541b; background: #f5f7fb; padding: 6px 10px; border-radius: 8px; }
.preview a { display: block; text-align: center; margin-top: 10px; font-size: 13px; font-weight: 700; color: #0a7c87; }

/* étapes et cartes */
.steps3 { position: relative; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 18px 0 8px; }
.step, .feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s; }
.step:hover, .feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.step h3, .feature h3 { margin: 10px 0 6px; font-size: 17px; }
.step p, .feature p { margin: 0; color: var(--muted); font-size: 14px; }
.stepnum { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.feature .ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 22px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg2)); border: 1px solid var(--line); }
.cta-band { margin: 36px 0 0; padding: 26px; border-radius: 18px; text-align: center; background: var(--accent-soft); border: 1px solid var(--line); }
.cta-band h2 { margin: 0 0 6px; font-size: 22px; }
.cta-band p { margin: 0 0 16px; color: var(--muted); }

/* ===================================================== guide : frise et terminal */
.ostabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; padding: 4px; background: var(--bg2); border-radius: 12px; }
.ostabs button { border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.ostabs button.active { background: var(--panel); color: var(--fg); box-shadow: var(--shadow); }
.bigsteps { list-style: none; counter-reset: s; padding: 0; margin: 0; position: relative; }
.bigsteps::before { content: ""; position: absolute; left: 33px; top: 30px; bottom: 30px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 20%, transparent)); }
.bigsteps > li { counter-increment: s; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 16px 72px; margin-bottom: 14px; box-shadow: var(--shadow); }
.bigsteps > li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); font-weight: 800; font-size: 17px; box-shadow: 0 0 0 5px var(--bg); }
.bigsteps h3 { margin: 6px 0 6px; font-size: 18px; }
.bigsteps p { margin: 6px 0; }
.note { background: color-mix(in srgb, var(--moyen) 10%, var(--panel)); border-left: 4px solid var(--moyen); padding: 9px 12px; border-radius: 8px; }
.tip { background: color-mix(in srgb, var(--ok) 10%, var(--panel)); border-left: 4px solid var(--ok); padding: 9px 12px; border-radius: 8px; }
code.filename { font-size: 14px; background: var(--bg2); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); word-break: break-all; }

/* commande = petite fenêtre de terminal avec bouton Copier */
.cmd { position: relative; margin: 8px 0; border-radius: 10px; overflow: hidden; background: var(--term-bg); border: 1px solid #1f2d45; }
.cmd::before { content: ""; display: block; height: 28px; background: var(--term-bar);
  background-image: radial-gradient(circle at 14px 14px, #ff5f57 5px, transparent 5.5px), radial-gradient(circle at 32px 14px, #febc2e 5px, transparent 5.5px),
                    radial-gradient(circle at 50px 14px, #28c840 5px, transparent 5.5px); }
.cmd pre { margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--term-fg); padding: 12px 14px; font-size: 13.5px; }
.cmd pre::before { content: "> "; color: #5eead4; }
.cmd button { position: absolute; top: 3px; right: 6px; font: 600 12px var(--font); padding: 3px 10px; border-radius: 7px; border: 1px solid #2c3d5c;
  background: #1c2a44; color: #d7e3f5; cursor: pointer; transition: background .15s; }
.cmd button:hover { background: #26395a; }
.cmd button.done { background: #1f6b4a; border-color: #2a8a60; color: #fff; }
.cmd mark { background: #ffe58a; color: #000; }

/* ===================================================== analyse : dépôt du fichier */
.dropzone { text-align: center; background: var(--panel); border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 22px;
  padding: 48px 20px; box-shadow: var(--shadow); transition: border-color .2s, background .2s, transform .2s; }
.dropzone:hover { border-color: var(--accent); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.dropzone .drop-ico { width: 76px; height: 76px; margin: 0 auto 6px; display: grid; place-items: center; border-radius: 22px; background: var(--accent-soft); color: var(--accent); }
.dropzone .drop-ico svg { width: 38px; height: 38px; }
.dropzone.over .drop-ico { animation: bob .8s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-5px); } }
.dash-head { display: flex; justify-content: flex-end; margin-bottom: 10px; }

/* ===================================================== tableau de bord */
.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 6px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 12px 12px 9px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button.active { color: var(--fg); border-bottom-color: var(--accent); }
.tab-panel { animation: fade-up .3s ease both; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; min-width: 0; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 16px; }
.grid2 > .panel { margin-bottom: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta { color: var(--muted); margin-bottom: 14px; }
.meta b { color: var(--fg); }

.scores { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.score { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.score .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.score .value { font-size: 32px; font-weight: 800; line-height: 1.2; }
.score .value small { font-size: 14px; color: var(--muted); font-weight: 500; }
.score.global { border: 2px solid var(--accent); }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; border-radius: 99px; }

/* jauges circulaires */
.ring { display: block; }
.ring circle { transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1); }
.ring text { fill: var(--fg); font-weight: 800; font-family: var(--font); }
.score.gauge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.score.gauge.global { grid-column: span 2; flex-direction: row; justify-content: center; gap: 22px; text-align: left;
  background: linear-gradient(135deg, var(--accent-soft), var(--panel)); }
.score.gauge .verdict { font-size: 22px; font-weight: 800; margin: 2px 0; }
.score.gauge .hint { font-size: 13px; color: var(--muted); max-width: 220px; }

.chart-box { position: relative; height: 240px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge { color: #0a1120; } }
:root[data-theme="dark"] .badge { color: #0a1120; }
.b-critique { background: var(--critique); } .b-eleve { background: var(--eleve); } .b-moyen { background: var(--moyen); }
.b-faible { background: var(--faible); } .b-info { background: var(--info); }
.st { font-size: 12px; font-weight: 700; } .st-conforme { color: var(--ok); } .st-non_verifiable { color: var(--muted); } .st-detecte { color: var(--eleve); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.filters input[type=search] { min-width: 240px; flex: 1 1 240px; }
.filters label { display: flex; gap: 6px; align-items: center; }

/* fiches de problème */
.finding { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--info); border-radius: 12px; margin-bottom: 10px;
  box-shadow: var(--shadow); transition: box-shadow .2s; }
.finding:hover { box-shadow: var(--shadow-hover); }
.finding.sev-critique { border-left-color: var(--critique); } .finding.sev-eleve { border-left-color: var(--eleve); }
.finding.sev-moyen { border-left-color: var(--moyen); } .finding.sev-faible { border-left-color: var(--faible); }
.finding summary { cursor: pointer; padding: 12px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; list-style: none; }
.finding summary::-webkit-details-marker { display: none; }
.finding summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.finding[open] summary::after { transform: rotate(180deg); }
.finding summary .key { color: var(--muted); font-size: 12px; margin-left: auto; }
.finding .body { padding: 0 16px 14px; animation: fade-up .25s ease both; }
.finding .body p { margin: 6px 0; }
.finding .body dt { font-weight: 700; margin-top: 8px; }
.finding .body dd { margin: 2px 0 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:hover td, tr:hover > td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
td.num, th.num { text-align: right; white-space: nowrap; }
.path { font-family: var(--mono); font-size: 12px; word-break: break-all; }

.plan-list { margin: 0; padding-left: 20px; } .plan-list li { margin: 6px 0; }
.cols3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cols3 ul { padding-left: 18px; margin: 0; } .cols3 li { margin: 4px 0; }
.delta-pos { color: var(--ok); font-weight: 700; } .delta-neg { color: var(--critique); font-weight: 700; }
.ai-step { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.ai-step.unverified { border-style: dashed; }
.toast { position: fixed; bottom: 16px; right: 16px; left: 16px; max-width: 420px; margin-left: auto; background: var(--fg); color: var(--bg); padding: 11px 16px;
  border-radius: 12px; z-index: 30; box-shadow: var(--shadow-hover); animation: fade-up .25s ease both; }

/* guide de correction */
.guide-title { margin: 18px 0 4px; font-size: 16px; }
.phase { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin: 12px 0; }
.phase h4 { margin: 4px 0 8px; }
.cmdcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: var(--panel); }
.cmdcard.cmd-verifier { border-left: 5px solid var(--accent); }
.cmdcard.cmd-ouvrir { border-left: 5px solid var(--moyen); }
.cmdcard.cmd-corriger { border-left: 5px solid var(--ok); }
.cmdhead { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 13px; }
.cmdtype { font-weight: 800; }
.cmdcard .effet { margin: 4px 0; }
.cmdcard .attendu { margin: 4px 0; font-size: 13px; color: var(--ok); }
.cmdcard .attention { margin: 6px 0 0; font-size: 13px; background: color-mix(in srgb, var(--critique) 8%, var(--panel)); border-left: 4px solid var(--critique); padding: 7px 10px; border-radius: 8px; }
.cmdcard .repl { font-size: 13px; } .cmdcard .repl ul { margin: 4px 0; padding-left: 18px; }
mark { background: #ffe58a; color: #000; border-radius: 3px; padding: 0 2px; }
.cat { font-size: 12px; white-space: nowrap; }
.legend-cat { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }

/* ===================================================== questions */
.faq { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* ===================================================== pied de page */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--panel); }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 22px 16px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.site-footer .brand strong { font-size: 14px; }
.site-footer .logo { width: 28px; height: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ===================================================== téléphone */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 32px 22px; }
  .preview { transform: none; }
}
@media (max-width: 600px) {
  .topbar { padding: 8px 12px; }
  .brand small { display: none; }
  .mainnav { width: 100%; }
  .theme-btn { position: absolute; top: 8px; right: 12px; }
  .mainnav a { padding: 6px 9px; font-size: 13px; }
  .hero h1 { font-size: 28px; }
  .page h1 { font-size: 24px; }
  .score .value { font-size: 26px; }
  .finding summary .key { margin-left: 0; width: 100%; }
  .bigsteps::before { left: 29px; }
  .bigsteps > li { padding: 14px 14px 14px 62px; }
  .bigsteps > li::before { left: 10px; width: 36px; height: 36px; }
  .grid2 { grid-template-columns: 1fr; }
  .score.gauge.global { flex-direction: column; text-align: center; }
}
@media (max-width: 380px) { .score.gauge.global { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===================================================== impression / PDF */
@media print {
  .topbar, .tabs, .toolbar, .filters, .dropzone, .site-footer, #ai-panel, .cmd button, .theme-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .tab-panel[hidden] { display: block !important; }
  .panel, .score, .finding { break-inside: avoid; box-shadow: none; }
  .page { padding: 0; animation: none; }
  .cmd { background: #f4f4f4; border-color: #ccc; } .cmd::before { display: none; } .cmd pre { color: #000; }
}
