/* Portail — style commun (page d'accueil + pages légales) */
:root {
  --bg: #0d0616;
  --bg2: #1a0b29;
  --card: #1f1030;
  --line: #3a2356;
  --text: #f3eefb;
  --muted: #b3a6c6;
  --accent: #e040fb;
  --accent2: #7c4dff;
  --gold: #ffd740;
  --ok: #69f0ae;
  --bad: #ff6e7a;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #3a1460 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* barre du haut */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 6, 22, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { font-weight: 900; font-size: 22px; letter-spacing: .5px; text-decoration: none; color: var(--text); }
.logo b { background: linear-gradient(90deg, var(--accent), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spacer { flex: 1; }
.wallet {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: #2a1544; border: 1px solid var(--line); font-weight: 800; color: var(--gold); white-space: nowrap;
}
.vip-badge { color: var(--gold); font-weight: 900; }
.btn {
  border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 20px rgba(224, 64, 251, .25);
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; color: var(--text); }
.btn.small { padding: 6px 12px; font-size: 14px; }

/* sections */
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: clamp(28px, 6vw, 48px); margin: 0 0 8px; line-height: 1.1; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 560px; }
h2 { font-size: 24px; margin: 40px 0 14px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.app { position: relative; overflow: hidden; color: #fff; text-decoration: none; min-height: 180px; border: 0; }
.app .emoji { font-size: 44px; line-height: 1; }
.app h3 { margin: 4px 0 0; font-size: 22px; }
.app p { margin: 0; opacity: .9; font-size: 14px; flex: 1; }
.app .go { align-self: flex-start; background: rgba(0,0,0,.28); padding: 6px 12px; border-radius: 10px; font-weight: 800; }
.app:hover { transform: translateY(-3px); transition: transform .15s; }
.aura { background: linear-gradient(135deg, #e040fb, #5e35b1); }
.cdx { background: linear-gradient(135deg, #ffb300, #e65100); }
.iron { background: linear-gradient(135deg, #546e7a, #1b2730); }
.zoo { background: linear-gradient(135deg, #43a047, #1b5e20); }
.squad { background: linear-gradient(135deg, #1e88e5, #0b3d6e); }
.flyer { background: linear-gradient(135deg, #ff7043, #6a1b9a); }
.uc { background: linear-gradient(135deg, #7c4dff, #c62828); }
.courses { background: linear-gradient(135deg, #43a047, #0f3d1a); }
.clubc { background: linear-gradient(135deg, #e53935, #1a2030); }
.stats-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
.stat { padding: 14px; gap: 4px; }
.stat h3 { margin: 0 0 6px; font-size: 16px; }
.stat .n { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.stat .n b { color: var(--text); font-size: 16px; }
.stat .lead { margin-top: 6px; font-size: 13px; color: var(--gold); }
.pack .amount { font-size: 28px; font-weight: 900; color: var(--gold); }
.pack .price { font-size: 20px; font-weight: 800; }
.bonus { display: inline-block; font-size: 12px; font-weight: 800; color: #000; background: var(--ok); border-radius: 999px; padding: 2px 8px; }
.muted { color: var(--muted); }
.demo-note { border: 1px dashed var(--gold); color: var(--gold); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.vip-card { background: linear-gradient(135deg, #3d2a00, #2a1544); border-color: #8d6e00; }
table.hist { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.hist-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.hist-box summary { cursor: pointer; padding: 11px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.hist-box summary::-webkit-details-marker { display: none; }
.hist-box summary::after { content: 'Afficher ▾'; color: var(--muted); font-weight: 700; font-size: 13px; }
.hist-box[open] summary::after { content: 'Masquer ▴'; }
.hist-box[open] { padding-bottom: 8px; }
table.hist .times { color: var(--gold); font-weight: 800; }
table.hist td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.hist td.num { text-align: right; font-weight: 800; white-space: nowrap; }
.plus { color: var(--ok); } .minus { color: var(--bad); }

/* fenêtres */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-back.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 420px; max-height: 90vh; overflow: auto; }
.modal h3 { margin-top: 0; }
label.field { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
label.field input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #120a1c; color: var(--text); font: inherit; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 10px 0; }
label.check input { margin-top: 3px; flex: none; }
.error { color: var(--bad); font-size: 14px; min-height: 1.2em; }
.tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tabs button { flex: 1; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 8px; font-weight: 700; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2a1544; border: 1px solid var(--accent); padding: 10px 16px; border-radius: 12px; font-weight: 800; display: none; z-index: 60; }

footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 20px 0 40px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
footer a { color: var(--muted); }

/* pages légales */
.legal { max-width: 820px; margin: 0 auto; padding: 24px 16px 40px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal .todo { background: #3d2a00; color: var(--gold); padding: 0 4px; border-radius: 4px; }
.legal .maj { color: var(--muted); font-size: 14px; }

@media (max-width: 520px) {
  header.top .wrap { gap: 8px; }
  .logo { font-size: 18px; }
  .hide-sm { display: none; }
}

.apk-line { margin: 10px 2px 0; font-size: 14px; }
.apk-line a { color: inherit; font-weight: 800; }
