/* ============ PersonaLab — Design System ============ */
:root {
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #2563eb;
  --grad: linear-gradient(120deg, #7c3aed 0%, #4f46e5 45%, #2563eb 100%);
  --ink: #101019;
  --ink-2: #3d3d4a;
  --muted: #71717e;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --border: rgba(16, 16, 25, 0.08);
  --chart: #2a78d6;
  --chart-soft: #cde2fb;
  --good: #0ca30c;
  --warn: #d03b3b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,16,25,.04), 0 8px 24px rgba(16,16,25,.06);
  --shadow-lg: 0 2px 6px rgba(16,16,25,.06), 0 20px 48px rgba(79,70,229,.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(255,255,255,.82); border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { font-size: 21px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--brand); }
@media (max-width: 720px) { .nav-links a.masquable { display: none; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 24px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(79,70,229,.45); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-lg { padding: 15px 32px; font-size: 16.5px; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; border-radius: 10px; }

/* ---------- Cards & chips ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 99px;
  background: rgba(79,70,229,.09); color: var(--brand);
}
.chip-neutral { background: var(--bg); color: var(--muted); }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- Hero landing ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 500px at 80% -10%, rgba(124,58,237,.55), transparent 60%),
              radial-gradient(900px 500px at 10% 110%, rgba(37,99,235,.5), transparent 60%),
              #0c0e1d;
}
.hero .nav { background: rgba(12,14,29,.6); border-bottom-color: rgba(255,255,255,.08); }
.hero .logo, .hero .nav-links a { color: #fff; }
.hero-content { padding: 92px 0 108px; text-align: center; position: relative; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; max-width: 850px; margin: 22px auto 0; }
.hero h1 .grad { background: linear-gradient(120deg, #c4b5fd, #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.72); max-width: 640px; margin: 22px auto 0; }
.hero-cta { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(24px, 6vw, 72px); justify-content: center; margin-top: 66px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.hero-stats .stat span { font-size: 13.5px; color: rgba(255,255,255,.62); }

/* ---------- Sections landing ---------- */
.section { padding: 84px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-title .chip { margin-bottom: 14px; }
.section-title h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.section-title p { color: var(--muted); margin-top: 12px; font-size: 16.5px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.test-card { padding: 30px; display: flex; flex-direction: column; gap: 14px; transition: transform .15s, box-shadow .15s; }
.test-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.test-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 25px; }
.test-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.test-card .meta { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.test-card p { color: var(--ink-2); font-size: 14.5px; }
.test-card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.test-card ul li { font-size: 14px; color: var(--ink-2); padding-left: 22px; position: relative; }
.test-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.pillar { display: flex; gap: 16px; align-items: flex-start; padding: 22px; }
.pillar .ico { font-size: 24px; }
.pillar h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pillar p { font-size: 14px; color: var(--muted); }

.cta-band { background: var(--grad); border-radius: 24px; color: #fff; text-align: center; padding: 58px 32px; box-shadow: var(--shadow-lg); }
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.85); margin: 12px auto 28px; max-width: 520px; }
.cta-band .btn { background: #fff; color: var(--brand); border: none; }

.footer { border-top: 1px solid var(--border); padding: 36px 0 48px; margin-top: 40px; color: var(--muted); font-size: 13.5px; }
.footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- App ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; padding: 36px 0 72px; }
.screen { display: none; }
.screen.active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Auth */
.auth-box { max-width: 430px; margin: 48px auto; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; font: inherit; font-weight: 600; font-size: 14.5px; padding: 10px; border: none; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--ink); }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 14px 0 18px; }
.consent input { margin-top: 3px; accent-color: var(--brand); }
.form-err { color: var(--warn); font-size: 13.5px; margin: 10px 0; min-height: 18px; }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-head h1 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.dash-head p { color: var(--muted); }
.dash-card { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.dash-card .top { display: flex; align-items: center; gap: 14px; }
.dash-card h3 { font-size: 17.5px; font-weight: 700; }
.dash-card .status { font-size: 13px; color: var(--muted); }
.dash-card .resume-line { font-size: 14px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.dash-card .actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

/* Passation */
.quiz-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.progress-track { flex: 1; height: 8px; border-radius: 4px; background: rgba(79,70,229,.12); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--grad); width: 0; transition: width .35s ease; }
.progress-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.q-item:last-of-type { border-bottom: none; }
.q-text { font-size: 16.5px; font-weight: 600; margin-bottom: 14px; letter-spacing: -.01em; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.likert label {
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  font-size: 11.5px; color: var(--muted); padding: 12px 6px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface);
  transition: border-color .12s, background .12s;
}
.likert label:hover { border-color: var(--brand); }
.likert input { accent-color: var(--brand); width: 17px; height: 17px; }
.likert label.checked { border-color: var(--brand); background: rgba(79,70,229,.07); color: var(--ink); font-weight: 600; }
@media (max-width: 620px) { .likert { grid-template-columns: repeat(5, 1fr); } .likert label { font-size: 9.5px; padding: 9px 2px; } }
.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.warn-msg { color: var(--warn); font-size: 13.5px; margin-top: 12px; display: none; }

/* DISC bloc */
.disc-bloc { padding: 20px 0; border-bottom: 1px solid var(--border); }
.disc-bloc:last-of-type { border-bottom: none; }
.disc-grid { display: grid; grid-template-columns: 1fr 78px 78px; gap: 6px 10px; align-items: center; }
.disc-grid .h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; }
.disc-adj { font-size: 15px; font-weight: 600; padding: 9px 0; }
.disc-cell { display: flex; justify-content: center; }
.disc-cell input { width: 19px; height: 19px; accent-color: var(--brand); cursor: pointer; }

/* Résultats */
.res-hero { text-align: center; padding: 36px 24px 28px; }
.res-hero .chip { margin-bottom: 12px; }
.res-hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.025em; }
.res-hero p { color: var(--ink-2); max-width: 560px; margin: 12px auto 0; font-size: 16px; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
@media (max-width: 860px) { .res-grid { grid-template-columns: 1fr; } }
.res-block h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.bar-row { margin-bottom: 14px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.bar-name { font-size: 13.5px; font-weight: 600; }
.bar-band { font-size: 12px; color: var(--muted); }
.bar-track { position: relative; height: 12px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--chart); transition: width .7s cubic-bezier(.2,.7,.3,1); }
.interp-card { padding: 22px; margin-bottom: 14px; }
.interp-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.interp-card .head h4 { font-size: 15.5px; font-weight: 700; }
.interp-card .head .score { font-size: 13px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.interp-card p { font-size: 14px; color: var(--ink-2); }
.interp-card .pro { margin-top: 10px; padding: 10px 14px; background: var(--bg); border-radius: 10px; font-size: 13.5px; color: var(--ink-2); }
.interp-card .pro b { color: var(--ink); }
.list-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .list-cols { grid-template-columns: 1fr; } }
.mini-list h5 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.mini-list ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mini-list li { font-size: 14px; color: var(--ink-2); padding-left: 20px; position: relative; }
.mini-list li::before { content: "•"; position: absolute; left: 6px; color: var(--brand); font-weight: 800; }
.metier-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.metier-chips .chip { font-weight: 500; }
.res-actions { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.disclaimer { font-size: 12.5px; color: var(--muted); text-align: center; max-width: 640px; margin: 26px auto 0; }

.svg-center { display: flex; justify-content: center; }
.loader { text-align: center; padding: 80px 0; color: var(--muted); }

@media print {
  .nav, .res-actions, .btn, .footer { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
}
