/* ═══════════════════════════════════════════════════════════════════════
   Ligue ebTV — système de design unifié « Splatoon vivid »
   Feuille partagée par toutes les pages. Les tokens ci-dessous pilotent aussi
   les styles inline des pages (qui utilisent var(--…)) : changer un token
   re-colore l'ensemble du site. Les noms hérités (--surface, --accent, --win…)
   sont conservés pour que les pages existantes suivent sans être réécrites.
   ═══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0a14;
  --surface:     #15111f;   /* remplissage solide (cartes de manche, inputs, slots) */
  --surface2:    #241d33;   /* survol / bandeaux d'en-tête */
  --accent:      #ff2f92;
  --accent-dark: #d81e78;
  --blue:        #1b2540;   /* bouton fantôme / inputs hérités */
  --text:        #f4f2fb;
  --muted:       #9d96b8;
  --body:        #c9c3dd;
  --win:         #2fe88a;
  --lose:        #ff2f92;
  --yellow:      #ffe14d;
  --cyan:        #12e0e0;
  --panel:        rgba(255,255,255,.05);   /* verre des cartes de la refonte */
  --panel-border: rgba(255,255,255,.10);
  --line:         rgba(255,255,255,.08);
  --radius:      14px;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  text-wrap: pretty;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--yellow); }
button { font-family: inherit; }

/* ── Coquille (fond + blobs d'encre) ─────────────────────────────────── */
.app { min-height: 100vh; position: relative; overflow: hidden; }
.content { position: relative; z-index: 1; }
.blob { position: absolute; pointer-events: none; z-index: 0; border-radius: 44% 56% 60% 40%/50% 45% 55% 50%; }
.blob-pink { width: 480px; height: 480px; top: -160px; right: -160px;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 70%); opacity: var(--blob-pink-op, .22); }
.blob-cyan { width: 420px; height: 420px; bottom: -140px; left: -140px;
  border-radius: 50% 50% 40% 60%/45% 55% 45% 55%;
  background: radial-gradient(circle at 60% 60%, var(--cyan), transparent 70%); opacity: var(--blob-cyan-op, .15); }

/* ── Nav partagée ────────────────────────────────────────────────────── */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px clamp(16px,4vw,32px); border-bottom: 1px solid var(--line); }
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav-brand img { width: 32px; height: 32px; }
.nav-brand span { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.nav-brand:hover { color: var(--text); }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(14px,3vw,28px); }
.nav-link { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 700; }
.btn-account { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 13px; display: inline-block; }
.btn-account:hover { background: rgba(255,255,255,.14); color: var(--text); }
.btn-connect { background: var(--yellow); color: #1a1300; border: none; border-radius: 999px;
  padding: 9px 18px; font-weight: 700; font-size: 13px; display: inline-block; }
.btn-connect:hover { background: #fff0a0; color: #1a1300; }

/* ── Conteneurs centrés ──────────────────────────────────────────────── */
.page { max-width: 1100px; margin: 0 auto; padding: clamp(20px,5vw,32px) 20px 90px; }
.wrap-560 { max-width: 560px; margin: 0 auto; padding: clamp(28px,7vw,56px) 20px 90px; }
.wrap-720 { max-width: 720px; margin: 0 auto; padding: clamp(20px,5vw,32px) 20px 90px; }
.wrap-760 { max-width: 760px; margin: 0 auto; padding: clamp(20px,5vw,32px) 20px 90px; }
.wrap-840 { max-width: 840px; margin: 0 auto; padding: clamp(20px,5vw,36px) 20px 90px; }

/* ── Titres ──────────────────────────────────────────────────────────── */
h1 { font-size: clamp(22px,5vw,26px); font-weight: 800; letter-spacing: -.01em; color: var(--text); }
h1.page-title { margin: 0 0 4px; }
h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.subtitle { font-size: 13.5px; color: var(--muted); margin: .25rem 0 26px; }
.subtitle-center { font-size: 13.5px; color: var(--muted); text-align: center; margin: 0 0 26px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 14px; text-align: center; }
h1.title { font-size: clamp(28px,7vw,40px); font-weight: 800; letter-spacing: -.01em; line-height: 1.1;
  margin: 0 0 16px; text-align: center; }
.lead { font-size: 15px; color: var(--body); line-height: 1.6; text-align: center; margin: 0 0 40px; }
.section-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin: 22px 0 10px; }

/* ── Cartes ──────────────────────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 16px;
  padding: 22px 24px; margin-bottom: 16px; backdrop-filter: blur(6px); }
.card h2 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.card p.desc { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }

/* ── Boutons ─────────────────────────────────────────────────────────── */
.btn { display: block; width: fit-content; margin: .75rem auto 0; padding: .8rem 1.25rem;
  background: var(--accent); color: #fff; font-size: 1rem; font-weight: 700; border: none;
  border-radius: 10px; cursor: pointer; text-align: center; text-decoration: none; transition: background .15s, filter .15s; }
.btn:hover:not(:disabled) { background: var(--accent-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.btn-primary { display: block; width: 100%; text-align: center; padding: 13px; border: none; border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--yellow)); color: #1a0a14; font-weight: 800; font-size: 14px;
  cursor: pointer; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-secondary { display: block; width: 100%; text-align: center; padding: 12px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--text);
  font-weight: 700; font-size: 13.5px; cursor: pointer; }
.btn-secondary:hover { background: rgba(255,255,255,.14); color: var(--text); }

/* ── Formulaires ─────────────────────────────────────────────────────── */
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; }
input[type="text"], input.text-input {
  width: 100%; padding: .65rem .85rem; background: var(--surface);
  border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: var(--text); font-size: .95rem;
  font-family: inherit; outline: none; }
input[type="text"]:focus, input.text-input:focus { border-color: var(--accent); }
input[type="text"]::placeholder { color: #66607a; }
select.team-select { background: var(--surface); border: 1px solid rgba(255,255,255,.14); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; }

/* ── Étapes (page de connexion) ──────────────────────────────────────── */
.steps, .step-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.08);
  color: var(--accent); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; }
.step p { font-size: 13px; color: var(--body); line-height: 1.55; }
.step strong { color: var(--text); }
.error-text { color: var(--accent); font-size: 12.5px; margin-top: 10px; min-height: 1em; }

/* ── Pills (filtres division / mode) ─────────────────────────────────── */
.pill { padding: 8px 18px; background: transparent; border: 2px solid rgba(255,255,255,.14); border-radius: 999px;
  color: var(--body); font-size: 13px; font-weight: 700; cursor: pointer; }
.pill:hover { border-color: rgba(255,255,255,.3); color: var(--text); }
.pill.active { background: rgba(255,47,146,.15); border-color: var(--accent); color: #fff; }
.pill-sm { padding: 6px 14px; font-size: 12px; }

/* ── Liste de matchs (lobby / sélection) ─────────────────────────────── */
.battle-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }
.battle-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: .9rem 1.1rem; display: flex; align-items: center; gap: 1rem; cursor: pointer;
  border: 2px solid transparent; transition: border-color .12s, background .12s; user-select: none;
  position: relative; overflow: hidden; }
.battle-item::before { content: ''; position: absolute; inset: 0;
  background: var(--stage-bg, none) center/cover no-repeat; opacity: .13; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 10%, black 45%);
  mask-image: linear-gradient(to bottom, transparent 10%, black 45%); }
.battle-item > * { position: relative; z-index: 1; }
.battle-item:hover { background: rgba(255,255,255,.09); }
.battle-item.selected { border-color: var(--accent); background: rgba(255,47,146,.12); }
.battle-item input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent);
  flex-shrink: 0; pointer-events: none; }
.battle-info { flex: 1; }
.battle-main { font-weight: 700; font-size: .95rem; }
.battle-sub { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.battle-result { font-weight: 700; font-size: .88rem; }
.win  { color: var(--win); }
.lose { color: var(--lose); }
.draw { color: var(--muted); }

.selection-hint { color: var(--muted); font-size: .88rem; margin-bottom: .5rem; }
.selection-hint span { color: var(--accent); font-weight: 700; }

/* ── En-tête de match + manches (résultat) ───────────────────────────── */
.match-header { text-align: center; padding: 2rem 1rem; background: var(--panel);
  border: 1px solid var(--panel-border); border-radius: 16px; margin-bottom: 1rem; }
.score-display { font-size: 2.5rem; font-weight: 800; margin: .5rem 0; }
.score-display .divider { color: var(--muted); margin: 0 .5rem; }
.score-alpha { color: var(--win); }
.score-bravo { color: var(--lose); }

.round-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px;
  overflow: hidden; margin-bottom: .75rem; position: relative; }
.round-card::before { content: ''; position: absolute; inset: 0;
  background: var(--stage-bg, none) center/cover no-repeat; opacity: .13; z-index: 0; pointer-events: none; }
.round-header { padding: .75rem 1.25rem; background: rgba(255,255,255,.04); display: flex; align-items: center;
  gap: .75rem; font-size: .9rem; position: relative; z-index: 1; flex-wrap: wrap; }
.round-header .round-num { font-weight: 700; }
.round-header .round-info { color: var(--muted); }
.mode-icon { width: 1.25rem; height: 1.25rem; object-fit: contain; flex-shrink: 0; }
.round-body { padding: 1rem 1.25rem; display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 1rem; position: relative; z-index: 1; }
.team-label { font-weight: 700; font-size: .85rem; margin-bottom: .5rem; }
.player-row { display: flex; justify-content: space-between; font-size: .82rem; padding: .2rem 0; }
.player-name { color: var(--text); }
.player-kda { color: var(--muted); font-family: ui-monospace, monospace; }
.team-score { font-size: .8rem; color: var(--muted); margin-top: .4rem; }

/* ── Utilitaires ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
.error { color: var(--accent); font-size: .88rem; margin-top: .4rem; }
.info  { color: var(--muted); font-size: .88rem; margin-top: .4rem; }
.success { color: var(--win); font-size: .9rem; margin-top: .5rem; }
.loading-msg { text-align: center; color: var(--muted); padding: 3rem 0; }
.empty-state { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }
