/* ============ Tribune — design ============ */
:root {
  --bg: #0a1437;
  --bg2: #0d1840;
  --surface: #111d4a;
  --surface2: #172559;
  --surface3: #203069;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.12);
  --text: #eef2fb;
  --text2: #aab4d6;
  --text3: #6f7aa3;
  --accent: #ff5fc1;
  --accent2: #8b5cff;
  --accent-grad: linear-gradient(135deg, #ff5fc1 0%, #c25cff 100%);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --live: #ff3d5a;
  --gold: #ffc940;
  --win: #22c983;
  --draw: #8a94aa;
  --lose: #ff5a6e;
  --team: #4b6cff;
  --home: #4b6cff;
  --away: #ff8a3d;
  --r: 18px;
  --r-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 64px;
  font-synthesis: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
h1, h2 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 750; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.filled { fill: currentColor; }
.muted { color: var(--text2); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 14px 16px; }
.full { width: 100%; }
[hidden] { display: none !important; }

#app { max-width: 640px; margin: 0 auto; min-height: 100vh; }
#view { outline: none; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); }
#view.enter { animation: enter 0.28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page { padding: 0 16px; }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  max-width: 640px; margin: 0 auto;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: rgba(8, 16, 46, 0.88);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid var(--line);
}
.tabbar a {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; color: var(--text3); font-size: 11px; font-weight: 600; transition: color 0.2s;
}
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.active { color: var(--text); }
.tabbar a.active .ic { color: var(--accent); filter: drop-shadow(0 0 8px rgba(255, 95, 193, 0.45)); }
.tab-live { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px var(--bg); animation: pulse 1.4s infinite; }

/* ---------- En-têtes ---------- */
.page-head { padding: calc(14px + var(--safe-t)) 0 10px; }
.page-head.sticky {
  position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  background: rgba(10, 20, 55, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.ph-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.ph-row h1 { flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: var(--text); flex: none; position: relative;
  transition: transform 0.15s, background 0.2s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn.on { color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  transition: transform 0.15s, filter 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 24px -8px rgba(255, 95, 193, 0.55); }
.btn.ghost { background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line2); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn.sm .ic { width: 17px; height: 17px; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 650; font-size: 13.5px; }
.link .ic { width: 16px; height: 16px; }
.row-end { display: flex; justify-content: flex-end; margin: 14px 0 4px; }

/* ---------- Cartes & sections ---------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(17, 26, 46, 0.92) 100%);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.card + .card { margin-top: 12px; }
.sec { margin-top: 22px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.list > * + * { border-top: 1px solid var(--line); }
.hint { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text3); font-size: 12.5px; margin: 10px 0 0; }
.hint .ic { width: 15px; height: 15px; }

/* ---------- Écussons ---------- */
.crest { object-fit: contain; flex: none; }
.crest.xxs { width: 14px; height: 14px; }
.crest.xs { width: 20px; height: 20px; }
.crest.sm { width: 24px; height: 24px; }
.crest.md { width: 40px; height: 40px; }
.crest.lg { width: 56px; height: 56px; }
.crest.xl { width: 68px; height: 68px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)); }
.league-logo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.league-logo.xs { width: 18px; height: 18px; }
.league-logo.xxs { width: 14px; height: 14px; }
.img-ph { display: inline-block; border-radius: 50%; background: var(--surface3); }

/* ---------- Forme (V/N/D) ---------- */
.form { display: flex; gap: 4px; }
.fchip {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px;
  font-size: 11.5px; font-weight: 800; color: #fff; background: var(--draw);
}
.fchip.f-V { background: var(--win); }
.fchip.f-D { background: var(--lose); }
.fchip.f-x { background: var(--surface3); color: var(--text3); }
.fchip.sm { min-width: 34px; height: 20px; font-size: 11px; }
.form.mini .fchip { min-width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }

/* ---------- Live ---------- */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 5px; vertical-align: middle; animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.7); } 70% { box-shadow: 0 0 0 7px rgba(255, 61, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0); } }
.live-txt { color: var(--live); font-weight: 750; }
.badge-live { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: rgba(255, 61, 90, 0.16); color: #ff8094; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }

/* ---------- Chaîne TV ---------- */
.tv {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 7px;
  background: var(--tv-bg); color: var(--tv-fg); font-size: 11.5px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.tv .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.tv.sm { height: 20px; font-size: 10.5px; padding: 0 7px 0 5px; }
.tv.sm .ic { width: 11px; height: 11px; }

/* ---------- Ligne de match ---------- */
.match-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; position: relative; transition: background 0.2s; }
.match-row:active { background: rgba(255, 255, 255, 0.04); }
.match-row.fav::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.mr-status { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--text2); text-align: center; font-variant-numeric: tabular-nums; }
.mr-status.live { color: var(--live); flex-direction: row; }
.mr-status.off { color: var(--text3); font-size: 11px; }
.mr-day { font-size: 10.5px; color: var(--text3); font-weight: 600; }
.mr-teams { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mr-team { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 550; }
.mr-team.win { font-weight: 800; }
.mr-team.lose { color: var(--text2); }
.mr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pens { font-size: 11px; color: var(--text3); }
.mr-score { width: 20px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.match-row.live .mr-score { color: var(--live); }
.match-row.flash, .mh-score.flash { animation: flash 2.2s ease-out; }
@keyframes flash { 0%, 30% { background: rgba(255, 95, 193, 0.22); } 100% { background: transparent; } }

/* ---------- Écran Matchs ---------- */
.date-pick { position: relative; overflow: hidden; }
.date-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.datestrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 2px 16px; scroll-behavior: smooth; }
.datestrip::-webkit-scrollbar, .chips::-webkit-scrollbar, .league-chips::-webkit-scrollbar, .hscroll::-webkit-scrollbar, .seg.scroll::-webkit-scrollbar { display: none; }
.ds-day {
  flex: none; width: 50px; padding: 7px 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  color: var(--text2); font-size: 11.5px; font-weight: 600; transition: background 0.2s, color 0.2s;
}
.ds-day b { font-size: 17px; color: var(--text); }
.ds-day.today span { color: var(--accent); }
.ds-day.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(255, 95, 193, 0.7); }
.ds-day.on b, .ds-day.on span { color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 2px; padding: 0 16px; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); font-size: 13.5px; font-weight: 650; color: var(--text2);
}
.chip i { font-style: normal; font-size: 11.5px; padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.chip .ic { width: 15px; height: 15px; }
.chip .live-dot { margin: 0; }
.chip.on { background: rgba(255, 95, 193, 0.14); border-color: rgba(255, 95, 193, 0.45); color: var(--text); }
.chip.has-live i { background: var(--live); color: #fff; }
.day-title { font-size: 20px; font-weight: 800; margin: 18px 2px 4px; letter-spacing: -0.02em; }
.league-block { margin-top: 14px; }
.lh-btn { display: block; width: 100%; text-align: left; }
.league-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 9px; }
.lh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.lh-name { font-weight: 750; font-size: 14.5px; }
.lh-area { font-size: 11.5px; color: var(--text3); }
.lh-count { font-size: 12px; color: var(--text2); font-weight: 600; }
.chev { display: inline-grid; color: var(--text3); transform: rotate(90deg); transition: transform 0.2s; }
.chev .ic { width: 16px; height: 16px; }
.league-block.collapsed .chev { transform: rotate(0deg); }
.league-block.collapsed .card { display: none; }
.star-ic { color: var(--gold); }
.pinned .card { border-color: rgba(255, 201, 64, 0.22); }

/* ---------- Vides / erreurs / chargement ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 24px; color: var(--text2); }
.empty p { margin: 6px 0 0; color: var(--text); font-weight: 700; font-size: 16px; }
.empty small { max-width: 280px; }
.empty .btn { margin-top: 14px; }
.empty-ic { width: 44px; height: 44px; color: var(--text3); stroke-width: 1.5; }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 16px; }
.sk-row + .sk-row { border-top: 1px solid var(--line); }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.sk-a { width: 36px; height: 14px; }
.sk-b { flex: 1; height: 14px; }
.sk-crest { width: 64px; height: 64px; border-radius: 50%; }
.sk-score { width: 90px; height: 40px; }
.sk-hero .mh-main { padding: 26px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card > .sk-row:first-child { margin-top: 0; }
.page > .card { margin-top: 12px; }

/* ---------- Écran club ---------- */
.team-hero {
  margin: 0 -16px; padding: calc(10px + var(--safe-t)) 16px 18px; position: relative;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--team) 55%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--team) 22%, var(--bg)) 0%, var(--bg) 100%);
}
.th-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 850; font-size: 18px; letter-spacing: -0.02em; }
.brand .ic { color: var(--accent); width: 22px; height: 22px; }
.th-id { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.th-name { font-size: 25px; line-height: 1.1; }
.th-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 6px; color: var(--text2); font-size: 13px; font-weight: 600; }

.seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line); margin-top: 6px;
}
.seg button { flex: 1; height: 36px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--text2); white-space: nowrap; padding: 0 12px; transition: background 0.2s, color 0.2s; }
.seg button.on { background: var(--surface3); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.seg.sticky { position: sticky; top: calc(8px + var(--safe-t)); z-index: 15; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(15, 27, 72, 0.9); }
.seg.scroll { overflow-x: auto; scrollbar-width: none; }
.seg.scroll button { flex: 1 0 auto; }
.seg.small { margin-top: 10px; }
.seg.small button { height: 32px; font-size: 13px; }
.tab-body { padding-top: 4px; }

/* Grande carte du prochain match */
.spotlight {
  display: block; margin-top: 16px; padding: 16px; border-radius: 24px; position: relative; overflow: hidden; cursor: pointer;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--team) 35%, transparent), transparent 70%),
    linear-gradient(160deg, var(--surface2), var(--surface));
  border: 1px solid var(--line2);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
}
.spotlight.is-live { border-color: rgba(255, 61, 90, 0.45); box-shadow: 0 0 0 1px rgba(255, 61, 90, 0.25), 0 20px 50px -20px rgba(255, 61, 90, 0.4); }
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-comp { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--text2); min-width: 0; }
.sp-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 16px; }
.sp-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 750; font-size: 14.5px; }
.sp-center { text-align: center; min-width: 92px; }
.sp-time { font-size: 32px; font-weight: 850; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sp-date { color: var(--text2); font-weight: 650; font-size: 13px; }
.sp-score { font-size: 44px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sp-score i { font-style: normal; color: var(--text3); margin: 0 6px; }
.sp-clock { color: var(--live); font-weight: 800; font-size: 14px; }
.sp-scorers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text2); }
.sp-scorers span:last-child { text-align: right; }
.countdown { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.cd-box { width: 58px; padding: 8px 0 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); text-align: center; }
.cd-box b { display: block; font-size: 22px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cd-box span { font-size: 10.5px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.sp-when { text-align: center; color: var(--text2); font-size: 12.5px; margin-top: 10px; }
.sp-tv { display: flex; justify-content: center; margin-top: 10px; }
.sp-actions { display: flex; gap: 8px; margin-top: 16px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line2); font-weight: 700; font-size: 13.5px;
}
.pill:first-child { flex: 1; background: var(--accent-grad); color: #fff; border: 0; }
.pill:active { transform: scale(0.97); }
.pill .ic { width: 18px; height: 18px; }

/* Derniers résultats */
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; }
.res-card {
  flex: none; width: 104px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 6px; scroll-snap-align: start; position: relative;
}
.res-card::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--draw); }
.res-card.r-V::after { background: var(--win); }
.res-card.r-D::after { background: var(--lose); }
.rc-top { display: flex; align-items: center; justify-content: space-between; width: 100%; font-size: 10.5px; color: var(--text3); font-weight: 650; }
.rc-opp { font-size: 12px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.rc-score { font-size: 18px; font-weight: 850; font-variant-numeric: tabular-nums; }
.rc-score small { font-size: 10px; color: var(--text3); }
.res-card .fchip { position: absolute; top: 34px; right: 12px; min-width: 18px; height: 18px; font-size: 10px; display: none; }

/* À venir */
.up-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.up-date { width: 40px; flex: none; text-align: center; line-height: 1.1; }
.up-date b { display: block; font-size: 19px; font-weight: 850; }
.up-date span { font-size: 11px; color: var(--text3); font-weight: 700; text-transform: uppercase; }
.up-main { flex: 1; min-width: 0; }
.up-teams { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; }
.up-teams span { overflow: hidden; text-overflow: ellipsis; }
.up-teams i { font-style: normal; color: var(--text3); }
.up-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--text2); }
.up-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

/* Tableaux */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.table th { font-size: 11px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 6px; text-align: center; }
.table td { padding: 9px 6px; text-align: center; border-top: 1px solid var(--line); }
.table .l { text-align: left; }
.table th:first-child, .table td:first-child { padding-left: 12px; width: 40px; }
.table th:last-child, .table td:last-child { padding-right: 14px; }
.table tbody tr { cursor: pointer; transition: background 0.2s; }
.table tbody tr:active { background: rgba(255, 255, 255, 0.04); }
.table tr.me td { background: rgba(255, 95, 193, 0.09); }
.table tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tcell { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.rk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 750; font-size: 12.5px; position: relative; }
.rk[style] { background: color-mix(in srgb, var(--z) 22%, transparent); color: var(--z); }
.table.mini td { padding: 8px 6px; }
@media (max-width: 380px) { .hide-xs { display: none; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 4px 6px; font-size: 12px; color: var(--text2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* Buteurs */
.scorer { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.scorer.me { background: rgba(255, 95, 193, 0.07); }
.sc-rank { width: 20px; text-align: center; font-weight: 800; color: var(--text3); font-size: 13px; }
.sc-main { flex: 1; min-width: 0; }
.sc-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent-grad); }
.sc-val { text-align: right; line-height: 1.1; }
.sc-val b { display: block; font-size: 20px; font-weight: 850; }
.sc-val small { font-size: 10.5px; color: var(--text3); font-weight: 600; }

/* Calendrier complet */
.sched-item .si-meta { display: flex; align-items: center; gap: 6px; padding: 9px 14px 0; font-size: 11.5px; color: var(--text3); font-weight: 650; }
.sched-item .si-meta .fchip { margin-left: auto; min-width: 18px; height: 18px; font-size: 10px; }
.sched-item .match-row { padding-top: 6px; }

/* Effectif */
.squad-row { display: flex; align-items: center; gap: 11px; padding: 10px 14px; }
.jersey { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--c) 30%, var(--surface2)); }
.bench .jersey { background: var(--c); }
.flag { width: 20px; height: 14px; object-fit: cover; border-radius: 3px; flex: none; }
.sq-main { flex: 1; min-width: 0; }
.sq-name { font-weight: 700; }
.inj { color: var(--live); font-size: 12px; }
.sq-stats { display: flex; gap: 8px; font-size: 13px; font-weight: 750; }
.sq-stats span { display: inline-flex; align-items: center; gap: 3px; }
.sq-stats .ic { width: 15px; height: 15px; }
.sq-stats .pd { color: var(--text2); font-size: 12px; }

/* ---------- Fiche match ---------- */
.match-hero {
  margin: 0 -16px; padding: calc(8px + var(--safe-t)) 16px 18px; position: relative; overflow: hidden;
  background:
    radial-gradient(80% 120% at 0% 10%, color-mix(in srgb, var(--home) 38%, transparent), transparent 65%),
    radial-gradient(80% 120% at 100% 10%, color-mix(in srgb, var(--away) 38%, transparent), transparent 65%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}
.match-hero.is-live::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--live), transparent); animation: sweep 2s linear infinite; background-size: 200% 100%; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.mh-top { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.mh-comp { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text2); white-space: nowrap; overflow: hidden; }
.mh-comp span { overflow: hidden; text-overflow: ellipsis; }
.mh-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin-top: 12px; }
.mh-team { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; font-weight: 750; font-size: 15px; line-height: 1.2; }
.mh-center { text-align: center; min-width: 110px; }
.mh-score { display: flex; align-items: center; justify-content: center; font-size: 50px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; border-radius: 14px; line-height: 1.1; }
.mh-score i { font-style: normal; color: var(--text3); margin: 0 8px; font-size: 36px; }
.mh-pens { font-size: 12px; color: var(--text2); font-weight: 700; }
.mh-time { font-size: 36px; font-weight: 850; letter-spacing: -0.03em; }
.mh-status { display: inline-flex; align-items: center; justify-content: center; margin-top: 4px; font-size: 13px; font-weight: 750; color: var(--text2); }
.mh-status.live { color: var(--live); padding: 3px 10px; border-radius: 99px; background: rgba(255, 61, 90, 0.14); }
.mh-scorers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-top: 14px; font-size: 12.5px; color: var(--text2); }
.mh-scorers .l { text-align: right; }
.mh-scorers b { color: var(--text); font-weight: 700; }
.mh-ball .ic { width: 15px; height: 15px; color: var(--text3); margin-top: 1px; }
.mh-info { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin-top: 16px; font-size: 12px; color: var(--text2); }
.mh-info > span { display: inline-flex; align-items: center; gap: 5px; }
.mh-info .ic { width: 14px; height: 14px; }

/* Fil du match */
.timeline { padding: 6px 0; margin-top: 12px; }
.timeline.list > * + *, .timeline > * + * { border-top: 0; }
.tl-row { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: center; padding: 7px 12px; }
.tl-row.is-goal { background: linear-gradient(90deg, transparent, rgba(255, 95, 193, 0.07), transparent); }
.tl-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-row.home .tl-side:first-child { justify-content: flex-end; text-align: right; }
.tl-txt { min-width: 0; }
.tl-main { font-weight: 700; font-size: 13.5px; }
.tl-sub { font-size: 12px; color: var(--text2); }
.tl-main .in { color: var(--win); }
.tl-sub .out { color: var(--lose); }
.tl-min { text-align: center; font-size: 12px; font-weight: 800; color: var(--text2); }
.tl-min::before { content: ""; }
.tl-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface3); flex: none; }
.tl-ic .ic { width: 16px; height: 16px; }
.tl-ic.goal { background: var(--accent-grad); color: #fff; }
.tl-ic.goal.og { background: var(--lose); color: #fff; }
.tl-ic.sub { color: var(--accent2); }
.tl-ic.miss { color: var(--lose); }
.tl-ic.var { font-size: 9px; font-weight: 900; }
.tl-score { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); font-size: 12px; }
.tl-sep { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--text3); font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; }
.tl-sep::before, .tl-sep::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.b-card { display: inline-block; width: 10px; height: 14px; border-radius: 2px; background: #ffd23f; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); vertical-align: middle; }
.b-card.red { background: #ff3b47; }

/* Terrain */
.pitch-card { margin-top: 12px; padding: 12px; background: linear-gradient(180deg, #0f2a1d, #0c2218); border-color: rgba(120, 255, 180, 0.08); }
.pitch-label { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; font-size: 13px; }
.pitch-label.bottom { padding: 10px 4px 4px; }
.pitch-label span { margin-left: auto; font-weight: 800; color: #9be7bd; font-variant-numeric: tabular-nums; }
.pitch {
  position: relative; aspect-ratio: 68 / 112; border-radius: 12px; overflow: hidden;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 8.33%, transparent 8.33% 16.66%),
    radial-gradient(ellipse at center, #1f7a4a 0%, #18643c 60%, #135232 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 0.35; }
.pitch-lines .fill { fill: rgba(255, 255, 255, 0.5); }
.half { position: absolute; left: 0; right: 0; height: 50%; display: flex; flex-direction: column; justify-content: space-around; padding: 2% 1%; }
.half.top { top: 0; padding-bottom: 3%; }
.half.bottom { bottom: 0; padding-top: 3%; }
.pline { display: flex; justify-content: space-evenly; align-items: flex-start; }
.pl { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 19%; min-width: 0; transition: transform 0.15s; }
.pl:active { transform: scale(0.92); }
.pl-dot {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--c); color: var(--ink); font-weight: 850; font-size: 13px;
  border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.pl-name {
  max-width: 100%; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, 0.45);
  font-size: 10.5px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-badges { position: absolute; right: -10px; top: -7px; display: flex; gap: 1px; }
.b-goal { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #fff; color: #0b1120; position: relative; }
.b-goal .ic { width: 13px; height: 13px; stroke-width: 2; }
.b-goal i { position: absolute; right: -5px; top: -5px; font-style: normal; font-size: 9px; font-weight: 900; background: var(--accent); color: #fff; border-radius: 99px; padding: 0 3px; }
.b-goal.og { background: var(--lose); color: #fff; }
.pl-badges .b-card { width: 9px; height: 12px; margin-top: 2px; }
.b-ast { display: inline-grid; place-items: center; height: 15px; padding: 0 3px; border-radius: 4px; background: var(--accent2); color: #fff; font-size: 9px; font-weight: 900; margin-top: 1px; }
.b-sub { position: absolute; left: -12px; bottom: -6px; padding: 0 3px; border-radius: 5px; background: #0b1120; color: #ff8a98; font-size: 9px; font-weight: 800; border: 1px solid rgba(255, 255, 255, 0.15); }
.mini-seg { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.mini-seg button { padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 750; color: var(--text2); }
.mini-seg button.on { background: var(--surface3); color: var(--text); }
.bench-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 14px; text-align: left; }
.bench-row + .bench-row { border-top: 1px solid var(--line); }
.bench-row:not(.in) { opacity: 0.72; }
.bn-name { flex: 1; font-weight: 650; }
.bn-ev { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.bn-ev .ic { width: 15px; height: 15px; }
.sub-in { display: inline-flex; align-items: center; gap: 3px; color: var(--win); font-weight: 750; }

/* Fiche joueur */
.player-sheet { padding-bottom: 6px; }
.pls-head { display: flex; align-items: center; gap: 14px; }
.pls-photo { position: relative; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, #000)); display: grid; place-items: center; }
.pls-photo span { font-size: 24px; font-weight: 850; color: rgba(255, 255, 255, 0.9); }
.pls-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface2); }
.pls-name { font-size: 21px; font-weight: 850; letter-spacing: -0.02em; }
.pls-sub { display: flex; align-items: center; gap: 6px; color: var(--text2); font-size: 13px; margin-top: 3px; }
.pls-tl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pls-tl div { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface2); font-size: 13px; font-weight: 650; }
.pls-tl .ic { width: 15px; height: 15px; }
.pls-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.pls-stat { padding: 12px 8px; border-radius: 14px; background: var(--surface2); text-align: center; }
.pls-stat b { display: block; font-size: 22px; font-weight: 850; color: var(--text3); }
.pls-stat.nz b { color: var(--text); }
.pls-stat span { font-size: 11px; color: var(--text2); font-weight: 600; }

/* Stats */
.stats { padding: 14px 16px 10px; margin-top: 12px; }
.st-teams { display: flex; justify-content: space-between; margin-bottom: 8px; }
.poss { margin-bottom: 18px; }
.poss-head { display: flex; justify-content: space-between; align-items: baseline; }
.poss-head b { font-size: 22px; font-weight: 850; }
.poss-head span { font-size: 12.5px; color: var(--text2); font-weight: 700; }
.poss-bar { display: flex; gap: 4px; height: 10px; margin-top: 8px; }
.poss-bar i { border-radius: 6px; transition: flex 0.6s; }
.st-row { padding: 9px 0; }
.st-vals { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; }
.st-vals span { font-size: 13px; color: var(--text2); font-weight: 650; }
.st-vals b { font-size: 15px; font-weight: 750; min-width: 34px; color: var(--text2); }
.st-vals b:last-child { text-align: right; }
.st-vals b.lead { color: var(--text); font-weight: 850; }
.st-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.st-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); overflow: hidden; display: flex; }
.st-bar.l { justify-content: flex-end; }
.st-bar i { display: block; height: 100%; border-radius: 6px; transition: width 0.6s; }
.st-bar i.dim { opacity: 0.4; }

/* Avant-match */
.proba { padding: 16px; }
.proba-bar { display: flex; gap: 4px; height: 12px; }
.proba-bar i { border-radius: 6px; }
.proba-bar .draw { background: var(--draw); }
.proba-legend { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; text-align: center; }
.proba-legend b { display: block; font-size: 20px; font-weight: 850; }
.proba-legend span { font-size: 12px; color: var(--text2); }
.proba-legend div:first-child { text-align: left; }
.proba-legend div:last-child { text-align: right; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .card + .card { margin-top: 0; }
.form-card { padding: 12px; }
.fc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.fc-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.fc-game { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.fc-opp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-row { display: grid; grid-template-columns: 70px 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13.5px; }
.h2h-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.h2h-t.r { text-align: right; }
.h2h-t.b { color: var(--text); font-weight: 750; }
.h2h-s { font-weight: 850; padding: 2px 8px; border-radius: 7px; background: var(--surface3); font-variant-numeric: tabular-nums; }
.info-list > div, .info-btn { display: flex; align-items: center; gap: 12px; padding: 13px 14px; font-size: 14px; width: 100%; text-align: left; }
.info-list .ic { color: var(--text2); }
.info-btn { color: var(--accent); font-weight: 700; }
.info-btn .ic { color: var(--accent); }

/* ---------- Classements ---------- */
.league-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 6px -16px 0; padding: 2px 16px; }
.lchip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 9px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-weight: 650; font-size: 13.5px; color: var(--text2);
}
.lchip.on { background: var(--accent); color: #fff; border-color: transparent; }

.page > .btn.full { margin-top: 18px; }

/* ---------- Panneau du bas ---------- */
#sheet-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#sheet-root.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.3s; backdrop-filter: blur(2px); }
#sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 88vh; overflow-y: auto;
  background: var(--bg2); border-radius: 26px 26px 0 0; border: 1px solid var(--line2); border-bottom: 0;
  padding: 0 18px calc(20px + var(--safe-b)); transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.25, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}
.sheet.tall { height: 82vh; }
#sheet-root.open .sheet { transform: none; }
.sheet-grip { position: sticky; top: 0; z-index: 2; height: 26px; margin: 0 -18px; background: var(--bg2); }
.sheet-grip::after { content: ""; position: absolute; left: 50%; top: 9px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line2); }
.ps-title { font-size: 21px; font-weight: 850; text-align: center; letter-spacing: -0.02em; margin-bottom: 4px; }
.form-sheet { display: flex; flex-direction: column; gap: 14px; }
.field { height: 50px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); padding: 0 16px; font: inherit; font-size: 16px; outline: none; }
.field:focus { border-color: var(--accent); }
.steps { padding-left: 22px; line-height: 1.6; margin: 18px 0; }
.steps li { margin-bottom: 8px; }
.steps .ic { width: 16px; height: 16px; vertical-align: -3px; }
.picker { margin-top: 6px; }
.league-chips.in-picker { margin: 10px 0 0; padding: 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 14px; }
.team-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; text-align: center; transition: transform 0.15s, border-color 0.2s;
}
.team-tile:active { transform: scale(0.95); }
.team-tile.on { border-color: rgba(255, 95, 193, 0.6); background: rgba(255, 95, 193, 0.08); }
.team-tile span { line-height: 1.2; }
.team-grid .card { grid-column: 1 / -1; }

/* ---------- Réglages ---------- */
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; }
.set-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row > a { flex: 1; }
.set-row > .ic { color: var(--text2); }
.set-row .chev { transform: none; color: var(--text3); width: 16px; }
.set-row.big { padding: 14px 16px; }
.set-row.big > .ic { color: var(--gold); width: 28px; height: 28px; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--surface3); position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }

/* ---------- Bienvenue ---------- */
.welcome { padding-top: calc(28px + var(--safe-t)); }
.wl-hero { text-align: center; padding: 10px 8px 6px; }
.wl-logo { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--accent-grad); color: #fff; box-shadow: 0 16px 40px -12px rgba(255, 95, 193, 0.6); animation: float 4s ease-in-out infinite; }
.wl-logo .ic { width: 40px; height: 40px; stroke-width: 1.7; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-6deg); } }
.wl-hero h1 { margin-top: 18px; font-size: 30px; line-height: 1.1; }
.wl-hero h1 span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wl-hero p { color: var(--text2); margin: 10px auto 0; max-width: 320px; }
.wl-step { display: flex; gap: 12px; align-items: flex-start; margin: 26px 2px 12px; }
.wl-step > div { display: flex; flex-direction: column; gap: 2px; }
.wl-step b { font-size: 17px; }
.wl-step small { color: var(--text2); }
.wl-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface3); font-weight: 850; flex: none; }
.welcome .card[data-picker] { padding: 12px; }
.wl-skip { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 18px 0; color: var(--text2); font-weight: 650; font-size: 14px; }
.wl-skip .ic { width: 16px; height: 16px; }

/* ---------- Toasts ---------- */
#toast-root { position: fixed; left: 0; right: 0; top: calc(10px + var(--safe-t)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast {
  pointer-events: auto; max-width: 520px; width: fit-content; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: 16px; background: rgba(24, 38, 92, 0.97); border: 1px solid var(--line2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); font-size: 14px; backdrop-filter: blur(14px);
  transform: translateY(-20px) scale(0.96); opacity: 0; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.2), opacity 0.3s;
}
.toast a { display: flex; align-items: center; gap: 6px; }
.toast.in { transform: none; opacity: 1; }
.toast .ic { width: 18px; height: 18px; }
.toast.ok .ic { color: var(--accent); }
.toast.goal { background: linear-gradient(135deg, #e0409f, #7341ff); border-color: rgba(255, 95, 193, 0.5); font-size: 15px; animation: shake 0.6s 0.3s; }
.toast.bad { background: linear-gradient(135deg, #5a1726, #3a1430); border-color: rgba(255, 61, 90, 0.4); }
.t-min { opacity: 0.8; font-size: 12px; }
@keyframes shake { 20%, 60% { transform: rotate(-2deg) scale(1.03); } 40%, 80% { transform: rotate(2deg) scale(1.03); } }

/* ---------- Grand écran ---------- */
@media (min-width: 700px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .page { padding: 0 22px; }
  .page-head.sticky, .team-hero, .match-hero { margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
  .tabbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Actu & Mercato ---------- */
.seg a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--text2); transition: background 0.2s, color 0.2s; }
.seg a .ic { width: 16px; height: 16px; }
.seg a.on { background: var(--surface3); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.chip .crest.xxs { width: 16px; height: 16px; }
.news-sk { margin-top: 14px; }
.sk-hero-img { display: block; aspect-ratio: 16 / 9; border-radius: 20px; margin-bottom: 12px; }
.sk-thumb { width: 76px; height: 60px; border-radius: 12px; flex: none; }
.news-hero {
  position: relative; display: block; margin-top: 14px; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--surface3), var(--surface)); border: 1px solid var(--line2);
}
.news-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(4, 8, 16, 0.92) 100%); }
.nh-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 16px; }
.nh-body h3 { margin: 6px 0 6px; font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.nh-meta, .nr-meta { font-size: 12px; color: var(--text2); }
.nh-meta .src, .nr-meta .src { color: var(--accent); font-weight: 700; }
.news-list { margin-top: 12px; }
.news-row { display: flex; gap: 12px; padding: 13px 14px; align-items: flex-start; transition: background 0.2s; }
.news-row:active { background: rgba(255, 255, 255, 0.04); }
.nr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nr-title { font-weight: 750; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nr-desc { font-size: 12.5px; color: var(--text2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nr-img { width: 88px; height: 70px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface3); }
.mtag { align-self: flex-start; display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; background: rgba(255, 255, 255, 0.1); color: var(--text2); }
.mtag.off { background: rgba(34, 201, 131, 0.18); color: #4fe0a3; }
.mtag.rum { background: rgba(255, 201, 64, 0.16); color: var(--gold); }
.mtag.prol { background: rgba(139, 92, 255, 0.16); color: #b89bff; }
.mtag.dep { background: rgba(255, 90, 110, 0.16); color: #ff8a98; }
.team-card {
  margin-top: 14px; padding: 16px; border-radius: 22px; border: 1px solid var(--line2);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--team) 40%, transparent), transparent 65%), var(--surface);
}
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-head > div { flex: 1; min-width: 0; }
.tc-name { font-size: 19px; font-weight: 850; letter-spacing: -0.02em; }
.tc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tc-stats > div { padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.tc-stats > div b { display: block; font-size: 19px; font-weight: 850; }
.tc-stats > div span { font-size: 11.5px; color: var(--text2); }
.tc-stats .wide { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tc-stats .wide b { font-size: 13.5px; font-weight: 700; text-align: right; }
.tc-stats .flags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; background: none; padding: 2px 0 0; }
.tc-stats .sk { grid-column: 1 / -1; height: 60px; }

/* =========================================================
   Thème "plateau TV" : bleu nuit, rose, titres étroits
   ========================================================= */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 46%, rgba(36, 58, 140, 0.32) 46% 58%, transparent 58% 100%),
    linear-gradient(118deg, transparent 0 64%, rgba(20, 34, 96, 0.55) 64% 100%),
    linear-gradient(118deg, rgba(5, 10, 32, 0.6) 0 22%, transparent 22% 100%),
    radial-gradient(900px 500px at 80% -10%, rgba(139, 92, 255, 0.16), transparent 60%),
    var(--bg);
}
h1, h2, .brand, .day-title, .th-name, .tc-name, .ps-title, .pls-name, .wl-hero h1 {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.005em;
}
h1 { font-size: 38px; font-weight: 900; line-height: 1; }
h2 { font-size: 21px; font-weight: 800; }
.th-name { font-size: 32px; font-weight: 900; line-height: 0.95; }
.day-title { font-size: 26px; font-weight: 900; }
.brand { font-size: 24px; font-weight: 900; }
.ps-title { font-size: 26px; font-weight: 900; }
.pls-name { font-size: 26px; font-weight: 900; }
.wl-hero h1 { font-size: 42px; line-height: 0.95; }
.tc-name { font-size: 24px; font-weight: 900; }

/* Étiquette rose façon "13e journée" */
.kicker {
  display: inline-block; padding: 3px 10px 2px; background: var(--accent); color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2;
}
.kicker sup { font-size: 0.6em; }

/* Chiffres et noms en police étroite */
.mr-team, .mr-status, .mr-score, .sp-team, .sp-time, .sp-score, .sp-clock, .cd-box b, .rc-score, .rc-opp, .up-teams, .up-date b,
.mh-team, .mh-score, .mh-time, .mh-status, .tl-min, .tl-main, .table, .sc-name, .sc-val b, .poss-head b, .st-vals b, .proba-legend b, .jersey, .pl-dot, .pl-name, .lh-name, .tv, .fchip, .chip, .lchip,
.seg button, .seg a, .ds-day, .btn, .pill, .tabbar a span, .tcell, .h2h-s, .tc-stats b, .pls-stat b, .nr-title, .nh-body h3, .mtag, .badge-live {
  font-family: var(--display);
}
.mr-team, .up-teams, .sc-name, .tcell, .mh-team, .sp-team, .lh-name { text-transform: uppercase; letter-spacing: 0.01em; }
.mr-team { font-size: 16px; font-weight: 700; }
.mr-team.win { font-weight: 800; }
.mr-score { font-size: 18px; font-weight: 800; }
.mr-status { font-size: 14px; }
.sp-team { font-size: 18px; font-weight: 800; }
.sp-time { font-size: 42px; font-weight: 900; }
.sp-score { font-size: 58px; }
.cd-box b { font-size: 28px; font-weight: 800; }
.mh-team { font-size: 19px; font-weight: 800; }
.mh-score { font-size: 66px; }
.mh-time { font-size: 46px; font-weight: 900; }
.tl-main { font-size: 15.5px; font-weight: 700; }
.nr-title { font-size: 17px; font-weight: 700; line-height: 1.15; }
.nh-body h3 { font-size: 25px; font-weight: 800; line-height: 1.05; text-transform: uppercase; }
.btn, .pill, .chip, .lchip, .seg button, .seg a { text-transform: uppercase; letter-spacing: 0.02em; font-weight: 800; }
.btn { font-size: 17px; }
.chip, .lchip, .seg button, .seg a { font-size: 15px; }
.tabbar a span { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.tabbar a.active { color: #fff; }
.tabbar a.active::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; background: var(--accent); }
.btn.primary, .pill:first-child { box-shadow: 0 8px 24px -8px rgba(255, 95, 193, 0.6); }
.seg button.on, .seg a.on { background: var(--accent); color: #fff; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on i { background: rgba(255, 255, 255, 0.25); }
.card { background: linear-gradient(180deg, rgba(20, 33, 84, 0.92), rgba(15, 26, 70, 0.92)); border-color: rgba(255, 255, 255, 0.08); }
.sec-head h2 { display: flex; align-items: center; gap: 10px; }
.sec-head h2::before { content: ""; width: 4px; height: 20px; background: var(--accent); flex: none; }

/* ---------- Classement façon plateau TV ---------- */
.bc-table { padding: 4px 0 6px; }
.bc-head, .bc-row { display: grid; grid-template-columns: 56px 44px 1fr 42px 46px 54px 20px; align-items: center; column-gap: 6px; padding: 0 12px; }
.bc-head { padding-top: 10px; padding-bottom: 6px; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--accent); text-transform: uppercase; text-align: center; }
.bc-head .l { text-align: left; }
.bc-row { position: relative; min-height: 50px; font-family: var(--display); cursor: pointer; }
.bc-row:active { background: rgba(255, 255, 255, 0.04); }
.bc-row.zone-end::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--z); box-shadow: 0 0 10px color-mix(in srgb, var(--z) 60%, transparent); }
.bc-rank { font-size: 34px; font-weight: 900; line-height: 1; text-align: center; color: var(--z, #fff); font-variant-numeric: tabular-nums; }
.bc-crest { width: 36px; height: 36px; object-fit: contain; justify-self: center; }
.bc-name { font-size: 19px; font-weight: 800; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em; }
.bc-num { text-align: center; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bc-num.bc-pts { font-weight: 900; font-size: 21px; }
.bc-num.muted { color: var(--text2); font-size: 16px; }
.bc-move { font-size: 16px; font-weight: 900; text-align: center; }
.bc-move.up { color: #35e05f; }
.bc-move.down { color: #ff3b47; }
.bc-row.me { background: linear-gradient(90deg, rgba(255, 95, 193, 0.16), transparent 80%); }
.bc-row.leader { min-height: 92px; margin-bottom: 4px; }
.bc-row.leader .bc-rank {
  display: grid; place-items: center; width: 52px; height: 78px; background: var(--accent); color: #fff; font-size: 58px;
  box-shadow: 0 10px 30px -10px rgba(255, 95, 193, 0.8);
}
.bc-row.leader .bc-crest { width: 56px; height: 56px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); }
.bc-row.leader .bc-name { font-size: 24px; }
.bc-row.leader .bc-num.bc-pts { font-size: 26px; }
@media (max-width: 380px) {
  .bc-head, .bc-row { grid-template-columns: 44px 34px 1fr 30px 40px 46px 16px; padding: 0 8px; column-gap: 4px; }
  .bc-rank { font-size: 28px; }
  .bc-name { font-size: 16.5px; }
  .bc-crest { width: 30px; height: 30px; }
}
.legend span { font-family: var(--display); font-size: 14px; text-transform: uppercase; font-weight: 700; }
.legend i { width: 18px; height: 3px; border-radius: 0; }
.standings-title { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 14px 2px 4px; }
.standings-title h2 { font-size: 44px; font-weight: 900; line-height: 0.9; }
.standings-title h2::before { display: none; }
.bc-row.leader { grid-template-columns: 62px 58px 1fr 42px 46px 54px 20px; }
.bc-row.leader .bc-rank { width: 54px; height: 74px; font-size: 54px; justify-self: start; }
.bc-row.leader .bc-crest { width: 50px; height: 50px; }
@media (max-width: 380px) {
  .bc-row.leader { grid-template-columns: 52px 46px 1fr 30px 40px 46px 16px; }
  .bc-row.leader .bc-rank { width: 46px; height: 64px; font-size: 46px; }
  .bc-row.leader .bc-crest { width: 42px; height: 42px; }
}
