/* =========================================================================
   AccessCheck — feuille de style faite main (CSS vanilla, file://)
   Thème CLAIR haute lisibilité. Le site est lui-même un modèle d'accessibilité.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #FFFFFF;
  --ink: #0A0A0A;
  --muted: #4B4B4B;
  --line: #0A0A0A;
  --line-soft: #D6D6D6;
  --accent: #1A56DB;       /* bleu franc */
  --accent-ink: #FFFFFF;
  --signal: #FFE600;       /* jaune signal */
  --error: #DC2626;
  --success: #16A34A;
  --warn: #B45309;
  --surface: #F6F6F4;
  --surface-2: #EFEFEC;

  /* échelle d'espacement 4 / 8 */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  --maxw: 1120px;
  --radius: 4px;

  --font-title: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
}

/* ---------- Contraste élevé : classe basculée sur <html> ---------- */
html.contrast-high {
  --bg: #000000;
  --ink: #FFFFFF;
  --muted: #F2F2F2;
  --line: #FFFFFF;
  --line-soft: #FFFFFF;
  --accent: #FFE600;        /* le jaune devient l'accent principal */
  --accent-ink: #000000;
  --signal: #FFE600;
  --error: #FF6B6B;
  --success: #4ADE80;
  --warn: #FACC15;
  --surface: #0A0A0A;
  --surface-2: #141414;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

/* ---------- Focus très visible (démonstration d'accessibilité) ---------- */
:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
html.contrast-high :focus-visible {
  outline-color: var(--signal);
}
/* fallback pour navigateurs sans :focus-visible */
a:focus, button:focus, input:focus, textarea:focus, select:focus, summary:focus {
  outline: 4px solid var(--accent);
  outline-offset: 3px;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible),
input:focus:not(:focus-visible), textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible), summary:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--s4);
  top: -200px;
  z-index: 1000;
  background: var(--signal);
  color: #0A0A0A;
  border: 2px solid #0A0A0A;
  padding: var(--s3) var(--s4);
  font-weight: 700;
  font-family: var(--font-title);
  text-decoration: none;
  transition: top 150ms ease;
}
.skip-link:focus {
  top: var(--s3);
}

/* ---------- Conteneur ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s5);
}

/* ---------- Liens ---------- */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
html.contrast-high a { color: var(--signal); }

/* ---------- Titres ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s4);
  font-weight: 800;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.05rem; letter-spacing: 0; }
p { margin: 0 0 var(--s4); max-width: 68ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s3);
  display: inline-block;
}
html.contrast-high .eyebrow { color: var(--signal); }

.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 60ch; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 68px;
  padding-block: var(--s2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand .mark {
  width: 30px; height: 30px;
  border: 2px solid var(--line);
  background: var(--accent);
  display: grid; place-items: center;
}
html.contrast-high .brand .mark { background: var(--signal); }
.brand .mark svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: var(--s2) var(--s3);
  font-family: var(--font-title);
  font-weight: 700;
  cursor: pointer;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--s2);
  margin: 0; padding: 0;
  align-items: center;
}
.main-nav a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: var(--s2) var(--s3);
  border: 1px solid transparent;
}
.main-nav a:hover { border-color: var(--line-soft); }
.main-nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--signal);
  color: #0A0A0A;
}
html.contrast-high .main-nav a { color: var(--ink); }
html.contrast-high .main-nav a[aria-current="page"] { background: var(--signal); color: #000; }

.btn-contrast {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: var(--s2) var(--s3);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-contrast:hover { background: var(--surface); }
.btn-contrast .dot {
  width: 14px; height: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, #000 50%, #fff 50%);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: var(--s3) var(--s5);
  border: 2px solid var(--line);
  cursor: pointer;
  background: var(--bg);
  color: var(--ink);
  transition: transform 150ms ease, background 150ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--line); }
.btn-primary:hover { background: #1646b8; }
html.contrast-high .btn-primary { background: var(--signal); color: #000; }
html.contrast-high .btn-primary:hover { background: #f0d800; }
.btn-ghost { background: var(--bg); }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { font-size: 1.1rem; padding: var(--s4) var(--s6); }

/* ---------- Sections ---------- */
section { scroll-margin-top: 90px; }
.section { padding-block: var(--s8); border-top: 1px solid var(--line-soft); }
.section--flush { border-top: none; }
.section-head { max-width: 70ch; margin-bottom: var(--s6); }

/* bandeaux pleine largeur */
.band {
  background: var(--ink);
  color: var(--bg);
  padding-block: var(--s8);
}
.band h2 { color: var(--bg); }
.band .lead { color: var(--bg); opacity: 0.85; }
html.contrast-high .band { background: var(--surface-2); border-block: 1px solid var(--line); }
.band-signal {
  background: var(--signal);
  color: #0A0A0A;
  padding-block: var(--s7);
  border-block: 2px solid var(--line);
}
.band-signal h2, .band-signal p { color: #0A0A0A; }

/* ---------- Grilles éditoriales ---------- */
.grid { display: grid; gap: var(--s5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s7);
  align-items: start;
}
.split--reverse { grid-template-columns: 0.9fr 1.1fr; }

/* ---------- Cartes / encarts ---------- */
.card {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: var(--s5);
}
.card h3 { margin-bottom: var(--s2); }
.card .num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: block;
  margin-bottom: var(--s2);
}
html.contrast-high .card .num { color: var(--signal); }

.callout {
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  background: var(--surface);
  padding: var(--s4) var(--s5);
}
.callout--warn { border-left-color: var(--warn); }
.callout--error { border-left-color: var(--error); }
.callout--ok { border-left-color: var(--success); }

/* statistique forte */
.stat { border: 1px solid var(--line); padding: var(--s5); }
.stat .figure {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat .figure .accent { color: var(--accent); }
html.contrast-high .stat .figure .accent { color: var(--signal); }
.stat .label { color: var(--muted); margin-top: var(--s2); font-size: 0.95rem; }

/* listes à puces "check" */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: var(--s6);
  margin-bottom: var(--s3);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  background: var(--accent);
  border: 1px solid var(--line);
}
html.contrast-high .check-list li::before { background: var(--signal); }
.check-list li .tick {
  position: absolute; left: 3px; top: 5px;
  color: var(--accent-ink); font-weight: 800; font-size: 12px; line-height: 1;
}

/* ---------- Tableaux ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
table.data caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line-soft);
}
table.data th, table.data td {
  text-align: left;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data thead th {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-title);
  position: sticky; top: 0;
}
html.contrast-high table.data thead th { background: var(--surface-2); }
table.data tbody tr:hover { background: var(--surface); }
table.data .yes { color: var(--success); font-weight: 700; }
table.data .no { color: var(--error); font-weight: 700; }

/* ---------- FAQ (details/summary) ---------- */
.faq details {
  border: 1px solid var(--line);
  margin-bottom: var(--s3);
  background: var(--bg);
}
.faq summary {
  cursor: pointer;
  padding: var(--s4) var(--s5);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
html.contrast-high .faq summary::after { color: var(--signal); }
.faq .answer { padding: 0 var(--s5) var(--s5); color: var(--muted); }
.faq .answer p { margin-bottom: var(--s3); }

/* ---------- Disclaimer ---------- */
.disclaimer {
  border: 1px dashed var(--line);
  background: var(--surface);
  padding: var(--s4) var(--s5);
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
}
.disclaimer svg { flex: 0 0 auto; margin-top: 2px; }
.disclaimer strong { color: var(--ink); }

/* ---------- Steps numérotés ---------- */
.steps { counter-reset: step; display: grid; gap: var(--s5); }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s4);
  align-items: start;
  border-top: 1px solid var(--line-soft);
  padding-top: var(--s5);
}
.step .step-num {
  counter-increment: step;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.4rem;
  width: 48px; height: 48px;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  background: var(--signal);
  color: #0A0A0A;
}
.step .step-num::before { content: counter(step); }

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 2px solid var(--line);
  background: var(--surface);
  padding-block: var(--s7) var(--s6);
  margin-top: var(--s9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s6);
}
.site-footer h2 { font-size: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--s2); }
.site-footer a { color: var(--ink); }
.footer-bottom {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

/* =========================================================================
   Page AUDIT — l'outil
   ========================================================================= */
.audit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
}
.code-input label.field-label {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: var(--s2);
}
.code-input textarea {
  width: 100%;
  min-height: 320px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: var(--s4);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
  tab-size: 2;
}
.code-input textarea:focus { background: var(--bg); }
.audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s4);
}
.field-hint { color: var(--muted); font-size: 0.92rem; margin-top: var(--s2); }

/* Résumé du score */
.score-panel { display: none; }
.score-panel.is-visible { display: block; }
.score-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s5);
  align-items: center;
  border: 2px solid var(--line);
  padding: var(--s5);
  background: var(--bg);
}
.score-ring {
  width: 132px; height: 132px;
  flex: 0 0 auto;
  position: relative;
}
.score-ring svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.score-ring .score-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 2.2rem;
  transform: none;
}
.score-num small { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.score-verdict { font-family: var(--font-title); font-weight: 800; font-size: 1.4rem; }
.score-verdict.lvl-good { color: var(--success); }
.score-verdict.lvl-mid { color: var(--warn); }
.score-verdict.lvl-bad { color: var(--error); }

.sev-tags { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.sev-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  border: 1px solid var(--line);
  padding: var(--s2) var(--s3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.sev-tag .pip { width: 12px; height: 12px; border: 1px solid var(--line); }
.sev-tag .pip.critique { background: var(--error); }
.sev-tag .pip.majeur { background: var(--warn); }
.sev-tag .pip.mineur { background: var(--accent); }
.sev-tag .pip.ok { background: var(--success); }
.sev-tag b { font-family: var(--font-title); }

/* Liste des problèmes */
.issues { margin-top: var(--s6); display: grid; gap: var(--s4); }
.issue {
  border: 1px solid var(--line);
  border-left-width: 6px;
  background: var(--bg);
}
.issue.sev-critique { border-left-color: var(--error); }
.issue.sev-majeur { border-left-color: var(--warn); }
.issue.sev-mineur { border-left-color: var(--accent); }
.issue-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: baseline;
  justify-content: space-between;
  padding: var(--s4) var(--s5) var(--s2);
}
.issue-head h3 { margin: 0; font-size: 1.1rem; }
.issue .badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  padding: 2px 8px;
  white-space: nowrap;
}
.issue.sev-critique .badge { background: var(--error); color: #fff; }
.issue.sev-majeur .badge { background: var(--warn); color: #fff; }
.issue.sev-mineur .badge { background: var(--accent); color: #fff; }
html.contrast-high .issue .badge { color: #000; }
.issue-body { padding: 0 var(--s5) var(--s5); }
.issue-body p { margin: var(--s2) 0; }
.issue .count-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.issue pre {
  margin: var(--s3) 0;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line-soft);
  padding: var(--s3) var(--s4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.issue .fix {
  border-top: 1px solid var(--line-soft);
  margin-top: var(--s3);
  padding-top: var(--s3);
}
.issue .fix-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--success);
  font-weight: 700;
}
html.contrast-high .issue .fix-label { color: var(--success); }
.issue .ref {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.no-issues {
  border: 2px solid var(--success);
  background: var(--surface);
  padding: var(--s5);
}
.empty-msg {
  border: 1px solid var(--error);
  background: var(--surface);
  padding: var(--s4) var(--s5);
  color: var(--error);
  font-weight: 600;
  margin-top: var(--s4);
}

/* checklist interactive (ressources) */
.rgaa-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.rgaa-list li {
  border: 1px solid var(--line-soft);
  padding: var(--s3) var(--s4);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  align-items: start;
}
.rgaa-list input[type="checkbox"] {
  width: 22px; height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.rgaa-list label { cursor: pointer; }
.rgaa-list .cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}
html.contrast-high .rgaa-list .cat { color: var(--signal); }
.checklist-progress {
  border: 2px solid var(--line);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s5);
  font-family: var(--font-title);
  font-weight: 700;
}
.checklist-progress .bar {
  height: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin-top: var(--s3);
  overflow: hidden;
}
.checklist-progress .bar > span {
  display: block; height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 200ms ease;
}
html.contrast-high .checklist-progress .bar > span { background: var(--signal); }

/* article (ressources) */
.article { max-width: 72ch; }
.article h2 { margin-top: var(--s7); }
.article h3 { margin-top: var(--s5); }
.article ul, .article ol { padding-left: var(--s5); }
.article li { margin-bottom: var(--s2); }
.toc {
  border: 1px solid var(--line);
  padding: var(--s4) var(--s5);
  background: var(--surface);
}
.toc ol { margin: var(--s2) 0 0; padding-left: var(--s5); }

/* divers utilitaires */
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; }
.center-block { text-align: center; }
.tag-inline {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--line);
  padding: 1px 7px;
  background: var(--surface);
}
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }

/* =========================================================================
   EMPLACEMENTS PUBLICITAIRES (monétisation CPM / RPM)
   Placeholder discret mais lisible, bordure pointillée, min-height anti-CLS.
   Variantes : --leaderboard, --rectangle, --inarticle.
   ========================================================================= */
.ad-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-inline: auto;
  padding: var(--s4);
  border: 1px dashed var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      var(--surface),
      var(--surface) 10px,
      var(--surface-2) 10px,
      var(--surface-2) 20px
    );
  color: var(--muted);
  text-align: center;
  /* l'emplacement n'est pas un repère de contenu : on l'isole un peu */
  isolation: isolate;
}
/* libellé « Publicité » — toujours visible, conforme aux règles des régies */
.ad-slot .ad-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
}
/* min-height = hauteur du futur créatif → évite le saut de mise en page (CLS) */
.ad-slot--leaderboard { min-height: 120px; max-width: 728px; }   /* 728×90 + label */
.ad-slot--rectangle   { min-height: 280px; max-width: 336px; }   /* 300×250 / 336×280 */
.ad-slot--inarticle   { min-height: 250px; max-width: 580px; }   /* in-article fluide */

/* espacement de respiration autour des blocs pub */
.ad-zone { margin-block: var(--s7); }
.ad-zone--tight { margin-block: var(--s5); }

/* contraste élevé : la trame disparaît, on garde un cadre net et lisible */
html.contrast-high .ad-slot {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
}
html.contrast-high .ad-slot .ad-label {
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
}
/* la trame rayée peut gêner ; on la retire aussi si l'utilisateur réduit les animations/contrastes */
@media (prefers-contrast: more) {
  .ad-slot { background: var(--surface-2); }
}

.hero {
  padding-block: var(--s9) var(--s8);
  border-bottom: 1px solid var(--line);
}
.hero .split { align-items: center; }
.hero-card {
  border: 2px solid var(--line);
  background: var(--surface);
  padding: var(--s5);
}
.hero-card .scoreline {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s3) 0; border-bottom: 1px solid var(--line-soft);
}
.hero-card .scoreline:last-child { border-bottom: none; }
.hero-card .scoreline .v { font-family: var(--font-mono); font-weight: 700; }
.hero-card .scoreline .v.bad { color: var(--error); }
.hero-card .scoreline .v.ok { color: var(--success); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: var(--s6); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--bg);
    border-bottom: 2px solid var(--line);
    padding: var(--s4) var(--s5) var(--s5);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: var(--s2); }
  .main-nav a { border: 1px solid var(--line-soft); }
  .header-inner { flex-wrap: wrap; position: relative; }
  .btn-contrast .label-full { display: none; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .score-head { grid-template-columns: 1fr; text-align: left; }
  .section { padding-block: var(--s7); }
  .hero { padding-block: var(--s7) var(--s6); }
}

@media (max-width: 360px) {
  .wrap { padding-inline: var(--s4); }
  body { font-size: 16px; }
  .btn-lg { padding: var(--s3) var(--s4); font-size: 1rem; }
  .audit-actions .btn { width: 100%; }
}
