:root {
  --bg: #101114;
  --card: rgba(255,255,255,0.08);
  --card-strong: rgba(255,255,255,0.13);
  --text: #f6f3ec;
  --muted: #b8b2a5;
  --accent: #ff7a2f;
  --accent-2: #ffd166;
  --danger: #ff5c77;
  --radius: 24px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,122,47,.32), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(255,209,102,.18), transparent 30rem),
    var(--bg);
}
.app { width: min(1180px, 92vw); margin: 0 auto; padding: 42px 0; }
.hero { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 28px; }
h1 { font-size: clamp(2.2rem, 6vw, 5.2rem); line-height: .9; margin: 0; letter-spacing: -0.07em; }
h2 { margin: 0 0 16px; font-size: 1.55rem; }
p { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: .75rem; color: var(--accent-2); font-weight: 800; }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.25); backdrop-filter: blur(18px); }
.auth-card { max-width: 460px; }

/* Barre d'onglets : flex, bouton déco poussé à droite via margin-left: auto */
.tabs {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  background: rgba(0,0,0,.22);
  border-radius: 999px;
}
.tabs button,
.ghost {
  border: 0;
  color: var(--text);
  background: transparent;
  padding: 12px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}
.tabs .active,
.ghost:hover {
  background: var(--card-strong);
}
#logoutBtn {
  margin-left: auto;
}

label { display: grid; gap: 8px; margin: 14px 0; color: var(--muted); font-weight: 700; }
input { width: 100%; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.3); color: var(--text); padding: 14px 16px; border-radius: 16px; font-size: 1rem; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,122,47,.15); }
.primary { width: 100%; margin-top: 10px; border: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1b1108; padding: 15px 20px; border-radius: 16px; font-weight: 900; cursor: pointer; }
.message { min-height: 24px; color: var(--danger); }
.hidden { display: none !important; }
.grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .7fr); gap: 22px; }
.section-title { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.routes { display: grid; gap: 12px; }
.route { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px; border-radius: 18px; background: rgba(0,0,0,.22); }
.route strong { font-size: 1.08rem; }
.route small { color: var(--muted); }
.counter { display: flex; align-items: center; gap: 10px; }
.counter button { width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.3rem; font-weight: 900; color: #1b1108; background: var(--accent-2); }
.count { min-width: 32px; text-align: center; font-weight: 900; font-size: 1.25rem; }
.leaderboard { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.leaderboard li { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(0,0,0,.22); }
.leaderboard b { color: var(--accent-2); }

.tab-content.hidden { display: none; }

@media (max-width: 820px) {
  .grid, .hero { grid-template-columns: 1fr; display: grid; }
}
