/* Diagnostics IA — design system aligné sur la vitrine (Practice Graph).
   Titres Bricolage, corps Hanken, libellés/scores/axes en monospace, violet/aqua, aéré. */
:root {
  --ink: #16122e;
  --paper: #fbfaff;
  --card: #FFFFFF;
  --brand: #5062ff;     /* violet Marylink */
  --brand-2: #6f7dff;   /* violet clair */
  --speed: #ed3d74;     /* aqua/rose, accent */
  --good: #0F8A6B;      /* jade, équilibre */
  --muted: #69647f;
  --line: #e9e5f7;
  --line-2: #f4f1ff;
  --risk: #C2410C;
  --r: 16px;
  --rs: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 29, .04), 0 12px 32px -12px rgba(20, 22, 29, .12);
  --shadow-lg: 0 2px 6px rgba(20, 22, 29, .05), 0 40px 80px -28px rgba(80, 98, 255, .26);
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Hanken Grotesk', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .dsp { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; letter-spacing: -.022em; line-height: 1.08; margin: 0; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
a { color: var(--brand); }

/* ── Chrome (barre haute discrète) ───────────────────────────────────────── */
.dx-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 32px);
  background: rgba(244, 245, 248, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.dx-brand { display: flex; align-items: center; gap: 10px; font-family: 'Hanken Grotesk', system-ui, sans-serif; font-weight: 600; font-size: 16px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.dx-brand img { height: 22px; width: auto; }
.dx-top .back { font-family: 'JetBrains Mono'; font-size: 12.5px; color: var(--muted); text-decoration: none; letter-spacing: .02em; }
.dx-top .back:hover { color: var(--ink); }
/* Barre slim cohérente avec le site (logo du site -> accueil, liens menu, CTA) */
.dx-topnav { display: flex; align-items: center; gap: 20px; }
.dx-toplink { font-family: 'Hanken Grotesk', system-ui, sans-serif; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.dx-toplink:hover { color: var(--ink); }
.dx-topcta { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 14px; background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 11px; text-decoration: none; transition: background .15s ease; }
.dx-topcta:hover { background: var(--brand); color: #fff; }
@media (max-width: 560px) { .dx-hide-sm { display: none; } .dx-topnav { gap: 14px; } }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.dx-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }
.dx-stage { min-height: calc(100vh - 52px); display: flex; flex-direction: column; }
.dx-screen { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 5vh, 56px) 0; animation: dxIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dxIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow { font-family: 'JetBrains Mono'; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--speed); }

/* ── Landing ─────────────────────────────────────────────────────────────── */
.dx-hero h1 { font-size: clamp(30px, 6vw, 50px); margin: 18px 0 0; max-width: 14ch; }
.dx-hero .sub { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 46ch; margin: 18px 0 0; }
.dx-hero .thesis { margin-top: 26px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--speed); border-radius: var(--rs); box-shadow: var(--shadow); }
.dx-hero .thesis .mono { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.dx-hero .thesis p { margin: 6px 0 0; font-size: 15.5px; }
.dx-hero .meta { margin-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; font-family: 'JetBrains Mono'; font-size: 12.5px; color: var(--muted); }
.dx-hero .meta span { display: inline-flex; align-items: center; gap: 7px; }
.dx-hero .meta svg { width: 15px; height: 15px; stroke: var(--good); }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; font-size: 16px; padding: 14px 24px; border-radius: 13px; border: 0; cursor: pointer; text-decoration: none; transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, background .2s, border-color .2s; }
.btn.primary { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 8px 26px -8px rgba(80, 98, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(80, 98, 255, .8); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--line-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.lg { padding: 16px 30px; font-size: 17px; }
.dx-ctas { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; }

/* ── Progression questionnaire ───────────────────────────────────────────── */
.dx-prog { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.dx-prog .step { font-family: 'JetBrains Mono'; font-size: 12.5px; color: var(--muted); white-space: nowrap; letter-spacing: .02em; }
.dx-prog .track { flex: 1; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.dx-prog .fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--speed)); border-radius: 4px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }

/* ── Question ────────────────────────────────────────────────────────────── */
.dx-q .stem { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 600; font-size: clamp(23px, 3.9vw, 33px); line-height: 1.18; letter-spacing: -.01em; margin: 0 0 6px; }
.dx-q .help { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.dx-opts { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }
.dx-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 17px 19px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--rs);
  font-family: inherit; font-size: 16px; color: var(--ink); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
}
.dx-opt:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.dx-opt:focus-visible { outline: 3px solid rgba(80, 98, 255, .35); outline-offset: 2px; }
.dx-opt.sel { border-color: var(--brand); background: #f6f6fd; box-shadow: 0 0 0 1px var(--brand) inset; }
.dx-opt .key { flex: none; width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; font-family: 'JetBrains Mono'; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; transition: inherit; }
.dx-opt:hover .key { border-color: var(--brand-2); color: var(--brand); }
.dx-opt.sel .key { background: var(--brand); border-color: var(--brand); color: #fff; }
.dx-opt .lab { flex: 1; }
.dx-opt .hint { font-family: 'JetBrains Mono'; font-size: 11.5px; color: var(--muted); flex: none; }
.dx-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.dx-nav .link { background: none; border: 0; color: var(--muted); font-family: 'JetBrains Mono'; font-size: 13px; cursor: pointer; padding: 8px 0; }
.dx-nav .link:hover { color: var(--ink); }
.dx-nav .link:disabled { opacity: .3; cursor: default; }

/* ── Aperçu (écran 3) ────────────────────────────────────────────────────── */
.dx-preview { text-align: center; }
.dx-preview .verdict { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 600; font-size: clamp(30px, 5.2vw, 46px); letter-spacing: -.01em; margin: 18px 0 4px; }
.dx-preview .teaser { color: var(--muted); max-width: 40ch; margin: 6px auto 0; }
.dx-sig { margin: 28px auto; max-width: 460px; }
.scores { display: flex; gap: 12px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.score-pill { font-family: 'JetBrains Mono'; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 8px 15px; display: inline-flex; gap: 8px; align-items: baseline; }
.score-pill b { font-size: 17px; font-weight: 700; }
.score-pill.a b { color: var(--brand); }
.score-pill.s b { color: var(--speed); }

/* ── Champs (ouvertes, email) ────────────────────────────────────────────── */
.dx-field { margin-bottom: 18px; }
.dx-field label { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 8px; }
.dx-field .req { color: var(--speed); }
.dx-input, .dx-textarea, .dx-select {
  width: 100%; padding: 13px 15px; font-family: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--rs); transition: border-color .15s, box-shadow .15s;
}
.dx-textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.dx-input:focus, .dx-textarea:focus, .dx-select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(80, 98, 255, .12); }
.dx-count { font-family: 'JetBrains Mono'; font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; }
.dx-microcopy { font-size: 13px; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; margin-top: 6px; }
.dx-microcopy svg { width: 15px; height: 15px; stroke: var(--good); flex: none; margin-top: 2px; }
.dx-check { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 14px 0; cursor: pointer; }
.dx-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.dx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .dx-grid2 { grid-template-columns: 1fr; } }

/* code à 6 chiffres */
.dx-code { display: flex; gap: 10px; justify-content: center; margin: 22px 0; }
.dx-code input { width: 48px; height: 60px; text-align: center; font-family: 'JetBrains Mono'; font-size: 26px; font-weight: 600; border: 1.5px solid var(--line); border-radius: var(--rs); background: var(--card); }
.dx-code input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(80, 98, 255, .12); }

/* ── Rapport (écran 7) ───────────────────────────────────────────────────── */
.dx-report { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow); }
.dx-report .head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line-2); margin-bottom: 22px; flex-wrap: wrap; }
.dx-report .verdict { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 600; font-size: clamp(26px, 4.2vw, 36px); letter-spacing: -.01em; }
.dx-report .body p { margin: 0 0 15px; }
.dx-report .body p:first-child { font-size: 17.5px; }
.dx-report .pistes { background: var(--paper); border-radius: var(--rs); padding: 18px 20px; margin: 18px 0; }
.dx-cta-block { margin-top: 28px; text-align: center; }
.dx-cta-block .lead { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 600; font-size: 21px; letter-spacing: -.01em; margin-bottom: 14px; }

/* badges / états résultat */
.badge { font-family: 'JetBrains Mono'; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; padding: 5px 12px; border-radius: 99px; display: inline-block; }
.badge.brand { background: #ecedfa; color: var(--brand); }
.badge.speed { background: #fde7ee; color: var(--speed); }
.badge.good { background: #e4f4ef; color: var(--good); }
.badge.risk { background: #fdeee6; color: var(--risk); }

/* loading / erreurs / vide */
.dx-load { text-align: center; padding: 40px 0; }
.dx-spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: dxSpin .8s linear infinite; margin: 0 auto 16px; }
@keyframes dxSpin { to { transform: rotate(360deg); } }
.dx-err { background: #fdeee6; border: 1px solid #f4c9ab; color: var(--risk); border-radius: var(--rs); padding: 12px 15px; font-size: 14px; margin: 14px 0; }
.dx-proof { font-family: 'JetBrains Mono'; font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 26px; line-height: 1.6; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* invitation */
.dx-invite { background: var(--card); border: 1px dashed var(--line); border-radius: var(--rs); padding: 18px; margin-top: 18px; }
.dx-invite .url { font-family: 'JetBrains Mono'; font-size: 12px; color: var(--brand); word-break: break-all; background: var(--paper); padding: 10px 12px; border-radius: 8px; margin-top: 10px; }

.btn.sm { padding: 9px 16px; font-size: 14px; border-radius: 2px; }

/* 360 : chips d'avancement + bloc manquants */
.dx-blocks { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin: 4px 0 6px; }
.dx-block { font-family: 'JetBrains Mono'; font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line); }
.dx-block.on { color: var(--good); background: #e4f4ef; border-color: transparent; }
.dx-block.off { color: var(--muted); }
.dx-missing { text-align: center; margin: 22px 0; padding: 18px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--rs); }

/* launcher hub */
.dx-launch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .dx-launch { grid-template-columns: 1fr; } }
.dx-lcard { display: flex; flex-direction: column; gap: 8px; padding: 24px 22px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s; }
.dx-lcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dx-lcard .tag { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.dx-lcard h3 { font-size: 20px; line-height: 1.2; margin: 4px 0; }
.dx-lcard p { color: var(--muted); font-size: 14.5px; margin: 0; flex: 1; }
.dx-lcard .go { font-size: 13px; color: var(--brand); font-weight: 600; margin-top: 10px; }

/* signatures */
.sig-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sig-axis-label { font-family: 'JetBrains Mono'; font-size: 10px; fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
