:root {
  --navy-950: #031a38;
  --navy-900: #062956;
  --navy-800: #0a3973;
  --navy-700: #174e8f;
  --blue-100: #e9f1fb;
  --blue-50: #f5f8fc;
  --gold-500: #d59616;
  --gold-400: #edb33c;
  --gold-100: #fff0c9;
  --ink: #14233a;
  --muted: #5b6678;
  --line: #dce4ee;
  --white: #fff;
  --danger: #a43d32;
  --success: #287a58;
  --shadow: 0 24px 60px rgba(3, 26, 56, .12);
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; }
body { max-width: 100%; margin: 0; overflow-x: hidden; overflow-x: clip; color: var(--ink); background: var(--blue-50); font-family: var(--font-sans); line-height: 1.6; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: -80px; left: 12px; padding: 10px 14px; color: white; background: var(--navy-950); }
.skip-link:focus { top: 12px; }

.diag-header { min-height: 84px; display: flex; align-items: center; gap: 26px; padding: 10px clamp(18px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.diag-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.diag-header > *, .welcome-shell > *, .field-grid > *, .review-summary > *, .wizard-main { min-width: 0; }
.diag-brand img { width: 55px; height: 55px; object-fit: cover; border: 1px solid var(--line); border-radius: 50%; }
.diag-brand strong { display: block; color: var(--navy-900); font: 500 1.08rem/1 var(--font-serif); letter-spacing: .16em; }
.diag-brand small { display: block; margin-top: 6px; color: #aa7413; font-size: .62rem; font-weight: 800; letter-spacing: .3em; }
.diag-header > p { display: flex; align-items: center; gap: 8px; margin: 0; padding-left: 26px; border-left: 1px solid var(--line); color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.diag-header > p i { width: 3px; height: 3px; border-radius: 50%; background: var(--gold-500); }
.back-link { margin-left: auto; color: var(--navy-700); font-size: .78rem; font-weight: 750; text-decoration: none; }
.diag-language { margin-left: auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy-900); font-size: .72rem; font-weight: 800; text-decoration: none; }
.diag-language + .back-link { margin-left: 0; }

.screen { display: none; }
.screen.active { display: block; animation: appear .35s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }
.eyebrow, .card-label { margin: 0 0 15px; color: var(--navy-700); font-size: .7rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 22px; border: 0; border-radius: 4px; cursor: pointer; font-size: .82rem; font-weight: 800; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button-primary { color: white; background: var(--navy-900); box-shadow: 0 12px 28px rgba(3,26,56,.16); }
.button-primary:hover { transform: translateY(-2px); background: var(--navy-800); }
.button-secondary { color: var(--navy-900); background: white; border: 1px solid #c9d6e5; }
.button:disabled { opacity: .5; cursor: wait; transform: none; }

#welcome-screen { min-height: calc(100vh - 145px); background: radial-gradient(circle at 80% 22%, rgba(213,150,22,.12), transparent 25rem), linear-gradient(120deg, #fff 60%, #f3f7fc 60%); }
.welcome-shell { width: min(calc(100% - 48px), 1250px); min-height: calc(100vh - 145px); margin: auto; display: grid; grid-template-columns: 1.06fr .72fr; gap: clamp(50px, 8vw, 110px); align-items: center; padding: 65px 0 78px; }
.welcome-copy h1 { max-width: 720px; margin: 0 0 25px; overflow-wrap: anywhere; color: var(--navy-950); font: 500 clamp(3rem, 5.2vw, 5rem)/1.04 var(--font-serif); letter-spacing: -.035em; }
.welcome-copy .lead { max-width: 690px; margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.8; }
.scope-list { max-width: 700px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 32px; }
.scope-list span { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--navy-800); background: rgba(255,255,255,.82); font-size: .69rem; font-weight: 750; }
.welcome-card { padding: clamp(28px, 4vw, 46px); border-top: 5px solid var(--gold-500); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.welcome-card h2 { margin: 0 0 20px; color: var(--navy-950); font: 500 2rem/1.2 var(--font-serif); }
.welcome-card ul { margin: 0 0 25px; padding: 0; list-style: none; }
.welcome-card li { position: relative; padding: 12px 0 12px 25px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .79rem; }
.welcome-card li::before { position: absolute; left: 0; color: var(--gold-500); content: "✓"; font-weight: 900; }
.welcome-card strong { color: var(--ink); }
.welcome-card .button { width: 100%; }
.secure-line { margin: 14px 0 0; color: var(--muted); font-size: .65rem; text-align: center; }
.secure-line span { color: var(--success); }

#form-screen.active { min-height: calc(100vh - 145px); display: grid; grid-template-columns: 300px 1fr; }
.wizard-nav { padding: 45px 30px 32px; border-right: 1px solid var(--line); background: var(--navy-950); color: white; }
.wizard-brandline { display: flex; align-items: center; gap: 9px; margin-bottom: 30px; color: #b9c9db; font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.wizard-brandline span { width: 22px; height: 2px; background: var(--gold-400); }
#step-nav { display: grid; gap: 5px; }
.step-item { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 4px; color: #8298b2; }
.step-item i { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #36506f; border-radius: 50%; font-size: .62rem; font-style: normal; font-weight: 800; }
.step-item span { font-size: .72rem; font-weight: 700; }
.step-item.active { color: white; background: rgba(255,255,255,.08); }
.step-item.active i { color: var(--navy-950); border-color: var(--gold-400); background: var(--gold-400); }
.step-item.done { color: #d6e0ec; }
.step-item.done i { color: white; border-color: var(--success); background: var(--success); }
.privacy-summary { margin-top: 35px; padding-top: 22px; border-top: 1px solid #284361; }
.privacy-summary strong { font-size: .74rem; }
.privacy-summary p { color: #9cb0c5; font-size: .66rem; line-height: 1.55; }
.text-button { padding: 0; color: var(--gold-400); border: 0; background: none; cursor: pointer; font-size: .67rem; font-weight: 800; text-decoration: underline; }

.wizard-main { width: 100%; max-width: 1050px; padding: 45px clamp(24px, 6vw, 75px) 70px; background: var(--blue-50); }
.progress-line { height: 4px; margin-bottom: 38px; border-radius: 99px; background: #dfe7f1; overflow: hidden; }
.progress-line span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--navy-700), var(--gold-500)); transition: width .35s ease; }
.step-heading { margin-bottom: 28px; }
.step-heading h1 { margin: 0 0 9px; overflow-wrap: anywhere; color: var(--navy-950); font: 500 clamp(2.2rem, 4vw, 3.4rem)/1.12 var(--font-serif); }
.step-heading > p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: .85rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field.full { grid-column: 1/-1; }
.field label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin-bottom: 7px; color: var(--navy-900); font-size: .71rem; font-weight: 800; }
.field label small { color: #788697; font-weight: 500; }
.field input, .field select { width: 100%; height: 50px; padding: 0 13px; border: 1px solid #cbd7e5; border-radius: 4px; color: var(--ink); background: white; outline: none; }
.field input:focus, .field select:focus { border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(23,78,143,.09); }
.field-hint { margin: 5px 0 0; color: var(--muted); font-size: .62rem; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.info-banner { margin-bottom: 18px; padding: 13px 16px; border-left: 3px solid var(--gold-500); color: var(--muted); background: var(--gold-100); font-size: .73rem; }
.question-card { margin-bottom: 13px; padding: 19px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.question-card > p { margin: 0 0 14px; color: var(--ink); font-size: .82rem; font-weight: 750; }
.question-card > p span { width: 27px; height: 27px; display: inline-grid; place-items: center; margin-right: 8px; border-radius: 50%; color: var(--navy-700); background: var(--blue-100); font-size: .62rem; }
.answer-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer label { min-height: 48px; display: grid; place-content: center; margin: 0; padding: 7px 5px; border: 1px solid #d5dfeb; border-radius: 4px; color: var(--muted); background: #fbfdff; cursor: pointer; text-align: center; }
.answer label strong { font-size: .63rem; }
.answer label small { display: none; }
.answer input:checked + label { color: white; border-color: var(--navy-700); background: var(--navy-700); box-shadow: 0 7px 15px rgba(23,78,143,.18); }
.review-card { padding: 25px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.review-card h2 { margin: 0 0 15px; color: var(--navy-950); font: 500 1.6rem var(--font-serif); }
.review-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 25px; padding: 16px 0; border-block: 1px solid var(--line); }
.review-summary div span { display: block; color: var(--muted); font-size: .62rem; text-transform: uppercase; }
.review-summary div strong { color: var(--ink); font-size: .77rem; }
.consent-box { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin-top: 20px; padding: 15px; border: 1px solid #cbd8e7; border-radius: 4px; background: var(--blue-50); }
.consent-box input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy-700); }
.consent-box label { margin: 0; color: var(--ink); font-size: .72rem; }
.consent-box button { font: inherit; }
.turnstile-wrap { width: 100%; min-height: 66px; margin-top: 16px; display: flex; align-items: center; overflow: hidden; }
.turnstile-wrap > * { max-width: 100%; }
.protection-status { color: var(--muted); font-size: .68rem; }
.protection-status.error { color: var(--danger); }
.form-error { margin-top: 15px; padding: 11px 14px; border-left: 3px solid var(--danger); color: var(--danger); background: #fff3f1; font-size: .72rem; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

#success-screen { min-height: calc(100vh - 145px); padding: 65px 24px; background: radial-gradient(circle at center top, var(--gold-100), transparent 26rem), var(--blue-50); }
.success-card { max-width: 720px; margin: 0 auto; padding: clamp(34px, 6vw, 65px); border-top: 5px solid var(--gold-500); border-radius: 7px; background: white; box-shadow: var(--shadow); text-align: center; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; color: white; background: var(--success); font-size: 1.5rem; }
.success-card h1 { margin: 0 0 19px; color: var(--navy-950); font: 500 clamp(2.4rem, 5vw, 3.5rem)/1.1 var(--font-serif); }
.success-card > p { color: var(--muted); font-size: .86rem; }
.success-card > p strong { color: var(--navy-900); }
.success-actions { display: flex; justify-content: center; gap: 10px; margin: 28px 0 20px; }
.success-card > small { color: var(--muted); font-size: .63rem; }

dialog { width: min(calc(100% - 32px), 700px); max-height: calc(100vh - 48px); padding: clamp(25px, 5vw, 48px); border: 0; border-radius: 7px; color: var(--ink); box-shadow: 0 30px 100px rgba(3,26,56,.3); }
dialog::backdrop { background: rgba(3,26,56,.75); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; right: 16px; top: 12px; padding: 5px 10px; border: 0; color: var(--navy-900); background: transparent; cursor: pointer; font-size: 1.8rem; }
dialog h2 { margin: 0 0 20px; color: var(--navy-950); font: 500 2rem/1.2 var(--font-serif); }
.privacy-content { max-height: 58vh; overflow: auto; padding-right: 12px; }
.privacy-content h3 { margin: 19px 0 4px; color: var(--navy-900); font-size: .8rem; }
.privacy-content p { margin: 0; color: var(--muted); font-size: .73rem; }
.privacy-content a { color: var(--navy-700); }

.diag-footer { min-height: 61px; display: flex; justify-content: space-between; gap: 25px; align-items: center; padding: 12px clamp(18px, 5vw, 72px); color: #b9c8d9; background: var(--navy-950); font-size: .65rem; }
.diag-footer strong { color: white; letter-spacing: .12em; }

@media (max-width: 900px) {
  .diag-header > p { display: none; }
  .diag-language { margin-left: auto; }
  .welcome-shell { grid-template-columns: 1fr; gap: 38px; }
  #form-screen.active { display: block; }
  .wizard-nav { padding: 12px 18px; }
  .wizard-brandline, .privacy-summary { display: none; }
  #step-nav { display: flex; gap: 5px; overflow: auto; }
  .step-item { flex: 0 0 auto; padding: 3px; }
  .step-item span { display: none; }
  .wizard-main { padding-top: 30px; }
}

@media (max-width: 620px) {
  .diag-header { min-height: 72px; gap: 10px; padding-inline: 12px; }
  .diag-brand { min-width: 0; gap: 8px; }
  .diag-brand img { width: 47px; height: 47px; }
  .diag-brand strong { font-size: .88rem; letter-spacing: .11em; }
  .diag-brand small { font-size: .52rem; letter-spacing: .21em; }
  .diag-language { flex: 0 0 auto; padding: 6px 9px; font-size: .68rem; }
  .back-link { flex: 0 0 auto; }
  .back-link { font-size: 0; }
  .back-link::after { content: "Retour"; font-size: .72rem; }
  .welcome-shell { width: min(calc(100% - 28px), 1250px); padding: 43px 0 55px; }
  .welcome-copy h1 { font-size: clamp(2.25rem, 11vw, 2.7rem); }
  .scope-list { grid-template-columns: repeat(2, 1fr); }
  .wizard-main { padding: 27px 15px 55px; }
  .field-grid, .review-summary { grid-template-columns: 1fr; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer label { min-height: 43px; display: flex; justify-content: space-between; padding: 7px 10px; text-align: left; }
  .answer label small { display: block; font-size: .58rem; font-weight: 500; opacity: .78; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .button { width: 100%; }
  .success-actions { flex-direction: column; }
  .diag-footer { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media (max-width: 420px) {
  .diag-header {
    min-height: 66px;
    gap: 7px;
    padding-inline: 9px;
  }

  .diag-brand {
    margin-right: auto;
  }

  .diag-brand img {
    width: 40px;
    height: 40px;
  }

  .diag-brand strong {
    font-size: .78rem;
    letter-spacing: .07em;
  }

  .diag-brand small {
    display: none;
  }

  .diag-language {
    margin-left: 0;
    padding: 5px 7px;
    font-size: .64rem;
  }

  .back-link::after {
    content: "Site";
    font-size: .68rem;
  }

  .welcome-shell {
    width: calc(100% - 20px);
    padding-top: 36px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.05rem, 10.5vw, 2.4rem);
  }

  .scope-list {
    grid-template-columns: 1fr;
  }

  .welcome-card,
  .success-card {
    padding: 27px 19px;
  }

  .wizard-nav {
    padding-inline: 10px;
  }

  .wizard-main {
    padding-inline: 10px;
  }

  .step-heading h1 {
    font-size: clamp(1.95rem, 10vw, 2.45rem);
  }

  .question-card,
  .review-card {
    padding: 16px 13px;
  }

  .consent-box {
    padding: 13px 10px;
  }

  dialog {
    width: calc(100% - 18px);
    padding: 28px 18px;
  }

  .diag-footer {
    overflow-wrap: anywhere;
  }
}

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