/* ============================================================
   MADBOT — landing post-apo / Rust
   Palette tirée de la mascotte : rouille, vert toxique, cyan
   ============================================================ */
:root {
  --bg0: #0b0907;
  --bg1: #151009;
  --bg2: #1d1610;
  --panel: #181208;
  --line: #2e251a;
  --rust: #e8641f;
  --rust-deep: #b2470f;
  --toxic: #a8e616;
  --cyan: #5fd9ff;
  --hazard: #d9a514;
  --blurple: #5865f2;
  --text: #ece3d2;
  --muted: #a99e8a;
  --accent: var(--toxic);
  --accent-ink: #10130a;
  --font-display: "Black Ops One", system-ui, sans-serif;
  --font-head: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(1100px 500px at 80% -10%, rgba(232, 100, 31, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(168, 230, 22, 0.05), transparent 60%);
}

body[data-scanlines="on"]::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.14) 2px 4px);
  mix-blend-mode: multiply;
}

::selection { background: var(--accent); color: var(--accent-ink); }
img { max-width: 100%; display: block; }

/* Sélecteur de langue (dashboard / landing / vitrine) */
.topbar-actions { display: inline-flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-switch a { padding: 5px 9px; font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-decoration: none; line-height: 1; }
.lang-switch a.on { background: var(--accent); color: var(--accent-ink); }
.lang-switch a:not(.on):hover { color: var(--accent); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; }

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

/* nav */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s;
}
.topbar.scrolled { background: rgba(11,9,7,.85); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 6px rgba(168,230,22,.45)); }
.brand span { font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; color: var(--text); }
.brand b { color: var(--accent); font-weight: inherit; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a {
  text-decoration: none; font-family: var(--font-head); font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); transition: color .2s;
}
.topbar nav a:hover { color: var(--accent); }

/* boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px; text-transform: uppercase;
  letter-spacing: 1px; text-decoration: none; padding: 14px 26px; border: 1px solid transparent;
  cursor: pointer; position: relative;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-discord { background: var(--blurple); color: #fff; }
.btn-discord:hover { box-shadow: 0 6px 28px rgba(88,101,242,.45); filter: brightness(1.08); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { box-shadow: 0 6px 28px color-mix(in oklch, var(--accent) 45%, transparent); }
.btn-ghost { background: rgba(236,227,210,.04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head);
  font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  background: color-mix(in oklch, var(--accent) 8%, transparent); padding: 7px 14px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.kicker .rad { width: 15px; height: 15px; animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero h1 { font-family: var(--font-display); font-size: clamp(64px, 9vw, 124px); letter-spacing: 2px; margin: 22px 0 6px; color: var(--text); line-height: .95; }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; overflow: hidden; opacity: 0; }
.glitch::before { color: var(--cyan); z-index: -1; }
.glitch::after { color: var(--rust); z-index: -2; }
.tagline { font-family: var(--font-head); font-weight: 700; font-size: clamp(20px, 2.6vw, 30px); text-transform: uppercase; letter-spacing: 1px; color: var(--rust); margin-bottom: 18px; }
.tagline em { font-style: normal; color: var(--accent); }
.hero p.lede { max-width: 56ch; font-size: 18px; color: var(--muted); margin: 0 0 30px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* mascotte */
.mascot-zone { position: relative; display: grid; place-items: center; }
.mascot-zone .ring { position: absolute; width: min(120%, 520px); aspect-ratio: 1; border-radius: 50%; border: 1px dashed color-mix(in oklch, var(--accent) 35%, transparent); animation: spin 40s linear infinite; }
.mascot-zone .ring.r2 { width: min(90%, 400px); border-style: solid; border-color: rgba(95,217,255,.12); animation-direction: reverse; animation-duration: 28s; }
.mascot-zone .glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklch, var(--accent) 22%, transparent), transparent 65%); animation: pulse 3.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(1.08); } }
.mascot { position: relative; width: min(100%, 440px); animation: float 5.5s ease-in-out infinite; filter: drop-shadow(0 24px 40px rgba(0,0,0,.6)); will-change: transform; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-18px) rotate(1deg); } }

/* hazard + tape */
.hazard { height: 12px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 22px, #131008 22px 44px); background-size: 62px 62px; animation: stripes 2.4s linear infinite; border-top: 1px solid #000; border-bottom: 1px solid #000; }
@keyframes stripes { to { background-position: 62px 0; } }
.tape { background: var(--bg2); border-bottom: 1px solid var(--line); overflow: hidden; padding: 13px 0; }
.tape-track { display: flex; gap: 48px; width: max-content; animation: tape 30s linear infinite; font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tape-track b { color: var(--accent); font-weight: 700; }
.tape-track .sep { color: var(--rust); }
@keyframes tape { to { transform: translateX(-50%); } }

/* stats */
.stats { background: var(--bg1); border-bottom: 1px solid var(--line); padding: 44px 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); color: var(--accent); text-shadow: 0 0 24px color-mix(in oklch, var(--accent) 40%, transparent); }
.stat .lbl { font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* sections */
.section { padding: 110px 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(34px, 4.5vw, 52px); font-weight: 700; text-transform: uppercase; margin: 16px 0 14px; }
.section-head h2 mark { background: none; color: var(--accent); }
.section-head p { color: var(--muted); margin: 0; text-wrap: pretty; }

/* features */
#features { background: var(--bg0); }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  position: relative; background: linear-gradient(160deg, var(--bg2), var(--bg1)); border: 1px solid var(--line);
  padding: 34px 32px; clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  transition: transform .25s, border-color .25s; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 200px at var(--mx,50%) var(--my,0%), color-mix(in oklch, var(--accent) 9%, transparent), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-5px); border-color: color-mix(in oklch, var(--accent) 45%, var(--line)); }
.card:hover::before { opacity: 1; }
.card .cmd { position: absolute; top: 20px; right: 24px; font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--cyan); background: rgba(95,217,255,.08); border: 1px solid rgba(95,217,255,.25); padding: 3px 9px; }
.card .icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent); background: color-mix(in oklch, var(--accent) 9%, transparent); border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); margin-bottom: 20px; }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; text-wrap: pretty; }

/* nouveautés */
#news { background: var(--bg1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.log { background: var(--bg2); border: 1px solid var(--line); padding: 28px; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.log-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.log .ver { font-family: var(--font-display); font-size: 17px; color: var(--rust); }
.log:first-child .ver { color: var(--accent); }
.log .date { font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.log .new-badge { margin-left: auto; font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: 1px; background: var(--accent); color: var(--accent-ink); padding: 2px 8px; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.log h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.log ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 15.5px; display: grid; gap: 8px; }
.log li { padding-left: 18px; position: relative; }
.log li::before { content: "▸"; position: absolute; left: 0; color: var(--rust); }

/* roadmap */
.timeline { position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--rust) 60%, var(--line)); }
.tl-item { position: relative; padding: 0 0 42px 48px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .dot { position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg0); border: 2px solid var(--rust); }
.tl-item[data-status="live"] .dot { border-color: var(--accent); box-shadow: 0 0 14px color-mix(in oklch, var(--accent) 60%, transparent); }
.tl-item[data-status="live"] .dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); animation: blink 1.4s steps(2) infinite; }
.chip { display: inline-block; font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 3px 10px; margin-bottom: 10px; }
.chip.live { background: color-mix(in oklch, var(--toxic) 14%, transparent); color: var(--toxic); border: 1px solid color-mix(in oklch, var(--toxic) 40%, transparent); }
.chip.soon { background: rgba(95,217,255,.08); color: var(--cyan); border: 1px solid rgba(95,217,255,.3); }
.chip.plan { background: rgba(232,100,31,.08); color: var(--rust); border: 1px solid rgba(232,100,31,.35); }
.tl-item h3 { font-size: 20px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.tl-item p { color: var(--muted); margin: 0; max-width: 60ch; text-wrap: pretty; }

/* CTA finale */
.cta-final { position: relative; background: radial-gradient(700px 320px at 50% 110%, color-mix(in oklch, var(--accent) 14%, transparent), transparent 70%), var(--bg1); border-top: 1px solid var(--line); text-align: center; padding: 110px 0 120px; overflow: hidden; }
.cta-final img.mini { width: 130px; margin: 0 auto 24px; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 0 30px color-mix(in oklch, var(--accent) 35%, transparent)); }
.cta-final h2 { font-size: clamp(32px, 4.5vw, 50px); font-weight: 700; text-transform: uppercase; }
.cta-final h2 mark { background: none; color: var(--accent); }
.cta-final p { color: var(--muted); max-width: 52ch; margin: 16px auto 34px; text-wrap: pretty; }
.cta-final .hero-ctas { justify-content: center; }

/* footer */
footer.madbot { border-top: 1px solid var(--line); padding: 30px 0; background: var(--bg0); }
footer.madbot .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
footer.madbot .links { margin-left: auto; display: flex; gap: 22px; }
footer.madbot a { text-decoration: none; color: var(--muted); transition: color .2s; }
footer.madbot a:hover { color: var(--accent); }

/* reveals */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal[data-delay="1"] { transition-delay: .1s; }
html.js .reveal[data-delay="2"] { transition-delay: .2s; }
html.js .reveal[data-delay="3"] { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
body[data-fx="off"] .mascot, body[data-fx="off"] .ring, body[data-fx="off"] .glow,
body[data-fx="off"] .hazard, body[data-fx="off"] .new-badge, body[data-fx="off"] .dot::after { animation: none !important; }
body[data-fx="off"] #embers { display: none; }

@media (prefers-reduced-motion: no-preference) {
  body[data-fx="on"] .glitch::before { animation: glitchA 4.2s steps(1) infinite; }
  body[data-fx="on"] .glitch::after { animation: glitchB 4.2s steps(1) infinite; }
}
@keyframes glitchA {
  0%, 91%, 95.5%, 100% { opacity: 0; transform: none; clip-path: none; }
  92% { opacity: .85; transform: translate(-6px, 2px); clip-path: inset(12% 0 58% 0); }
  93.5% { opacity: .85; transform: translate(5px, -2px); clip-path: inset(60% 0 18% 0); }
  95% { opacity: .85; transform: translate(-3px, 1px); clip-path: inset(35% 0 40% 0); }
}
@keyframes glitchB {
  0%, 91.5%, 96%, 100% { opacity: 0; transform: none; clip-path: none; }
  92.5% { opacity: .8; transform: translate(6px, -2px); clip-path: inset(55% 0 22% 0); }
  94% { opacity: .8; transform: translate(-5px, 2px); clip-path: inset(8% 0 70% 0); }
  95.5% { opacity: .8; transform: translate(4px, 1px); clip-path: inset(42% 0 33% 0); }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lede { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .mascot-zone { order: -1; }
  .mascot { width: min(60%, 300px); }
  .features-grid, .news-grid { grid-template-columns: 1fr; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .topbar nav { display: none; }
}
