/* quiz.css — Quiz public Cybersécurité & RGPD (SNI-NSZ × DP Box Easy)
 * Palette SNI/NSZ reprise de dpb-easy-app/static/css/app.css.
 * Autonome : ne dépend d'aucune autre feuille de style.
 */
:root {
  --blue: #054B8D;
  --blue-dark: #04315C;
  --blue-light: #e5edf6;
  --orange: #FB940C;
  --orange-dark: #b86a00;
  --orange-light: #fff3e0;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #5b6b80;
  --line: #e2e8f0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --ko: #b91c1c;
  --ko-bg: #fef2f2;
  --lvl-1: #dc2626;
  --lvl-2: #d97706;
  --lvl-3: #2466a8;
  --lvl-4: #15803d;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, 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(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; color: var(--blue-dark); }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.1rem); margin: 0 0 .6rem; }
h2 { font-size: 1.25rem; margin: 0 0 .8rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
p { margin: 0 0 .8rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1:focus, h2:focus { outline: none; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* ---------------------------------------------------------------- topbar */
.topbar { background: #fff; border-bottom: 3px solid var(--orange); }
.topbar-inner {
  max-width: 760px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 104px; height: auto; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); padding-left: 12px; }
.brand-title { font-weight: 700; color: var(--blue); font-size: .98rem; }
.brand-sub { font-size: .78rem; color: var(--muted); }
.lang-switch { display: flex; gap: 4px; flex-shrink: 0; }
.lang-switch button {
  font: inherit; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 6px 10px; border-radius: 8px; cursor: pointer; min-width: 40px; min-height: 36px;
}
.lang-switch button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.lang-switch button:hover { border-color: var(--blue); }

@media (max-width: 560px) {
  .brand-text { display: none; }
  .brand-logo { width: 92px; }
}

/* ------------------------------------------------------------------ main */
main { padding: 24px 0 40px; }
main:focus { outline: none; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
@media (max-width: 560px) { .card { padding: 18px; } }
.kicker {
  text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700;
  color: var(--orange-dark); margin-bottom: .4rem;
}
.error { color: var(--ko); }

/* ----------------------------------------------------------------- intro */
.hero { border-top: 5px solid var(--orange); }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.points { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.points li { position: relative; padding-left: 28px; margin-bottom: .5rem; }
.points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue); font-weight: 700; font-size: .75rem;
  display: flex; align-items: center; justify-content: center; margin-top: 3px;
}
.note { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--blue); color: #fff; border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 4px;
}
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--orange); line-height: 1.1; }
.stat-label { font-size: .88rem; color: #e5edf6; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 10px; padding: 11px 20px; min-height: 46px;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1.08rem; padding: 14px 26px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-accent { background: var(--orange); color: #1a1200; }
.btn-accent:hover { background: #ffa733; }
.btn-secondary { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue-light); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-link { background: none; border: none; color: var(--blue); text-decoration: underline; padding-left: 8px; padding-right: 8px; }

/* -------------------------------------------------------------- progress */
.progress-wrap { margin-bottom: 14px; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .88rem; color: var(--muted); margin-bottom: 6px;
}
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--orange)); transition: width .35s ease; }
.tag { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.tag-cyber { background: var(--blue-light); color: var(--blue-dark); }
.tag-rgpd { background: var(--orange-light); color: #7a4700; }

/* -------------------------------------------------------------- question */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; width: 100%; }
.question { font-size: 1.15rem; color: var(--ink); margin-bottom: 1rem; font-weight: 650; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 12px;
  border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px;
  cursor: pointer; background: #fff; transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: #9fb6cf; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-letter {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
}
.option-text { padding-top: 2px; }
.option:has(input:checked) { border-color: var(--blue); background: #f2f7fc; }
.option:has(input:checked) .option-letter { background: var(--blue); color: #fff; border-color: var(--blue); }
.option:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.options .option.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.options .option.is-correct .option-letter { background: var(--ok); color: #fff; border-color: var(--ok); }
.options .option.is-wrong { border-color: var(--ko); background: var(--ko-bg); }
.options .option.is-wrong .option-letter { background: var(--ko); color: #fff; border-color: var(--ko); }
.option:has(input:disabled) { cursor: default; }

.form-error { color: var(--ko); font-weight: 600; margin: .8rem 0 0; }
.actions { margin-top: 18px; display: flex; justify-content: flex-end; }
@media (max-width: 560px) { .actions .btn { width: 100%; } }

.feedback { margin-top: 18px; padding: 16px 18px; border-radius: 10px; border-left: 5px solid; }
.feedback-ok { background: var(--ok-bg); border-color: var(--ok); }
.feedback-ko { background: var(--ko-bg); border-color: var(--ko); }
.feedback-title { font-weight: 800; font-size: 1.05rem; }
.feedback-ok .feedback-title { color: var(--ok); }
.feedback-ko .feedback-title { color: var(--ko); }
.fact, .dpb-hint { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #fff; }
.fact p:last-child, .dpb-hint p:last-child { margin-bottom: 0; }
.fact-label, .dpb-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; }
.fact-label { color: var(--blue); }
.dpb-hint { border: 1px dashed var(--orange); }
.dpb-label { color: var(--orange-dark); }

/* ---------------------------------------------------------------- report */
.report-head { border-top: 5px solid var(--orange); }
.score-block { display: flex; align-items: center; gap: 24px; margin-top: 12px; }
@media (max-width: 560px) { .score-block { flex-direction: column; text-align: center; } }
.gauge { width: 150px; height: 150px; flex-shrink: 0; }
.gauge-bg { fill: none; stroke: var(--line); stroke-width: 12; }
.gauge-fg { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.gauge.lvl-1 .gauge-fg { stroke: var(--lvl-1); }
.gauge.lvl-2 .gauge-fg { stroke: var(--lvl-2); }
.gauge.lvl-3 .gauge-fg { stroke: var(--lvl-3); }
.gauge.lvl-4 .gauge-fg { stroke: var(--lvl-4); }
.gauge-num { font-size: 34px; font-weight: 800; text-anchor: middle; fill: var(--ink); }
.gauge-of { font-size: 11px; text-anchor: middle; fill: var(--muted); }
.profile-label { font-size: 1.3rem; font-weight: 800; margin-bottom: .4rem; }
.profile-label.lvl-1 { color: var(--lvl-1); }
.profile-label.lvl-2 { color: var(--lvl-2); }
.profile-label.lvl-3 { color: var(--lvl-3); }
.profile-label.lvl-4 { color: var(--lvl-4); }

.axis { margin-bottom: 14px; }
.axis-head { display: flex; justify-content: space-between; gap: 8px; font-size: .95rem; margin-bottom: 4px; }
.axis-name { font-weight: 700; }
.axis-pts { color: var(--muted); }
.axis-track { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.axis-fill { height: 100%; width: 0; border-radius: 99px; transition: width .8s ease; }
.axis-fill.lvl-1 { background: var(--lvl-1); }
.axis-fill.lvl-2 { background: var(--lvl-2); }
.axis-fill.lvl-3 { background: var(--lvl-3); }
.axis-fill.lvl-4 { background: var(--lvl-4); }

.priorities { counter-reset: prio; list-style: none; padding: 0; margin: 0; }
.priorities li {
  counter-increment: prio; position: relative; padding: 12px 14px 12px 54px; margin-bottom: 10px;
  background: var(--bg); border-radius: 10px; font-weight: 550;
}
.priorities li::before {
  content: counter(prio); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #1a1200;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}

.cta {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; border-radius: var(--radius); padding: 28px 24px; margin-bottom: 16px;
}
.cta h2 { color: #fff; font-size: 1.35rem; }
.cta p { color: #e5edf6; }
.cta-features { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
@media (max-width: 560px) { .cta-features { grid-template-columns: 1fr; } }
.cta-features li { position: relative; padding-left: 24px; }
.cta-features li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 800; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) { .cta-actions .btn { width: 100%; } }
.cta-contact { margin: 1rem 0 0; font-size: .9rem; }

.recap { list-style: none; padding: 0; margin: 0; }
.recap-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recap-item:last-child { border-bottom: 0; }
.recap-mark {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.recap-item.is-ok .recap-mark { background: var(--ok); }
.recap-item.is-ko .recap-mark { background: var(--ko); }
.recap-q { margin-bottom: .3rem; font-size: .95rem; }
.recap-a { margin-bottom: .2rem; font-size: .9rem; color: var(--ink-2); }
.recap-a span { font-weight: 700; }
.recap-good span { color: var(--ok); }

.report-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: .85rem; color: var(--ink-2); }
.footer-inner p { margin-bottom: .5rem; }

/* ----------------------------------------------------------------- print */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .lang-switch, .skip, .no-print, .site-footer .footer-inner p:first-child { display: none !important; }
  .print-only { display: block; }
  .topbar { border-bottom: 2px solid var(--orange); }
  main { padding: 10px 0; }
  .card, .cta { box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .cta { background: #fff !important; color: var(--ink); border: 2px solid var(--blue); }
  .cta h2 { color: var(--blue-dark); }
  .cta p, .cta-contact { color: var(--ink-2); }
  .cta .btn { border: 1px solid var(--blue); color: var(--blue); background: #fff; }
  .cta a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; font-weight: 400; word-break: break-all; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; transition: none !important; }
}

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