/*
 * ONE Assessment — identité Cyber Praxis ONE : bleu nuit #011e31, turquoise #07ceb6.
 * Contrastes (WCAG 2.2 AA) : blanc sur bleu nuit 17:1, bleu nuit sur turquoise 8,5:1,
 * turquoise foncé #047b6d sur blanc 5,2:1. Le turquoise vif ne porte jamais de texte sur blanc.
 */
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("/fonts/roboto-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("/fonts/roboto-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("/fonts/roboto-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cabin"; font-weight: 600; font-display: swap; src: url("/fonts/cabin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cabin"; font-weight: 700; font-display: swap; src: url("/fonts/cabin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #011e31; --navy-2: #0e2c40; --teal: #07ceb6; --teal-ink: #047b6d;
  --bg: #f2f5f6; --surface: #ffffff; --surface-2: #f7f9fa; --line: #dce4e7; --line-2: #c9d5da;
  --text: #15252e; --muted: #5a6d77; --danger: #b42318; --warn: #9a5b00; --ok: #0f7b4f;
  --radius: 12px; --shadow: 0 1px 2px rgb(1 30 49 / .06), 0 8px 24px rgb(1 30 49 / .06);
  --font: "Roboto", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --display: "Cabin", "Roboto", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; text-wrap: balance; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 3.4vw, 40px); } h2 { font-size: 24px; } h3 { font-size: 18px; }
p { margin: 0 0 1em; }
a { color: var(--teal-ink); }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* En-tête et pied de page */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand img { display: block; width: auto; height: 38px; }
.site-footer { margin-top: 56px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-row nav a { white-space: nowrap; }
.badge-proto { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff4e0; color: var(--warn); font-weight: 500; font-size: 12.5px; }

/* Sélecteur de langue : même composant que Cyber Praxis ONE */
.locale-menu { position: relative; display: inline-block; }
.locale-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; user-select: none; }
.locale-trigger::-webkit-details-marker { display: none; }
.locale-trigger:hover, .locale-menu[open] > .locale-trigger { border-color: var(--teal-ink); }
.locale-flag { width: 22px; height: 16px; flex: none; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgb(0 0 0 / .14); }
.locale-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.locale-menu[open] .locale-chevron { transform: rotate(180deg); }
.locale-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; min-width: 220px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 32px rgb(1 30 49 / .16); }
.locale-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.locale-list .locale-flag { width: 24px; height: 17px; }
.locale-list button:hover { background: var(--surface-2); }
.locale-list button[aria-current="true"] { background: var(--bg); font-weight: 600; }
.locale-check { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: var(--teal-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .locale-chevron { transition: none; } }

/* Accueil */
.hero { margin: 32px 0 0; padding: clamp(28px, 5vw, 56px); border-radius: 20px; background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero h1 { color: #fff; max-width: 18em; }
.hero .lead { font-size: 18px; color: #dbe7ec; max-width: 36em; }
.hero .nature { color: #b9ccd4; font-size: 14.5px; }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border: 2px solid rgb(7 206 182 / .18); border-radius: 50%; }
.privacy-note { margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: rgb(255 255 255 / .07); color: #dbe7ec; font-size: 14.5px; max-width: 40em; }

/* Boutons et champs */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15.5px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { background: #12dcc3; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--teal-ink); }
.btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 500; font-size: 14.5px; }
.input, select.input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.input:focus { border-color: var(--teal-ink); outline: none; box-shadow: 0 0 0 3px rgb(7 206 182 / .3); }
.field-error { color: var(--danger); font-size: 13.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.hint { color: var(--muted); font-size: 14px; }

/* Cartes et étapes */
.card { margin-top: 24px; padding: clamp(20px, 3.5vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stepper { margin-top: 28px; }
.stepper ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.stepper li { flex: 1; }
.stepper .bar { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.stepper li[data-state="done"] .bar, .stepper li[data-state="current"] .bar { background: var(--teal-ink); }
.stepper .name { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.stepper li[data-state="current"] .name { color: var(--navy); font-weight: 600; }
.choices { display: grid; gap: 10px; margin: 18px 0; padding: 0; border: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice:hover { border-color: var(--teal-ink); }
.choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal-ink); flex: none; }
.choice:has(input:checked) { border-color: var(--teal-ink); background: #effaf8; box-shadow: inset 3px 0 0 var(--teal-ink); }
.choice .level-tag { flex: none; min-width: 26px; height: 26px; border-radius: 6px; background: var(--bg); color: var(--navy); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.choice.secondary { background: var(--surface-2); }
.fw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.fw-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.fw-card:hover:not([disabled]) { border-color: var(--teal-ink); }
.fw-card[aria-pressed="true"] { border-color: var(--teal-ink); background: #effaf8; box-shadow: inset 3px 0 0 var(--teal-ink); }
.fw-card[disabled] { cursor: not-allowed; opacity: .7; }
.fw-card strong { font-family: var(--display); font-size: 16.5px; color: var(--navy); }
.fw-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-ok { background: #e3f6f2; color: var(--teal-ink); }
.tag-soon { background: var(--bg); color: var(--muted); }
.tag-pre { background: #fff4e0; color: var(--warn); }
.question-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; }
.question-text { font-family: var(--display); font-size: clamp(19px, 2.2vw, 23px); color: var(--navy); margin: 10px 0 4px; }
.question-help { margin: 2px 0 10px; max-width: 70ch; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--teal-ink); }
.demo-box { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.demo-box input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-ink); }
.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* Résultats */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.kpi .k-label { font-size: 13px; color: var(--muted); }
.kpi .k-value { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--navy); }
.kpi .k-sub { font-size: 13px; color: var(--muted); }
.kpi.main { background: var(--navy); border-color: var(--navy); }
.kpi.main .k-label, .kpi.main .k-sub { color: #b9ccd4; }
.kpi.main .k-value { color: #fff; }
.alert { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; }
.alert-warn { background: #fff4e0; color: #6b3f00; }
.alert-info { background: #e8f2f6; color: var(--navy); }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.radar svg { width: 100%; height: auto; }
.domain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.domain-list .d-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.domain-list .d-bar { height: 8px; border-radius: 4px; background: var(--line); margin-top: 4px; overflow: hidden; }
.domain-list .d-bar > span { display: block; height: 100%; background: var(--teal-ink); }
.domain-list .d-note { font-size: 12.5px; color: var(--warn); }
.gap-list { margin: 8px 0 0; padding-left: 20px; }
.gap-list li { margin-bottom: 6px; }
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; align-items: start; }
.roadmap section { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.roadmap h3 { font-size: 15px; }
.roadmap ul { margin: 0; padding-left: 18px; font-size: 14px; }
.roadmap li { margin-bottom: 6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 14.5px; }
.anti-abuse { margin: 14px 0 4px; }
.turnstile-box { min-height: 65px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-ink); flex: none; }
.notice { padding: 12px; background: #fff4e0; border-radius: 8px; }

@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-grid, .grid-2, .roadmap { grid-template-columns: minmax(0, 1fr); }
  .stepper .name { display: none; }
  .brand img { height: 30px; }
}
.radar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.radar-legend li { display: inline-flex; align-items: center; gap: 6px; }
.radar-legend svg { width: 26px; height: 12px; flex: none; }
.roadmap-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-list { display: grid; gap: 10px; margin-top: 10px; }
.service { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.service p { margin: 6px 0; }
.service a { color: var(--teal-ink); font-weight: 500; }
@media (max-width: 760px) { .roadmap-4 { grid-template-columns: minmax(0, 1fr); } }

/* Orientation réglementaire indicative */
.orientation { margin: 18px 0; }
.table-wrap { overflow-x: auto; }
table.orient { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 14px; }
table.orient caption { text-align: left; font-weight: 600; color: var(--navy); padding: 4px 0 6px; }
table.orient th, table.orient td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.orient thead th { background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: 13px; }
table.orient tbody th { font-weight: 500; color: var(--text); min-width: 160px; }
.q { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 13px; font-weight: 500; white-space: normal; }
.q-applicable-declared { background: #e3f6f3; color: var(--teal-ink); }
.q-potentially-applicable { background: #e8f2f6; color: var(--navy); }
.q-to-confirm { background: #fdf3e1; color: var(--warn); }
.q-not-applicable { background: var(--surface-2); color: var(--muted); }
.q-insufficient-info { background: var(--surface-2); color: var(--muted); }
.regulatory-context { margin-top: 18px; }

/* Parcours, prise de rendez-vous et « Pourquoi choisir Cyber Praxis ? » */
.paths { margin-top: 22px; }
.path { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; background: var(--surface); }
.path h4, .booking h4, .why h4 { font-family: var(--display); color: var(--navy); font-size: 18px; margin: 0 0 6px; }
.booking { background: #e6f6f3; border: 1px solid var(--teal); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.booking-facts { font-weight: 600; color: var(--teal-ink); }
.why { border-left: 4px solid var(--teal); background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.why-headline { font-weight: 600; color: var(--teal-ink); }
.why ul { margin: 8px 0 0; padding-left: 20px; columns: 2 260px; }
.link { color: var(--teal-ink); font-weight: 500; }

/* Six indicateurs */
.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Marque de certification SOCOTEC : affichée seulement une fois activée (data/trust.json). Image
   officielle non retouchée, posée sur fond blanc avec une marge de protection ; tailles à ajuster au
   règlement de la marque (taille minimale). */
.trust-mark { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 14px 0 0; }
.trust-mark picture { display: block; background: #fff; padding: 6px; border-radius: 6px; line-height: 0; }
.trust-mark img { display: block; height: auto; max-width: 100%; }
.trust-mark figcaption { flex: 1 1 260px; font-size: 13.5px; color: var(--muted); }
.trust-mark-footer { margin: 0; }
.trust-mark-footer img { width: 96px; }
.trust-mark-form img { width: 120px; }
.trust-mark-section img { width: 160px; }
.trust-facts { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
