/* ===========================
   PLAYOFFS - BLEUBLANCDUNK
   Version 2.2 : lisible & sexy
   =========================== */

:root {
  --po-bg:         var(--bg, #f3f4f8);
  --po-ink:        var(--ink, #0b1b33);
  --po-primary:    var(--primary, #1a4b9a);
  --po-primary-2:  var(--primary-2, #2a66d4);
  --po-accent:     #ff8f3c;
  --po-border:     var(--border, #e2e8f0);
  --po-card-bg:    #ffffff;
  --po-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.18);
  --po-radius-lg:  22px;
  --po-radius-xl:  26px;
  --po-radius-pill: 999px;
}

/* --- Page wrapper --- */

#poPageWrapper {
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 18px 36px;
}

/* --- Bandeau titre + filtres --- */

#poTopBar {
  background: linear-gradient(120deg, rgba(26,75,154,0.15), rgba(42,102,212,0.06));
  border-radius: var(--po-radius-xl);
  padding: 18px 22px;
  margin: 18px auto 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

#poTopBarTitle {
  font-size: 24px;
  font-weight: 800;
  color: var(--po-ink);
}

#poTopBarSubtitle {
  font-size: 13px;
  opacity: 0.8;
}

.po-top-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#poSeasonLabel {
  font-weight: 700;
}

.po-type-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.06);
  border-radius: var(--po-radius-pill);
  padding: 3px;
}

.po-type-btn {
  border: none;
  background: transparent;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--po-radius-pill);
  cursor: pointer;
  color: rgba(15,23,42,0.7);
  transition: all 0.15s ease;
}

.po-type-btn:hover {
  background: rgba(255,255,255,0.9);
}

.po-type-btn.active {
  background: #ffffff;
  color: var(--po-primary);
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.20);
}

/* Résumé FR */

#poFrSummary {
  margin: 4px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.po-fr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--po-radius-pill);
  background: rgba(15, 118, 110, 0.10);
  color: #0f172a;
  font-weight: 500;
}

.po-fr-chip span.flag {
  font-size: 16px;
}

#poStatus {
  margin-top: 4px;
  font-size: 13px;
  color: #b91c1c;
}

/* ===========================
   BRACKETS
   =========================== */

#poBrackets {
  margin-top: 10px;
}

/* Wrapper Est/Ouest : une conférence par ligne */

.po-conf-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Bloc conférence */

.po-conf {
  background: var(--po-card-bg);
  border-radius: var(--po-radius-xl);
  box-shadow: var(--po-shadow-soft);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.po-conf-title {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 14px;
  font-weight: 800;
  color: rgba(15,23,42,0.75);
  text-align: center;
}

/* colonnes de tours */

.po-rounds {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.po-round-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-round-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-align: center;
  color: rgba(15,23,42,0.55);
  margin-bottom: 2px;
}

/* ----------- Cartes série ----------- */

.po-series-card {
  position: relative;
  border-radius: var(--po-radius-lg);
  background: #f9fafb;
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(148,163,184,0.7);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.po-series-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
  border-color: rgba(37,99,235,0.9);
}

.po-series-card.fr {
  background: radial-gradient(circle at top left,
              rgba(56,189,248,0.38),
              #f9fafb 55%);
  border-color: rgba(56,189,248,0.85);
}

/* bandeau seed + résultat */

.po-series-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}

.po-seed {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: rgba(15,23,42,0.8);
}

.po-result {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: var(--po-radius-pill);
  background: rgba(15,23,42,0.92);
  color: #f9fafb;
}

/* ligne équipe */

.po-team-row {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
}

.po-team-logo {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(148,163,184,0.75);
}

.po-team-name {
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.po-team-name .flag-fr {
  font-size: 16px;
}

.po-team-rec {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

/* badge FR */

.po-series-fr-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--po-radius-pill);
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.65);
}

/* ===========================
   FINALES NBA
   =========================== */

#poFinalsBlock {
  margin: 30px auto 0;
  max-width: 700px;
}

#poFinalsBlock .po-conf {
  padding-inline: 24px;
}

/* ===========================
   BLOCS JOUEURS FR
   =========================== */

#poFrPlayersBlock {
  margin: 32px auto 0;
  max-width: 1180px;
  background: var(--po-card-bg);
  border-radius: var(--po-radius-xl);
  box-shadow: var(--po-shadow-soft);
  padding: 18px 22px 20px;
}

#poFrPlayersBlock h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

#poFrPlayersGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

/* carte joueur FR */

.po-fr-card {
  display: grid;
  grid-template-columns: 84px minmax(0,1fr);
  gap: 10px;
  padding: 11px 13px;
  border-radius: 20px;
  background: radial-gradient(circle at top left,
              rgba(56,189,248,0.4),
              #ffffff 55%);
  border: 1px solid rgba(56,189,248,0.7);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

/* headshot */

.po-fr-card .hs-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}

.po-fr-card .hs-bg {
  position: absolute;
  inset: 12px 6px 0;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg,
              rgba(15,23,42,0.9),
              rgba(37,99,235,0.75));
  filter: blur(3px);
}

.po-fr-card .hs-img {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid #f8fafc;
}

/* texte */

.po-fr-card-name {
  font-size: 15px;
  font-weight: 800;
}

.po-fr-card-meta {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.po-fr-card-stats {
  font-size: 12px;
  font-weight: 600;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 900px) {
  #poTopBar {
    flex-direction: column;
    align-items: flex-start;
  }
  .po-top-controls {
    margin-left: 0;
  }
  .po-rounds {
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .po-round-col {
    min-width: 220px;
  }
}

@media (max-width: 520px) {
  #poPageWrapper {
    padding-inline: 10px;
  }
  #poTopBar {
    padding-inline: 14px;
  }
  .po-fr-card {
    grid-template-columns: 68px minmax(0,1fr);
  }
  .po-fr-card .hs-wrap,
  .po-fr-card .hs-img {
    width: 68px;
    height: 68px;
  }
}
/* ===================================================== */
/*  PLAYOFFS - layout XXL lisible sur grand écran       */
/* ===================================================== */

/* Conteneur global des brackets */
#poBrackets {
  max-width: 1400px;            /* bien large */
  margin: 0 auto 48px;
}

/* Les deux conférences côte à côte */
.po-conf-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 1200px) {
  .po-conf-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Carte "Conférence Est / Ouest" */
.po-conf {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 18px 24px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
}

/* Titre de conférence */
.po-conf-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 16px;
}

/* Colonnes de tours (1er tour / demis / finale conf) */
.po-rounds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1100px) {
  .po-rounds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .po-rounds {
    grid-template-columns: 1fr;
  }
}

.po-round-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.po-round-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  text-align: center;
  margin-bottom: 2px;
}

/* Cartes de séries- GROS et lisible */
.po-series-card {
  border-radius: 18px;
  padding: 10px 12px 12px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #e5e7eb;
  font-size: 14px;               /* important : texte + gros */
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* En-tête de la série (seeds + score global) */
.po-series-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
}

.po-seed {
  font-weight: 600;
  opacity: 0.9;
}

.po-result {
  font-weight: 700;
}

/* Lignes équipes */
.po-team-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  margin-top: 4px;
}

.po-team-logo {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #0b1120;
  padding: 2px;
}

.po-team-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flag-fr {
  margin-left: 4px;
}

/* "X victoires" */
.po-team-rec {
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: right;
  opacity: 0.9;
}

/* Badge "🇫🇷 présent" */
.po-series-fr-badge {
  margin-top: 6px;
  align-self: flex-start;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
}
/* ===================================================== */
/*  PLAYOFFS - layout vertical + onglets Est/Ouest       */
/* ===================================================== */

.page-playoffs .playoffs-main {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 16px;
}

/* Barre de contrôle en haut (titre + saison + boutons) */
.playoffs-controls {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(
    120deg,
    rgba(26, 75, 154, 0.08),
    rgba(42, 102, 212, 0.05)
  );
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.po-controls-left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.po-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.po-season-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.po-season-select select {
  border-radius: 10px;
  border: 1px solid var(--po-border);
  padding: 4px 8px;
}

/* le résumé FR existe déjà (#poFrSummary), on enlève juste la marge d’origine ici */
.playoffs-controls #poFrSummary {
  margin: 0;
}

/* Onglets Est / Ouest */
.po-brackets {
  margin-top: 18px;
}

.po-conf-tabs {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  padding: 3px;
  gap: 4px;
  margin-bottom: 12px;
}

.po-conf-tab {
  border: none;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: transparent;
  color: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.po-conf-tab.active {
  background: #ffffff;
  color: var(--po-primary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

/* Panneaux Est / Ouest */
.po-conf-panels {
  margin-top: 4px;
}

.po-conf-panel {
  display: none;
}

.po-conf-panel.active {
  display: block;
}

/* Message de statut dans chaque panneau */
#poStatusEast,
#poStatusWest {
  margin-top: 4px;
  font-size: 13px;
  color: #b91c1c;
}

/* Round (= 1er tour, demis, finale de conf, etc.) en vertical */
.po-round-block {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--po-border);
  margin-bottom: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.po-round-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

/* Par défaut : 1 carte par ligne (finales, petites séries) */
.po-series-column {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 8px;
}

/* 1er tour : 4 cartes par ligne */
.po-round-block[data-round="round1"] .po-series-column {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Demis : 2 cartes par ligne */
.po-round-block[data-round="semis"] .po-series-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Finale de conf + finales NBA : 1 carte, on garde la valeur par défaut */

/* Responsive : on réduit le nombre de colonnes sur petits écrans */
@media (max-width: 1100px) {
  .po-round-block[data-round="round1"] .po-series-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .po-round-block[data-round="round1"] .po-series-column,
  .po-round-block[data-round="semis"] .po-series-column {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}


/* Responsive */
@media (max-width: 768px) {
  .playoffs-controls {
    flex-direction: column;
    align-items: flex-start;
  }
}
/***************************************************
 * RESET PLAYOFFS : cartes lisibles, sans dégradés
 ***************************************************/

/* Bloc de round (1er tour / demis / finale conf) */
.po-round-block {
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1px solid var(--po-border, #e2e8f0) !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
  padding: 10px 12px !important;
}

/* Titre de round */
.po-round-title {
  margin: 0 0 8px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827 !important;
}

/* Grille de séries dans un round */
.po-series-column {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

/* 1er tour : jusqu'à 4 cartes par ligne, mais wrap proprement */
.po-round-block[data-round="round1"] .po-series-column {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
}


/* Demies : 2 cartes */
.po-round-block[data-round="semis"] .po-series-column {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .po-round-block[data-round="round1"] .po-series-column {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 700px) {
  .po-round-block[data-round="round1"] .po-series-column,
  .po-round-block[data-round="semis"] .po-series-column {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* Carte de série : fond blanc, texte foncé */
.po-series-card,
.po-series-card.fr {
  background: #ffffff !important;
  color: #111827 !important;
  border-radius: 12px !important;
  border: 1px solid var(--po-border, #e2e8f0) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10) !important;
  padding: 8px 10px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* On garde juste un petit badge FR discret */
.po-series-card.fr {
  border-left: 4px solid #2563eb !important;
}

/* En-tête : seed + résultat global */
.po-series-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.po-seed {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.po-result {
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 999px !
}

/* Force la lisibilité quoi qu'il arrive */
.bracket-wrap, .finals, .round, .series-card,
.series-card *{
  color:#0f172a !important;
}

/* Score ultra lisible */
.sseries-score{
  background:#0f172a;
  color:#fff !important;
  padding:6px 12px;
  border-radius:999px;
  min-width:92px;
  text-align:center;
  font-weight:900;
}

/* Badges + toggle restent lisibles */
.badge{ background:#fff; }
.toggle{
  background:#fff;
  color:#0f172a !important;
}
.toggle.open{
  background:#0f172a;
  color:#fff !important;
}