/* ═══════════════════════════════════════════════════════════════
   VoteScope NHL — style.css
   Sports vibe · Ice dark · Static + Cloudflare Pages
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --ice:        #080e1f;
  --ice-2:      #0d1830;
  --ice-3:      #122044;
  --ice-4:      #1a2d5a;
  --accent:     #4fc3f7;    /* bleu glace vif */
  --accent2:    #ff6b35;    /* orange puck */
  --gold:       #ffd54f;    /* or Cup */
  --green:      #69f0ae;
  --red:        #ef5350;
  --text:       #e8f0fe;
  --text-muted: #7a96c2;
  --border:     rgba(79, 195, 247, 0.15);
  --card-bg:    rgba(13, 24, 48, 0.8);
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', monospace;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ice);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: #fff; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header / Nav ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 14, 31, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 1.05em;
  color: var(--text);
  text-decoration: none;
}

.nav-vs { color: var(--accent); }
.nav-sep { color: var(--text-muted); }
.nav-nhl { color: var(--text); display: flex; align-items: center; gap: 8px; }

.badge-live {
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--accent2);
  color: #fff;
  animation: pulse-badge 2s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9em;
}

.nav-links a { color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); font-weight: 700; }

.nav-updated {
  color: var(--text-muted);
  font-size: 0.82em;
  white-space: nowrap;
}

.nav-cta {
  background: var(--ice-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--accent) !important;
  font-weight: 600;
}

.nhl-share-btn {
  border: 1px solid var(--border);
  background: var(--ice-3);
  color: var(--accent);
  border-radius: 8px;
  padding: 6px 10px;
  font: 700 0.82em var(--font);
  cursor: pointer;
}

.nhl-share-btn:hover {
  border-color: var(--accent);
  color: #fff;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  overflow: hidden;
}

.hero-bg-rink {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(79, 195, 247, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 107, 53, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2.2em, 6vw, 4em);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 18px;
}

.hero-title .accent {
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 1.05em;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 20px;
}

/* ── PROCHAIN MATCH / HERO ────────────────────────────────── */
.hero-next-match {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.25);
  color: #fff;
  font-weight: 700;
}

.hero-next-match--idle {
  background: rgba(26, 45, 90, 0.35);
  border-color: var(--border);
  color: var(--text-muted);
}

.hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--text-muted);
}

.meta-sep { color: var(--ice-4); }

/* ── Sections ──────────────────────────────────────────────── */
.section {
  padding: 60px 0;
}

.section--dark {
  background: var(--ice-2);
}

.section-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.9em;
  margin-bottom: 28px;
}

/* ── SCORES DU SOIR ───────────────────────────────────────── */
.section--scores {
  background: rgba(13, 24, 48, 0.35);
}

#scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.scores-loading {
  color: var(--text-muted);
  font-size: 0.95em;
}

.scores-source {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.82em;
}

.score-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.score-card--live {
  border-left: 3px solid var(--accent2);
  animation: pulse-badge 2s ease-in-out infinite;
}

.score-card--final {
  opacity: 0.75;
}

.score-card--upcoming {
  opacity: 0.9;
}

.score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-team {
  font-weight: 700;
  color: #fff;
}

.score-values {
  font-family: var(--mono);
  font-size: 1.4em;
  font-weight: 700;
  color: #fff;
}

.score-state {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.84em;
}

/* ── PROCHAINS MATCHS ─────────────────────────────────────── */
.section--matchups {
  background:
    radial-gradient(circle at top right, rgba(255, 107, 53, 0.08), transparent 32%),
    rgba(8, 14, 31, 0.65);
}

#matchups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.match-card {
  background: linear-gradient(180deg, rgba(18, 32, 68, 0.92), rgba(13, 24, 48, 0.92));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}

.match-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.match-card-kicker {
  font-family: var(--mono);
  font-size: 0.73em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 4px;
}

.match-card-title {
  font-size: 1.08em;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.match-card-time {
  font-size: 0.78em;
  color: var(--text-muted);
  text-align: right;
}

.match-card-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  background: var(--ice-4);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.match-card-bar-home {
  background: linear-gradient(90deg, var(--accent), #7be0ff);
}

.match-card-bar-away {
  background: rgba(122, 150, 194, 0.55);
}

.match-card-probs {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.match-card-prob {
  flex: 1;
  background: rgba(8, 14, 31, 0.5);
  border: 1px solid rgba(79, 195, 247, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

.match-card-prob-label {
  display: block;
  font-size: 0.74em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.match-card-prob-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.15em;
  font-weight: 700;
  color: #fff;
}

.match-card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.match-meta-pill {
  background: rgba(8, 14, 31, 0.45);
  border: 1px solid rgba(79, 195, 247, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

.match-meta-label {
  display: block;
  font-size: 0.7em;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.match-meta-value {
  display: block;
  font-family: var(--mono);
  font-size: 1em;
  color: #fff;
}

.match-card-goalies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.match-goalie {
  background: rgba(8, 14, 31, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
}

.match-goalie-label {
  display: block;
  font-size: 0.72em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.match-goalie-name {
  display: block;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.match-goalie-note {
  display: block;
  margin-top: 4px;
  font-size: 0.74em;
  color: var(--text-muted);
  font-family: var(--mono);
}

.match-card-scores {
  border-top: 1px solid rgba(79, 195, 247, 0.08);
  padding-top: 12px;
}

.match-card-scores-title {
  font-size: 0.76em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.match-card-impact {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 14, 31, 0.42);
  border: 1px solid rgba(79, 195, 247, 0.08);
}

.match-card-impact-title {
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.match-card-impact-copy {
  color: #dbeaff;
  font-size: 0.92em;
  line-height: 1.45;
}

.match-card-impact-copy + .match-card-impact-copy {
  margin-top: 4px;
}

.scoreline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scoreline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.09);
  border: 1px solid rgba(255, 107, 53, 0.18);
  font-family: var(--mono);
  font-size: 0.78em;
  color: #fff;
}

.scoreline-prob {
  color: var(--text-muted);
  font-size: 0.92em;
}

/* ── Podium (top 3) ────────────────────────────────────────── */
.podium-section {
  padding: 30px 0 50px;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 16px;
  align-items: end;
}

.podium-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
}

.podium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.podium-card--1 {
  border-color: rgba(255, 213, 79, 0.4);
  background: linear-gradient(160deg, rgba(255, 213, 79, 0.06) 0%, var(--card-bg) 60%);
}

.podium-rank {
  position: absolute;
  top: 14px;
  left: 18px;
  font-family: var(--mono);
  font-size: 0.75em;
  font-weight: 700;
  color: var(--text-muted);
}

.podium-card--1 .podium-rank { color: var(--gold); }

.podium-emoji { font-size: 2.8em; margin-bottom: 8px; display: block; }
.podium-name  { font-size: 1em; font-weight: 700; color: #fff; margin-bottom: 4px; }
.podium-code  { font-family: var(--mono); font-size: 0.72em; color: var(--text-muted); margin-bottom: 16px; }

.podium-pct {
  font-size: 2.2em;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.podium-card--1 .podium-pct { color: var(--gold); }

.podium-label {
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.podium-bar-wrap {
  margin-top: 14px;
  height: 4px;
  background: var(--ice-4);
  border-radius: 2px;
  overflow: hidden;
}

.podium-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.podium-card--1 .podium-bar { background: var(--gold); }

/* Skeleton */
.podium-skeleton {
  height: 200px;
  background: var(--ice-3);
  border-radius: var(--radius);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.podium-skeleton--main { height: 230px; }

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0.3; }
}

/* ── Séries ────────────────────────────────────────────────── */
.conf-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
}

.conf-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  min-height: 200px;
}

.conf-label {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent2);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Série card */
.series-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.series-card:hover,
.series-card:focus-visible {
  border-color: rgba(79, 195, 247, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}

.series-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.series-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.series-badge--round {
  background: rgba(79, 195, 247, 0.12);
  border: 1px solid rgba(79, 195, 247, 0.2);
  color: var(--accent);
}

.series-badge--live {
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.22);
  color: #ffb08f;
}

.series-badge--final {
  background: rgba(122, 150, 194, 0.12);
  border: 1px solid rgba(122, 150, 194, 0.2);
  color: var(--text-muted);
}

.series-matchup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.series-team {
  flex: 1;
  text-align: center;
}

.series-team-emoji { font-size: 1.6em; display: block; margin-bottom: 3px; }
.series-team-code  { font-family: var(--mono); font-size: 0.72em; font-weight: 700; color: var(--text-muted); }

.series-vs {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Barre de probabilité 2 équipes */
.series-prob-bar {
  height: 8px;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  margin-bottom: 8px;
  gap: 2px;
}

.series-prob-a {
  background: var(--accent);
  border-radius: 4px 0 0 4px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.series-prob-b {
  background: var(--ice-4);
  border-radius: 0 4px 4px 0;
  flex: 1;
}

.series-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78em;
  color: var(--text-muted);
}

.series-scoreline {
  margin-top: 8px;
  font-size: 0.76em;
  color: var(--text-muted);
}

.series-winner {
  font-weight: 700;
  color: var(--accent);
}

/* Tooltip durée */
.series-games {
  font-family: var(--mono);
  font-size: 0.72em;
  color: var(--text-muted);
}

/* Distribution 4/5/6/7 */
.series-dist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.series-team-lengths {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.series-team-length-row {
  display: grid;
  gap: 6px;
}

.series-team-length-label {
  font-size: 0.7em;
  color: var(--text-muted);
}

.series-team-length-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.series-team-length-grid span {
  display: grid;
  gap: 2px;
  padding: 5px 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.64em;
  color: var(--text-muted);
  text-align: center;
}

.series-team-length-grid span.is-zero {
  background: rgba(255, 255, 255, 0.015);
  color: rgba(122, 150, 194, 0.6);
  border: 1px dashed rgba(122, 150, 194, 0.18);
}

.series-team-length-grid strong {
  font-size: 1.2em;
  color: var(--text);
  font-family: var(--mono);
}

.series-team-length-grid span.is-zero strong {
  color: rgba(232, 240, 254, 0.58);
}

.dist-item {
  background: var(--ice-3);
  border-radius: 6px;
  padding: 5px 4px;
  text-align: center;
}

.dist-label { font-size: 0.65em; color: var(--text-muted); display: block; }
.dist-pct   { font-size: 0.82em; font-weight: 700; font-family: var(--mono); color: var(--text); display: block; margin-top: 1px; }

/* ── Tableau des probabilités ─────────────────────────────── */
.prob-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.prob-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.9em;
}

.series-summary-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 24, 48, 0.66);
}

.series-summary {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88em;
}

.series-summary th,
.series-summary td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.series-summary th {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76em;
}

.series-summary tbody tr:last-child td { border-bottom: none; }

.prob-table thead th {
  background: var(--ice-3);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

.prob-table .col-cup { color: var(--gold); }
.prob-table .col-trend { text-align: center; min-width: 84px; }

.prob-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.prob-table tbody tr:last-child { border-bottom: none; }
.prob-table tbody tr:hover { background: rgba(79, 195, 247, 0.04); }

.prob-table td {
  padding: 11px 14px;
  white-space: nowrap;
}

.td-rank {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.78em;
  width: 36px;
}

.td-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-emoji  { font-size: 1.3em; }
.td-name   { font-weight: 600; color: #fff; }
.td-code   { font-family: var(--mono); font-size: 0.72em; color: var(--text-muted); margin-left: 4px; }

.td-cup {
  font-weight: 700;
  font-family: var(--mono);
  font-size: 1em;
}

.td-trend {
  text-align: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.sparkline {
  display: inline-block;
  vertical-align: middle;
}

.sparkline-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline--up .sparkline-line   { stroke: var(--green); }
.sparkline--down .sparkline-line { stroke: var(--red); }
.sparkline--flat .sparkline-line { stroke: var(--text-muted); }

.sparkline--empty {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.78em;
}

.cup-bar-cell {
  width: 90px;
}

.cup-bar-bg {
  background: var(--ice-4);
  border-radius: 2px;
  height: 6px;
  overflow: hidden;
}

.cup-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.td-mono { font-family: var(--mono); color: var(--text-muted); font-size: 0.86em; }
.td-force { color: var(--accent2); font-family: var(--mono); font-size: 0.86em; }

/* Couleurs probabilité */
.pct-high   { color: var(--gold); }
.pct-med    { color: var(--accent); }
.pct-low    { color: var(--text-muted); }

/* ── Méthode ───────────────────────────────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.method-card {
  background: var(--ice-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.method-icon { font-size: 1.8em; margin-bottom: 10px; }
.method-card h3 { color: var(--accent); font-size: 1em; margin-bottom: 8px; }
.method-card p  { font-size: 0.88em; color: var(--text-muted); line-height: 1.6; }

.method-note {
  background: rgba(255, 107, 53, 0.08);
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.86em;
  color: var(--text-muted);
}

.method-note strong { color: var(--accent2); }

/* ── MODAL DÉTAIL SÉRIE ───────────────────────────────────── */
.series-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.series-modal.is-open {
  display: block;
}

.series-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.series-modal-dialog {
  position: relative;
  max-width: 620px;
  margin: 7vh auto 0;
  background: rgba(13, 24, 48, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--text);
  transform: scale(0.95);
  opacity: 0;
  animation: modal-in 0.22s ease forwards;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.series-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.3em;
  cursor: pointer;
}

.series-modal-close:hover { color: #fff; }

.series-modal-kicker {
  font-family: var(--mono);
  font-size: 0.78em;
  color: var(--accent2);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.series-modal-head h3 {
  font-size: 1.5em;
  color: #fff;
  margin-bottom: 4px;
}

.series-modal-sub {
  color: var(--text-muted);
  font-size: 0.92em;
}

.series-modal-probs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 12px;
}

.series-modal-prob {
  background: var(--ice-3);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.series-modal-prob strong {
  font-family: var(--mono);
  color: #fff;
}

.series-modal-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  margin-bottom: 18px;
  background: var(--ice-4);
}

.series-modal-bar-a {
  background: var(--accent);
}

.series-modal-bar-b {
  background: var(--accent2);
}

.series-modal-dist {
  display: grid;
  gap: 10px;
}

.series-modal-dist-row {
  display: grid;
  grid-template-columns: 70px 1fr 48px;
  gap: 10px;
  align-items: center;
}

.series-modal-dist-label,
.series-modal-dist-value {
  font-size: 0.84em;
  color: var(--text-muted);
}

.series-modal-dist-value {
  text-align: right;
  font-family: var(--mono);
}

.series-modal-dist-track {
  height: 10px;
  border-radius: 999px;
  background: var(--ice-4);
  overflow: hidden;
}

.series-modal-dist-fill {
  height: 100%;
  border-radius: 999px;
}

.series-modal-dist-fill.sweep { background: var(--red); }
.series-modal-dist-fill.five  { background: var(--accent2); }
.series-modal-dist-fill.six   { background: var(--accent); }
.series-modal-dist-fill.seven { background: var(--green); }

.series-modal-goalies {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9em;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--ice-2);
  border-top: 1px solid var(--border);
  padding: 32px 0 24px;
}

/* ── BLUESKY SOCIAL FEED ──────────────────────────────────── */
.section--social {
  padding-top: 40px;
}

.social-embed-wrap {
  max-width: 600px;
  margin: 0 auto;
  background: var(--ice-2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.social-cta {
  margin-top: 16px;
  text-align: center;
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand { font-size: 0.9em; color: var(--text-muted); }
.footer-brand a { color: var(--accent); font-weight: 700; }

.footer-links { display: flex; gap: 20px; font-size: 0.88em; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

.footer-fine {
  font-size: 0.78em;
  color: var(--ice-4);
  color: #3a5080;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav {
    height: auto;
    min-height: 58px;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 12px;
  }

  .nav-links {
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .nav-updated {
    width: 100%;
    text-align: right;
  }

  .podium {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }
  .podium > :nth-child(2) { order: -1; }

  .conf-grid {
    grid-template-columns: 1fr;
  }
  .conf-divider { display: none; }

  .series-card-meta {
    flex-wrap: wrap;
  }

  .col-hide-sm { display: none; }

  .series-modal-dialog {
    margin: 4vh 14px 0;
    padding: 20px;
  }

  .series-modal-probs {
    grid-template-columns: 1fr;
  }

  .series-modal-dist-row {
    grid-template-columns: 58px 1fr 42px;
  }

  .match-card-meta {
    grid-template-columns: 1fr;
  }

  .match-card-head {
    flex-direction: column;
  }

  .match-card-time {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2em; }
  .section { padding: 40px 0; }

  .match-card-probs,
  .match-card-goalies {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fade-in-up 0.5s ease both;
}

/* Stagger */
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.12s; }
.animate-in:nth-child(3) { animation-delay: 0.19s; }
.animate-in:nth-child(4) { animation-delay: 0.26s; }
.animate-in:nth-child(5) { animation-delay: 0.33s; }

/* ── Lang switch NHL ──────────────────────────────────────────── */
.nhl-lang {
  display: flex;
  gap: 2px;
  margin-left: 8px;
  align-items: center;
}
.nhl-lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.75em;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.15s;
}
.nhl-lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}
.nhl-lang-btn:hover:not(.active) { border-color: var(--accent); color: #fff; }

/* ── Ligne tableau cliquable ──────────────────────────────────── */
.prob-row { cursor: pointer; transition: background 0.12s ease; }
.prob-row:hover { background: rgba(255, 255, 255, 0.04); }
.prob-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ── Modale équipe — décomposition BSTS / Marché / Blend ──────── */
.team-modal-probs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0 8px;
}
.team-modal-prob {
  background: var(--ice-3);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.team-modal-prob span {
  font-size: 0.78em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.team-modal-prob strong {
  font-family: var(--mono);
  color: #fff;
  font-size: 1.1em;
}

.team-modal-breakdown {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}
.team-modal-bd-title {
  font-size: 0.82em;
  color: var(--accent2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.team-modal-bd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  background: var(--ice-3);
  border-radius: 8px;
}
.team-modal-bd-row--final {
  background: rgba(var(--accent-rgb, 88, 166, 255), 0.12);
  border: 1px solid var(--border);
}
.team-modal-bd-label {
  color: var(--text);
  font-size: 0.92em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.team-modal-bd-label small {
  color: var(--text-muted);
  font-size: 0.78em;
  font-weight: 400;
}
.team-modal-bd-value {
  font-family: var(--mono);
  color: #fff;
  font-size: 1.05em;
  font-weight: 700;
}

@media (max-width: 560px) {
  .team-modal-probs { grid-template-columns: repeat(2, 1fr); }
}
