/* ==========================================================
   teams.css — Page Équipe (PHL)
   - Compatible Bootstrap 5
   - Conserve le style PHL (violet/fuchsia/bleu néon)
   - Fix texte noir (Bootstrap tables / variables)
   - Cards glass + tables clean + calendrier logos
   ========================================================== */

/* =========================
   Tokens (on réutilise PHL)
========================= */
:root{
  /* On garde tes couleurs PHL */
  --phl-primary:#FF00B8;
  --phl-secondary:#5A00B4;
  --phl-blue:#00C2FF;

  /* Background + glass */
  --team-bg:#0b0b14;
  --team-card:rgba(255,255,255,.06);
  --team-border:rgba(255,255,255,.12);

  /* Texte */
  --team-text:rgba(255,255,255,.92);
  --team-muted:rgba(255,255,255,.70);

  /* Effets */
  --team-shadow: 0 14px 40px rgba(0,0,0,.45);
  --team-radius: 18px;
  --team-radius-sm: 14px;
}

/* =========================
   Base / background
========================= */
html, body{ height:100%; }

body{
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255,0,184,.20), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(0,194,255,.18), transparent 55%),
    radial-gradient(900px 500px at 50% 110%, rgba(90,0,180,.22), transparent 60%),
    var(--team-bg);
  color: var(--team-text);
}

/* Wrapper */
.phl-wrapper{
  min-height: 100vh;
  color: var(--team-text);
}

/* Liens */
a{
  color: rgba(244,244,255,.92);
  text-decoration: none;
}
a:hover{
  color: #fff;
  text-decoration: none;
}

/* =========================
   FIX GLOBAL TEXTE NOIR (Bootstrap)
   - Empêche .table / .container / <strong> de devenir noirs
========================= */
.phl-wrapper,
.phl-wrapper *{
  color: inherit;
}

.phl-wrapper{
  color: var(--team-text);
}

/* Assure <strong> et titres en blanc */
.phl-wrapper strong,
.phl-wrapper b,
.phl-wrapper h1,
.phl-wrapper h2,
.phl-wrapper h3{
  color: var(--team-text) !important;
}

/* Muted */
.muted{
  color: var(--team-muted) !important;
  font-size: 13px;
}

/* =========================
   Cards glass
========================= */
.phl-card{
  background: var(--team-card);
  border: 1px solid var(--team-border);
  border-radius: var(--team-radius);
  box-shadow: var(--team-shadow);
  color: var(--team-text);
}

/* si un élément inside impose du noir, on force */
.phl-card *{
  color: inherit;
}

/* =========================
   Header équipe
========================= */
.team-header{
  display:flex;
  gap:18px;
  align-items:center;
}

.team-logo{
  width:84px;
  height:84px;
  border-radius:16px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}

.team-logo img{
  width:74px;
  height:74px;
  object-fit:contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.team-name{
  margin:0;
  font-weight:900;
  letter-spacing:.2px;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height:1.1;
  color: var(--team-text) !important;
}

/* =========================
   Section titles
========================= */
.section-title{
  font-weight:800;
  margin:0 0 12px 0;
  font-size:18px;
  letter-spacing:.2px;
  color: var(--team-text) !important;
  position: relative;
}
.section-title::after{
  content:"";
  display:block;
  margin-top:8px;
  width:64px;
  height:2px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(255,0,184,.75), rgba(0,194,255,.70));
  opacity:.7;
}

/* Ligne titre + compteur */
.badge-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

/* =========================
   KPI Grid
========================= */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}

@media (max-width: 768px){
  .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius:16px;
  padding:12px 14px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.kpi:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
}

.kpi .label{
  color: var(--team-muted) !important;
  font-size:12px;
  letter-spacing:.6px;
  text-transform:uppercase;
  margin-bottom:6px;
}

.kpi .value{
  font-size:22px;
  font-weight:900;
  line-height:1;
  color: var(--team-text) !important;
}

/* =========================
   Tables — FIX Bootstrap noir
   IMPORTANT: Bootstrap 5 met souvent les couleurs via --bs-table-*
========================= */
.table-responsive{
  border-radius: var(--team-radius-sm);
  overflow:hidden;
}

/* Force les variables Bootstrap pour nos tables */
.table.phl-table{
  --bs-table-color: var(--team-text);
  --bs-table-bg: transparent;
  --bs-table-striped-color: var(--team-text);
  --bs-table-striped-bg: rgba(255,255,255,.03);
  --bs-table-hover-color: var(--team-text);
  --bs-table-hover-bg: rgba(255,255,255,.04);
  --bs-table-border-color: rgba(255,255,255,.10);

  color: var(--team-text) !important;
  margin:0;
}

/* Force texte blanc sur th/td (sinon Bootstrap peut imposer #212529) */
.table.phl-table th,
.table.phl-table td{
  color: var(--team-text) !important;
}

/* Thead */
.table.phl-table thead th{
  border-bottom: 1px solid var(--team-border) !important;
  color: rgba(255,255,255,.82) !important;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
  background: rgba(0,0,0,.18);
}

/* Body */
.table.phl-table tbody td{
  border-top: 1px solid rgba(255,255,255,.10) !important;
  vertical-align: middle;
  white-space: nowrap;
  background: rgba(255,255,255,.02);
}

.table.phl-table tbody tr:hover td{
  background: rgba(255,255,255,.04);
}

/* Nom joueur / date */
.name-cell{
  font-weight: 900;
  white-space: normal;
}

/* Align numeric */
.table.phl-table .text-end{
  font-variant-numeric: tabular-nums;
}

/* =========================
   Pills / badges
========================= */
.pos-pill,
.match-pill,
.team-flag,
.count-pill,
.vs-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.90) !important;
  font-size:12px;
  white-space:nowrap;
}

.pos-pill{ padding:3px 10px; }

.match-pill{
  gap:8px;
  padding:5px 10px;
}

.team-flag{ padding:3px 10px; }

.count-pill{
  padding:4px 10px;
  color: rgba(255,255,255,.86) !important;
}

.vs-pill{
  padding:2px 10px;
  color: rgba(255,255,255,.86) !important;
}

/* Score pill */
.score-pill{
  font-weight: 950;
  letter-spacing: .4px;
}

/* =========================
   Calendrier — ligne match + logos
========================= */
.match-line{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.logo-sm{
  width:32px;
  height:32px;
  border-radius:10px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}

.logo-sm img{
  width:26px;
  height:26px;
  object-fit:contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.35));
}

/* =========================
   Inputs (si filtres plus tard)
========================= */
.form-control,
.form-select{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  border-radius: 12px;
}

.form-control:focus,
.form-select:focus{
  background: rgba(255,255,255,.07);
  border-color: rgba(0,194,255,.45);
  box-shadow: 0 0 0 .2rem rgba(0,194,255,.12);
  color: rgba(255,255,255,.95);
}

.form-control::placeholder{
  color: rgba(255,255,255,.45);
}

/* =========================
   Scrollbar discret
========================= */
*{
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) rgba(255,255,255,.06);
}
*::-webkit-scrollbar{ height:10px; width:10px; }
*::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); }
*::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,.24);
}

/* =========================
   Responsive polish
========================= */
@media (max-width: 576px){
  .team-logo{ width:72px; height:72px; border-radius:14px; }
  .team-logo img{ width:62px; height:62px; }
  .kpi .value{ font-size:20px; }
}

/* =========================
   Sécurité extra: si Bootstrap injecte des couleurs table ailleurs
========================= */
.table,
.table *{
  /* Ne casse pas Bootstrap globalement, mais évite le noir dans ton wrapper */
}
.phl-wrapper .table,
.phl-wrapper .table *{
  color: var(--team-text) !important;
}
