/* =========================================================================
   Liquid Glass — ambiance claire (style Apple)
   ========================================================================= */

:root {
  --accent: #0a84ff;
  --accent-deep: #0060df;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --accent-glow: rgba(10, 132, 255, 0.30);

  --ink: #14161a;
  --ink-2: #51555c;
  --ink-3: #888d95;

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-edge: rgba(160, 180, 210, 0.22);

  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;

  --shadow-soft: 0 22px 60px -20px rgba(28, 50, 92, 0.28), 0 6px 18px -10px rgba(28, 50, 92, 0.18);
  --shadow-lift: 0 30px 80px -24px rgba(28, 50, 92, 0.38), 0 8px 22px -10px rgba(28, 50, 92, 0.22);

  --good: #1aa86b;
  --warn: #e0902a;
  --high: #e2563f;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: #eef1f6;
  overflow-x: hidden;
}

/* ---- Décor : fond clair + orbes colorés flous ------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 800px at 78% -8%, #eaf2ff 0%, rgba(234,242,255,0) 55%),
    radial-gradient(1000px 700px at 8% 105%, #f1ecff 0%, rgba(241,236,255,0) 55%),
    linear-gradient(180deg, #f4f7fb 0%, #eaeef5 100%);
}
.orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.orb-1 { width: 46vw; height: 46vw; left: -10vw; top: -8vw;
  background: radial-gradient(circle at 30% 30%, #8fc2ff, #3f86ff); animation: drift1 26s ease-in-out infinite; }
.orb-2 { width: 40vw; height: 40vw; right: -8vw; top: 8vh;
  background: radial-gradient(circle at 40% 40%, #c8b6ff, #8a7cff); opacity: 0.42; animation: drift2 32s ease-in-out infinite; }
.orb-3 { width: 38vw; height: 38vw; left: 18vw; bottom: -14vw;
  background: radial-gradient(circle at 50% 50%, #9af0e2, #34c5b0); opacity: 0.34; animation: drift3 30s ease-in-out infinite; }

@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(4vw,3vh) scale(1.06)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-3vw,4vh) scale(1.08)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(2vw,-3vh) scale(1.05)} }

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none !important; }
}

/* ---- Layout ----------------------------------------------------------- */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 40px) 64px;
}
.shell { width: 100%; max-width: 720px; }
.shell.wide { max-width: 1080px; }

/* ---- Verre ------------------------------------------------------------ */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  overflow: hidden;
}
/* reflet spéculaire en haut */
.glass::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0) 90%);
  pointer-events: none;
}
/* liseré interne lumineux */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 0 0 1px var(--glass-edge);
  pointer-events: none;
}
.glass > * { position: relative; z-index: 1; }

.pad { padding: clamp(26px, 4vw, 46px); }

/* ---- Topbar ----------------------------------------------------------- */
.topbar {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 34px);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  box-shadow: 0 6px 16px -4px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.5);
  display: grid; place-items: center;
  color: #fff; flex: none;
}
.brand .mark svg { width: 21px; height: 21px; }
.brand .t1 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.brand .t2 { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }

/* segmented language toggle */
.lang {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 7px 15px; border-radius: 999px; transition: color .2s;
}
.lang button.on {
  color: #fff;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  box-shadow: 0 4px 12px -3px var(--accent-glow);
}

/* ---- Typographie ------------------------------------------------------ */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 6px 13px; border-radius: 999px;
}
h1.title {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.06; letter-spacing: -0.025em; font-weight: 700;
  margin: 18px 0 14px; text-wrap: balance;
}
.lead { font-size: clamp(16px, 1.9vw, 18.5px); line-height: 1.5; color: var(--ink-2); max-width: 58ch; }

/* ---- Boutons ---------------------------------------------------------- */
.btn {
  font-family: var(--font); font-size: 16px; font-weight: 600;
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 15px 28px; transition: transform .14s ease, box-shadow .2s, background .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:active { transform: scale(0.975); }
.btn-primary {
  color: #fff;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  box-shadow: 0 12px 28px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-primary:hover { box-shadow: 0 16px 34px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.45); }
.btn-ghost {
  color: var(--ink); background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.btn-ghost:hover { background: #fff; }
.btn[disabled] { opacity: .42; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; }

/* ---- Intro cards ------------------------------------------------------ */
.feat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 22px;
}
.feat {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 18px 19px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.feat .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: var(--accent-deep);
  background: var(--accent-soft); margin-bottom: 12px;
}
.feat .ico svg { width: 19px; height: 19px; }
.feat h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.feat p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; margin-top: 5px; }

/* ---- Disclaimer ------------------------------------------------------- */
.disclaim {
  display: flex; gap: 13px; align-items: flex-start;
  margin-top: 24px; padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 244, 230, 0.55);
  border: 1px solid rgba(224, 144, 42, 0.32);
}
.disclaim .ico { color: var(--warn); flex: none; margin-top: 1px; }
.disclaim .ico svg { width: 22px; height: 22px; }
.disclaim h4 { font-size: 14px; font-weight: 650; color: #9a6212; }
.disclaim p { font-size: 13px; line-height: 1.5; color: #7c5a25; margin-top: 3px; }

/* ---- Progress --------------------------------------------------------- */
.progress-wrap { width: 100%; max-width: 720px; margin-bottom: 22px; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--ink-2); margin-bottom: 9px; font-weight: 500;
}
.progress-meta .part { color: var(--accent-deep); font-weight: 650; }
.track {
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--glass-border);
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(40,60,100,0.08);
}
.fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #5ab0ff);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width .45s cubic-bezier(.22,1,.36,1);
}

/* ---- Question --------------------------------------------------------- */
.q-num { font-size: 13px; font-weight: 600; color: var(--accent-deep); letter-spacing: 0.02em; }
.q-text {
  font-size: clamp(20px, 2.7vw, 26px); line-height: 1.28; letter-spacing: -0.018em;
  font-weight: 600; margin: 12px 0 26px; text-wrap: pretty;
}
.choices { display: flex; flex-direction: column; gap: 11px; }
.choice {
  display: flex; align-items: center; gap: 15px;
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font); font-size: 16.5px; font-weight: 550; color: var(--ink);
  padding: 16px 19px; border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  transition: transform .12s, border-color .18s, background .18s, box-shadow .18s;
}
.choice:hover { transform: translateY(-1px); background: #fff; border-color: rgba(10,132,255,0.4); }
.choice .dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--ink-3); transition: all .18s;
  display: grid; place-items: center;
}
.choice.sel {
  background: linear-gradient(150deg, rgba(10,132,255,0.14), rgba(10,132,255,0.07));
  border-color: var(--accent);
  box-shadow: 0 8px 22px -12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.6);
}
.choice.sel .dot { border-color: var(--accent); background: var(--accent); }
.choice.sel .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.choice .val { margin-left: auto; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }

/* ---- Section intro ---------------------------------------------------- */
.sec-badge {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep)); color: #fff;
  box-shadow: 0 10px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.sec-badge svg { width: 28px; height: 28px; }

/* ---- Results ---------------------------------------------------------- */
.results-grid { display: grid; gap: 18px; }
.r-hero { text-align: center; }
.level-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 650; padding: 8px 17px; border-radius: 999px; margin-bottom: 8px;
}
.level-low { color: var(--good); background: rgba(26,168,107,0.12); }
.level-mod { color: var(--warn); background: rgba(224,144,42,0.13); }
.level-high { color: var(--high); background: rgba(226,86,63,0.13); }

.big-num { font-size: clamp(54px, 9vw, 78px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.big-num span { font-size: 0.4em; color: var(--ink-3); font-weight: 600; }

.r-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .r-cols, .feat-grid { grid-template-columns: 1fr; } }

.card-h { font-size: 13px; font-weight: 650; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-3); }
.card-sub { font-size: 13px; color: var(--ink-2); line-height: 1.45; margin-top: 4px; }

.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--glass-edge); }
.stat-row:first-of-type { border-top: 0; }
.stat-label { font-size: 14.5px; font-weight: 550; }
.tag { font-size: 12.5px; font-weight: 650; padding: 5px 12px; border-radius: 999px; }
.tag.ok { color: var(--good); background: rgba(26,168,107,0.12); }
.tag.no { color: var(--ink-3); background: rgba(120,130,145,0.12); }
.tag.hi { color: var(--high); background: rgba(226,86,63,0.12); }

.count-badge { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.count-badge small { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* gauges row */
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.gauge-wrap { text-align: center; }
.gauge-label { font-size: 14px; font-weight: 600; margin-top: 6px; }
.gauge-pct { font-size: 13px; color: var(--ink-2); }

.dim-list { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.dim { }
.dim-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 550; margin-bottom: 7px; }
.dim-top span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dim-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,0.6); border: 1px solid var(--glass-border); overflow: hidden; }
.dim-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #6bb6ff); }

.radar-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: center; }
@media (max-width: 760px) { .radar-wrap, .gauges { grid-template-columns: 1fr; } }

/* what now */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 18px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.step .n { width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: 14px; display: grid; place-items: center; margin-bottom: 11px; }
.step h4 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.step p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin-top: 5px; }

/* refs */
.ref { padding: 14px 0; border-top: 1px solid var(--glass-edge); font-size: 13.5px; line-height: 1.5; }
.ref:first-child { border-top: 0; }
.ref .a { font-weight: 600; }
.ref .j { color: var(--ink-3); }
.ref a { color: var(--accent-deep); text-decoration: none; font-weight: 550; }
.ref a:hover { text-decoration: underline; }

.foot { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 26px; line-height: 1.5; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* transitions between screens — translate only (no opacity)
   so static captures, print & PDF always show content */
.fade-in { animation: fadeUp .5s cubic-bezier(.22,1,.36,1); }
@keyframes fadeUp { from { transform: translateY(12px); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

.mb0 { margin-bottom: 0; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.center { text-align: center; }
.stack-btns { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 26px; }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Print ------------------------------------------------------------ */
@media print {
  .bg, .orb { display: none !important; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .stage { padding: 0; }
  .glass { box-shadow: none; border: 1px solid #dfe3ea; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; break-inside: avoid; }
  .glass::before, .glass::after { display: none; }
  .shell, .shell.wide { max-width: 100%; }
  .results-grid { gap: 12px; }
}
