:root {
  --ok: #1b7f3b;
  --warn: #a15c00;
  --bad: #b3261e;
  --muted: #5f6672; /* contraste 5,9:1 sur blanc */
  --focus: #0b57d0;
  --panel: #f4f6f8;
}

/* --- Accessibilité ----------------------------------------------------------------- */
.skip-link {
  position: absolute; left: .5rem; top: -3rem; z-index: 10; padding: .5rem 1rem;
  background: #fff; color: #111; border: 2px solid var(--focus); border-radius: .25rem;
}
.skip-link:focus { top: .5rem; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
main:focus { outline: none; }
html:not(.js) .js-only { display: none !important; }
.copy-buffer { position: fixed; left: -10000px; top: 0; }

/* --- Mise en page générale ----------------------------------------------------------- */
.brand { text-decoration: none; }
/* Logo : 32 px de haut (24 px minimum, voir design/CHARTE.md), largeur proportionnelle. */
.brand img { display: block; height: 2rem; width: auto; }
@media (max-width: 576px) { .brand img { height: 1.75rem; } }
.site-header nav { flex-wrap: wrap; }
.site-header nav ul:last-child { flex-wrap: wrap; }
.hero { margin-block: 2rem 1rem; }
.lead { font-size: 1.15rem; }
.h3 { font-size: 1.25rem; }
.form-error { color: var(--bad); }
.disclaimer { color: var(--muted); border-left: 3px solid var(--muted); padding-left: .75rem; }
.muted { color: var(--muted); }
.reassurance { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding-left: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps li { counter-increment: step; background: var(--panel); border-radius: .5rem;
  padding: 1rem 1.25rem; list-style: none; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--focus); color: #fff;
  font-weight: 700; margin-bottom: .5rem; }
.steps h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.topics ul { padding-left: 1.1rem; margin-bottom: 0; }
.topics li { list-style: disc; }
.topics h3 { font-size: 1.1rem; }
.cta-grid { margin-block: 2rem; }

.sample-report { border: 1px dashed var(--muted); border-radius: .5rem; padding: 1rem;
  margin-inline: 0; }
.sample-item { margin-block: .75rem; }
.sample-brand { border-bottom: 2px solid var(--focus); padding-bottom: .25rem; }
.sample-item .points { float: right; color: var(--muted); font-size: .9rem; }

/* --- Rapport ------------------------------------------------------------------------- */
.summary { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.grade {
  width: 6rem; height: 6rem; border-radius: 1rem; display: grid; place-items: center;
  font-size: 3.5rem; font-weight: 800; color: #fff; flex: none;
}
/* Texte blanc sur fond coloré : contraste ≥ 3:1 (gros caractères) pour chaque note. */
.grade-A { background: #1b7f3b; }
.grade-B { background: #4d8a22; }
.grade-C { background: #8f6a00; }
.grade-D { background: #c0561a; }
.grade-E { background: #b3261e; }
.grade-none { background: var(--muted); }
.score { font-size: 1.25rem; margin-bottom: .25rem; }
.cap { color: var(--bad); }

.category h2 small { font-weight: normal; color: var(--muted); font-size: 1rem; }
.check { border-left: 4px solid var(--muted); padding-left: .75rem; }
.check.status-pass { border-left-color: var(--ok); }
.check.status-warn { border-left-color: var(--warn); }
.check.status-fail { border-left-color: var(--bad); }
.check summary .points { float: right; color: var(--muted); font-size: .9rem; }
.pill {
  display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 1rem;
  margin-right: .5rem; color: #fff; background: var(--muted); vertical-align: middle;
}
.pill-pass { background: var(--ok); }
.pill-warn { background: var(--warn); }
.pill-fail { background: var(--bad); }
.detail { font-style: italic; }
.alert { color: var(--bad); margin-bottom: 0; }
.scan-error { border-left: 4px solid var(--bad); }

.report-actions { margin-bottom: 1.5rem; }
.report-actions input[readonly] { font-family: var(--pico-font-family-monospace, monospace);
  font-size: .9rem; }
.print-only { display: none; }
.pdf-branding { margin-top: .5rem; }
.pdf-branding input[type="color"] { height: 2.75rem; padding: .25rem; }
.dns-fix { background: var(--panel); border-radius: .5rem; padding: .75rem 1rem;
  margin-bottom: 1rem; }
.dns-fix dl, dl.dns-fix { display: grid; grid-template-columns: max-content 1fr;
  gap: .25rem 1rem; margin-bottom: .5rem; }
.dns-fix dt { font-weight: 600; }
.dns-fix dd { margin: 0; min-width: 0; }
.dns-snippet { white-space: pre-wrap; word-break: break-all; margin-bottom: .5rem; }
.dns-snippet code { padding: .5rem .75rem; display: block; }
.copy-btn { width: auto; }
.copy-status { display: block; min-height: 1.2em; }
.fix-notes { padding-left: 1.1rem; }
.fix-notes li { list-style: disc; }
.explanations dt { margin-top: .5rem; }
.explanations dd { margin-left: 1rem; }

.waitlist-box { background: var(--panel); border-left: 4px solid var(--focus);
  border-radius: .5rem; padding: 1rem 1.25rem; margin-block: 2rem; }
.waitlist-box h2 { font-size: 1.3rem; }
.consent { font-size: .95rem; }
.consent input[type="checkbox"] { flex: none; }

/* --- Pied de page, formulaires ---------------------------------------------------------- */
.footer-links ul { flex-wrap: wrap; gap: .25rem 1rem; padding-left: 0; }
.footer-links li { padding-block: .25rem; }
.nojs-warning { color: var(--bad); border-left: 3px solid var(--bad); padding-left: .75rem;
  margin-top: 1rem; }
.altcha-status { display: block; margin-top: .25rem; }
.form-success { color: var(--ok); }
.pending-notice { color: var(--muted); font-style: italic; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.draft-banner { background: #fff4d6; border-left: 4px solid var(--warn); padding: .5rem .75rem; }

/* --- Petits écrans ----------------------------------------------------------------- */
@media (max-width: 576px) {
  .grade { width: 4.5rem; height: 4.5rem; font-size: 2.5rem; }
  .dns-fix dl, dl.dns-fix { grid-template-columns: 1fr; }
  .check summary .points, .sample-item .points { float: none; display: block; }
  .site-header nav ul:first-child { width: 100%; }
}

/* --- Impression : rapport propre, sans navigation ni formulaires ----------------------- */
@media print {
  @page { margin: 1.5cm; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .site-header, .site-footer, .skip-link, .no-print, form, button, [role="button"],
  .waitlist-box, .report-actions { display: none !important; }
  .print-only { display: block; font-size: 9pt; color: #333; }
  main.container { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  details { break-inside: avoid; page-break-inside: avoid; }
  details > summary { list-style: none; font-weight: 600; }
  details > summary::-webkit-details-marker { display: none; }
  .category { break-before: auto; }
  .category h2 { break-after: avoid; page-break-after: avoid; }
  .summary { break-inside: avoid; }
  .grade, .pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dns-fix, .dns-snippet code { background: #fff !important; border: 1px solid #999; }
  .disclaimer { color: #333; border-left-color: #333; }
}
