/* ===== Base ===== */
:root{
  --bg:#0B0D17;
  --bg2:#101424;
  --text:#E8E9F0;
  --muted:#B7B9C6;
  --brand1:#6546E0;
  --brand2:#4A61FF;
  --brand3:#EACD5C;
  --card:rgba(255,255,255,.04);
  --card-2:rgba(255,255,255,.06);
  --stroke:rgba(101,70,224,.22);
  --ok: #8FE388;
}

*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text); background:radial-gradient(1200px 700px at 20% -10%, rgba(101,70,224,.35), transparent 60%),
                      radial-gradient(1200px 700px at 100% 10%, rgba(234,205,92,.18), transparent 60%),
                      var(--bg);
  background-attachment: fixed;
}

/* Accessibilité */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ===== Header ===== */
.site-header{
  display:flex; align-items:center; justify-content:flex-start;
  padding:16px 20px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,0));
  position: sticky; top:0; z-index: 10;
}
.brand-logo{ display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; }
.valorys-icon{ filter: drop-shadow(0 2px 14px rgba(101,70,224,.45)); }

/* ===== Hero ===== */
.hero{ max-width:1100px; margin:0 auto; padding:42px 16px 24px; text-align:center; }
.brand-wordmark{ font-family:"Space Grotesk",Inter,sans-serif; font-size:56px; letter-spacing:.06em; margin:0 0 8px; }
.valorys-glow{ background:linear-gradient(90deg,var(--brand1),var(--brand2) 60%,var(--brand3)); -webkit-background-clip:text; background-clip:text; color:transparent; filter: drop-shadow(0 10px 50px rgba(101,70,224,.25)); }
.hero-subtitle{ margin:0 0 22px; color:var(--muted) }

/* ===== Games strip ===== */
.games-strip{ overflow:hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); margin-bottom:18px; }
.games-track{ display:flex; gap:42px; align-items:center; animation: marquee 22s linear infinite; opacity:.85 }
.games-track img{ height:28px; opacity:.9 }
@keyframes marquee { from{ transform: translateX(0) } to{ transform: translateX(-50%) } }

/* ===== Live preview (demo) ===== */
.live-preview{ display:flex; justify-content:center; margin:14px 0 18px; transition: opacity .32s, height .32s, margin .32s; }
.live-preview.is-hidden{ opacity:0; height:0; margin:0; overflow:hidden; }
.lp-card{
  width:min(760px,100%); background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid rgba(101,70,224,.25);
  box-shadow: 0 14px 44px rgba(0,0,0,.45), inset 0 0 0 1px rgba(101,70,224,.12);
  border-radius:18px; padding:16px;
}
.lp-header{ display:flex; align-items:center; gap:10px; color:var(--muted); }
.lp-header img{ width:22px; height:22px; object-fit:contain; }
.lp-time{ margin-left:auto; font-size:12px; opacity:.8 }
.lp-body{ text-align:left; margin-top:6px; }
.lp-rank{ font-size:22px; font-weight:700; text-align:center; margin:2px 0 8px; }
.lp-meta{ color:var(--muted); font-size:14px; text-align:center; }
.lp-meter{ height:10px; background:rgba(255,255,255,.08); border-radius:999px; margin:12px 0 8px; overflow:hidden; }
.lp-meter-fill{ height:100%; width:60%; background:linear-gradient(90deg, var(--brand1), var(--brand3)); border-radius:999px; }
.lp-compare{ color:var(--muted); font-size:13px; display:flex; gap:6px; justify-content:center; flex-wrap:wrap; }

.lp-enter{ animation:lpIn .36s ease forwards; }
.lp-leave{ animation:lpOut .36s ease forwards; }
@keyframes lpIn{ from{ transform:translateY(6px); opacity:0 } to{ transform:none; opacity:1 } }
@keyframes lpOut{ from{ transform:none; opacity:1 } to{ transform:translateY(-6px); opacity:0 } }

/* ===== Input box ===== */
.hero-input{ display:flex; gap:12px; justify-content:center; align-items:center; margin:18px auto 8px; width:min(860px,100%); }
.hero-input input{
  flex:1; padding:16px 18px; background:var(--card);
  border:1px solid rgba(255,255,255,.08); border-radius:14px;
  color:var(--text); outline:none; box-shadow: 0 6px 24px rgba(0,0,0,.35), inset 0 0 0 1px rgba(101,70,224,.08);
}
.hero-input input::placeholder{ color: #9aa0b3 }
.hero-input button{
  padding:14px 18px; border-radius:14px; border:1px solid var(--stroke); color:#fff; background:linear-gradient(90deg,var(--brand1),var(--brand2));
  box-shadow: 0 10px 24px rgba(101,70,224,.35), inset 0 0 0 1px rgba(255,255,255,.08);
  font-weight:600; cursor:pointer;
}
.hero-input.loading button{ opacity:.7; cursor:progress }

/* ===== Historique ===== */
.history{ width:min(860px,100%); margin:10px auto 24px; }
.history__head{ display:flex; align-items:center; gap:10px; justify-content:space-between; margin-bottom:10px; }
.history__head h2{ font-size:18px; margin:0; color:#dfe1eb }
.history__list{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
@media (max-width: 720px){ .history__list{ grid-template-columns:1fr } }

.history-empty{
  padding:18px; text-align:center; color:var(--muted);
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08); border-radius:14px;
}

/* Carte historique */
.h-card{
  border-radius:16px; padding:14px;
  border:1px solid rgba(101,70,224,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 12px 28px rgba(0,0,0,.45), inset 0 0 0 1px rgba(101,70,224,.08);
}
.h-head{ display:flex; align-items:center; gap:10px; }
.h-icon{ width:22px; height:22px; object-fit:contain; filter: drop-shadow(0 3px 8px rgba(101,70,224,.35)); }
.h-titles{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
.h-game{ font-weight:600; }
.h-time{ font-size:12px; color:var(--muted); }
.h-rank{ margin-left:auto; font-weight:700; font-size:16px; background:linear-gradient(90deg,var(--brand1),var(--brand3)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.h-meta{ margin:8px 0 8px; font-size:13px; color:var(--muted) }
.h-meter{ height:8px; background:rgba(255,255,255,.08); border-radius:999px; overflow:hidden; }
.h-meter-fill{ height:100%; width:40%; background:linear-gradient(90deg, var(--brand1), var(--brand3)); border-radius:999px; }
.h-compare{ margin-top:8px; color:var(--muted); font-size:13px; display:flex; gap:6px; flex-wrap:wrap; }

/* ===== Result main ===== */
.hero-result{
  width:min(860px,100%); margin:20px auto 10px; padding:16px 18px; border-radius:18px;
  border:1px solid rgba(101,70,224,.25); background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: 0 14px 44px rgba(0,0,0,.45), inset 0 0 0 1px rgba(101,70,224,.12);
  text-align:left;
}
.hero-result h3{ margin:0 0 6px; }
.hero-result p{ margin:0 0 10px; color:var(--muted) }

.value-meter{ height:10px; background:rgba(255,255,255,.08); border-radius:999px; overflow:hidden; position:relative; margin:10px 0 8px; }
.value-meter__fill{ height:100%; width:0%; background:linear-gradient(90deg, var(--brand1), var(--brand3)); border-radius:999px; transition: width .35s ease; }
.value-meter__ticks{ display:flex; justify-content:space-between; font-size:11px; color:#A9AFC3; margin-top:6px; }

.ghost-btn{ background:transparent; border:1px solid rgba(255,255,255,.12); color:#dfe1eb; border-radius:10px; padding:8px 12px; cursor:pointer; }
.ghost-btn.small{ padding:6px 10px; font-size:12px }

/* ===== How it works ===== */
.howitworks{ padding:36px 16px 64px; background:linear-gradient(180deg, rgba(255,255,255,.02), transparent); }
.howitworks__inner{ max-width:1100px; margin:0 auto; }
.howitworks__title{ text-align:center; margin:0 0 18px; }
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width: 900px){ .steps{ grid-template-columns:1fr; } }
.step-card{ padding:16px; border-radius:14px; background:var(--card); border:1px solid rgba(255,255,255,.08); }
.step-icon{ margin-bottom:6px; opacity:.85 }
.reveal-init{ opacity:0; transform: translateY(8px); transition: opacity .4s, transform .4s }
.reveal-visible{ opacity:1; transform:none }

/* ===== Footer ===== */
.site-footer{ padding:26px 16px; border-top:1px solid rgba(255,255,255,.06); }
.footer-inner{ max-width:1100px; margin:0 auto; display:flex; gap:12px; align-items:center; justify-content:space-between; }
.footer-logo{ display:flex; align-items:center; gap:8px; color:#fff; text-decoration:none; }
.footer-nav{ display:flex; flex-wrap:wrap; gap:14px; }
.footer-nav a{ color:#cfd2e1; text-decoration:none; border:1px solid rgba(255,255,255,.08); padding:6px 10px; border-radius:10px; }
.footer-icon{ filter: drop-shadow(0 2px 14px rgba(101,70,224,.4)); }
