/* Scanner Eziom : feuille de style unique, servie localement. Police Inter auto-hébergée (SIL OFL 1.1). */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/inter-latin-400-normal.woff2?v=8909904ab6c8) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/inter-latin-600-normal.woff2?v=f9a06e79cd3a) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/inter-latin-700-normal.woff2?v=6f56409fd3d6) format('woff2');
}

:root {
  --text: #172033;
  --muted: #4a5568;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --line: #d5dbe7;
  --primary: #1d4ed8;
  --primary-dark: #163ea8;
  --focus: #b45309;
  --ok-text: #14532d;
  --ok-bg: #e3f4e8;
  --warn-text: #7a3e00;
  --warn-bg: #fff1d6;
  --bad-text: #8f1d14;
  --bad-bg: #fde7e4;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: 1.85rem; margin-top: 0.6em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p, ul, ol { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; }

.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 1.1rem; }
main.wrap { padding-bottom: 3rem; }
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; 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: -999px; top: 0; background: var(--text); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.small { font-size: 0.9rem; color: var(--muted); }

/* En-tête et pied de page */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.brand { color: var(--text); text-decoration: none; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-mark { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--primary); display: inline-block; }
.header-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 1.5rem 0; font-size: 0.95rem; color: var(--muted); }
.footer-disclaimer { font-weight: 600; color: var(--text); }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; }

/* Boutons et formulaire */
.button {
  display: inline-block; border: 2px solid var(--primary); border-radius: var(--radius); padding: 0.7rem 1.2rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; min-height: 2.9rem;
}
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.button-secondary { background: #fff; color: var(--primary); }
.button[disabled] { opacity: 0.7; cursor: progress; }

.scan-form { margin: 1.5rem 0 1rem; }
.field-name { display: block; font-weight: 700; font-size: 1.05rem; }
.field-hint { margin: 0.15rem 0 0.5rem; color: var(--muted); font-size: 0.95rem; }
.field-row { display: flex; flex-direction: column; gap: 0.6rem; }
.field-input {
  font: inherit; width: 100%; padding: 0.7rem 0.9rem; min-height: 2.9rem; border: 2px solid #6b7486;
  border-radius: var(--radius); background: #fff; color: var(--text);
}
.field-input[aria-invalid='true'] { border-color: var(--bad-text); }
.form-error { border-left: 5px solid var(--bad-text); background: var(--bad-bg); color: var(--bad-text); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1rem; font-weight: 600; }
.form-error p:last-child { margin-bottom: 0; }
.pow-status { min-height: 1.6em; color: var(--muted); margin-top: 0.5rem; }
.subscribe { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--bg-soft); }
.subscribe-form { margin-top: 1rem; }
.field-check { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.8rem; }
.field-check input { margin-top: 0.3rem; flex: none; }
.snippet { white-space: pre-wrap; font-size: 0.9rem; user-select: all; }
.badge-preview img { display: block; max-width: 100%; height: auto; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.notice { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; }
.notice p:last-child { margin-bottom: 0; }
.disclaimer { font-weight: 600; }
.disclaimer-strong { border-left: 5px solid var(--primary); padding: 0.4rem 0.9rem; background: var(--bg-soft); }
.placeholder { background: #fff3a3; color: #3d3300; padding: 0 0.2em; }

/* Accueil */
.hero { padding-top: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.feature-grid, .indicator-grid, .action-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.feature, .indicator, .action { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: #fff; }
.feature h3, .indicator h3, .action h3 { margin-top: 0; }
.checklist { padding-left: 1.2rem; }
.checklist li { margin-bottom: 0.5rem; }

/* Panneaux (attente, échec, erreurs) */
.panel { max-width: 44rem; padding-top: 1rem; }
.steps { list-style: none; padding: 0; counter-reset: step; }
.step { position: relative; padding: 0.35rem 0 0.35rem 2.3rem; color: var(--muted); counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: 0.3rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  border: 2px solid var(--line); text-align: center; line-height: 1.45rem; font-size: 0.85rem; font-weight: 700; background: #fff;
}
.step-done { color: var(--ok-text); }
.step-done::before { content: '✓'; border-color: var(--ok-text); background: var(--ok-bg); }
.step-current { color: var(--text); font-weight: 700; }
.step-current::before { border-color: var(--primary); color: var(--primary); }
.step-detail { font-weight: 400; color: var(--muted); }
.poll-status { font-weight: 600; }
.detail { color: var(--muted); }
.meta { color: var(--muted); font-size: 0.9rem; }

/* Rapport */
.report-header { padding-top: 0.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin: 1rem 0 0; }
.report-header h1 { margin-top: 0.2em; }
.report-meta { display: flex; flex-direction: column; gap: 0.15rem; color: var(--muted); }
.section { margin-top: 2rem; }
.indicator-value { margin: 0; line-height: 1; }
.score { font-size: 3rem; font-weight: 700; }
.score-max { font-size: 1.2rem; color: var(--muted); margin-left: 0.15rem; }
.letter { display: inline-block; font-size: 2.6rem; font-weight: 700; width: 3.6rem; height: 3.6rem; line-height: 3.6rem; text-align: center; border-radius: var(--radius); }
.letter-a, .letter-b { background: var(--ok-bg); color: var(--ok-text); }
.letter-c { background: var(--warn-bg); color: var(--warn-text); }
.letter-d, .letter-e { background: var(--bad-bg); color: var(--bad-text); }
.indicator-meter { width: 100%; height: 0.8rem; margin: 0.6rem 0 0.3rem; }
.indicator-band { font-weight: 600; margin: 0.5rem 0; }
.indicator-help { color: var(--muted); font-size: 0.95rem; margin: 0; }

.check { border: 1px solid var(--line); border-left-width: 6px; border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 1rem 0; background: #fff; }
.check-ok { border-left-color: var(--ok-text); }
.check-attention { border-left-color: #b26a00; }
.check-probleme { border-left-color: var(--bad-text); }
.check-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; }
.check-header h3 { margin: 0; }
.check-code { display: inline-block; font-size: 0.85rem; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 0 0.35rem; margin-right: 0.3rem; }
.check-explanation { margin-top: 0.6rem; }
.check-meta { font-size: 0.9rem; color: var(--muted); margin: 0.6rem 0 0; }
.evidence h4, .advice h4 { margin: 0.8rem 0 0.3rem; font-size: 0.95rem; }
.evidence ul { padding-left: 1.2rem; margin-bottom: 0.4rem; }
.evidence li { overflow-wrap: anywhere; }
.evidence-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.evidence-detail { color: var(--muted); }
.advice p { margin-bottom: 0; }

.badge { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.9rem; border-radius: 999px; padding: 0.1rem 0.7rem; white-space: nowrap; }
.badge-icon { font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-attention { background: var(--warn-bg); color: var(--warn-text); }
.badge-probleme { background: var(--bad-bg); color: var(--bad-text); }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding: 0.4rem 0; }
th, td { border-bottom: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
thead th { background: var(--bg-soft); }
tfoot th, tfoot td { font-weight: 700; border-bottom: none; }
.num { text-align: right; white-space: nowrap; }
.cap-row td, .cap-row th { color: var(--muted); font-style: italic; }
.severity { color: var(--muted); }
.inline-list { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding-left: 1.2rem; }

.actions .action-help { border-color: var(--primary); background: #eef3ff; }
.report-footer { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1rem; color: var(--muted); font-size: 0.95rem; }

/* Pages d'information */
.prose { max-width: 46rem; }
.prose li { margin-bottom: 0.4rem; }
.code-block { display: block; padding: 0.7rem 0.9rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow-wrap: anywhere; }
.method-check { border-top: 1px solid var(--line); padding-top: 0.3rem; }

@media (min-width: 40rem) {
  .field-row { flex-direction: row; }
  .field-row .field-input { flex: 1; }
  .feature-grid, .indicator-grid { grid-template-columns: repeat(3, 1fr); }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .report-meta { flex-direction: row; flex-wrap: wrap; gap: 0.2rem 1.5rem; }
  h1 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Impression : le rapport tient sur papier, sans navigation ni boutons. */
@media print {
  @page { margin: 1.5cm; }
  body { font-size: 10.5pt; color: #000; }
  .site-header, .header-nav, .skip-link, .no-print, .scan-form, .subscribe, .footer-links { display: none !important; }
  .site-footer { background: none; border-top: 1px solid #999; }
  a { color: #000; text-decoration: none; }
  .check, .indicator, .table-wrap, tr { break-inside: avoid; }
  .indicator-grid { grid-template-columns: repeat(3, 1fr); }
  .check { border-left-width: 4px; }
  .badge, .letter { border: 1px solid #000; }
  .action-help a.button[href]::after { content: ' (' attr(href) ')'; }
}

/* Annuaire des sites audités (jalon J4) */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; padding: 0; margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--muted); }
.breadcrumb li + li::before { content: '›'; margin-right: 0.5rem; }
.sector-list { columns: 2 16rem; padding-left: 1.2rem; }
.sector-list li { margin-bottom: 0.3rem; break-inside: avoid; }
.listing-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.listing-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; background: #fff; }
.listing-card p { margin: 0.2rem 0; }
.listing-name { margin: 0 0 0.3rem; }
.listing-place, .listing-date { color: var(--muted); font-size: 0.95rem; }
.listing-scores { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.listing-flag { font-weight: 700; color: var(--warn-text); }
.listing-correction { border-left: 5px solid #b26a00; }
.listing-facts { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 1rem 0; }
.listing-facts div { border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; }
.listing-facts dt { font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.listing-facts dd { margin: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.5rem 0; }
.field-textarea { width: 100%; font: inherit; }
.field-error { color: var(--bad-text); font-weight: 600; margin: 0.3rem 0 0; }
.delisting fieldset { border: none; padding: 0; margin: 0 0 1rem; }
.manage select.field-input, .manage input.field-input { width: 100%; max-width: 32rem; }
.method-list li { margin-bottom: 0.8rem; }
.verification-ok { color: var(--ok-text); }
.consent { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; }

@media (min-width: 40rem) {
  .listing-list { grid-template-columns: repeat(2, 1fr); }
  .listing-facts { grid-template-columns: repeat(2, 1fr); }
}
