/* =============================================================================
   classements.css — Page Classements Football UY1
   Chargé uniquement dans classements.html
   Thème : sombre fumé, radius 12px, cohérent avec main.css
   ============================================================================= */

/* ── Indicateur de mise à jour ──────────────────────────────────────────────── */
.update-indicator {
  position: fixed; top: calc(var(--nav-h) + 10px); right: 1.5rem;
  background: rgba(255,153,0,0.2); border: 1px solid rgba(255,153,0,0.35);
  color: #ffd740; padding: 0.45rem 1rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700; z-index: 500;
  display: none; align-items: center; gap: 0.4rem;
  backdrop-filter: blur(8px);
}
.update-indicator.visible { display: flex; }

/* ── Hero overrides ─────────────────────────────────────────────────────────── */
.hero-meta { margin-top: 0.75rem; }
.hero-meta small { color: rgba(255,255,255,0.45); font-size: 0.82rem; }

.live-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(0,230,118,0.2); border: 1px solid rgba(0,230,118,0.3);
  color: #00e676; font-size: 0.72rem; font-weight: 800;
  padding: 0.2rem 0.65rem; border-radius: 20px; margin-left: 0.75rem;
  animation: livePulse 2s infinite; vertical-align: middle;
}
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* ── Sélecteur de filière ───────────────────────────────────────────────────── */
.filiere-selector {
  background: rgba(10,10,35,0.72); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.filiere-selector-header {
  font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700;
  color: rgba(255,255,255,0.85); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.45rem;
}
.filiere-selector-header i { color: rgba(255,204,0,0.85); }
.filiere-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.filiere-btn {
  padding: 0.45rem 1rem; border-radius: 20px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.72); font-size: 0.84rem; font-weight: 700;
  cursor: pointer; transition: all 0.22s; font-family: 'Nunito', sans-serif;
}
.filiere-btn:hover { background: rgba(255,153,0,0.15); border-color: rgba(255,153,0,0.3); color: #ffd740; }
.filiere-btn.active { background: rgba(255,153,0,0.2); border-color: rgba(255,204,0,0.45); color: #ffd740; font-weight: 800; }

/* ── Indicateur de chargement ──────────────────────────────────────────────── */
.loading-indicator {
  text-align: center; padding: 1rem;
  color: rgba(255,255,255,0.6); font-size: 0.9rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

/* ── Onglets ────────────────────────────────────────────────────────────────── */
.tabs-container {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1.25rem;
  background: rgba(10,10,35,0.72); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 0.6rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.tab-button {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border-radius: 8px;
  background: transparent; border: none;
  color: rgba(255,255,255,0.6); font-size: 0.86rem; font-weight: 700;
  cursor: pointer; transition: all 0.22s; font-family: 'Nunito', sans-serif;
  white-space: nowrap;
}
.tab-button i { font-size: 0.8rem; }
.tab-button:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.tab-button.active {
  background: rgba(255,153,0,0.2); border: 1px solid rgba(255,204,0,0.35);
  color: #ffd740; font-weight: 800;
}

/* Contenu onglet */
.onglet-content { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Titre d'onglet ─────────────────────────────────────────────────────────── */
.onglet-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.35rem; font-weight: 700; color: var(--blanc);
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.onglet-title i { color: rgba(255,204,0,0.85); }

.filiere-badge {
  background: rgba(255,153,0,0.2); border: 1px solid rgba(255,204,0,0.3);
  color: #ffd740; padding: 0.2rem 0.65rem; border-radius: 20px;
  font-size: 0.76rem; font-weight: 700; margin-left: 0.25rem;
  font-family: 'Nunito', sans-serif;
}

/* ── Tableau scroll horizontal ──────────────────────────────────────────────── */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  /* Scrollbar stylée */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,153,0,0.5) rgba(255,255,255,0.05);
}
.table-scroll-wrapper::-webkit-scrollbar { height: 6px; }
.table-scroll-wrapper::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 3px; }
.table-scroll-wrapper::-webkit-scrollbar-thumb { background: rgba(255,153,0,0.5); border-radius: 3px; }
.table-scroll-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(255,153,0,0.75); }

.scroll-hint {
  text-align: center; font-size: 0.76rem;
  color: rgba(255,255,255,0.3); margin-top: 0.5rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}

/* ── Table container ────────────────────────────────────────────────────────── */
.table-container {
  background: rgba(0,0,0,0.25); border-radius: 12px;
  overflow: hidden; min-width: 600px;
}

/* ── Classement table ───────────────────────────────────────────────────────── */
.classement-table {
  width: 100%; border-collapse: collapse; background: transparent;
  font-size: 0.92rem;
}
.classement-table thead {
  background: linear-gradient(135deg, #ff9900, #ffcc00);
}
.classement-table th {
  padding: 1rem 0.85rem; text-align: center;
  font-weight: 800; color: #000; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
.classement-table th.col-equipe { text-align: left; min-width: 160px; }
.classement-table th.col-sticky-header {
  text-align: left; min-width: 160px;
  position: sticky; left: 0; z-index: 10;
  background: linear-gradient(135deg, #ff9900, #ffcc00);
}
.classement-table th:first-child { border-radius: 12px 0 0 0; }
.classement-table th:last-child  { border-radius: 0 12px 0 0; }

.classement-table td {
  padding: 0.9rem 0.85rem; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.9rem; font-weight: 500; color: var(--texte);
  white-space: nowrap;
}
.classement-table td.equipe-nom {
  text-align: left; font-weight: 700; color: var(--blanc);
  display: flex; align-items: center; gap: 0.5rem;
}
.classement-table td.points { font-weight: 800; font-size: 1rem; color: #ffd740; }
.classement-table td.diff-positive { color: #00e676; font-weight: 700; }
.classement-table td.diff-negative { color: #ff5252; font-weight: 700; }
.classement-table td.diff-neutre   { color: rgba(255,255,255,0.45); }

/* Lignes */
.equipe-row { transition: all 0.22s; background: rgba(255,255,255,0.02); }
.equipe-row:hover { background: rgba(255,153,0,0.08) !important; transform: translateX(4px); }
.equipe-row:nth-child(even) { background: rgba(255,255,255,0.03); }

/* Zones */
.equipe-row.zone-qual { border-left: 3px solid #00c853; }
.equipe-row.zone-barr { border-left: 3px solid #ffc107; }
.equipe-row.zone-rele { border-left: 3px solid #ff5252; }

/* Tableau rencontres - colonnes verticales */
#tableau-rencontres th:not(:first-child) {
  writing-mode: vertical-rl; transform: rotate(180deg);
  max-width: 42px; white-space: nowrap;
  font-size: 0.78rem; padding: 1rem 0.3rem;
}
#tableau-rencontres td:first-child {
  text-align: left; font-weight: 700; color: var(--blanc);
  padding-left: 1rem; position: sticky; left: 0;
  background: rgba(10,10,35,0.85); z-index: 5; min-width: 150px;
}
.equipe-row:hover #tableau-rencontres td:first-child { background: rgba(255,153,0,0.12); }

.cell-match { font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: transform 0.2s; }
.cell-match:hover { transform: scale(1.3); }
.cell-match.termine  { color: #00e676; text-shadow: 0 0 8px rgba(0,230,118,0.4); }
.cell-match.en_cours { color: #ffc107; text-shadow: 0 0 8px rgba(255,193,7,0.4); }
.cell-match.programme{ color: #448aff; text-shadow: 0 0 8px rgba(68,138,255,0.4); }
.cell-diagonal { background: rgba(0,0,0,0.3); color: rgba(255,255,255,0.15); font-weight: 700; }

/* No data */
.no-data { text-align: center; padding: 3rem 1rem; color: rgba(255,255,255,0.4); }
.no-data i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; color: rgba(255,153,0,0.5); }
.no-data h3 { font-family: 'Oswald', sans-serif; color: rgba(255,255,255,0.65); margin-bottom: 0.4rem; }
.no-data p  { font-size: 0.88rem; }

/* ── Légende classement ─────────────────────────────────────────────────────── */
.legende-bloc {
  background: rgba(10,10,35,0.72); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 1.25rem 1.5rem; margin-top: 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  display: flex; gap: 2rem; flex-wrap: wrap;
}
.legende-section { flex: 1; min-width: 220px; }
.legende-title {
  font-family: 'Oswald', sans-serif; font-size: 0.95rem; font-weight: 700;
  color: rgba(255,255,255,0.75); margin-bottom: 0.85rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.legende-title i { color: rgba(255,204,0,0.75); }
.abbrev-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.abbrev-item {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0.3rem 0.7rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.72);
}
.abbrev-item strong { color: #ffd740; margin-right: 3px; }
.status-list { display: flex; flex-direction: column; gap: 0.5rem; }
.status-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: rgba(255,255,255,0.72); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.green  { background: #00c853; box-shadow: 0 0 6px rgba(0,200,83,0.5); }
.dot.yellow { background: #ffc107; box-shadow: 0 0 6px rgba(255,193,7,0.5); }
.dot.red    { background: #ff5252; box-shadow: 0 0 6px rgba(255,82,82,0.5); }

/* ── Card sombre générique ──────────────────────────────────────────────────── */
.card-dark {
  background: rgba(10,10,35,0.72); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 1.5rem; box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  margin-bottom: 1.25rem;
}

/* ── Liste membres / buteurs / matchs ───────────────────────────────────────── */
.members-list { display: flex; flex-direction: column; gap: 0.65rem; }

.member-item {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 0.85rem 1rem;
  transition: all 0.22s; gap: 0.75rem;
  /* Empêche le débordement sur mobile */
  min-width: 0; width: 100%;
}
.member-item:hover {
  background: rgba(255,153,0,0.08); border-color: rgba(255,153,0,0.2);
  transform: translateX(3px);
}

/* Partie gauche : rang + info */
.member-left {
  display: flex; align-items: center; gap: 0.75rem;
  flex: 1; min-width: 0; /* permet la troncature du texte */
}
.member-info { min-width: 0; flex: 1; }
.member-info h4 {
  color: var(--blanc); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-info p {
  color: rgba(255,255,255,0.45); font-size: 0.78rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Partie droite : score */
.member-score { text-align: center; flex-shrink: 0; }
.member-score-num {
  font-family: 'Oswald', sans-serif; font-size: 1.45rem; font-weight: 700;
  color: #ffd740; line-height: 1;
}
.member-score-lbl { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 0.15rem; }

.member-rank {
  font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700;
  color: #ff9900; min-width: 28px; flex-shrink: 0;
}

/* Match card */
.match-card .match-icon { font-size: 1.1rem; color: #ff9900; min-width: 24px; flex-shrink: 0; }
.match-score-display {
  font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 700; color: #ffd740;
  white-space: nowrap;
}

/* ── Podium ─────────────────────────────────────────────────────────────────── */
.podium-wrapper {
  background: rgba(10,10,35,0.72); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 1.25rem 1rem; margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* Podium horizontal côte à côte, items de même taille */
.podium-flex {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0.75rem 0 0;
  align-items: end;
}

.podium-item {
  background: linear-gradient(135deg, #ff9900, #e88800);
  border-radius: 10px; padding: 0.9rem 0.6rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(255,153,0,0.3);
  color: #fff;
  width: 100%;            /* occupe toute la colonne */
  box-sizing: border-box;
}
.podium-item.first {
  /* 1er légèrement plus grand */
  padding-top: 1.1rem; padding-bottom: 1.1rem;
  box-shadow: 0 6px 24px rgba(255,153,0,0.4);
}
.podium-medal { font-size: 1.6rem; margin-bottom: 0.3rem; line-height: 1; }
.podium-name  { font-weight: 800; font-size: 0.82rem; margin-bottom: 0.2rem; line-height: 1.3; word-break: break-word; }
.podium-team  { font-size: 0.7rem; opacity: 0.8; margin-bottom: 0.35rem; }
.podium-buts  { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700; }
.podium-pos   { font-size: 0.65rem; opacity: 0.65; margin-top: 0.15rem; }

/* ── Recherche ──────────────────────────────────────────────────────────────── */
.search-container { position: relative; margin-bottom: 1.25rem; }
.search-input-wrapper {
  position: relative; display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 1rem; color: rgba(255,255,255,0.35); font-size: 0.9rem; z-index: 1;
}
.search-input {
  width: 100%; padding: 0.82rem 1rem 0.82rem 2.75rem;
  background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 10px; color: var(--blanc); font-size: 0.92rem;
  font-family: 'Nunito', sans-serif; transition: border-color 0.22s, box-shadow 0.22s;
}
.search-input:focus {
  outline: none; border-color: #ff9900;
  box-shadow: 0 0 0 3px rgba(255,153,0,0.15); background: rgba(255,255,255,0.1);
}
.search-input::placeholder { color: rgba(255,255,255,0.28); }
.search-indicator {
  position: absolute; right: 1rem;
  background: rgba(255,153,0,0.12); color: #ffd740;
  padding: 0.22rem 0.65rem; border-radius: 20px;
  font-size: 0.76rem; font-weight: 700; pointer-events: none;
}
.search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: rgba(15,15,45,0.97); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,153,0,0.25); border-radius: 10px;
  max-height: 320px; overflow-y: auto; z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  scrollbar-width: thin; scrollbar-color: rgba(255,153,0,0.4) transparent;
}
.search-results::-webkit-scrollbar { width: 5px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(255,153,0,0.4); border-radius: 3px; }
.search-result-item {
  padding: 0.9rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer; transition: all 0.2s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,153,0,0.1); padding-left: 1.4rem; }
.search-result-name { font-weight: 700; color: var(--blanc); font-size: 0.9rem; margin-bottom: 0.2rem; }
.search-result-info { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.search-no-results { padding: 1.5rem; text-align: center; color: rgba(255,255,255,0.35); font-style: italic; font-size: 0.88rem; }

/* ── Filtres ────────────────────────────────────────────────────────────────── */
.filters-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.filter-btn {
  padding: 0.42rem 1rem; border-radius: 20px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.22s; font-family: 'Nunito', sans-serif;
}
.filter-btn:hover { background: rgba(255,153,0,0.12); border-color: rgba(255,153,0,0.25); color: #ffd740; }
.filter-btn.active { background: rgba(255,153,0,0.2); border-color: rgba(255,204,0,0.4); color: #ffd740; font-weight: 800; }
.reset-btn { background: rgba(255,255,255,0.04) !important; color: rgba(255,255,255,0.45) !important; }
.reset-btn:hover { color: rgba(255,255,255,0.75) !important; background: rgba(255,255,255,0.1) !important; }

/* ── Rencontres hint & legend ───────────────────────────────────────────────── */
.rencontres-hint { color: rgba(255,255,255,0.55); font-size: 0.88rem; margin-bottom: 1.1rem; line-height: 1.65; }
.rencontres-legend {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 1.1rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.84rem; color: rgba(255,255,255,0.55);
}
.rencontres-legend span { display: flex; align-items: center; gap: 0.4rem; }

/* ── Timestamp footer ───────────────────────────────────────────────────────── */
.timestamp-footer {
  text-align: center; padding: 1rem 0 0.5rem;
  color: rgba(255,255,255,0.3); font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablette / petit écran ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Container : padding réduit */
  .filiere-selector { padding: 1rem; }
  .card-dark        { padding: 1rem; }
  .podium-wrapper   { padding: 1rem 0.75rem; }
  .legende-bloc     { padding: 1rem; gap: 1rem; flex-direction: column; }

  /* Tabs scrollable horizontalement */
  .tabs-container {
    overflow-x: auto; flex-wrap: nowrap;
    padding: 0.5rem; gap: 0.3rem;
    scrollbar-width: none;
  }
  .tabs-container::-webkit-scrollbar { display: none; }
  .tab-button { padding: 0.48rem 0.85rem; font-size: 0.8rem; flex-shrink: 0; }
  .tab-button span { display: none; }   /* cache le label, garde juste l'icône sur très petit */

  /* Filière : boutons scrollables */
  .filiere-buttons { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .filiere-buttons::-webkit-scrollbar { display: none; }
  .filiere-btn { flex-shrink: 0; }

  /* Podium : grid 3 colonnes — réduit la taille de police */
  .podium-item { padding: 0.75rem 0.4rem; }
  .podium-medal { font-size: 1.3rem; }
  .podium-name  { font-size: 0.75rem; }
  .podium-team  { font-size: 0.65rem; }
  .podium-buts  { font-size: 0.9rem; }

  /* Member items : texte plus compact */
  .member-item { padding: 0.75rem 0.85rem; }
  .member-info h4 { font-size: 0.86rem; }
  .member-info p  { font-size: 0.75rem; }
  .member-score-num { font-size: 1.25rem; }
  .member-rank { font-size: 0.9rem; min-width: 24px; }

  /* Classement table : réduire padding */
  .classement-table th,
  .classement-table td { padding: 0.75rem 0.55rem; font-size: 0.84rem; }
  .classement-table th.col-equipe { min-width: 120px; }

  /* Onglet title plus petit */
  .onglet-title { font-size: 1.1rem; }

  /* Stats grid 2 colonnes sur mobile */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 1.25rem 0.85rem 1.1rem; }
  .stat-number { font-size: 2rem; }
  .stat-label { font-size: 0.7rem; }
}

/* ── Très petit écran < 420px ───────────────────────────────────────────── */
@media (max-width: 420px) {

  .tab-button span { display: none; }
  .tab-button { padding: 0.45rem 0.7rem; font-size: 0.9rem; }

  /* Podium : colonnes encore plus compactes */
  .podium-flex { gap: 0.4rem; }
  .podium-item { padding: 0.65rem 0.3rem; }
  .podium-name  { font-size: 0.7rem; }
  .podium-medal { font-size: 1.1rem; }

  /* Member items : layout en colonne si texte très long */
  .member-item { flex-direction: row; align-items: center; }
  .member-info h4 { font-size: 0.82rem; }

  /* Réduire padding général */
  .card-dark      { padding: 0.85rem; }
  .filiere-selector { padding: 0.85rem; }

  /* Table classement : cacher colonnes secondaires sur mobile */
  .classement-table th:nth-child(7),
  .classement-table td:nth-child(7),
  .classement-table th:nth-child(8),
  .classement-table td:nth-child(8) {
    display: none; /* Cache BP et BC sur très petit écran */
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stat-card { padding: 1rem 0.7rem; }
  .stat-number { font-size: 1.75rem; }
}
