/* ==========================================================================
   AIMI Design System v2 — static/aimi/aimi.css
   Baromètre AIMI 2026 · kemil.fr
   Direction : moderne / premium / lumineux (réf. visitors.now, limitless)
   Clair, chaleureux, sans-serif arrondie, accent violet, pilules, beaucoup d'air.
   Stack : Jinja2 + CSS vanilla · Chart.js vendorisé · Mobile-first
   ========================================================================== */

/* Onest : sans-serif moderne, chaleureuse, premium (Google Fonts, fiable) */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

:root {
  /* — Surfaces : clair, chaleureux — */
  --ink:           #181925;   /* near-black headings */
  --ink-soft:      #3A3B47;
  --muted:         #6B6B76;   /* texte secondaire */
  --faint:         #9A9AA4;   /* labels, placeholders */
  --line:          rgba(20,21,30,0.08);
  --line-strong:   rgba(20,21,30,0.14);
  --fill:          rgba(20,21,30,0.035);   /* boutons/cartes subtils */
  --fill-hover:    rgba(20,21,30,0.06);
  --bg:            #FFFFFF;
  --bg-alt:        #F6F6F8;   /* sections alternées */
  --bg-warm:       #FBFAF9;
  --card:          #FFFFFF;

  /* — Accent primaire TEAL / petrol (santé moderne) — */
  --accent:        #0D9488;   /* teal */
  --accent-hover:  #0B7E73;
  --accent-soft:   rgba(13,148,136,0.10);
  --accent-line:   rgba(13,148,136,0.24);
  --cyan:          #22D3EE;   /* partenaire de gradient */
  /* — Accent secondaire VIOLET (signe le côté IA) — */
  --violet:        #7C5CFF;
  --violet-soft:   rgba(124,92,255,0.12);
  --blue:          #2C78FC;
  --blue-soft:     rgba(44,120,252,0.08);
  /* Aurora santé (teal → cyan) pour les héros */
  --aurora: radial-gradient(120% 120% at 50% 0%, rgba(13,148,136,0.20) 0%, rgba(34,211,238,0.12) 35%, rgba(255,255,255,0) 70%);

  /* — Statuts (tons doux, pas de feux tricolores agressifs) — */
  --ok-bg:   #ECFDF3;  --ok-fg:   #047857;  --ok-dot:  #10B981;
  --warn-bg: #FFF7ED;  --warn-fg: #B45309;  --warn-dot:#F59E0B;
  --bad-bg:  #FEF2F2;  --bad-fg:  #B91C1C;  --bad-dot: #EF4444;
  --pre-bg:  #F4F4F6;  --pre-fg:  #6B6B76;  --pre-dot: #9A9AA4;

  --gap-over-bg:  #F3F0FF; --gap-over-fg:  #5B3FD6;
  --gap-align-bg: #ECFDF3; --gap-align-fg: #047857;
  --gap-under-bg: #FFF7ED; --gap-under-fg: #B45309;

  /* — Typo — */
  --font: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --t-xs: 0.75rem; --t-sm: 0.875rem; --t-base: 1rem; --t-md: 1.125rem;
  --t-lg: 1.375rem; --t-xl: 1.75rem; --t-2xl: 2.25rem; --t-3xl: 3rem; --t-4xl: 3.75rem;

  /* — Espacement — */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.25rem;
  --s6: 1.5rem; --s8: 2rem; --s10: 2.5rem; --s12: 3rem; --s16: 4rem; --s20: 5rem; --s24: 6rem;

  /* — Rayons : généreux, pilules — */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* — Ombres douces, premium — */
  --sh-xs: 0 1px 2px rgba(20,21,30,0.04);
  --sh-sm: 0 2px 8px rgba(20,21,30,0.05), 0 1px 2px rgba(20,21,30,0.04);
  --sh-md: 0 8px 24px rgba(20,21,30,0.07), 0 2px 6px rgba(20,21,30,0.04);
  --sh-lg: 0 18px 48px rgba(20,21,30,0.10), 0 6px 16px rgba(20,21,30,0.05);
  --sh-accent: 0 8px 28px rgba(13,148,136,0.32);

  --dur: 200ms; --dur-slow: 420ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --z-sticky: 40; --z-pop: 60; --z-toast: 1000;
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body {
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }

/* — Typo utilitaires — */
.t-xs { font-size: var(--t-xs); } .t-sm { font-size: var(--t-sm); }
.t-base { font-size: var(--t-base); } .t-md { font-size: var(--t-md); }
.t-lg { font-size: var(--t-lg); } .t-xl { font-size: var(--t-xl); }
.t-2xl { font-size: var(--t-2xl); }
.display {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
}
.display .dim { color: var(--faint); }   /* mot dé-emphasé (truc éditorial des réfs) */
.muted { color: var(--muted); }
.overline {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent);
}

/* ── HEADER : nav flottante en pilule ─────────────────────────────────────── */
.aimi-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.aimi-page--alt { background: var(--bg-alt); }

.aimi-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; justify-content: center;
  padding: var(--s4) var(--s4) 0;
  pointer-events: none;
}
.aimi-nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s4);
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--s2) var(--s2) var(--s2) var(--s5);
  box-shadow: var(--sh-sm);
}
.aimi-logo {
  font-weight: 700; font-size: var(--t-md); letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: var(--s2);
}
.aimi-logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: var(--sh-accent); }
.aimi-nav__meta { font-size: var(--t-sm); color: var(--muted); padding-right: var(--s3); }

/* ── Carte centrale (préambule, légal, rgpd) ──────────────────────────────── */
.aimi-shell { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: var(--s12) var(--s4) var(--s16); }
.aimi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  padding: var(--s10) var(--s8);
  width: 100%; max-width: 600px;
  position: relative; overflow: hidden;
}
.aimi-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 240px;
  background: var(--aurora); pointer-events: none;
}
.aimi-card > * { position: relative; }
@media (min-width: 768px) { .aimi-card { padding: var(--s12) var(--s12); } }

/* ── Pills info ───────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--t-sm); font-weight: 500;
  background: var(--fill); color: var(--ink-soft);
  padding: var(--s2) var(--s4); border-radius: var(--r-pill);
}
.pill--violet { background: var(--accent-soft); color: var(--accent); }
.pill--blue { background: var(--blue-soft); color: var(--blue); }

/* ── Transparence / hint ──────────────────────────────────────────────────── */
.aimi-note {
  background: var(--bg-alt); border-radius: var(--r-md);
  padding: var(--s4) var(--s5); font-size: var(--t-sm);
  color: var(--ink-soft); line-height: 1.6;
}
.aimi-note--warm { background: var(--warn-bg); color: var(--warn-fg); }

/* ── Consentement ─────────────────────────────────────────────────────────── */
.aimi-consent {
  display: flex; align-items: flex-start; gap: var(--s3);
  font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.6; cursor: pointer;
}
.aimi-consent input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.aimi-consent a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: 0 var(--s8);
  font-family: var(--font); font-size: var(--t-base); font-weight: 600;
  letter-spacing: -0.01em;
  border: none; border-radius: var(--r-pill); cursor: pointer; text-decoration: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; transform: translateY(-1px); }
.btn--ghost { background: var(--fill); color: var(--ink); }
.btn--ghost:hover { background: var(--fill-hover); }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--outline:hover { background: var(--fill); }
.btn--sm { min-height: 40px; padding: 0 var(--s4); font-size: var(--t-sm); }
.btn--full { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.35; cursor: not-allowed; pointer-events: none; box-shadow: none; }

/* ── Progress bar (questionnaire) ─────────────────────────────────────────── */
.aimi-progress {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: var(--s4) var(--s5);
  display: flex; flex-direction: column; gap: var(--s2);
}
.aimi-progress__meta { display: flex; justify-content: space-between; align-items: center; }
.aimi-progress__label { font-size: var(--t-sm); font-weight: 500; color: var(--ink); }
.aimi-progress__time { font-size: var(--t-xs); color: var(--faint); }
.aimi-progress__track { height: 6px; background: var(--fill); border-radius: var(--r-pill); overflow: hidden; }
.aimi-progress__fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width var(--dur-slow) var(--ease); }
.aimi-autosave { font-size: var(--t-xs); color: var(--faint); text-align: right; opacity: 0; transition: opacity var(--dur); }
.aimi-autosave--visible { opacity: 1; }

/* ── Question ─────────────────────────────────────────────────────────────── */
.aimi-q { flex: 1; max-width: 600px; width: 100%; margin: 0 auto; padding: var(--s12) var(--s5) var(--s10); }
.aimi-q__bloc { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s5); }
.aimi-q__id { font-size: var(--t-xs); color: var(--faint); margin-bottom: var(--s2); font-variant-numeric: tabular-nums; }
.aimi-q__text { font-size: var(--t-lg); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); margin-bottom: var(--s8); }
@media (min-width: 768px) { .aimi-q__text { font-size: var(--t-xl); } }
.aimi-q__sub { font-size: var(--t-sm); color: var(--muted); margin-top: calc(-1 * var(--s6)); margin-bottom: var(--s8); line-height: 1.55; }
.aimi-group-title { font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); margin: var(--s6) 0 var(--s3); }

/* ── Tooltip trigger ──────────────────────────────────────────────────────── */
.aimi-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--fill); color: var(--muted);
  font-size: 11px; font-weight: 700; cursor: pointer; vertical-align: middle; margin-left: 4px;
  border: none; transition: background var(--dur), color var(--dur);
}
.aimi-tip:hover, .aimi-tip:focus { background: var(--accent); color: #fff; outline: none; }
.aimi-badge-sensitive {
  display: inline-block; font-size: var(--t-xs); font-weight: 600;
  padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent); vertical-align: middle; margin-left: var(--s2);
}

/* ── Options radio / checkbox (cartes-pilules) ────────────────────────────── */
.aimi-options { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.aimi-option { position: relative; }
.aimi-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.aimi-option__label {
  display: flex; align-items: center; gap: var(--s4);
  min-height: 56px; padding: var(--s4) var(--s5);
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-md); cursor: pointer;
  font-size: var(--t-base); color: var(--ink); line-height: 1.4;
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur), transform var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.aimi-option__label::before {
  content: ''; flex-shrink: 0; width: 22px; height: 22px;
  border-radius: 50%; border: 2px solid var(--line-strong); background: var(--card);
  transition: border-color var(--dur), background var(--dur);
}
.aimi-option--checkbox .aimi-option__label::before { border-radius: 7px; }
.aimi-option__label:hover { border-color: var(--accent-line); box-shadow: var(--sh-sm); }
.aimi-option:active .aimi-option__label { transform: scale(0.99); }
.aimi-option input:checked + .aimi-option__label {
  border-color: var(--accent); background: var(--accent-soft);
}
.aimi-option input[type=radio]:checked + .aimi-option__label::before {
  border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px #fff;
}
.aimi-option input[type=checkbox]:checked + .aimi-option__label::before {
  border-color: var(--accent); background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 11px;
}
.aimi-option input:focus-visible + .aimi-option__label { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.aimi-option-other { margin-top: var(--s2); margin-left: 38px; }
.aimi-option-other input {
  width: 100%; padding: var(--s3) var(--s4); font-family: var(--font); font-size: var(--t-sm);
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--bg-alt);
}
.aimi-option-other input:focus { outline: none; border-color: var(--accent); }

/* ── Slider ───────────────────────────────────────────────────────────────── */
.aimi-slider-polarities { display: flex; justify-content: space-between; margin-bottom: var(--s4); }
.aimi-slider-polarities span { font-size: var(--t-sm); max-width: 42%; color: var(--muted); }
.aimi-slider-polarities span:last-child { text-align: right; }
.aimi-slider-wrap { position: relative; padding: var(--s4) 0; }
input[type=range].aimi-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; background: transparent; cursor: pointer; }
input[type=range].aimi-slider::-webkit-slider-runnable-track { height: 10px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), var(--cyan)); }
input[type=range].aimi-slider::-moz-range-track { height: 10px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), var(--cyan)); }
input[type=range].aimi-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: none; box-shadow: var(--sh-md); margin-top: -10px; transition: transform var(--dur); }
input[type=range].aimi-slider::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: none; box-shadow: var(--sh-md); }
input[type=range].aimi-slider:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type=range].aimi-slider:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 6px; border-radius: var(--r-pill); }
.aimi-slider-labels { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--faint); margin-top: var(--s2); }
.aimi-slider-value { text-align: center; margin-top: var(--s4); font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.03em; color: var(--accent); }

/* ── Textarea ─────────────────────────────────────────────────────────────── */
.aimi-textarea {
  width: 100%; min-height: 130px; padding: var(--s4) var(--s5);
  font-family: var(--font); font-size: var(--t-base); color: var(--ink);
  background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: var(--r-md);
  resize: none; line-height: 1.6; field-sizing: content;
  transition: border-color var(--dur), background var(--dur);
}
.aimi-textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
.aimi-textarea-footer { display: flex; justify-content: flex-end; margin-top: var(--s2); font-size: var(--t-xs); color: var(--faint); }
.aimi-textarea-counter--warning { color: var(--warn-fg); }
.aimi-hint-card { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s4); margin-top: var(--s3); font-size: var(--t-xs); color: var(--muted); line-height: 1.6; }

/* ── Nav bas questionnaire ────────────────────────────────────────────────── */
.aimi-navbar {
  position: sticky; bottom: 0; z-index: var(--z-sticky);
  background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: var(--s4) var(--s5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
}
.aimi-skip { font-size: var(--t-sm); color: var(--faint); text-decoration: underline; cursor: pointer; background: none; border: none; }
.aimi-skip:hover { color: var(--muted); }

/* ── Tooltip flottant ─────────────────────────────────────────────────────── */
.aimi-tooltip {
  position: absolute; z-index: var(--z-pop);
  background: var(--ink); color: #fff; font-size: var(--t-sm); line-height: 1.6;
  padding: var(--s3) var(--s4); border-radius: var(--r-md); max-width: 280px;
  box-shadow: var(--sh-lg); pointer-events: none; opacity: 0; transform: translateY(6px);
  transition: opacity var(--dur), transform var(--dur);
}
.aimi-tooltip--visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ── Badges fiabilité ─────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.badge--green { background: var(--ok-bg); color: var(--ok-fg); } .badge--green::before { background: var(--ok-dot); }
.badge--yellow { background: var(--warn-bg); color: var(--warn-fg); } .badge--yellow::before { background: var(--warn-dot); }
.badge--white { background: var(--pre-bg); color: var(--pre-fg); } .badge--white::before { background: var(--pre-dot); }

/* ── DASHBOARD ────────────────────────────────────────────────────────────── */
.aimi-dash { min-height: 100dvh; background: var(--bg-alt); }
.aimi-dash__body { max-width: 760px; margin: 0 auto; padding: var(--s8) var(--s4) var(--s16); }

/* En-tête héros */
.dash-hero {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-md);
  padding: var(--s8) var(--s6); margin-bottom: var(--s4);
}
.dash-hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 220px; background: var(--aurora); pointer-events: none; }
.dash-hero > * { position: relative; }
.dash-hero__name { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.035em; color: var(--ink); line-height: 1.05; }
.dash-hero__sub { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s5); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s5) 0; }
.stat {
  background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s4) var(--s5);
  display: flex; flex-direction: column; gap: 2px;
}
.stat__val { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--t-xs); color: var(--muted); }

/* Cartes de section */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  padding: var(--s6); margin-bottom: var(--s4);
}
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.card__title { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
.card__sub { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }

/* Score héros */
.score { text-align: center; padding: var(--s6) 0 var(--s4); }
.score__val { font-size: var(--t-4xl); font-weight: 800; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.score__max { font-size: var(--t-xl); font-weight: 600; color: var(--faint); }
.score__level { display: inline-block; margin-top: var(--s3); font-size: var(--t-md); font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: var(--s2) var(--s5); border-radius: var(--r-pill); }

/* Barre de niveaux */
.levels { display: flex; gap: 4px; margin: var(--s5) 0 var(--s2); }
.levels__seg { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--fill); }
.levels__seg--active { background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.levels__seg--past { background: var(--accent-line); }
.levels__labels { display: flex; justify-content: space-between; }
.levels__labels span { font-size: 10px; color: var(--faint); flex: 1; text-align: center; }

/* Tableau dimensions */
.dims { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s6); }
.dim { display: grid; grid-template-columns: 1fr 90px auto; align-items: center; gap: var(--s4); padding: var(--s3); border-radius: var(--r-sm); transition: background var(--dur); }
.dim:hover { background: var(--bg-alt); }
.dim__name { font-size: var(--t-sm); color: var(--ink-soft); }
.dim__track { height: 6px; background: var(--fill); border-radius: var(--r-pill); overflow: hidden; }
.dim__bar { height: 100%; border-radius: var(--r-pill); background: var(--accent); }
.dim__bar--warm { background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.dim__val { font-size: var(--t-sm); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }

.benchmark-note { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s4); font-size: var(--t-xs); color: var(--muted); line-height: 1.6; margin-top: var(--s5); }

/* KPI cards (douces, claires) */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s4) 0; }
.kpi { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s1); }
.kpi__val { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi__label { font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }

/* Perception gap */
.gap { border-radius: var(--r-md); padding: var(--s5); display: flex; align-items: flex-start; gap: var(--s4); }
.gap--over { background: var(--gap-over-bg); color: var(--gap-over-fg); }
.gap--aligned { background: var(--gap-align-bg); color: var(--gap-align-fg); }
.gap--under { background: var(--gap-under-bg); color: var(--gap-under-fg); }
.gap__val { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1; flex-shrink: 0; }
.gap__text { font-size: var(--t-sm); line-height: 1.55; }

/* Sections verrouillées */
.locked { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); margin-bottom: var(--s4); min-height: 230px; }
.locked__preview { filter: blur(7px); opacity: 0.55; pointer-events: none; user-select: none; padding: var(--s6); }
.locked__overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--s6); background: linear-gradient(to top, #fff 0%, rgba(255,255,255,0.86) 45%, rgba(255,255,255,0.2) 100%); }
.unlock { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: var(--s6) var(--s8); max-width: 340px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.unlock__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.unlock__icon svg { width: 22px; height: 22px; }
.unlock__title { font-size: var(--t-md); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.unlock__desc { font-size: var(--t-sm); color: var(--muted); line-height: 1.55; }
.unlock__notify { font-size: var(--t-xs); color: var(--faint); }

/* Quick wins */
.qw { display: flex; gap: var(--s4); padding: var(--s5); background: var(--bg-alt); border-radius: var(--r-md); align-items: flex-start; }
.qw__num { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: var(--sh-accent); }
.qw__tag { font-size: var(--t-xs); color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.qw__text { font-size: var(--t-sm); color: var(--ink); line-height: 1.55; }

/* Verbatims */
.verbatim { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s4) var(--s5); font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.6; font-style: italic; }

/* CTA */
.cta { position: relative; overflow: hidden; background: var(--ink); border-radius: var(--r-xl); padding: var(--s10) var(--s6); margin-top: var(--s8); text-align: center; color: #fff; }
.cta::before { content: ''; position: absolute; inset: auto 0 0; height: 200px; background: radial-gradient(100% 100% at 50% 100%, rgba(13,148,136,0.55) 0%, rgba(34,211,238,0.20) 45%, transparent 75%); pointer-events: none; }
.cta > * { position: relative; }
.cta__pre { font-size: var(--t-xs); color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s3); }
.cta__text { font-size: var(--t-md); color: rgba(255,255,255,0.92); line-height: 1.6; max-width: 480px; margin: 0 auto var(--s6); }
.cta .btn--primary { background: #fff; color: var(--ink); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
.cta .btn--primary:hover { background: #fff; }
.cta .btn--outline { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.35); }
.cta .btn--outline:hover { background: rgba(255,255,255,0.1); }

/* Partage direction (capture CEO) */
.share-dir { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s8); padding: var(--s5) var(--s6); border-radius: var(--r-xl); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); border-left: 4px solid var(--accent); }
.share-dir__txt { flex: 1 1 280px; }
.share-dir__title { font-weight: 650; font-size: var(--t-md); color: var(--ink); margin-bottom: var(--s1); }
.share-dir__sub { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.55; margin: 0; }
.share-dir .btn { flex: 0 0 auto; white-space: nowrap; }

/* ── Page résultats (M7) ──────────────────────────────────────────────────── */
.results-hero { position: relative; overflow: hidden; text-align: center; padding: var(--s20) var(--s6) var(--s16); background: var(--card); }
.results-hero::before { content: ''; position: absolute; inset: 0; background: var(--aurora); pointer-events: none; }
.results-hero > * { position: relative; }
.results-hero__eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.results-hero__level { font-size: var(--t-4xl); font-weight: 800; letter-spacing: -0.04em; color: var(--ink); line-height: 1.05; margin: var(--s2) 0; }
.results-hero__score { font-size: var(--t-lg); font-weight: 600; color: var(--muted); }
.results-hero__disclaimer { font-size: var(--t-xs); color: var(--faint); font-style: italic; max-width: 340px; margin: var(--s4) auto 0; line-height: 1.55; }

.resources { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
@media (min-width: 768px) { .resources { grid-template-columns: repeat(3, 1fr); } }
.resource { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); transition: transform var(--dur), box-shadow var(--dur); }
.resource:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.resource__tag { align-self: flex-start; font-size: var(--t-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: var(--r-pill); }
.resource__title { font-size: var(--t-base); font-weight: 600; letter-spacing: -0.01em; }
.resource__desc { font-size: var(--t-sm); color: var(--muted); line-height: 1.55; }
.resource__link { font-size: var(--t-sm); font-weight: 600; color: var(--accent); text-decoration: none; }

.uuid-block { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s5); margin: var(--s6) 0; }
.uuid-block__title { font-size: var(--t-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--s2); }
.uuid-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.uuid-code { font-family: var(--mono); font-size: var(--t-sm); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s2) var(--s3); word-break: break-all; }
.uuid-note { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s3); line-height: 1.55; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.aimi-footer { padding: var(--s8) var(--s6); text-align: center; font-size: var(--t-xs); color: var(--faint); }
.aimi-footer a { color: var(--muted); text-decoration: none; }
.aimi-footer a:hover { color: var(--ink); }
.aimi-footer__brand { margin-top: var(--s2); }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.rise { animation: rise var(--dur-slow) var(--ease) both; }
.d1 { animation-delay: 60ms; } .d2 { animation-delay: 120ms; } .d3 { animation-delay: 180ms; } .d4 { animation-delay: 240ms; } .d5 { animation-delay: 300ms; }
.q-enter { animation: qin var(--dur) var(--ease) both; }
.q-enter--back { animation: qinb var(--dur) var(--ease) both; }
@keyframes qin { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }
@keyframes qinb { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 3px; border-radius: var(--r-sm); }
.skip-link { position: absolute; top: -100px; left: var(--s4); background: var(--accent); color: #fff; padding: var(--s2) var(--s4); border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 600; text-decoration: none; z-index: var(--z-toast); transition: top var(--dur); }
.skip-link:focus { top: var(--s4); }

/* ==========================================================================
   WOW ENTRANCE — page d'arrivée du questionnaire
   Aurora mesh animée + orbe morphant + carte glass + révélation en cascade
   Pur CSS (60fps), réf. Stripe/Linear/Auros
   ========================================================================== */

@property --orb-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.wow {
  position: relative;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s12) var(--s4);
  overflow: hidden;
  background: #FBFAFF;
}

/* — Aurora mesh : 4 gradients radiaux qui dérivent lentement — */
.wow-aurora {
  position: absolute; inset: -20%;
  z-index: 0; pointer-events: none; filter: blur(40px);
  background:
    radial-gradient(38% 42% at 22% 28%, rgba(13,148,136,0.55), transparent 70%),
    radial-gradient(34% 38% at 78% 22%, rgba(34,211,238,0.45), transparent 70%),
    radial-gradient(42% 46% at 68% 78%, rgba(94,140,255,0.42), transparent 72%),
    radial-gradient(36% 40% at 28% 82%, rgba(168,120,255,0.40), transparent 72%);
  animation: aurora-drift 22s var(--ease) infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  33%  { transform: translate3d(3%, -2%, 0) scale(1.08) rotate(2deg); }
  66%  { transform: translate3d(-2%, 3%, 0) scale(1.04) rotate(-2deg); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.1) rotate(1deg); }
}

/* — Orbe central morphant (sous la carte) — */
.wow-orb {
  position: absolute; z-index: 0; width: min(560px, 86vw); aspect-ratio: 1;
  top: 50%; left: 50%; translate: -50% -50%;
  pointer-events: none; opacity: 0.9;
  background: conic-gradient(from var(--orb-a), #0D9488, #22D3EE, #5E8CFF, #2DD4BF, #0D9488);
  filter: blur(58px) saturate(125%);
  border-radius: 47% 53% 44% 56% / 54% 42% 58% 46%;
  animation: orb-morph 14s ease-in-out infinite, orb-spin 28s linear infinite;
}
@keyframes orb-morph {
  0%,100% { border-radius: 47% 53% 44% 56% / 54% 42% 58% 46%; transform: scale(1); }
  50%     { border-radius: 58% 42% 60% 40% / 42% 58% 42% 58%; transform: scale(1.06); }
}
@keyframes orb-spin { to { --orb-a: 360deg; } }

/* — Grain subtil pour la profondeur premium — */
.wow::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* — Carte glass flottante — */
.wow-card {
  position: relative; z-index: 2; width: 100%; max-width: 560px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(80,50,180,0.18), 0 8px 24px rgba(80,50,180,0.10), inset 0 1px 0 rgba(255,255,255,0.9);
  padding: var(--s10) var(--s8);
}
@media (min-width: 768px) { .wow-card { padding: var(--s12); } }

/* — Révélation en cascade (ressort) — */
.reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); animation: reveal 0.9s var(--ease) forwards; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.reveal.r1 { animation-delay: 0.15s; } .reveal.r2 { animation-delay: 0.30s; }
.reveal.r3 { animation-delay: 0.45s; } .reveal.r4 { animation-delay: 0.60s; }
.reveal.r5 { animation-delay: 0.75s; } .reveal.r6 { animation-delay: 0.90s; }
.reveal.r7 { animation-delay: 1.05s; }

/* — Titre : révélation par masque (clip) + montée — */
.wow-title { font-size: clamp(2.25rem, 8vw, 3.25rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; color: var(--ink); }
.wow-title .dim { color: var(--accent); }
.wow-title .line { display: block; overflow: hidden; }
.wow-title .line > span { display: block; transform: translateY(110%); animation: line-up 0.95s var(--ease) forwards; }
.wow-title .line:nth-child(1) > span { animation-delay: 0.25s; }
.wow-title .line:nth-child(2) > span { animation-delay: 0.38s; }
@keyframes line-up { to { transform: translateY(0); } }

/* — Bouton héros : halo pulsé + sheen au survol — */
.btn--hero { position: relative; overflow: hidden; height: 56px; font-size: var(--t-md); }
.btn--hero::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
}
.btn--hero:hover::after { animation: sheen 0.9s var(--ease); }
@keyframes sheen { to { left: 130%; } }
.btn--hero.pulse { animation: hero-pulse 2.6s ease-in-out infinite; }
@keyframes hero-pulse {
  0%,100% { box-shadow: 0 8px 28px rgba(13,148,136,0.32); }
  50%     { box-shadow: 0 8px 38px rgba(13,148,136,0.58); }
}

@media (prefers-reduced-motion: reduce) {
  .wow-aurora, .wow-orb { animation: none; }
  .reveal, .wow-title .line > span { animation: none !important; opacity: 1; transform: none; filter: none; }
}

/* ==========================================================================
   SPARKLES ENTRANCE — page d'accueil du sondage (réf. Aceternity Sparkles)
   Fond noir, champ de particules scintillantes, ligne lumineuse, masque radial.
   ========================================================================== */

.spark {
  position: relative; min-height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s12) var(--s4);
  background: #000;
  color: #fff;
}
/* Canvas plein écran des particules */
.spark-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* Masque radial : concentre les particules au centre, fond noir sur les bords */
.spark-mask {
  /* Éventail depuis le trait : révèle les particules sous la ligne, fondu aux bords (style Aceternity) */
  position: absolute; inset: 0; z-index: 1; pointer-events: none; background: #000;
  -webkit-mask-image: radial-gradient(55% 48% at 50% 44%, transparent 8%, #000 70%);
  mask-image: radial-gradient(55% 48% at 50% 44%, transparent 8%, #000 70%);
}

.spark-inner { position: relative; z-index: 2; width: 100%; max-width: 600px; text-align: center; }

/* Overline */
.spark-eyebrow {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* Titre géant blanc — deux lignes propres, jamais de casse au trait d'union */
.spark-title {
  font-size: clamp(2.1rem, 8.5vw, 4.25rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.0;
  margin: var(--s4) 0 0;
  color: #fff;
}
.spark-title .ln { display: block; white-space: nowrap; }
.spark-sub { margin-top: var(--s6); font-size: var(--t-sm); color: rgba(255,255,255,0.45); letter-spacing: 0.02em; }
.spark-title .grad {
  background: linear-gradient(90deg, #2DD4BF, #22D3EE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Ligne lumineuse signature (indigo large + cyan étroite, fondue aux bords) */
.spark-lines { position: relative; width: min(30rem, 86vw); height: 26px; margin: var(--s5) auto 0; }
.spark-lines i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.spark-lines .l-wide  { width: 75%; height: 2px; filter: blur(2px); background: linear-gradient(90deg, transparent, #0D9488, transparent); }
.spark-lines .l-wide2 { width: 75%; height: 1px;                 background: linear-gradient(90deg, transparent, #0D9488, transparent); }
.spark-lines .l-thin  { width: 28%; height: 5px; filter: blur(2px); background: linear-gradient(90deg, transparent, #5EC8FF, transparent); }
.spark-lines .l-thin2 { width: 28%; height: 1px;                 background: linear-gradient(90deg, transparent, #5EC8FF, transparent); }

/* Étape 2 : disclaimer épuré + consentement (carte dark glass) */
.spark-gate {
  position: relative; z-index: 2; width: 100%; max-width: 480px; margin: var(--s8) auto 0;
  text-align: center;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-xl);
  padding: var(--s8);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.spark-gate__obj { font-size: var(--t-md); color: rgba(255,255,255,0.85); line-height: 1.6; margin-bottom: var(--s6); }
.spark-gate__obj strong { color: #fff; }
.spark-consent { display: flex; align-items: flex-start; gap: var(--s3); text-align: left; font-size: var(--t-sm); color: rgba(255,255,255,0.6); line-height: 1.55; cursor: pointer; margin-bottom: var(--s6); }
.spark-consent input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.spark-consent a { color: #2DD4BF; text-decoration: none; }
.spark-back { margin-top: var(--s4); background: none; border: none; color: rgba(255,255,255,0.4); font-size: var(--t-sm); cursor: pointer; }
.spark-back:hover { color: rgba(255,255,255,0.7); }
.spark-foot { position: relative; z-index: 2; margin-top: var(--s8); font-size: var(--t-xs); color: rgba(255,255,255,0.35); text-align: center; }
.spark-foot a { color: rgba(255,255,255,0.5); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { .spark-canvas { opacity: 0.5; } }

/* ==========================================================================
   DASHBOARD v2 — KPI cards dashboard-grade, jauge, grilles (senior-ui-ux)
   ========================================================================== */
.aimi-dash__body--wide { max-width: 900px; }
@media (min-width: 960px) { .aimi-dash__body--wide { padding-left: var(--s6); padding-right: var(--s6); } }

.dash-hero--v2 { padding: var(--s6); }
.dash-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.dash-hero__eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2); }
.dash-hero__name { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.035em; color: var(--ink); line-height: 1.05; }
.dash-meta-row { display: flex; gap: var(--s5); flex-wrap: wrap; align-items: center; }
.dash-meta { display: flex; align-items: center; gap: var(--s2); }
.dash-meta__icon { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; }
.dash-meta__val { font-size: var(--t-md); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-meta__label { font-size: var(--t-xs); color: var(--muted); }
.dash-unlock-hint { display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s4); font-size: var(--t-xs); color: var(--muted); background: var(--bg-alt); border-radius: var(--r-pill); padding: var(--s2) var(--s4); }
.dash-unlock-hint svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--faint); }
.dash-unlock-hint strong { color: var(--ink-soft); }

.kpi-band { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin-bottom: var(--s4); }
@media (min-width: 600px) { .kpi-band { grid-template-columns: repeat(4, 1fr); } }

.kpi-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s1); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.kpi-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.kpi-card__overline { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); line-height: 1.2; }
.kpi-card__val { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: var(--s1); }
.kpi-card__unit { font-size: var(--t-sm); font-weight: 600; color: var(--faint); letter-spacing: 0; }
.kpi-card__sub { font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }
.kpi-card__detail { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s1); }
.kpi-card__detail--warn { color: var(--warn-fg); font-weight: 600; }
.kpi-card__bar-wrap { display: flex; gap: 3px; margin-top: var(--s3); }
.kpi-card__bar-seg { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--fill); transition: background var(--dur-slow); }
.kpi-card__bar-seg--filled { background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.kpi-card--hero { background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(34,211,238,0.07) 100%); border-color: var(--accent-line); }
.kpi-card--hero .kpi-card__overline { color: var(--accent); }
.kpi-card--hero .kpi-card__val { color: var(--accent); }
.kpi-card--gap-over { background: var(--gap-over-bg); border-color: rgba(91,63,214,0.18); }
.kpi-card--gap-over .kpi-card__overline { color: var(--gap-over-fg); }
.kpi-card--gap-over .kpi-card__val { color: var(--gap-over-fg); }
.kpi-card--gap-aligned { background: var(--gap-align-bg); border-color: rgba(4,120,87,0.18); }
.kpi-card--gap-aligned .kpi-card__overline { color: var(--gap-align-fg); }
.kpi-card--gap-aligned .kpi-card__val { color: var(--gap-align-fg); }
.kpi-card--gap-under { background: var(--gap-under-bg); border-color: rgba(180,83,9,0.18); }
.kpi-card--gap-under .kpi-card__overline { color: var(--gap-under-fg); }
.kpi-card--gap-under .kpi-card__val { color: var(--gap-under-fg); }
.kpi-card--shadow .kpi-card__val { color: var(--bad-fg); }
.kpi-card__val--compliance { font-size: var(--t-xl); font-weight: 700; }
.kpi-card--locked-mini { background: var(--bg-alt); border-color: var(--line); opacity: 0.65; }
.kpi-card__val--locked { color: var(--faint); }
.kpi-card__bar-linear { height: 4px; background: var(--fill); border-radius: var(--r-pill); margin-top: var(--s3); overflow: hidden; }
.kpi-card__bar-linear-fill { height: 100%; border-radius: var(--r-pill); background: var(--accent); transition: width 0.8s var(--ease); }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (min-width: 640px) { .kpi-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.kpi-card--inline { background: var(--bg-alt); border: none; box-shadow: none; }
.kpi-card--inline:hover { background: var(--fill-hover); transform: none; box-shadow: none; }

.dash-grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--s6); padding: var(--s6); }
@media (min-width: 768px) { .dash-grid-2 { grid-template-columns: 1fr 1fr; padding: var(--s8); } }
.dash-grid-2__left, .dash-grid-2__right { display: flex; flex-direction: column; gap: var(--s4); }

.gauge-wrap { position: relative; width: 100%; max-width: 260px; margin: 0 auto; }
.gauge-wrap canvas { width: 100% !important; height: auto !important; }
.gauge-center { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.gauge-center__val { display: block; font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.gauge-center__max { display: block; font-size: var(--t-sm); color: var(--faint); font-weight: 600; }
.gauge-labels { display: flex; justify-content: space-between; margin-top: var(--s2); padding: 0 var(--s1); }
.gauge-labels span { font-size: 9px; color: var(--faint); text-align: center; flex: 1; letter-spacing: 0; }

.score-split { display: flex; align-items: stretch; background: var(--bg-alt); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.score-split__item { flex: 1; padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: 2px; }
.score-split__overline { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.score-split__overline--pink { color: var(--cyan); }
.score-split__val { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.score-split__label { font-size: var(--t-xs); color: var(--muted); line-height: 1.4; }
.score-split__div { width: 1px; background: var(--line); flex-shrink: 0; }

.radar-wrap { width: 100%; height: 300px; display: flex; align-items: center; justify-content: center; }
.section-sep { height: 1px; background: var(--line); margin: var(--s5) 0; }
.section-label { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2); }
.dims--compact .dim { padding: var(--s2) var(--s3); }

.gap-viz { border-radius: var(--r-md); padding: var(--s5) var(--s6); display: flex; gap: var(--s5); align-items: flex-start; flex-wrap: wrap; }
.gap-viz.gap--over { background: var(--gap-over-bg); }
.gap-viz.gap--aligned { background: var(--gap-align-bg); }
.gap-viz.gap--under { background: var(--gap-under-bg); }
.gap-viz__score { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; min-width: 70px; }
.gap-viz__val { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink); }
.gap--over .gap-viz__val { color: var(--gap-over-fg); }
.gap--aligned .gap-viz__val { color: var(--gap-align-fg); }
.gap--under .gap-viz__val { color: var(--gap-under-fg); }
.gap-viz__unit { font-size: var(--t-xs); color: var(--muted); font-weight: 500; }
.gap-viz__body { flex: 1; min-width: 200px; }
.gap-viz__label { font-weight: 700; font-size: var(--t-base); margin-bottom: var(--s2); color: var(--ink); }
.gap-viz__text { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.6; margin-bottom: var(--s4); }
.gap-viz__bars { display: flex; flex-direction: column; gap: var(--s3); }
.gap-viz__bar-row { display: grid; grid-template-columns: 60px 1fr 36px; align-items: center; gap: var(--s3); }
.gap-viz__bar-label { font-size: var(--t-xs); color: var(--muted); font-weight: 500; white-space: nowrap; }
.gap-viz__track { height: 8px; background: rgba(20,21,30,0.08); border-radius: var(--r-pill); overflow: hidden; }
.gap-viz__fill { height: 100%; border-radius: var(--r-pill); transition: width 0.8s var(--ease); }
.gap-viz__fill--dir { background: var(--accent); }
.gap-viz__fill--team { background: var(--cyan); }
.gap-viz__bar-num { font-size: var(--t-xs); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }

.qw-list { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .qw-list { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.qw--v2 { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s5); border: 1px solid var(--line); transition: box-shadow var(--dur), transform var(--dur); }
.qw--v2:hover { box-shadow: var(--sh-sm); transform: translateY(-1px); }
.qw__body { flex: 1; }

.verbatim-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 640px) { .verbatim-grid { grid-template-columns: 1fr 1fr; } }
.verbatim--v2 { background: var(--bg-alt); border-radius: var(--r-md); padding: var(--s5); font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.65; font-style: italic; border: 1px solid var(--line); border-left: 3px solid var(--accent-line); }

/* ── Sélection de rôle (branchement du sondage) ───────────────────────────── */
.role-card {
  display: flex; align-items: center; gap: var(--s4);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s5) var(--s6); text-decoration: none; color: var(--ink);
  box-shadow: var(--sh-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.role-card:hover { border-color: var(--accent); box-shadow: var(--sh-md); transform: translateY(-2px); }
.role-card__icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.role-card__icon svg { width: 24px; height: 24px; }
.role-card__title { font-size: var(--t-md); font-weight: 600; letter-spacing: -0.01em; }
.role-card__sub { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.role-card__arrow { margin-left: auto; font-size: var(--t-lg); color: var(--accent); flex-shrink: 0; }

/* ── Bannière de contrainte principale (Théorie des Contraintes) ───────────── */
.constraint {
  display: flex; gap: var(--s4); align-items: flex-start;
  background: linear-gradient(135deg, #FFF7ED 0%, #FEF2F2 100%);
  border: 1px solid rgba(180,83,9,0.20);
  border-left: 4px solid var(--warn-dot);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  padding: var(--s5) var(--s6); margin-bottom: var(--s4);
}
.constraint__icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--warn-bg); color: var(--warn-fg);
  display: flex; align-items: center; justify-content: center;
}
.constraint__icon svg { width: 22px; height: 22px; }
.constraint__label {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--warn-fg);
}
.constraint__title { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 2px 0 var(--s2); }
.constraint__text { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.6; }
