/* =====================================================================
   TRACKER — Habillage « chaîne TV sportive » (ADN LMTV : synthés biseautés,
   révélations clip-path, Contrail One + Oswald) en rouge-orangé électrique.
   ===================================================================== */

@font-face { font-family: 'Contrail One'; src: url('../fonts/ContrailOne-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url('../fonts/Oswald-var.woff2') format('woff2'); font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #090A0F;
  --bg-2: #11131B;
  --card: #161924;
  --card-2: #1C2030;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --ink: #F4F6FA;
  --ink-soft: #C9CEDA;
  --ink-faint: #8A91A3;
  --accent: #FF4D26;
  --accent-a: #FF3B1D;
  --accent-b: #FF6B2B;
  --accent-grad: linear-gradient(100deg, var(--accent-a) 0%, var(--accent-b) 100%);
  --accent-glow: 0 0 24px rgba(255, 77, 38, .45);
  --win: #10B981;
  --loss: #EF4444;
  --ace: #38BDF8;
  --gold: #F59E0B;
  --font-display: 'Contrail One', 'Oswald', Impact, sans-serif;
  --font-label: 'Oswald', 'Arial Narrow', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --skew: -12deg;
  --radius: 4px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 77, 38, .14), transparent 60%),
    radial-gradient(900px 400px at -10% 10%, rgba(56, 189, 248, .05), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-b); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-b); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ Header (2 niveaux, verre dépoli) */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 10, 15, .78);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 77, 38, .55) 30%, rgba(255, 107, 43, .55) 70%, transparent); pointer-events: none; }
.hdr-main { max-width: 1440px; margin: 0 auto; padding: 12px 20px 8px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }

/* Sélecteur de joueur */
.pp { position: relative; flex: 0 0 auto; }
.pp-btn {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 4px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color .15s, background .15s; max-width: 280px;
}
.pp-btn:hover, .pp-btn[aria-expanded="true"] { border-color: rgba(255, 77, 38, .6); background: rgba(255, 77, 38, .06); }
.pp-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: 0 0 36px; background: var(--card-2); box-shadow: 0 0 0 2px var(--tier, var(--accent)); }
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pp-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; }
.pp-text strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-text small { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.pp-chev svg { width: 14px; height: 14px; color: var(--ink-faint); transition: transform .15s; }
.pp-btn[aria-expanded="true"] .pp-chev svg { transform: rotate(180deg); }
.pp-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px; max-height: 60vh; overflow: auto; padding: 6px;
  background: #12141C; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  animation: pop .14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.pp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.pp-item:hover, .pp-item:focus-visible { background: rgba(255, 255, 255, .05); outline: none; }
.pp-item[aria-selected="true"] { background: rgba(255, 77, 38, .1); }
.pp-item .pp-avatar { width: 32px; height: 32px; flex-basis: 32px; }
.pp-item .meta { margin-left: auto; font-size: 11px; color: var(--ink-faint); white-space: nowrap; }

/* Recherche / ajout */
.search {
  flex: 1 1 auto; max-width: 520px; height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 5px 0 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-strong); border-radius: 999px; transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 77, 38, .15); }
.search-ic svg { width: 16px; height: 16px; color: var(--ink-faint); display: block; }
.search input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 14px; }
.search input::placeholder { color: var(--ink-faint); }
.search select { border: 0; background: rgba(255, 255, 255, .06); height: 30px; border-radius: 999px; padding: 0 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.search select option { background: #12141C; }
.search-kbd { font: 600 11px var(--font-ui); color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; }
.search:focus-within .search-kbd { display: none; }
.search-go { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .08); transition: background .15s; }
.search-go:hover, .search:focus-within .search-go { background: var(--accent-grad); color: #fff; }
.search-go svg { width: 16px; height: 16px; }
.search-go[disabled] svg { animation: spin 1s linear infinite; }

/* Actions */
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.sync-meta { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.btn-sync {
  height: 44px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-grad); color: #fff; font: 700 12px var(--font-label); letter-spacing: 1.4px; text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(255, 59, 29, .35); transition: transform .15s, box-shadow .15s;
}
.btn-sync:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 59, 29, .45); }
.btn-sync[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-sync svg { width: 16px; height: 16px; }

/* Niveau 2 : onglets + filtres */
.hdr-sub { max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.filters { display: flex; gap: 8px; padding-bottom: 8px; flex: 0 0 auto; }
.pills { display: inline-flex; padding: 3px; gap: 2px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 999px; }
.pills button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--ink-faint); white-space: nowrap; transition: color .15s, background .15s; }
.pills button:hover { color: var(--ink); }
.pills button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }

/* Progression import saison */
.bf { max-width: 1440px; margin: 0 auto; padding: 0 20px 8px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 11px; color: var(--ink-faint); }
.bf-bar { order: 2; }
.bf-bar { flex: 0 0 160px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bf-bar i { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width .6s var(--ease); }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--accent-grad); transform: skewX(var(--skew)); box-shadow: var(--accent-glow);
}
.brand-mark svg { transform: skewX(calc(-1 * var(--skew))); }
.brand-name { font-family: var(--font-display); font-size: 22px; letter-spacing: .5px; line-height: 1; }
.brand-name small { display: block; font-family: var(--font-label); font-size: 10px; letter-spacing: 2.4px; color: var(--ink-faint); text-transform: uppercase; }

.field, .btn {
  height: 36px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--card); padding: 0 12px;
}
.field { min-width: 0; }
select.field { padding-right: 28px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.field:focus { border-color: var(--accent); outline: none; }
.btn {
  cursor: pointer; font-family: var(--font-label); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; font-size: 12px;
  display: inline-flex; align-items: center; gap: 8px; transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { border-color: var(--accent); }
.btn-accent { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: var(--accent-glow); }
.btn-accent:hover { transform: translateY(-1px); }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn svg { width: 16px; height: 16px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bandeau EN DIRECT */
.live-banner { display: none; background: #0d0f15; border-top: 1px solid var(--line); overflow: hidden; }
.live-banner.on { display: block; }
.live-inner { max-width: 1440px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 14px; }
.live-tag {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 1px; padding: 3px 16px;
  background: var(--accent-grad); transform: skewX(var(--skew)); display: inline-flex; align-items: center; gap: 8px;
}
.live-tag > span { transform: skewX(calc(-1 * var(--skew))); display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.live-text { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-text img { width: 28px; height: 28px; border-radius: 2px; }
.live-sweep { height: 2px; background: var(--accent-grad); animation: sweep 2.4s var(--ease) infinite; transform-origin: left; }
@keyframes sweep { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ------------------------------------------------------------------ Onglets */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: 0 0 auto; cursor: pointer; border: 0; background: none; color: var(--ink-faint);
  font-family: var(--font-label); font-weight: 500; text-transform: uppercase; letter-spacing: 1.4px; font-size: 13px;
  padding: 10px 14px 14px; display: inline-flex; align-items: center; gap: 8px; transition: color .15s;
}
.tab .num { font-family: var(--font-display); font-weight: 400; font-size: 12px; color: var(--ink-faint); opacity: .7; }
.tab::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--accent-grad);
  transform: skewX(var(--skew)) scaleX(0); transform-origin: left; transition: transform .2s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.tab[aria-selected="true"] .num { color: var(--accent-b); opacity: 1; }
.tab[aria-selected="true"]::after { transform: skewX(var(--skew)) scaleX(1); box-shadow: 0 0 12px rgba(255, 77, 38, .6); }

main { max-width: 1440px; margin: 0 auto; padding: 18px 20px 40px; }
.panel { display: none; }
.panel.active { display: block; animation: wipe .5s var(--ease); }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

/* ------------------------------------------------------------------ Grille & cartes */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; min-width: 0; }
.card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent-grad); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0 18px; flex-wrap: wrap; }
.card-body { padding: 12px 16px 16px 18px; }

/* Synthé titre biseauté */
.synth { display: inline-flex; align-items: stretch; height: 30px; }
.synth-tag {
  background: var(--accent-grad); padding: 0 12px; display: flex; align-items: center;
  font-family: var(--font-display); font-size: 14px; transform: skewX(var(--skew)); margin-left: 4px;
}
.synth-tag > span { transform: skewX(calc(-1 * var(--skew))); }
.synth-title {
  background: #0b0d13; padding: 0 16px 0 14px; display: flex; align-items: center;
  font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; font-size: 13px;
  transform: skewX(var(--skew)); margin-left: -2px; border: 1px solid var(--line);
}
.synth-title > span { transform: skewX(calc(-1 * var(--skew))); }
.card-hint { color: var(--ink-faint); font-size: 12px; }
.chart { width: 100%; height: 300px; }
.chart.tall { height: 380px; }
.chart.short { height: 240px; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 6px 10px; cursor: pointer; font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; color: var(--ink-faint); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ Fiche Titulaire */
.hero { display: grid; grid-template-columns: 220px 1fr; min-height: 300px; position: relative; }
.hero-splash { position: absolute; inset: 0; background-size: cover; background-position: center 20%; opacity: .32; mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 70%, transparent 100%); }
.hero-left { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; gap: 6px; background: linear-gradient(180deg, rgba(255, 77, 38, .08), transparent); }
.hero-right { position: relative; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.hero-name { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); line-height: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-name small { font-family: var(--font-label); font-size: 16px; color: var(--ink-faint); letter-spacing: 1px; }
.hero-rank { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.6px; text-align: center; }
.hero-rank strong { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: .5px; color: var(--ink); }
.hero-rank span { color: var(--ink-faint); font-size: 12px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  background: rgba(9, 10, 15, .7); border: 1px solid var(--line); padding: 8px 14px; min-width: 104px;
  transform: skewX(var(--skew));
}
.stat > div { transform: skewX(calc(-1 * var(--skew))); }
.stat-label { font-family: var(--font-label); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-faint); }
.stat-value { font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.stat-value.accent { color: var(--accent-b); }
.stat-value.win { color: var(--win); } .stat-value.loss { color: var(--loss); }
.signature { display: flex; align-items: center; gap: 10px; }
.signature img { width: 44px; height: 44px; border: 2px solid var(--accent); }
.last10 { display: flex; gap: 6px; flex-wrap: wrap; }
.last10 button {
  width: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.last10 img { width: 44px; height: 44px; border-bottom: 3px solid var(--loss); }
.last10 .w img { border-bottom-color: var(--win); }
.last10 .sc { position: absolute; left: 0; right: 0; bottom: 3px; font-family: var(--font-display); font-size: 12px; background: rgba(0, 0, 0, .72); text-align: center; }
.last10 .medal { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; }

.gauge-caption { text-align: center; color: var(--ink-faint); font-size: 12px; margin-top: -8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Tableaux */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { font-family: var(--font-label); font-weight: 500; text-transform: uppercase; letter-spacing: 1.2px; font-size: 11px; color: var(--ink-faint); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; cursor: pointer; }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tr:hover td { background: rgba(255, 255, 255, .02); }
.champ-cell { display: flex; align-items: center; gap: 8px; }
.champ-cell img { width: 28px; height: 28px; border-radius: 2px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 2px; font-family: var(--font-label); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.pill.win { background: rgba(16, 185, 129, .15); color: var(--win); }
.pill.loss { background: rgba(239, 68, 68, .15); color: var(--loss); }
.pos { color: var(--win); } .neg { color: var(--loss); }
.heat-cell { font-family: var(--font-label); font-weight: 700; }

/* ------------------------------------------------------------------ Draft */
.draft { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.draft-side h3 { margin: 0 0 8px; font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.6px; font-size: 13px; }
.draft-side.ally h3 { color: var(--ace); } .draft-side.enemy h3 { color: var(--loss); }
.slot { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.slot svg { width: 26px; height: 26px; }
.slot.me { outline: 1px dashed var(--accent); outline-offset: 3px; }
.picks { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pick { background: var(--card-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.pick img.splash { width: 100%; height: 120px; object-fit: cover; object-position: center 20%; }
.pick-body { padding: 10px; }
.pick-rank { position: absolute; top: 0; left: 0; background: var(--accent-grad); font-family: var(--font-display); padding: 2px 12px; transform: skewX(var(--skew)) translateX(-4px); }
.pick-name { font-family: var(--font-display); font-size: 18px; }
.pick-score { font-family: var(--font-display); font-size: 28px; color: var(--accent-b); }
.bar { height: 6px; background: rgba(255, 255, 255, .06); margin: 3px 0 6px; }
.bar > i { display: block; height: 100%; background: var(--accent-grad); }
.bar-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-faint); }
.reasons { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ Historique */
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match-row {
  display: grid; grid-template-columns: 6px 64px 150px 1fr 330px 90px; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; padding-right: 12px; transition: border-color .2s, transform .2s var(--ease);
  text-align: left; width: 100%;
}
.match-row:hover { border-color: var(--accent); transform: translateX(3px); }
.match-row .res { align-self: stretch; background: var(--loss); }
.match-row.w .res { background: var(--win); }
.match-row .champ { position: relative; }
.match-row .champ img { width: 56px; height: 56px; margin: 6px 0; }
.match-row .champ .lvl { position: absolute; bottom: 6px; right: 0; background: #000; font-size: 10px; padding: 0 3px; }
.mr-meta { font-size: 12px; color: var(--ink-faint); line-height: 1.5; }
.mr-meta strong { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1px; color: var(--ink); font-size: 13px; }
.mr-kda { font-family: var(--font-display); font-size: 20px; }
.mr-kda small { font-family: var(--font-ui); font-size: 12px; color: var(--ink-faint); display: block; }
.icons { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.icons.build { flex-wrap: nowrap; }
.icons.build .spell { margin-right: 1px; }
.icons.build .spell:nth-child(4) { margin-right: 8px; }
.icons img { width: 26px; height: 26px; border-radius: 2px; background: #0b0d13; }
.icons .empty { width: 26px; height: 26px; background: #0b0d13; border-radius: 2px; }
.icons .spell { width: 22px; height: 22px; }
.score-badge { text-align: center; }
.score-badge b { display: block; font-family: var(--font-display); font-size: 26px; line-height: 1; }
.score-badge span { font-family: var(--font-label); font-size: 10px; letter-spacing: 1.4px; color: var(--ink-faint); text-transform: uppercase; }
.medals { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.medals svg { width: 22px; height: 22px; }
.load-more { margin: 16px auto 0; display: flex; }

/* ------------------------------------------------------------------ Modale feuille de match */
dialog.sheet { width: min(1180px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--ink); border-radius: var(--radius); }
dialog.sheet::backdrop { background: rgba(4, 5, 8, .78); backdrop-filter: blur(3px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 10px; position: sticky; top: 0; background: var(--bg-2); z-index: 2; }
.sheet-body { padding: 16px 18px 20px; display: grid; gap: 16px; }
.sheet-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.team-head { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.6px; padding: 6px 10px; display: flex; justify-content: space-between; }
.team-head.blue { background: rgba(56, 189, 248, .12); color: var(--ace); }
.team-head.red { background: rgba(239, 68, 68, .12); color: var(--loss); }
.ps-row { display: grid; grid-template-columns: 22px 36px 1fr 70px 52px; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.ps-row.me { background: rgba(255, 77, 38, .1); }
.ps-row img { width: 36px; height: 36px; }
.ps-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-row .nm small { display: block; color: var(--ink-faint); }
.ps-row .sc { font-family: var(--font-display); font-size: 18px; text-align: right; }
.ps-row svg { width: 20px; height: 20px; }
.close-x { background: none; border: 1px solid var(--line-strong); width: 36px; height: 36px; cursor: pointer; border-radius: var(--radius); }

/* ------------------------------------------------------------------ Heatmap Faille */
.rift-wrap { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1; }
.rift-wrap canvas { width: 100%; height: 100%; display: block; border: 1px solid var(--line); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-faint); justify-content: center; margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ------------------------------------------------------------------ États */
.empty-state { padding: 40px 20px; text-align: center; color: var(--ink-faint); }
.empty-state strong { display: block; font-family: var(--font-display); font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(calc(100% + 40px)); z-index: 100; visibility: hidden;
  background: var(--card-2); border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); padding: 12px 18px; max-width: calc(100vw - 32px);
  transition: transform .35s var(--ease); font-size: 13px;
}
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
.toast.error { border-left-color: var(--loss); }
.toast.ok { border-left-color: var(--win); }

/* ------------------------------------------------------------------ Footer & pages légales */
footer { border-top: 1px solid var(--line); margin-top: 30px; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 18px 20px 26px; color: var(--ink-faint); font-size: 11px; line-height: 1.6; display: grid; gap: 8px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.2px; font-size: 11px; }
.footer-links a:hover { color: var(--accent-b); }
.legal-page { max-width: 820px; margin: 0 auto; padding: 30px 20px 40px; }
.legal-page h1 { font-family: var(--font-display); font-size: 34px; margin: 0 0 18px; }
.legal-page h2 { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.4px; font-size: 16px; color: var(--accent-b); margin-top: 28px; }
.legal-page p, .legal-page li { color: var(--ink-soft); }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.error-page .code { font-family: var(--font-display); font-size: 120px; line-height: 1; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1280px) and (min-width: 821px) {
  .sync-meta { display: none; }
  .brand-name small { display: none; }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .hdr-sub { flex-direction: column; align-items: stretch; gap: 0; }
  .filters { order: -1; padding: 0 0 4px; }
}
@media (max-width: 1180px) {
  .span-3, .span-4, .span-5 { grid-column: span 6; }
  .span-7, .span-8 { grid-column: span 12; }
  .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .match-row { grid-template-columns: 6px 64px 130px 1fr 80px; }
  .match-row .build { display: none; }
}
@media (max-width: 820px) {
  .span-3, .span-4, .span-5, .span-6 { grid-column: span 12; }
  .hero { grid-template-columns: 1fr; }
  .draft, .sheet-teams { grid-template-columns: 1fr; }
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdr-main { flex-wrap: wrap; padding: 10px 16px 8px; gap: 10px; }
  .brand-name small, .sync-meta { display: none; }
  .pp { order: 2; flex: 1 1 0; min-width: 0; }
  .bf { justify-content: flex-start; }
  .bf-bar { flex-basis: 80px; }
  .pp-btn { max-width: 100%; width: 100%; }
  .pp-menu { min-width: 0; width: 100%; }
  .hdr-actions { order: 3; margin-left: 0; }
  .btn-sync { width: 44px; padding: 0; justify-content: center; }
  .btn-sync .lbl { display: none; }
  .search { order: 4; flex: 1 1 100%; max-width: none; }
  .search-kbd { display: none; }
  .hdr-sub { flex-direction: column; align-items: stretch; gap: 0; padding: 0 16px; }
  .filters { order: -1; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
  .bf { padding: 0 16px 8px; }
  main { padding-left: 16px; padding-right: 16px; }
  .match-row { grid-template-columns: 6px 56px 1fr 70px; }
  .match-row .meta-col { display: none; }
  .chart { height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
