@font-face { font-family: 'Inter'; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Unbounded'; src: url(fonts/unbounded.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }

/* ---------- Direction artistique « conduite de nuit » ---------- */
:root {
  color-scheme: dark;
  --bg: #050608; --bg-2: #0a0c10; --surface: #0f1217; --surface-2: #161a22; --surface-3: #1d222c;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --text: #f3f5f8; --text-2: #cfd5de; --muted: #8c94a4; --dim: #5d6574;
  --amber: #ffc53d; --amber-2: #ff9f1c; --amber-soft: rgba(255, 197, 61, .11); --on-amber: #161004;
  --good: #3ee08f; --good-soft: rgba(62, 224, 143, .1);
  --bad: #ff5d5d; --bad-soft: rgba(255, 93, 93, .1);
  --blue: #6b97ff; --violet: #b18cff;
  --radius: 20px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --head: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #2a303b transparent; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font: 400 16px/1.55 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 85% -12%, rgba(255, 197, 61, .075), transparent 62%),
    radial-gradient(900px 520px at -10% 8%, rgba(107, 151, 255, .055), transparent 60%);
}
body::after { /* grain */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(255, 197, 61, .3); }
a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.display { font-family: var(--head); font-weight: 800; font-size: clamp(2.6rem, 6.6vw, 4.8rem); line-height: 1.02; letter-spacing: -.045em; margin: 0 0 .35em; }
.h-display { font-family: var(--head); font-weight: 750; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -.035em; }
.hl { color: var(--amber); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--amber);
  font: 600 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.14rem); color: var(--text-2); max-width: 36em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.page { width: 100%; max-width: 1060px; margin: 0 auto; padding: 28px 20px 48px; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(5, 6, 8, .72); backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; height: 66px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 9px; transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.wordmark { display: flex; flex-direction: column; font: 700 17px/1 var(--display); letter-spacing: -.02em; }
.wordmark small { white-space: nowrap; font: 500 10.5px/1.4 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.brand.sm { gap: 8px; font: 600 13px var(--display); color: var(--text-2); }
.brand.sm img { box-shadow: none; border-radius: 6px; }
#nav { display: flex; align-items: center; gap: 6px; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 11px; color: var(--muted);
  font: 600 14.5px var(--font); text-decoration: none; background: none; border: 0; cursor: pointer; transition: color .2s, background .2s; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.avatar-s { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--display);
  background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: var(--on-amber); }
@media (max-width: 760px) { .nav-link.opt { display: none; } .nav-link .lbl { display: none; } }

main { flex: 1; width: 100%; outline: none; }
.loading { display: flex; justify-content: center; gap: 8px; padding: 120px 0; }
.loading span { width: 10px; height: 10px; border-radius: 3px; background: var(--amber); animation: dots 1s ease-in-out infinite; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }

.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.foot a { color: var(--muted); }
body.focus .top, body.focus .foot { display: none; }

/* ---------- Boutons ---------- */
.btn {
  --bh: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: var(--bh); padding: 0 20px;
  border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 600 15px/1.1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform .16s var(--ease), background .2s, border-color .2s, box-shadow .3s, color .2s;
}
.btn:hover { border-color: rgba(255, 255, 255, .26); background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn .ic { width: 18px; height: 18px; }
.btn .go { transition: transform .25s var(--ease); }
.btn:hover .go { transform: translateX(3px); }
.btn.primary { background: var(--amber); border-color: transparent; color: var(--on-amber);
  box-shadow: 0 6px 16px -8px rgba(255, 197, 61, .45), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.primary:hover { background: #ffd062; box-shadow: 0 0 0 4px rgba(255, 197, 61, .12), 0 8px 20px -8px rgba(255, 197, 61, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 93, 93, .35); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.danger.fill { background: var(--bad); color: #1c0505; border-color: transparent; }
.btn.lg { --bh: 56px; padding: 0 28px; font-size: 16px; border-radius: 15px; }
.btn.sm { --bh: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text-2); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.link { background: none; border: 0; padding: 0; color: var(--amber); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font: 600 12.5px/1.3 var(--font);
  background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255, 197, 61, .2); }
.chip.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--line-2); }
.chip.good { background: var(--good-soft); color: var(--good); border-color: rgba(62, 224, 143, .25); }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: rgba(255, 93, 93, .25); }
.chip .ic { width: 14px; height: 14px; }

.card { position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008)), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card h2 .ic { vertical-align: -3px; margin-right: 4px; color: var(--amber); }
.danger-zone h2 .ic { color: var(--bad); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; font: 700 19px var(--head); letter-spacing: -.02em; margin: 34px 0 14px; }
.sec-title .muted { font: 500 13px var(--font); letter-spacing: 0; }

/* ---------- Page d'accueil publique ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 88px) 0 clamp(64px, 10vw, 120px); }
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 68%; perspective: 300px; perspective-origin: 50% 0%; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 92%); mask-image: linear-gradient(to top, #000 10%, transparent 92%); opacity: .55; }
.road-plane { position: absolute; left: 50%; bottom: -10%; width: 1500px; height: 210%; transform: translateX(-50%) rotateX(74deg); transform-origin: 50% 100%;
  background:
    linear-gradient(90deg, transparent 23%, rgba(255, 255, 255, .5) 23%, rgba(255, 255, 255, .5) calc(23% + 5px), transparent calc(23% + 5px),
      transparent calc(77% - 5px), rgba(255, 255, 255, .5) calc(77% - 5px), rgba(255, 255, 255, .5) 77%, transparent 77%),
    linear-gradient(90deg, transparent 23%, #0c0e12 23%, #0c0e12 77%, transparent 77%); }
.road-plane::before, .road-plane::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8px;
  background: repeating-linear-gradient(to bottom, var(--amber) 0 70px, transparent 70px 160px); animation: drive .9s linear infinite; }
.road-plane::before { left: calc(41% - 4px); opacity: .9; } .road-plane::after { left: calc(59% - 4px); opacity: .9; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--text-2); font-size: 14.5px; }
.ticks li { display: inline-flex; align-items: center; gap: 8px; }
.ticks .ic { color: var(--good); }
.hero-demo { position: relative; }
.demo { position: relative; padding: 14px; border-radius: 24px; background: rgba(15, 18, 23, .86); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px -40px #000;
  transform: perspective(1300px) rotateY(-8deg) rotateX(3deg); transition: transform .7s var(--ease); }
.hero-demo:hover .demo, .demo:focus-within { transform: none; }
.demo-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 4px 12px; }
.demo .media { margin: 0 0 12px; }
.demo .media.photo img { max-height: 260px; }
.demo-q { font-weight: 600; font-size: 1.02rem; margin: 0 4px 12px; }
.demo .answer { min-height: 50px; padding: 9px 12px 9px 9px; font-size: 14.5px; }
.demo .answer .key { width: 32px; height: 32px; }
.demo .exp { margin-top: 12px; padding: 12px 14px; font-size: 14px; }
.demo-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 14px; font: 600 14px var(--font);
  background: rgba(22, 26, 34, .92); border: 1px solid var(--line-2); box-shadow: 0 24px 40px -18px #000; animation: float 6s ease-in-out infinite;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none; }
.float.f1 { top: -20px; right: -14px; } .float.f1 .ic { color: var(--amber); }
.float.f2 { bottom: -22px; left: -34px; animation-delay: -3s; } .float.f2 .ic { color: var(--good); }
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; }
  .demo { transform: none; }
  .float { display: none; }
}

.strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -24px; position: relative; z-index: 1; }
.strip > div { padding: 22px 20px; text-align: center; border-left: 1px dashed var(--line-2); }
.strip > div:first-child { border-left: 0; }
.strip b { display: block; font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--display); letter-spacing: -.03em; }
.strip span { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .strip { grid-template-columns: 1fr 1fr; } .strip > div:nth-child(3) { border-left: 0; } .strip > div:nth-child(n+3) { border-top: 1px dashed var(--line-2); } }

.section { scroll-margin-top: 70px; padding-top: clamp(64px, 10vw, 110px); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.sec-head p:not(.eyebrow) { color: var(--muted); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { display: flex; flex-direction: column; position: relative; overflow: hidden; padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  transition: transform .35s var(--ease), border-color .3s, opacity .8s var(--ease); }
.feat::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(500px 200px at 50% -40%, rgba(255, 197, 61, .14), transparent 70%); }
.feat:hover { border-color: var(--line-2); }
.feat:hover::before { opacity: 1; }
.feat.wide { grid-column: span 2; }
.feat h3 { font: 700 18px/1.3 var(--head); letter-spacing: -.02em; margin: 18px 0 8px; }
.feat p { color: var(--muted); margin: 0; }
.fi { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255, 197, 61, .18); }
.fi .ic { width: 22px; height: 22px; }
.feat .thumb { margin-top: 20px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.feat .thumb svg { display: block; width: 100%; height: auto; }
.dash-demo { display: grid; grid-template-columns: repeat(40, 1fr); gap: 4px; margin-top: auto; padding-top: 28px; }
.dash-demo i { height: 26px; border-radius: 3px; background: var(--surface-3); animation: fillseg 5s ease-in-out infinite; animation-delay: calc(var(--k) * 55ms); }
.dash-demo i.x { animation-name: fillsegko; }
.dash-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; color: var(--dim); }
.dash-legend b { color: var(--good); font-weight: 600; }
.mini-meters { display: grid; gap: 12px; margin-top: 22px; }
.mini-meters div { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 13px; color: var(--text-2); }
.mini-meters .meter { grid-column: 1 / -1; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .feat.wide { grid-column: auto; } .dash-demo { gap: 2px; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), transparent); }
.step-n { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; font: 700 16px/1 var(--display); color: var(--amber); background: var(--amber-soft); border: 1px solid rgba(255, 197, 61, .22); }
.step h3 { font: 700 18px var(--head); letter-spacing: -.02em; margin: 18px 0 8px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.tchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tchip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .25s, transform .3s var(--ease), opacity .8s var(--ease); }
.tchip:hover { border-color: rgba(255, 197, 61, .35); transform: translateY(-2px); }
.tchip div { display: flex; flex-direction: column; line-height: 1.3; }
.tchip b { font-weight: 600; font-size: 15px; }
.tchip small { color: var(--muted); font-size: 13px; }
.tcode { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font: 700 15px var(--display);
  background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(255, 197, 61, .2); }

.final { position: relative; overflow: hidden; margin: clamp(64px, 10vw, 110px) auto 56px; text-align: center; padding: clamp(44px, 7vw, 76px) 24px;
  border-radius: 30px; border: 1px solid rgba(255, 197, 61, .25);
  background: radial-gradient(720px 320px at 50% 0%, rgba(255, 197, 61, .1), transparent 75%), var(--surface); }
.final .lead { margin: 0 auto 28px; }
.final .road { height: 100%; opacity: .25; }

/* ---------- Connexion ---------- */
.auth { display: grid; grid-template-columns: 1.08fr 1fr; max-width: 1120px; min-height: min(680px, calc(100dvh - 150px)); margin: 28px auto;
  border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: 0 50px 100px -50px #000; }
.auth-visual { position: relative; background: #000; min-height: 220px; }
.auth-visual > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-visual .ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(to top, rgba(5, 6, 8, .96) 8%, rgba(5, 6, 8, .35) 55%, rgba(5, 6, 8, .1)); }
.auth-visual .h-display { margin: 0 0 8px; }
.auth-visual p { color: var(--text-2); margin: 0; max-width: 30em; }
.auth-form { padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font: 800 28px var(--head); letter-spacing: -.035em; margin-bottom: 6px; }
.auth-form .sub { color: var(--muted); margin-bottom: 28px; }
.auth-switch { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; margin: 12px 16px; border-radius: 22px; min-height: 0; }
  .auth-visual { height: 190px; }
  .auth-visual p { display: none; }
}

.field { display: block; margin-bottom: 16px; }
.field .lab { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.ctl { position: relative; display: block; }
input { display: block; width: 100%; height: 52px; padding: 0 16px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text); font: 500 16px var(--font); transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover { border-color: rgba(255, 255, 255, .22); }
input:focus { outline: none; border-color: var(--amber); background: #0c0e12; box-shadow: 0 0 0 4px rgba(255, 197, 61, .14); }
.ctl input { padding-right: 52px; }
.eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.eye:hover { color: var(--text); background: var(--surface-2); }
.error { min-height: 1.4em; margin: 2px 0 14px; color: var(--bad); font-size: 14px; font-weight: 500; }
.error.ok { color: var(--good); }

/* ---------- Tableau de bord ---------- */
.dash-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: clamp(24px, 4vw, 36px); overflow: hidden;
  border-color: rgba(255, 197, 61, .16);
  background: radial-gradient(640px 360px at 100% 0%, rgba(255, 197, 61, .07), transparent 75%), linear-gradient(180deg, rgba(255, 255, 255, .03), transparent), var(--surface); }
.dash-hero h1 { margin-bottom: 10px; }
.dash-hero .lead { margin-bottom: 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; color: var(--muted); font-size: 13.5px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 680px) { .dash-hero { grid-template-columns: 1fr; } .ring-wrap { order: -1; justify-self: center; } .dash-hero .btn.lg { width: 100%; } }
.ring { --tone: var(--dim); position: relative; width: 164px; height: 164px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: var(--tone); stroke-linecap: round; stroke-dasharray: 377; stroke-dashoffset: calc(377 * (1 - var(--p)));
  animation: ringin 1.4s var(--ease) both .15s; }
.ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring b { font: 700 36px/1 var(--display); letter-spacing: -.04em; }
.ring small { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tone-good { --tone: var(--good); } .tone-warn { --tone: var(--amber); } .tone-bad { --tone: var(--bad); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.kpi span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.kpi span .ic { width: 15px; height: 15px; color: var(--kc, var(--amber)); }
.kpi b { font: 700 28px/1 var(--display); letter-spacing: -.03em; }
@media (max-width: 720px) { .kpis { grid-template-columns: 1fr 1fr; } }

.chart { --plot: 160px; position: relative; height: calc(var(--plot) + 24px); padding-top: 24px; display: flex; align-items: flex-end; gap: clamp(4px, 1.3vw, 12px);
  border-bottom: 1px solid var(--line-2); }
.chart .pass { position: absolute; left: 0; right: 0; bottom: calc(var(--plot) * .875); border-top: 1.5px dashed rgba(62, 224, 143, .5); pointer-events: none; }
.chart .pass span { position: absolute; right: 0; top: -19px; font-size: 11px; font-weight: 700; color: var(--good); }
.bar { flex: 1; max-width: 46px; height: var(--h); min-height: 6px; border-radius: 9px 9px 3px 3px; position: relative; transform-origin: bottom;
  animation: grow .9s var(--ease) both; animation-delay: calc(var(--k) * 45ms); }
.bar.ok { background: linear-gradient(to top, rgba(62, 224, 143, .25), var(--good)); }
.bar.ko { background: linear-gradient(to top, rgba(255, 93, 93, .22), var(--bad)); }
.bar span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 26px 12px; color: var(--muted); }
.empty .fi { margin-bottom: 10px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { --c: var(--amber); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, background .25s; }
.tile::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 18%, transparent), transparent); opacity: 0; transition: opacity .3s; }
.tile:hover:not(:disabled) { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 40%, transparent); background: var(--surface-2); }
.tile:hover:not(:disabled)::after { opacity: 1; }
.tile:active:not(:disabled) { transform: scale(.98); }
.tile:disabled { opacity: .45; cursor: default; }
.tile .ti { width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); }
.tile .ti .ic { width: 21px; height: 21px; }
.tile b { font-size: 15.5px; font-weight: 600; }
.tile small { color: var(--muted); font-size: 13px; }
.tile .tn { position: absolute; top: 20px; right: 20px; font: 700 20px var(--display); color: var(--c); letter-spacing: -.03em; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr 1fr; } }

.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tcard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 14px; width: 100%; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, background .25s; }
.tcard:hover { transform: translateY(-2px); border-color: rgba(255, 197, 61, .35); background: var(--surface-2); }
.tcard .tcode { grid-row: span 2; }
.tcard.done .tcode { background: var(--good-soft); color: var(--good); border-color: rgba(62, 224, 143, .25); }
.tcard .tname { font-weight: 600; font-size: 15px; }
.tcard .tnum { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tcard .meter { grid-column: 2 / 4; }
@media (max-width: 720px) { .tgrid { grid-template-columns: 1fr; } }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--amber); animation: meter 1.1s var(--ease) both .25s; }
.tcard.done .meter i { background: var(--good); }

/* ---------- Question ---------- */
.quiz { max-width: 1200px; margin: 0 auto; padding: 14px 20px 28px; }
.qbar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 12px; }
.qtitle { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.qcount { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.qcount b { color: var(--text); font: 700 16px var(--display); }
.segs { display: flex; gap: 3px; margin-bottom: 20px; }
.segs i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); transition: background .3s; }
.segs i.done { background: rgba(255, 255, 255, .5); }
.segs i.ok { background: var(--good); } .segs i.ko { background: var(--bad); }
.segs i.cur { background: var(--amber); animation: pulse 1.4s ease-in-out infinite; }
.tring { position: relative; width: 44px; height: 44px; }
.tring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tring circle { fill: none; stroke-width: 3.5; }
.tring .tr-bg { stroke: var(--surface-3); }
.tring .tr-fg { stroke: var(--amber); stroke-linecap: round; stroke-dasharray: 106.8; transition: stroke-dashoffset .25s linear, stroke .3s; }
.tring span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 14px var(--display); font-variant-numeric: tabular-nums; }
.tring.reading .tr-fg { stroke: var(--blue); }
.tring.reading span { color: var(--muted); }
.tring.urgent .tr-fg { stroke: var(--bad); }
.tring.urgent span { color: var(--bad); }
.tring.urgent { animation: beat .5s ease-in-out infinite alternate; }
.qbody { display: grid; gap: 22px; }
@media (min-width: 1000px) { .qbody.has-media { grid-template-columns: 1.18fr 1fr; align-items: start; } .qbody.has-media .media { position: sticky; top: 16px; } }
.q-enter .qbody { animation: qin .45s var(--ease) both; }
.media { position: relative; margin: 0; border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--line); display: flex; justify-content: center; }
.media svg, .media.photo img { display: block; width: 100%; height: auto; max-height: 470px; object-fit: contain; }
.media.scene svg { max-height: none; }
.media.sign { padding: 30px; background: radial-gradient(circle at 50% 38%, #222834, #0c0e12 75%); }
.media.sign img { height: 190px; width: auto; max-width: 100%; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .65)); }
.theme-tag { margin: 0 0 8px; color: var(--amber); font: 600 12px var(--font); letter-spacing: .13em; text-transform: uppercase; }
.question { font: 600 clamp(1.15rem, 2.3vw, 1.42rem)/1.38 var(--font); letter-spacing: -.012em; margin: 0 0 12px; }
.expect { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 16px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 500; }
.expect .ic { width: 14px; height: 14px; color: var(--amber); }
.answers { display: grid; gap: 10px; }
.subq { margin: 10px 0 0; font-weight: 600; color: var(--text-2); }
.subq:first-child { margin-top: 0; }
.answer { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 11px 16px 11px 11px; border-radius: 15px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text); font: 500 15.5px/1.4 var(--font); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: border-color .18s, background .18s, transform .15s var(--ease), box-shadow .25s; }
.answer:hover:not(:disabled) { border-color: rgba(255, 255, 255, .28); background: var(--surface-2); }
.answer:active:not(:disabled) { transform: scale(.985); }
.answer:disabled { cursor: default; }
.key { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font: 700 14px var(--display);
  background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .45); color: var(--muted); transition: all .2s var(--ease); }
.answer.sel { border-color: var(--amber); background: rgba(255, 197, 61, .075); box-shadow: 0 0 0 4px rgba(255, 197, 61, .09); }
.answer.sel .key { background: var(--amber); color: var(--on-amber); border-color: transparent; transform: scale(1.06); box-shadow: none; }
.answer.good { border-color: var(--good); background: var(--good-soft); box-shadow: none; animation: pop .45s var(--ease); }
.answer.good .key { background: var(--good); color: #03140b; border-color: transparent; box-shadow: none; }
.answer.bad { border-color: var(--bad); background: var(--bad-soft); box-shadow: none; animation: shake .45s; }
.answer.bad .key { background: var(--bad); color: #1c0505; border-color: transparent; box-shadow: none; }
.answer .mine { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.answer .st { width: 22px; height: 22px; margin-left: auto; stroke-width: 2.6; animation: popin .35s var(--ease) both .1s; }
.answer .mine + .st { margin-left: 8px; }
@media (max-width: 480px) { .answer .mine { display: none; } .answer .st { margin-left: auto !important; } }
.answer.good .st { color: var(--good); } .answer.bad .st { color: var(--bad); }
.exp { margin-top: 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid; animation: slideup .4s var(--ease) both; }
.exp.ok { background: var(--good-soft); border-color: rgba(62, 224, 143, .28); }
.exp.ko { background: var(--bad-soft); border-color: rgba(255, 93, 93, .28); }
.exp-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-weight: 700; }
.exp.ok .exp-h { color: var(--good); } .exp.ko .exp-h { color: var(--bad); }
.exp-h span { color: var(--text-2); font-weight: 500; }
.exp p { margin: 8px 0 0; color: var(--text-2); }
.qactions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.qactions .btn { min-width: 210px; }
.hint { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0; color: var(--dim); font-size: 13px; }
kbd { font: 600 11px var(--font); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .5); }
@media (hover: none) { .hint { display: none; } }
@media (max-width: 720px) {
  .quiz { padding-bottom: 0; }
  .qactions { position: sticky; bottom: 0; z-index: 5; margin: 22px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: rgba(5, 6, 8, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .qactions .btn { flex: 1; min-width: 0; }
}

/* ---------- Résultat ---------- */
.result { --tone: var(--amber); text-align: center; padding: clamp(28px, 5vw, 44px) 24px; overflow: hidden; }
.result::before { content: ''; position: absolute; left: 50%; top: -160px; width: 640px; height: 380px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 12%, transparent), transparent); }
.result > * { position: relative; }
.gauge { position: relative; width: 210px; height: 210px; margin: 14px auto 6px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 12; }
.gauge .bg { stroke: var(--surface-3); }
.gauge .fg { stroke: var(--tone); stroke-linecap: round; stroke-dasharray: 553; stroke-dashoffset: calc(553 * (1 - var(--p)));
  animation: gaugein 1.6s var(--ease) both .2s; }
.g-num { position: absolute; inset: 0; display: grid; place-content: center; }
.g-num b { font: 800 66px/1 var(--display); letter-spacing: -.05em; }
.g-num span { color: var(--muted); font: 600 17px var(--display); margin-top: 4px; }
.verdict { font: 800 clamp(1.2rem, 3vw, 1.6rem) var(--head); letter-spacing: -.03em; color: var(--tone); margin: 6px 0 4px; }
.r-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.r-stats div { min-width: 104px; padding: 12px 16px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); }
.r-stats b { display: block; font: 700 22px var(--display); letter-spacing: -.03em; }
.r-stats span { color: var(--muted); font-size: 13px; }
.good-t { color: var(--good); } .bad-t { color: var(--bad); }
.err-themes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -4px 0 24px; }
.seg-ctrl { display: inline-flex; gap: 2px; padding: 4px; margin: 10px 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg-ctrl button { border: 0; background: transparent; color: var(--muted); font: 600 14px var(--font); padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: background .2s, color .2s; }
.seg-ctrl button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.corr { --tone: var(--good); border-left: 3px solid var(--tone); }
.corr.ko { --tone: var(--bad); }
.corr-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 13.5px; }
.corr .media { max-width: 620px; margin-bottom: 16px; }
.corr h3 { font-size: 1.08rem; line-height: 1.4; }
.corr .answer { min-height: 52px; animation: none; }
.exp-text { margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); }
.exp-text b { color: var(--amber); }
.confetti { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; animation: fall var(--d) cubic-bezier(.25, .6, .4, 1) var(--dl) forwards; }

/* ---------- Compte ---------- */
.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile h1 { margin: 0 0 4px; font: 800 24px var(--head); letter-spacing: -.03em; }
.profile p { margin: 0; }
.profile .btn { margin-left: auto; }
.avatar { width: 66px; height: 66px; flex: none; border-radius: 20px; display: grid; place-items: center; font: 700 28px var(--display);
  background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: var(--on-amber); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.mini-stats div { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.mini-stats b { display: block; font: 700 22px var(--display); }
.mini-stats span { color: var(--muted); font-size: 13px; }
.form-narrow { max-width: 440px; }
.danger-zone { border-color: rgba(255, 93, 93, .22); }
.danger-zone h2 { color: var(--bad); }
.credits { padding-left: 18px; font-size: .92rem; word-break: break-word; color: var(--text-2); }
.credits li { margin-bottom: 6px; }

/* ---------- Fenêtres et notifications ---------- */
.modal { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 22px; background: var(--surface); color: var(--text);
  box-shadow: 0 40px 100px -20px #000; }
.modal[open] { animation: modalin .3s var(--ease); }
.modal::backdrop { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal form { padding: 26px; }
.modal h2 { font: 700 19px var(--head); letter-spacing: -.02em; }
.modal p { color: var(--muted); }
.modal-actions { display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: 10px; margin-top: 22px; }
#toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -12px #000; font-size: 14.5px; font-weight: 600; animation: toastin .4s var(--ease) both; transition: opacity .3s, transform .3s; }
.toast.good .ic { color: var(--good); } .toast.bad .ic { color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(10px); }

/* ---------- Animations ---------- */
.enter { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 65ms); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.bento .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.bento .reveal:nth-child(4) { transition-delay: .08s; } .bento .reveal:nth-child(5) { transition-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes qin { from { opacity: 0; transform: translateX(26px); } }
@keyframes slideup { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { 40% { transform: scale(1.02); } }
@keyframes popin { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulse { 50% { opacity: .55; } }
@keyframes beat { to { transform: scale(1.08); } }
@keyframes drive { to { background-position: 0 160px; } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes ringin { from { stroke-dashoffset: 377; } }
@keyframes gaugein { from { stroke-dashoffset: 553; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes meter { from { width: 0; } }
@keyframes dots { 50% { transform: translateY(-8px); opacity: .4; } }
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }
@keyframes fillseg { 0%, 8% { background: var(--surface-3); } 22%, 78% { background: var(--good); } 92%, 100% { background: var(--surface-3); } }
@keyframes fillsegko { 0%, 8% { background: var(--surface-3); } 22%, 78% { background: var(--bad); } 92%, 100% { background: var(--surface-3); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .demo { transform: none; }
}

/* ---------- Séries en cours, mode erreurs, légal ---------- */
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font: 700 11.5px var(--font); background: var(--bad); color: #1c0505; }
.resume { display: grid; gap: 10px; margin-bottom: 16px; }
.rs { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.rs .ti { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.rs-t { display: grid; gap: 4px; min-width: 0; }
.rs-t b { font-weight: 600; }
.rs-t small { color: var(--muted); font-size: 13px; }
.rs-t .meter { margin-top: 4px; }
@media (max-width: 520px) { .rs { grid-template-columns: auto 1fr auto; } .rs .btn { grid-column: 1 / -1; grid-row: 2; } }
.kpis.two { grid-template-columns: 1fr 1fr; }
.err-themes.left { justify-content: flex-start; margin: 18px 0 0; }
.consent { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legal .card { max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 44px); }
.legal h2 { font: 700 17px var(--head); margin: 28px 0 8px; letter-spacing: -.01em; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal code { font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
textarea { display: block; width: 100%; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: 500 16px/1.5 var(--font); resize: vertical; min-height: 140px; transition: border-color .2s, box-shadow .2s; }
textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 197, 61, .14); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
