:root {
  /* Couleurs approximées depuis l'identité visuelle fournie - à valider avec les valeurs officielles */
  --purple: #7900ff;
  --purple-dark: #33264f;
  --orange: #f6a51c;
  --lavender: #f1e5ff;
  --cream: #fff8ec;
  --ink: #2f2940;
  --white: #ffffff;
  --border: #ded7e8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--lavender), #ffffff 38%);
}

.page-shell { width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 72px; }
.hero { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.logo { width: 150px; max-height: 110px; object-fit: contain; background: white; border-radius: 20px; padding: 10px; }
.eyebrow { margin: 0 0 6px; color: var(--purple); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; }
.intro { margin: 10px 0 0; opacity: .8; }
.card { background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 24px; padding: 24px; margin-top: 18px; box-shadow: 0 16px 40px rgba(64, 35, 92, .08); }
.warning { border-left: 6px solid var(--orange); }
.warning h3 { margin: 20px 0 8px; font-size: 1.1rem; }
.warning ul { margin: 0 0 12px; padding-left: 20px; }
.warning li { margin-bottom: 6px; line-height: 1.5; }
.contact-footer { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: .88rem; opacity: .8; }
.contact-footer a { color: var(--purple); }
.consent-row { display: flex; gap: 12px; align-items: flex-start; background: var(--cream); padding: 14px; border-radius: 14px; font-weight: 650; }
.consent-row input { width: 20px; height: 20px; accent-color: var(--purple); }
.toggle-row { display: flex; gap: 10px; margin: 10px 0 20px; }
.toggle-btn { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: white; font-weight: 700; font-size: 1rem; cursor: pointer; }
.toggle-btn[aria-pressed="true"] { border-color: var(--purple); background: var(--lavender); box-shadow: inset 0 0 0 2px var(--purple); }
.named-consent-block { margin-top: 4px; }
.named-consent-block h4 { margin: 0 0 8px; }
.named-consent-block p { margin: 0 0 14px; font-size: .92rem; opacity: .85; }
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.contact-fields label { display: block; font-weight: 700; font-size: .88rem; }
.contact-fields input { width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); font: inherit; box-sizing: border-box; }
#consent-error { margin: 10px 0 0; }
#consent-continue { width: 100%; margin-top: 14px; }
.section-title { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.step { flex: 0 0 auto; background: var(--purple); color: white; border-radius: 999px; padding: 7px 10px; font-weight: 800; font-size: .82rem; }
.question { border: 0; border-top: 1px solid var(--border); padding: 22px 0; margin: 0; }
.question:first-child { border-top: 0; }
.question legend { padding: 0; margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; }
#dimension-title:focus, #restitution h2:focus { outline: 2px solid var(--purple); outline-offset: 4px; border-radius: 4px; }
.options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label { display: flex; min-height: 82px; align-items: center; justify-content: center; text-align: center; padding: 10px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; background: white; font-size: .88rem; transition: .15s ease; }
.option input:checked + label { border-color: var(--purple); background: var(--lavender); box-shadow: inset 0 0 0 2px var(--purple); font-weight: 800; }
.primary { border: 0; border-radius: 14px; background: linear-gradient(90deg, var(--purple), #a500df); color: white; padding: 15px 18px; font-size: 1rem; font-weight: 800; cursor: pointer; }
.secondary { border: 1px solid var(--border); border-radius: 14px; background: white; color: var(--ink); padding: 15px 18px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.nav-buttons .primary { flex: 1; }
.status { min-height: 24px; font-weight: 700; }
.status.success { color: #177245; }
.status.error { color: #a32626; }

.table-scroll { overflow-x: auto; }
.score-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.score-table th, .score-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-weight: 400; }
.score-table thead th { font-weight: 800; }
.score-table .total-row th, .score-table .total-row td { font-weight: 800; border-top: 2px solid var(--purple); border-bottom: none; }

.radar-chart { display: flex; justify-content: center; margin: 16px 0 8px; }
.radar-chart svg { width: 100%; max-width: 420px; height: auto; }
.radar-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-axis { stroke: var(--border); stroke-width: 1; }
.radar-data { fill: rgba(121, 0, 255, .22); stroke: var(--purple); stroke-width: 2; }
.radar-dot { fill: var(--purple); }
.radar-label { font-size: 11px; fill: var(--ink); font-weight: 700; }

.action-section { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.action-section .intro { opacity: .75; font-size: .92rem; }
.action-block { background: var(--cream); border-radius: 16px; padding: 16px; margin-top: 14px; }
.action-block h4 { margin: 0 0 6px; }
.action-block p { margin: 0 0 12px; font-size: .9rem; opacity: .85; }
.action-block label { display: block; font-weight: 700; font-size: .88rem; margin-top: 10px; }
.action-block input { width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); font: inherit; box-sizing: border-box; }

@media (max-width: 720px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .options { grid-template-columns: 1fr; }
  .option label { min-height: 52px; justify-content: flex-start; text-align: left; }
  .contact-fields { grid-template-columns: 1fr; }
}
