:root {
  --bg: #050a14;
  --bg-2: #08101f;
  --panel: rgba(14, 24, 44, .72);
  --panel-solid: #0c1627;
  --panel-2: rgba(24, 40, 70, .66);
  --line: rgba(120, 190, 255, .16);
  --line-strong: rgba(120, 200, 255, .34);
  --text: #eaf4ff;
  --muted: #8ea6c4;
  --ice: #6fdcff;
  --ice-2: #3b82f6;
  --ice-3: #9be7ff;
  --ok: #3ddc97;
  --bad: #ff6b81;
  --gold: #ffd479;
  --radius: 16px;
  --glow: 0 0 24px rgba(90, 200, 255, .28);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.55 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(5,10,20,.55) 0%, rgba(5,10,20,.92) 520px, var(--bg) 760px),
    url('/img/hero.jpg') center top / 1920px auto no-repeat fixed, var(--bg);
}
a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; }
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .8; }
.top, .app, .foot { position: relative; z-index: 1; }

/* ───── En-tête ───── */
.top { display: flex; align-items: center; gap: 22px; padding: 12px 28px; position: sticky; top: 0; z-index: 10;
  background: rgba(5, 10, 20, .72); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 10px rgba(90, 200, 255, .55)); transition: transform .4s ease; }
.brand:hover img { transform: rotate(-6deg) scale(1.08); }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: .22em;
  background: linear-gradient(180deg, #fff 10%, var(--ice-3) 55%, var(--ice-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark small { font-size: 12px; letter-spacing: .1em; margin-left: 4px; font-weight: 700; }
.nav { display: flex; gap: 2px; margin-left: 10px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 13px; border-radius: 10px; font-weight: 500; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav a.on { color: #fff; background: linear-gradient(135deg, rgba(111,220,255,.22), rgba(59,130,246,.2)); box-shadow: inset 0 0 0 1px var(--line-strong); }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }

/* ───── Mise en page ───── */
.app { width: 100%; max-width: 1040px; margin: 0 auto; padding: 36px 22px 90px; flex: 1; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: .01em; }
.sub { color: var(--muted); margin: 0 0 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); transition: border-color .2s, transform .2s; }
.grid > .card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ice); margin: 0 0 12px; font-weight: 700; }
.big { font-size: 30px; font-weight: 800; }
.section { margin-top: 28px; }

/* ───── Hero ───── */
.hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 28px 36px; justify-content: space-between;
  padding: 44px 40px; margin-bottom: 18px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: linear-gradient(100deg, rgba(5,10,20,.88) 0%, rgba(5,10,20,.55) 55%, rgba(5,10,20,.2) 100%), url('/img/hero.jpg') center 35% / cover;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .55), var(--glow); }
.hero-text { position: relative; z-index: 1; max-width: 460px; }
.hero h1 { font-size: 54px; line-height: 1; letter-spacing: .12em; margin: 4px 0 14px; font-weight: 800;
  background: linear-gradient(180deg, #fff 15%, var(--ice-3) 60%, var(--ice-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(90, 200, 255, .35)); }
.hero-logo { position: relative; z-index: 1; width: 210px; height: 210px; object-fit: contain; order: 2; animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 28px rgba(80, 190, 255, .65)); margin-inline: auto; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 12px; color: var(--ice); font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: rgba(10, 20, 38, .75); border: 1px solid var(--line); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.dot.on { background: var(--ok); box-shadow: 0 0 9px var(--ok); }

/* ───── Boutons & formulaires ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 12px 22px; border-radius: 12px;
  color: #03101e; background: linear-gradient(135deg, var(--ice-3), var(--ice) 45%, var(--ice-2));
  box-shadow: 0 6px 22px rgba(59, 130, 246, .35), inset 0 1px 0 rgba(255,255,255,.5); transition: transform .15s, filter .15s, box-shadow .15s; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; box-shadow: 0 8px 28px rgba(80, 190, 255, .5), inset 0 1px 0 rgba(255,255,255,.5); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: rgba(14, 28, 52, .55); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; padding: 13px; }

form.stack { display: grid; gap: 15px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select { font: inherit; color: var(--text); background: rgba(4, 9, 18, .75); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(111, 220, 255, .22); }
.msg { font-size: 13px; min-height: 18px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.alt { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ───── Connexion / inscription ───── */
.auth-wrap { min-height: 70vh; display: grid; place-items: center; }
.auth { width: 100%; max-width: 430px; }
.auth-brand { display: grid; justify-items: center; gap: 4px; margin-bottom: 22px; text-align: center; }
.auth-brand img { width: 112px; height: 112px; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 0 26px rgba(80, 190, 255, .7)); }
.auth-brand .wordmark { font-size: 40px; }
.auth .card { padding: 28px; border-color: var(--line-strong); box-shadow: 0 24px 80px rgba(0, 0, 0, .6), var(--glow); }
.auth h1 { text-align: center; font-size: 22px; margin-bottom: 2px; }
.auth .sub { text-align: center; margin-bottom: 20px; }

/* ───── Listes ───── */
.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 13px; padding: 14px 18px; }
.row .meta { color: var(--muted); font-size: 13px; }
.row form { display: flex; gap: 8px; }
.row.small { padding: 9px 13px; }
.dl-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(111,220,255,.25), rgba(59,130,246,.25)); border: 1px solid var(--line-strong); font-size: 20px; flex: none; }
.row-main { display: flex; align-items: center; gap: 14px; }
.steps { counter-reset: s; display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(111,220,255,.28), rgba(59,130,246,.28)); border: 1px solid var(--line-strong); color: var(--ice-3); font-weight: 800; }
.notice { border: 1px dashed var(--line-strong); border-radius: 13px; padding: 14px 18px; color: var(--muted); font-size: 14px; background: rgba(8, 16, 30, .5); }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.sech { margin-bottom: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ice); }
.balance { color: var(--text); border-color: var(--line-strong); }
.balance:hover { text-decoration: none; background: var(--panel-2); }

/* ───── Mini-jeux ───── */
.game-canvas { width: 100%; height: auto; display: block; background: rgba(3, 7, 15, .8); border-radius: 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.controls label { min-width: 120px; }
.quick { display: flex; gap: 6px; }
.crash-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); margin-top: 8px; align-items: start; }
@media (max-width: 800px) { .crash-layout { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; min-height: 28px; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.chip.hi { color: var(--ok); } .chip.lo { color: var(--bad); }

/* ───── Pied de page ───── */
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 22px 16px 28px; border-top: 1px solid var(--line); background: rgba(5, 10, 20, .6); }
.foot b { color: var(--ice-3); letter-spacing: .15em; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 8px 14px; padding: 10px 16px; }
  .nav { order: 3; width: 100%; margin: 0; }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 40px; }
  .hero-logo { width: 140px; height: 140px; order: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #snow { display: none; }
}
