body.page-teams main{
  width:100%;
  max-width:1280px;
  margin:0 auto;
  padding:0 20px 32px;
  box-sizing:border-box;
  position:relative;
  z-index:1;
}

body.page-teams .hidden{
  display:none !important;
}

body.page-teams .muted{
  color:#64748b;
}

body.page-teams .td-right,
body.page-teams .pct{
  text-align:right;
}

body.page-teams .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 16px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:12px;
  background:#fff;
  color:#0f172a;
  font-weight:800;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(15,23,42,.06);
  transition:
    background .12s ease,
    border-color .12s ease,
    box-shadow .12s ease,
    transform .12s ease;
}

body.page-teams .btn:hover{
  background:#f8fafc;
  border-color:rgba(100,116,139,.34);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  transform:translateY(-1px);
}

body.page-teams .btn:active{
  transform:translateY(0);
  box-shadow:0 2px 8px rgba(15,23,42,.06);
}

/* =========================
   Layout global
   ========================= */

.controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
}

.confs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:14px;
}

.conf h2{
  margin:10px 0;
}

.confs .grid{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tables{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.team-view{
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.team-dashboard-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.panel--full{
  width:100%;
}

.team-schedule-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

/* =========================
   Cards / panels / tables
   ========================= */

body.page-teams .table,
body.page-teams .panel{
  background:#fff;
  border:1px solid rgba(148,163,184,.22);
  border-radius:16px;
  box-shadow:0 6px 18px rgba(15,23,42,.06);
  overflow:hidden;
}

body.page-teams .table header,
body.page-teams .panel > header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  background:#f8fbff;
  border-bottom:1px solid rgba(148,163,184,.18);
}

body.page-teams .table header strong,
body.page-teams .panel > header strong{
  font-size:14px;
  font-weight:900;
  color:#0f172a;
}

body.page-teams table,
body.page-teams .tbl{
  width:100%;
  border-collapse:collapse;
}

body.page-teams th,
body.page-teams td,
body.page-teams .tbl th,
body.page-teams .tbl td{
  padding:10px 12px;
  border-bottom:1px solid #eef2f7;
  text-align:left;
  vertical-align:middle;
}

body.page-teams th,
body.page-teams .tbl th{
  background:#fafbff;
  color:#475569;
  font-weight:900;
  font-size:13px;
  white-space:nowrap;
}

body.page-teams tr:last-child td,
body.page-teams .tbl tr:last-child td{
  border-bottom:none;
}

body.page-teams .table tbody tr:hover td,
body.page-teams .tbl tbody tr:hover td{
  background:#fafcff;
}

/* =========================
   Tables classement
   ========================= */

body.page-teams .table{
  overflow:hidden;
}

body.page-teams .table table{
  width:100%;
  table-layout:fixed;
}

/* Barre couleur équipe + colonne % masquée */
body.page-teams .table tbody tr{
  --tc: transparent;
}

body.page-teams .table tbody td:first-child{
  border-left:3px solid var(--tc,transparent);
  padding-left:9px;
}

body.page-teams .table tbody tr:hover td{
  background:color-mix(in srgb, var(--tc,#1d4ed8) 6%, #fafcff);
}

body.page-teams .table .pct{
  display:none;
}

body.page-teams .table th:nth-child(1),
body.page-teams .table td:nth-child(1){
  width:36px;
}

body.page-teams .table th:nth-child(3),
body.page-teams .table td:nth-child(3){
  width:86px;
  text-align:right;
  white-space:nowrap;
}

body.page-teams .table th:nth-child(4),
body.page-teams .table td:nth-child(4){
  width:70px;
  text-align:right;
  white-space:nowrap;
}

body.page-teams .table td:nth-child(2){
  overflow:hidden;
  white-space:nowrap;
}

body.page-teams .table td:nth-child(2) .team-fr-flag{
  display:inline-block;
  vertical-align:middle;
  margin-left:6px;
  margin-right:6px;
}

body.page-teams .table td:nth-child(2) .seed-badge{
  display:inline-flex;
  vertical-align:middle;
}

/* =========================
   Team cards classement
   ========================= */

body.page-teams .team-card{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:12px;
  cursor:pointer;
  width:100%;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  padding:0 !important;
}

body.page-teams .team-card .veil,
body.page-teams .team-card .veil-strong{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}

body.page-teams .team-card .veil{
  background:rgba(0,0,0,.06);
}

body.page-teams .team-card .veil-strong{
  background:rgba(0,0,0,.10);
}

body.page-teams .team-card::after{
  content:"";
  position:absolute;
  right:-22px;
  bottom:-50px;
  width:190px;
  height:190px;
  background-image:var(--team-logo, none);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  opacity:.09;
  filter:grayscale(40%);
  pointer-events:none;
  z-index:0;
}

body.page-teams .team-card:hover::after{
  opacity:.11;
}

body.page-teams .team-card .tc-row{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:30px 48px 1fr auto;
  align-items:center;
  column-gap:10px;
  padding:8px 12px !important;
  min-height:52px;
  box-sizing:border-box;
  height:auto !important;
}

body.page-teams .team-card .tc-rank{
  font-weight:950;
  font-size:17px;
  color:#fff;
  line-height:1;
}

body.page-teams .team-card .tc-logo{
  width:36px;
  height:36px;
  object-fit:contain;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.35));
}

body.page-teams .team-card .tc-mid{
  min-width:0;
  overflow:hidden;
}

body.page-teams .team-card .tc-subname{
  font-size:10px;
  font-weight:700;
  color:rgba(255,255,255,.58);
  line-height:1;
  margin-top:3px;
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

body.page-teams .team-card .tc-name{
  margin:0;
  color:#fff;
  font-weight:950;
  font-size:18px;
  line-height:1;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  letter-spacing:.6px;
}

body.page-teams .team-card .tc-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  white-space:nowrap;
  color:#fff;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}

body.page-teams .team-card .tc-wl{
  font-size:13px;
}

body.page-teams .team-card .tc-pct{
  font-size:12px;
  opacity:.95;
}

body.page-teams .seed-badge,
body.page-teams .pill-l10,
body.page-teams .tc-streak-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 8px;
  font-size:11px;
  font-weight:900;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.12);
  color:#fff;
}

body.page-teams .seed-badge{
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.25);
  backdrop-filter:blur(4px);
}

body.page-teams .seed-badge.po{
  color:#22c55e;
  border-color:#22c55e;
}

body.page-teams .seed-badge.pi{
  color:#f59e0b;
  border-color:#f59e0b;
}

body.page-teams .seed-badge.out{
  color:#ef4444;
  border-color:#ef4444;
}

body.page-teams .pill-l10.good{
  background:rgba(34,197,94,.18);
  border-color:rgba(34,197,94,.28);
}

body.page-teams .pill-l10.mid{
  background:rgba(245,158,11,.18);
  border-color:rgba(245,158,11,.28);
}

body.page-teams .pill-l10.bad{
  background:rgba(239,68,68,.18);
  border-color:rgba(239,68,68,.28);
}

body.page-teams .pill-l10.neu{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.14);
}

body.page-teams .tc-streak-pill.w{
  background:rgba(34,197,94,.20);
  border-color:rgba(34,197,94,.30);
}

body.page-teams .tc-streak-pill.l{
  background:rgba(239,68,68,.20);
  border-color:rgba(239,68,68,.30);
}

body.page-teams .tc-streak-pill.neu{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.14);
}

body.page-teams .tc-badges{
  display:none;
}

/* =========================
   Hero équipe / bloc détail
   ========================= */

#panelRecap{
  position:relative;
  overflow:hidden;
  border-radius:26px;
  border:1px solid rgba(148,163,184,.18);
  background:
    radial-gradient(circle at top left, color-mix(in oklab, var(--accent,#1a2c5e) 20%, white) 0%, rgba(255,255,255,.98) 34%, #f4f7fb 100%);
  color:#0f172a;
  box-shadow:
    0 20px 42px rgba(15,23,42,.10),
    0 8px 22px rgba(15,23,42,.06);
  isolation:isolate;
  padding-bottom:4px;
}

#panelRecap::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:8px;
  background:linear-gradient(
    90deg,
    color-mix(in oklab, var(--accent,#1a2c5e) 100%, white),
    color-mix(in oklab, var(--accent,#1a2c5e) 72%, white),
    color-mix(in oklab, var(--accent,#1a2c5e) 42%, white)
  );
  z-index:0;
  pointer-events:none;
}

#panelRecap::after{
  content:"";
  position:absolute;
  right:-30px;
  bottom:-24px;
  width:330px;
  height:330px;
  background-image:var(--team-logo, none);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  opacity:.055;
  filter:grayscale(100%);
  pointer-events:none;
  z-index:0;
}

#panelRecap > *{
  position:relative;
  z-index:1;
}

#teamRecordHdr{
  white-space:nowrap;
}

.team-hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding-bottom:10px;
}

.team-head{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

#teamLogoHdr{
  width:72px;
  height:72px;
  object-fit:contain;
  flex:0 0 72px;
  filter:drop-shadow(0 6px 14px rgba(15,23,42,.12));
}

#teamNameHdr{
  font-size:40px;
  font-weight:950;
  line-height:1;
  color:#0f172a;
  letter-spacing:-.03em;
}

#teamTriHdr{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#475569;
}

#teamTriHdr::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--accent,#1a2c5e);
  box-shadow:0 0 0 5px color-mix(in oklab, var(--accent,#1a2c5e) 16%, transparent);
}

.recap-mark{
  position:absolute;
  right:24px;
  bottom:20px;
  width:170px;
  height:170px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  opacity:.07;
  pointer-events:none;
}

body.page-teams .chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid color-mix(in oklab, var(--accent,#1a2c5e) 22%, white);
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,255,255,.82));
  color:#0f172a;
  font-weight:950;
  font-size:16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 18px rgba(15,23,42,.06);
}

.team-kpis,
.team-extra-kpis{
  display:grid;
  gap:16px;
  margin-top:18px;
}

.team-kpis--top{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.team-kpis--mid{
  grid-template-columns:repeat(6, minmax(0, 1fr));
}

.team-extra-kpis{
  grid-template-columns:repeat(6, minmax(0, 1fr));
  padding-top:2px;
}

#panelRecap .stat{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  padding:18px 18px 16px;
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.84));
  border:1px solid rgba(255,255,255,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    0 12px 26px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
  transition:transform .14s ease, box-shadow .14s ease;
}

#panelRecap .stat:hover{
  transform:translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    0 16px 30px rgba(15,23,42,.08);
}

#panelRecap .stat::after{
  content:"";
  position:absolute;
  inset:auto 14px 0 14px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    color-mix(in oklab, var(--accent,#1a2c5e) 82%, white),
    color-mix(in oklab, var(--accent,#1a2c5e) 42%, white)
  );
  opacity:.52;
}

#panelRecap .stat .muted{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.11em;
  color:#64748b;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#panelRecap .stat b{
  font-size:28px;
  font-weight:950;
  color:#0f172a;
  line-height:1;
  letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;
}

#panelRecap .team-kpis--top .stat b{
  font-size:28px;
}

#panelRecap .team-extra-kpis .stat b{
  font-size:22px;
}

/* =========================
   Forme du moment
   ========================= */

.last5-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:stretch;
}

.last5-chip{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 3px 10px rgba(15,23,42,.05);
  min-width:180px;
}

.last5-chip .opp-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  flex:0 0 34px;
}

.last5-chip .meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.last5-chip .line1{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  color:#0f172a;
}

.last5-chip .line1 .at{
  font-weight:800;
  opacity:.65;
}

.last5-chip .line2{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#334155;
}

.last5-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border-radius:999px;
  font-weight:950;
  font-size:12px;
  line-height:1;
  border:1px solid rgba(15,23,42,.10);
}

.last5-pill.w{
  background:rgba(34,197,94,.15);
  color:#166534;
  border-color:rgba(34,197,94,.22);
}

.last5-pill.l{
  background:rgba(239,68,68,.12);
  color:#991b1b;
  border-color:rgba(239,68,68,.20);
}

.last5-date{
  opacity:.65;
}

.last5-trends{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(6, minmax(120px, 1fr));
  gap:10px;
}

.trend-card{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  padding:10px 12px;
  box-shadow:0 2px 10px rgba(15,23,42,.05);
}

.trend-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.trend-label{
  font-weight:900;
  font-size:12px;
  letter-spacing:.4px;
  color:#334155;
}

.trend-val{
  font-weight:950;
  font-size:16px;
  color:#0f172a;
  font-variant-numeric:tabular-nums;
}

.trend-sub{
  margin-top:4px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
  color:#475569;
}

.trend-delta{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  font-weight:950;
  font-variant-numeric:tabular-nums;
}

.trend-delta.up{
  background:rgba(34,197,94,.14);
  color:#166534;
  border-color:rgba(34,197,94,.22);
}

.trend-delta.down{
  background:rgba(239,68,68,.12);
  color:#991b1b;
  border-color:rgba(239,68,68,.20);
}

.trend-delta.flat{
  background:rgba(100,116,139,.10);
  color:#334155;
  border-color:rgba(100,116,139,.18);
}

.spark{
  width:92px;
  height:26px;
  display:block;
}

.spark path{
  fill:none;
  stroke:currentColor;
  stroke-width:2;
}

.spark .axis{
  opacity:.25;
  stroke-width:1;
}

.last5-meta{
  margin-top:12px;
  display:grid;
  grid-template-columns:280px minmax(0, 1fr);
  gap:12px;
  align-items:stretch;
}

.momentum{
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 4px 14px rgba(15,23,42,.06);
  font-weight:950;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.insight{
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 4px 14px rgba(15,23,42,.05);
  color:#0f172a;
  font-weight:800;
  line-height:1.3;
}

.momentum .tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(100,116,139,.08);
  font-size:12px;
}

.momentum.good .tag{
  background:rgba(34,197,94,.14);
  border-color:rgba(34,197,94,.22);
  color:#166534;
}

.momentum.mid .tag{
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.22);
  color:#92400e;
}

.momentum.bad .tag{
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.20);
  color:#991b1b;
}

.insight .muted{
  color:#64748b;
  font-weight:800;
}

.insight b{
  font-weight:950;
}

/* =========================
   Tableaux matchs
   ========================= */

#panelPast{
  overflow:hidden;
}

#panelNext .tbl-games{
  width:100%;
  table-layout:fixed;
}

#panelPast .tbl-games th,
#panelPast .tbl-games td{
  white-space:nowrap;
}

.w{
  color:#15803d;
  font-weight:900;
}

.l{
  color:#b91c1c;
  font-weight:900;
}

/* 10 derniers matchs */
#panelPast .tbl-games th:nth-child(1),
#panelPast .tbl-games td:nth-child(1){
  width:68px;
}

#panelPast .tbl-games th:nth-child(2),
#panelPast .tbl-games td:nth-child(2){
  width:108px;
}

#panelPast .tbl-games th:nth-child(3),
#panelPast .tbl-games td:nth-child(3){
  width:52px;
  text-align:center;
}

#panelPast .tbl-games th:nth-child(4),
#panelPast .tbl-games td:nth-child(4){
  width:48px;
  text-align:center;
}

#panelPast .tbl-games th:nth-child(5),
#panelPast .tbl-games td:nth-child(5){
  width:72px;
  text-align:center;
}

#panelPast .tbl-games th:nth-child(6),
#panelPast .tbl-games td:nth-child(6){
  width:126px;
  text-align:left;
  white-space:nowrap;
}
#panelPast .tbl-games td:nth-child(6) .score-inline{
  display:inline-flex;
  align-items:center;
  justify-content:left;
  width:100%;
}
#panelPast .diff-inline{
  display:inline-block;
  min-width:42px;
  text-align:left;
}
/* Matchs à venir : version resserrée sans scroll */
#panelNext .tbl-games th,
#panelNext .tbl-games td{
  white-space:nowrap;
}


#panelNext .last-matchup-inline{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  white-space:nowrap;
}

#panelNext td:nth-child(5),
#panelNext th:nth-child(5){
  text-align:left !important;
}

#panelNext .tbl-team-cell{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-width:0;
  white-space:nowrap;
}

#panelNext .tbl-team-logo{
  width:18px;
  height:18px;
  flex:0 0 18px;
}
#panelNext .tbl-team-tri{
  font-weight:900;
  font-size:14px; /* même taille que tableau précédent */
  letter-spacing:0.3px;
}
#panelNext .tbl-games td,
#panelNext .tbl-games th{
  padding:10px 8px; /* avant c'était trop large */
}
#panelNext .tbl-team-cell{
  gap:5px; /* avant trop large */
}
#panelNext .tbl-games td:nth-child(3),
#panelNext .tbl-games th:nth-child(3){
  padding-left:4px;
}



.tbl-team-cell,
.opp-cell,
.team-opp-cell{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
}

.tbl-team-logo,
.opp-cell img,
.team-opp-cell img,
#panelPast .opp-cell .opp-logo{
  width:20px;
  height:20px;
  object-fit:contain;
  flex:0 0 20px;
}

.tbl-team-tri,
.opp-cell .opp-tri,
.team-opp-cell .opp-tri{
  font-weight:900;
  color:#0f172a;
  white-space:nowrap;
}

.vs-streak-pill,
#panelPast .vs-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1.1;
  border:1px solid transparent;
}

.vs-streak-pill.w,
#panelPast .vs-pill.w{
  color:#166534;
  background:rgba(34,197,94,.14);
  border-color:rgba(34,197,94,.22);
}

.vs-streak-pill.l,
#panelPast .vs-pill.l{
  color:#991b1b;
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.20);
}

.vs-streak-pill.neu,
#panelPast .vs-pill.neu{
  color:#334155;
  background:rgba(100,116,139,.10);
  border-color:rgba(100,116,139,.18);
}

.last-matchup-inline{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.last-matchup-inline strong{
  font-weight:950;
  color:#0f172a;
}

.mini-res{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:20px;
  padding:0 7px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  line-height:1;
  border:1px solid transparent;
}

.mini-res.w{
  color:#166534;
  background:rgba(34,197,94,.14);
  border-color:rgba(34,197,94,.22);
}

.mini-res.l{
  color:#991b1b;
  background:rgba(239,68,68,.12);
  border-color:rgba(239,68,68,.20);
}

.score-inline{
  display:inline-block;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  color:#0f172a;
}

.score-inline strong{
  font-weight:950;
  color:#111827;
}

.diff-inline{
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-left:4px;
}

.tbl-subtle{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

.diff-pos{
  color:#166534;
  font-weight:900;
}

.diff-neg{
  color:#991b1b;
  font-weight:900;
}

/* =========================
   Tableau joueurs
   ========================= */

#panelPlayers{
  overflow-x:auto;
}

.tbl-players{
  table-layout:auto;
  min-width:1160px;
}

.tbl-players thead th{
  position:sticky;
  top:0;
  z-index:1;
}

.tbl-players tbody tr{
  transition:background .15s ease, transform .15s ease;
}

.tbl-players tbody tr:hover{
  background:#f1f5f9;
}

.tbl-players td:first-child{
  min-width:300px;
}

.player-cell-team{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:300px;
}

.player-headshot{
  width:38px;
  height:38px;
  border-radius:999px;
  object-fit:cover;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.20);
  flex:0 0 38px;
}

.player-name-team{
  font-weight:800;
  color:#0f172a;
  white-space:nowrap;
}

.badge-fr{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  color:#1d4ed8;
  background:rgba(59,130,246,.10);
  border:1px solid rgba(59,130,246,.18);
}

.fr-player .player-name-team{
  color:#111827;
}

/* =========================
   Mobile menu z-index safety
   ========================= */

body.page-teams #confWrap,
body.page-teams .conf,
body.page-teams .grid,
body.page-teams .team-card,
body.page-teams .team-card .tc-row{
  position:relative !important;
  z-index:1 !important;
}

body.page-teams .mobile-menu{
  position:fixed !important;
  inset:0 !important;
  z-index:2147483000 !important;
}

body.page-teams .mobile-menu__backdrop{
  position:absolute !important;
  inset:0 !important;
  z-index:2147483001 !important;
}

body.page-teams .mobile-menu__panel{
  position:absolute !important;
  top:0 !important;
  left:0 !important;
  z-index:2147483002 !important;
}

body.page-teams .topbar,
body.page-teams .nav-shell,
body.page-teams .nav-card{
  overflow:visible !important;
}

/* =========================
   Responsive
   ========================= */

@media (max-width:980px){
  .last5-trends{
    grid-template-columns:repeat(3, minmax(120px, 1fr));
  }

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

  .team-kpis--mid,
  .team-extra-kpis{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  #teamNameHdr{
    font-size:28px;
  }
}

@media (max-width:900px){
  body.page-teams main{
    padding:0 10px 32px;
  }

  .confs{
    grid-template-columns:1fr;
  }

  .tables{
    grid-template-columns:1fr;
  }

  .team-schedule-grid{
    grid-template-columns:1fr;
  }

  .tables .table{
    overflow-x:auto;
  }

  .tables .table table{
    min-width:360px;
  }

  body.page-teams .btn{
    width:auto;
    max-width:100%;
  }

  body.page-teams .table,
  body.page-teams .panel{
    border-radius:18px;
  }

  body.page-teams th,
  body.page-teams td,
  body.page-teams .tbl th,
  body.page-teams .tbl td{
    padding:9px 10px;
  }

  body.page-teams .table th,
  body.page-teams .table td{
    padding:8px 8px;
    font-size:13px;
  }

  body.page-teams .table th:nth-child(1),
  body.page-teams .table td:nth-child(1){
    width:30px;
  }

  body.page-teams .table th:nth-child(3),
  body.page-teams .table td:nth-child(3){
    width:74px;
  }

  body.page-teams .table th:nth-child(4),
  body.page-teams .table td:nth-child(4){
    width:48px;
  }

  body.page-teams .table td:nth-child(2){
    word-break:normal;
    white-space:normal;
  }

  body.page-teams .table .seed-badge{
    margin-left:6px;
    padding:2px 6px;
    font-size:10px;
  }

  .team-hero-head{
    flex-direction:column;
    align-items:flex-start;
  }

  #teamLogoHdr{
    width:60px;
    height:60px;
    flex-basis:60px;
  }

  #teamNameHdr{
    font-size:30px;
  }

  .team-kpis--top{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

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

  body.page-teams .team-card .tc-row{
    grid-template-columns:28px 40px 1fr auto;
    gap:8px;
  }

  body.page-teams .team-card .tc-logo{
    width:32px;
    height:32px;
  }

  body.page-teams .team-card .tc-name{
    font-size:16px;
  }

  body.page-teams .pill-l10{
    display:none;
  }

  #panelRecap{
    border-radius:20px;
  }

  #panelRecap .stat{
    border-radius:16px;
    padding:14px 14px 12px;
  }

  #panelRecap .team-kpis--top .stat b{
    font-size:24px;
  }

  #panelRecap .team-kpis--mid .stat b,
  #panelRecap .team-extra-kpis .stat b{
    font-size:20px;
  }
}

@media (max-width:520px){
  .last5-trends{
    grid-template-columns:repeat(2, minmax(120px, 1fr));
  }

  .team-kpis--mid,
  .team-extra-kpis{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  body.page-teams .table th,
  body.page-teams .table td{
    padding:7px 6px;
    font-size:12px;
  }

  body.page-teams .table th:nth-child(1),
  body.page-teams .table td:nth-child(1){
    width:26px;
  }

  body.page-teams .table th:nth-child(3),
  body.page-teams .table td:nth-child(3){
    width:68px;
  }

  body.page-teams .table th:nth-child(4),
  body.page-teams .table td:nth-child(4){
    width:44px;
  }

  body.page-teams .table .seed-badge{
    display:inline-flex;
    margin-left:4px;
  }

  body.page-teams .table td:nth-child(2) .team-fr-flag{
    margin-left:4px;
    margin-right:4px;
  }

  body.page-teams .table td:nth-child(2){
    overflow:hidden;
    white-space:nowrap;
  }

  body.page-teams .team-card .tc-row{
    grid-template-columns:26px 34px 1fr auto;
    padding:7px 10px !important;
    min-height:48px;
  }

  body.page-teams .team-card .tc-logo{
    width:30px;
    height:30px;
  }

  .player-cell-team{
    min-width:260px;
  }

  .tbl-players td:first-child{
    min-width:260px;
  }

  #teamLogoHdr{
    width:52px;
    height:52px;
    flex-basis:52px;
  }

  #teamNameHdr{
    font-size:24px;
  }

  #panelRecap .stat b{
    font-size:18px;
  }

  #panelRecap .team-kpis--top .stat b{
    font-size:21px;
  }

  #panelRecap .stat .muted{
    font-size:10px;
  }
}

#panelPast .tbl-games,
#panelNext .tbl-games{
  font-size:14px;
}

#panelPast .tbl-games th,
#panelPast .tbl-games td,
#panelNext .tbl-games th,
#panelNext .tbl-games td{
  padding:10px 8px;
}

#panelPast .tbl-games th,
#panelNext .tbl-games th{
  font-size:13px;
  font-weight:900;
}

#panelPast .tbl-games td,
#panelNext .tbl-games td{
  font-size:14px;
  line-height:1.2;
}

#panelPast .opp-tri,
#panelNext .tbl-team-tri{
  font-size:14px;
  font-weight:900;
  color:#0f172a;
  white-space:nowrap;
  letter-spacing:0;
}


#panelNext .tbl-games th:nth-child(1),
#panelNext .tbl-games td:nth-child(1){
  width:64px;
}

#panelNext .tbl-games th:nth-child(2),
#panelNext .tbl-games td:nth-child(2){
  width:110px;
}

#panelNext .tbl-games th:nth-child(3),
#panelNext .tbl-games td:nth-child(3){
  width:52px;
  text-align:left;
}

#panelNext .tbl-games th:nth-child(4),
#panelNext .tbl-games td:nth-child(4){
  width:72px;
  text-align:center;
}

#panelNext .tbl-games th:nth-child(5),
#panelNext .tbl-games td:nth-child(5){
  width:150px;
  text-align:left;
}

#panelNext .tbl-games th:nth-child(6),
#panelNext .tbl-games td:nth-child(6){
  width:150px;
  text-align:right;
  white-space:nowrap;
}

#panelNext .tbl-games td:nth-child(3),
#panelNext .tbl-games th:nth-child(3){
  padding-left:4px;
}

#panelNext .tbl-team-cell{
  gap:6px;
}

#panelNext .tbl-games td:nth-child(6){
  font-size:13px;
  font-weight:800;
  color:#0f172a;
}

/* ===== Tableau joueurs : FR + fallback headshots ===== */

#panelPlayers .tbl-players tbody tr.fr-player-row td{
  background:#f8fbff;
}

#panelPlayers .tbl-players tbody tr.fr-player-row td:first-child{
  position:relative;
  padding-left:18px;
}

#panelPlayers .tbl-players tbody tr.fr-player-row td:first-child::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:5px;
  border-radius:999px;
  background:linear-gradient(180deg,#2563eb 0 33%, #ffffff 33% 66%, #ef4444 66% 100%);
}

#panelPlayers .tbl-players tbody tr.fr-player-row .player-name-team{
  color:#1d4ed8;
  font-weight:900;
}

#panelPlayers .player-headshot{
  background:linear-gradient(180deg,#ffffff,#eef2f7);
  border:1px solid rgba(148,163,184,.24);
  padding:2px;
  box-sizing:border-box;
}

/* Scroll horizontal des tableaux uniquement sur mobile */
@media (max-width: 900px){

  #panelPast,
  #panelNext,
  #panelPlayers{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #panelPast .tbl-games{
    min-width: 620px;
  }

  #panelNext .tbl-games{
    min-width: 760px;
  }

  #panelPlayers .tbl-players{
    min-width: 1160px;
  }
}
/* ── Panneau Postseason (Play-In / Playoffs) ── */
#panelPostseason {
  margin-top: 16px;
}

.po-phase-sep {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  padding: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.po-phase-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #dbe2ea);
}

.tbl-po-games th,
.tbl-po-games td {
  padding: 7px 10px;
  font-size: 13px;
}

.tbl-po-games tr.upcoming-row td {
  color: var(--muted, #64748b);
  font-style: italic;
}

@media (max-width: 600px) {
  #panelPostseason {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tbl-po-games {
    min-width: 460px;
  }
}
