/* ===================================================
   compositions.css  — Style ancienne version adapté
   nouvelle structure (sidebar + onglets)
=================================================== */

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ff6b35 0%, #667eea 60%, #764ba2 100%);
  color: white;
  min-height: 100vh;
  padding: 10px;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }

/* ===== LAYOUT PRINCIPAL ===== */
.comp-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* ===== SIDEBAR ===== */
.matches-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(26, 26, 46, 0.95);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: sticky;
  top: 10px;
  max-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 14px 16px;
  background: linear-gradient(140deg, #667eea 0%, #ff6b35 70%, #764ba2 100%);
  text-align: center;
}
.sidebar-header h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  color: white;
}

/* Filtres filière */
.filiere-filters {
  padding: 10px 12px;
  background: rgba(0,0,0,0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filiere-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.filiere-btn.active,
.filiere-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: translateY(-1px);
}

/* Liste des matchs */
.matches-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.matches-list::-webkit-scrollbar { width: 5px; }
.matches-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.matches-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.sidebar-filiere-label {
  font-size: 10px;
  font-weight: 700;
  color: #ffc107;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 6px 4px 4px;
  border-bottom: 1px solid rgba(255,215,0,0.2);
  margin-bottom: 4px;
  margin-top: 10px;
}
.sidebar-filiere-group:first-child .sidebar-filiere-label { margin-top: 0; }

.match-item {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 7px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  display: block;
  color: white;
}
.match-item:hover {
  background: rgba(255,255,255,0.1);
  border-left-color: rgba(76,175,80,0.5);
}
.match-item.active {
  background: rgba(76,175,80,0.25);
  border-left-color: #4CAF50;
}

.match-item-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.team-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.match-item-names {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-item-names em { color: rgba(255,255,255,0.4); font-style: normal; }

.match-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}
.match-item-score {
  font-weight: 700;
  color: #4CAF50;
}
.match-item-status {
  text-transform: uppercase;
  font-size: 9px;
  color: rgba(255,255,255,0.5);
}
.match-status-en_cours { color: #dc3545 !important; font-weight: 700; }
.match-status-termine  { color: #6c757d !important; }

/* ===== ZONE PRINCIPALE ===== */
.comp-main {
  flex: 1;
  min-width: 0;
  background: rgba(26, 26, 46, 0.95);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 16px;
}

/* ===== MATCH HEADER CARD ===== */
.match-header-card {
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.match-header-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.header-team {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.header-team-right {
  justify-content: flex-end;
}

.header-team-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.header-team-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.header-team-right .header-team-info { align-items: flex-end; }

.header-team-name {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.hbadge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.hbadge-ok   { background: rgba(76,175,80,0.3); color: #4CAF50; border: 1px solid rgba(76,175,80,0.4); }
.hbadge-muted{ background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }

.header-score-block {
  text-align: center;
  flex-shrink: 0;
}

.header-score {
  font-size: 36px;
  font-weight: 700;
  color: #4CAF50;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.score-sep { color: rgba(255,255,255,0.3); font-size: 28px; }

.header-match-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px 0;
}

.header-status-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(108,117,125,0.3);
  color: #adb5bd;
}
.status-en_cours { background: rgba(220,53,69,0.2) !important; color: #f87171 !important; }
.status-termine  { background: rgba(108,117,125,0.2) !important; color: #6c757d !important; }

.live-dot-xs {
  display: inline-block;
  width: 7px; height: 7px;
  background: #dc3545;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  margin-right: 3px;
}

.header-minute {
  font-size: 13px;
  color: #dc3545;
  font-weight: 700;
}

.header-date {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* Cotes rapides header */
.cotes-quick {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.cote-box {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cote-dom { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.cote-nul { background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%); }
.cote-ext { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.cote-team { font-size: 10px; color: rgba(255,255,255,0.8); }
.cote-val  { font-size: 22px; font-weight: 700; color: white; }
.cote-lbl  { font-size: 9px; color: rgba(255,255,255,0.6); }

.cotes-votes {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 0 8px;
  white-space: nowrap;
}

/* ===== ONGLETS ===== */
.comp-tabs {
  display: flex;
  justify-content: space-around;
  margin: 0 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.comp-tab {
  flex: 1;
  padding: 10px 5px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.comp-tab:hover { color: rgba(255,255,255,0.9); }
.comp-tab.active { color: white; font-weight: 700; }
.comp-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, #4CAF50, #20c997);
  border-radius: 2px 2px 0 0;
}
.tab-live-dot {
  width: 7px; height: 7px;
  background: #dc3545;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* ===== SECTIONS ===== */
.comp-section { display: none; animation: fadeIn 0.4s ease; }
.comp-section.active { display: block; }

/* ===== SECTION MATCHS ===== */
.section-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(140deg, #667eea 40%, #ff6b35 70%, #764ba2 100%);
  border-radius: 30px;
}

.refresh-pulse {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.refresh-pulse span {
  width: 8px; height: 8px;
  background: #28a745;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

.btn-ghost-sm {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-ghost-sm:hover { background: rgba(255,255,255,0.25); }

.last-update {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  margin-top: 12px;
}

.matches-section { margin: 20px 0; }

.section-title {
  font-size: 17px;
  color: white;
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.match-card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
}
.match-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

.match-header { margin-bottom: 10px; }

.live-badge {
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  animation: pulse 2s infinite;
  display: inline-block;
}
.upcoming-badge {
  background: #ffc107;
  color: #2c3e50;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
}
.finished-badge {
  background: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
}

.teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}

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

.team-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  margin: 0 auto 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.team-name {
  font-size: 12px;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
}
.team-score {
  font-size: 20px;
  font-weight: 700;
  color: #4CAF50;
}

.vs {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin: 0 8px;
}

.match-time, .match-date {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  margin: 8px 0;
}

/* Boutons */
.btn {
  display: block;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  color: white;
  font-family: inherit;
  font-size: 13px;
}
.btn-primary { background: #4CAF50; }
.btn-primary:hover { background: #45a049; }
.btn-outline-secondary {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline-secondary:hover { background: rgba(255,255,255,0.1); color: white; }
.btn-info { background: rgba(0,123,255,0.7); }
.btn-info:hover { background: rgba(0,123,255,0.9); }

/* Erreur / chargement */
.error-message {
  text-align: center;
  padding: 30px 20px;
  color: rgba(255,255,255,0.5);
}
.loading {
  text-align: center;
  padding: 30px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.comp-loading {
  text-align: center;
  padding: 30px;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ===== SECTION DIRECT ===== */
.live-score-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 28px 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.live-score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #28a745, #20c997);
}

.live-team { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.live-logo {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.live-team-name { font-size: 18px; font-weight: 700; color: #2c3e50; }
.live-score-big { font-size: 48px; font-weight: 700; color: #2c3e50; transition: all 0.6s ease; }

.live-vs { flex: 0.5; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.live-vs-text { font-size: 20px; font-weight: 700; color: #6c757d; }
.live-badge-big {
  background: #dc3545;
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  animation: pulse 2s infinite;
}
.live-dot {
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
.live-minute { font-size: 16px; font-weight: 700; color: #dc3545; }
.live-status-text {
  background: #6c757d;
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* Chronologie */
.chronologie-wrap {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

.chronologie-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.chronologie-head h3 {
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chronologie-line {
  position: relative;
  padding-left: 40px;
  max-height: 550px;
  overflow-y: auto;
}
.chronologie-line::-webkit-scrollbar { width: 6px; }
.chronologie-line::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.chronologie-line::before {
  content: '';
  position: absolute;
  left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #3498db, #e74c3c);
}

.chronologie-event {
  position: relative;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  border-left: 4px solid #3498db;
  transition: all 0.3s;
  animation: slideIn 0.5s ease;
}
.chronologie-event:hover { background: rgba(255,255,255,0.12); transform: translateX(5px); }
.chronologie-event::before {
  content: '';
  position: absolute;
  left: -38px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: white;
  border: 3px solid #3498db;
}

.chronologie-event.event-but        { border-left-color: #27ae60; background: rgba(39,174,96,0.1); }
.chronologie-event.event-but::before       { border-color: #27ae60; }
.chronologie-event.event-carton-jaune      { border-left-color: #f39c12; background: rgba(243,156,18,0.1); }
.chronologie-event.event-carton-jaune::before { border-color: #f39c12; }
.chronologie-event.event-carton-rouge      { border-left-color: #e74c3c; background: rgba(231,76,60,0.1); }
.chronologie-event.event-carton-rouge::before { border-color: #e74c3c; }
.chronologie-event.event-remplacement      { border-left-color: #9b59b6; background: rgba(155,89,182,0.1); }
.chronologie-event.event-remplacement::before { border-color: #9b59b6; }

.chronologie-event-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.chronologie-event-time { font-size: 12px; color: rgba(255,255,255,0.6); }
.chronologie-event-icon { font-size: 1.3rem; }
.chronologie-event-player { font-weight: 700; font-size: 1rem; color: white; margin-bottom: 4px; }
.chronologie-event-description { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: 4px; }
.chronologie-event-team { font-size: 12px; color: rgba(255,255,255,0.5); font-style: italic; }

.chrono-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
}
.chrono-empty i {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.3;
}

/* ===== SECTION COTES ===== */
.cotes-full-wrap { padding: 4px 0; }

.cotes-match-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
}
.cotes-match-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.cotes-match-nom  { font-size: 16px; font-weight: 700; text-align: center; }
.cotes-match-date { font-size: 12px; color: rgba(255,255,255,0.5); text-align: center; margin-top: 3px; }

.cotes-trio {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.cote-card {
  flex: 1;
  text-align: center;
  padding: 22px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cote-card-dom { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); box-shadow: 0 8px 20px rgba(102,126,234,0.4); }
.cote-card-nul { background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%); box-shadow: 0 8px 20px rgba(255,193,7,0.4); }
.cote-card-ext { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); box-shadow: 0 8px 20px rgba(245,87,108,0.4); }

.cote-card-icon  { font-size: 1.8rem; }
.cote-card-label { font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 600; }
.cote-card-val   { font-size: 38px; font-weight: 700; color: white; line-height: 1; }
.cote-card-sub   { font-size: 11px; color: rgba(255,255,255,0.65); }
.cote-card-pct   { font-size: 12px; color: rgba(255,255,255,0.7); }

/* Pronostics */
.prono-section { margin: 0 0 20px; }
.prono-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.prono-bar-wrap { }
.prono-bar-inner {
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}
.prono-seg {
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 12px;
  transition: width 0.5s ease;
}
.prono-dom { background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); }
.prono-nul { background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%); }
.prono-ext { background: linear-gradient(90deg, #f5576c 0%, #f093fb 100%); }

.prono-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

.prono-total {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}

.cotes-explain {
  background: rgba(255,255,255,0.06);
  border-left: 3px solid rgba(255,255,255,0.2);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
  display: flex; gap: 8px; align-items: flex-start;
}

.cotes-all-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  color: white;
}

.cote-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.cote-match-card {
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.3s;
  border: 1px solid rgba(255,255,255,0.07);
}
.cote-match-card:hover { transform: translateY(-4px); }

.cote-match-date  { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.cote-match-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: white; }

.cote-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.cote-mini {
  text-align: center;
  padding: 10px 6px;
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 3px;
}
.cote-mini span   { font-size: 9px; color: rgba(255,255,255,0.8); }
.cote-mini strong { font-size: 18px; font-weight: 700; color: white; }
.cote-mini-dom { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.cote-mini-nul { background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%); }
.cote-mini-ext { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.cote-mini-bar {
  height: 22px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}
.cote-mini-bar > div { transition: width 0.5s ease; }

.cote-votes {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

/* ===== SECTION COMPOSITIONS (terrain) ===== */
.terrain-container { padding: 4px 0; }

.team-switch {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.switch-btn {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.switch-btn:first-child { border-right: 1px solid rgba(255,255,255,0.1); }
.switch-btn.active { background: #4CAF50; font-weight: 700; }
.switch-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.switch-color {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.switch-count { font-size: 11px; opacity: 0.7; }

.formation-bar {
  text-align: center;
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.formation-bar strong { color: white; }

/* TERRAIN */
.terrain {
  background: linear-gradient(to bottom,
    #2d5a2d 0%, #1e4d1e 25%, #1a4d1a 50%, #1e4d1e 75%, #2d5a2d 100%);
  width: 100%;
  height: 680px;
  position: relative;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 6px;
  margin: 0 auto;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.3);
  overflow: hidden;
}
.terrain::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.9);
}
.terrain::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 120px; height: 120px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.center-circle {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.surface-reparation {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 250px; height: 140px;
  border: 2px solid rgba(255,255,255,0.8);
}
.surface-reparation.top    { top: 0; border-top: none; }
.surface-reparation.bottom { bottom: 0; border-bottom: none; }
.surface-but {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 100px; height: 60px;
  border: 2px solid rgba(255,255,255,0.8);
}
.surface-but.top    { top: 0; border-top: none; }
.surface-but.bottom { bottom: 0; border-bottom: none; }
.but {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 60px; height: 10px;
  background: rgba(255,255,255,0.9);
  border-radius: 1px;
}
.but.top    { top: -3px; }
.but.bottom { bottom: -3px; }

/* Joueurs */
.joueur {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.joueur:hover { transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 8px 25px rgba(0,0,0,0.4); z-index: 10; }
.joueur.vide  { background: rgba(128,128,128,0.4) !important; border-color: rgba(255,255,255,0.2); }
.joueur.vide:hover { background: rgba(128,128,128,0.6) !important; }

.joueur-num {
  color: white; font-weight: 700; font-size: 13px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}
.joueur-nom {
  color: white; font-size: 8px; text-align: center;
  max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7); font-weight: 500;
}

/* Positions — 4-3-3 */
[data-formation="4-3-3"] .equipe-domicile .gardien            { bottom: 30px;  left: 50%; }
[data-formation="4-3-3"] .equipe-domicile .lateral-droit       { bottom: 110px; left: 85%; }
[data-formation="4-3-3"] .equipe-domicile .defenseur-central-1 { bottom: 110px; left: 35%; }
[data-formation="4-3-3"] .equipe-domicile .defenseur-central-2 { bottom: 110px; left: 65%; }
[data-formation="4-3-3"] .equipe-domicile .lateral-gauche      { bottom: 110px; left: 15%; }
[data-formation="4-3-3"] .equipe-domicile .milieu-defensif     { bottom: 200px; left: 50%; }
[data-formation="4-3-3"] .equipe-domicile .milieu-central-1    { bottom: 250px; left: 25%; }
[data-formation="4-3-3"] .equipe-domicile .milieu-central-2    { bottom: 250px; left: 75%; }
[data-formation="4-3-3"] .equipe-domicile .ailier-droit        { bottom: 350px; left: 80%; }
[data-formation="4-3-3"] .equipe-domicile .avant-centre        { bottom: 400px; left: 50%; }
[data-formation="4-3-3"] .equipe-domicile .ailier-gauche       { bottom: 350px; left: 20%; }

[data-formation="4-3-3"] .equipe-exterieur .gardien            { top: 30px;  left: 50%; }
[data-formation="4-3-3"] .equipe-exterieur .lateral-droit      { top: 110px; left: 15%; }
[data-formation="4-3-3"] .equipe-exterieur .defenseur-central-1{ top: 110px; left: 65%; }
[data-formation="4-3-3"] .equipe-exterieur .defenseur-central-2{ top: 110px; left: 35%; }
[data-formation="4-3-3"] .equipe-exterieur .lateral-gauche     { top: 110px; left: 85%; }
[data-formation="4-3-3"] .equipe-exterieur .milieu-defensif    { top: 200px; left: 50%; }
[data-formation="4-3-3"] .equipe-exterieur .milieu-central-1   { top: 250px; left: 75%; }
[data-formation="4-3-3"] .equipe-exterieur .milieu-central-2   { top: 250px; left: 25%; }
[data-formation="4-3-3"] .equipe-exterieur .ailier-droit       { top: 350px; left: 20%; }
[data-formation="4-3-3"] .equipe-exterieur .avant-centre       { top: 400px; left: 50%; }
[data-formation="4-3-3"] .equipe-exterieur .ailier-gauche      { top: 350px; left: 80%; }

/* Positions — 4-4-2 */
[data-formation="4-4-2"] .equipe-domicile .gardien            { bottom: 30px;  left: 50%; }
[data-formation="4-4-2"] .equipe-domicile .lateral-droit      { bottom: 110px; left: 85%; }
[data-formation="4-4-2"] .equipe-domicile .defenseur-central-1{ bottom: 110px; left: 35%; }
[data-formation="4-4-2"] .equipe-domicile .defenseur-central-2{ bottom: 110px; left: 65%; }
[data-formation="4-4-2"] .equipe-domicile .lateral-gauche     { bottom: 110px; left: 15%; }
[data-formation="4-4-2"] .equipe-domicile .milieu-defensif    { bottom: 220px; left: 85%; }
[data-formation="4-4-2"] .equipe-domicile .milieu-central-1   { bottom: 220px; left: 35%; }
[data-formation="4-4-2"] .equipe-domicile .milieu-central-2   { bottom: 220px; left: 65%; }
[data-formation="4-4-2"] .equipe-domicile .ailier-droit       { bottom: 220px; left: 15%; }
[data-formation="4-4-2"] .equipe-domicile .avant-centre       { bottom: 380px; left: 35%; }
[data-formation="4-4-2"] .equipe-domicile .ailier-gauche      { bottom: 380px; left: 65%; }

[data-formation="4-4-2"] .equipe-exterieur .gardien            { top: 30px;  left: 50%; }
[data-formation="4-4-2"] .equipe-exterieur .lateral-droit      { top: 110px; left: 15%; }
[data-formation="4-4-2"] .equipe-exterieur .defenseur-central-1{ top: 110px; left: 65%; }
[data-formation="4-4-2"] .equipe-exterieur .defenseur-central-2{ top: 110px; left: 35%; }
[data-formation="4-4-2"] .equipe-exterieur .lateral-gauche     { top: 110px; left: 85%; }
[data-formation="4-4-2"] .equipe-exterieur .milieu-defensif    { top: 220px; left: 15%; }
[data-formation="4-4-2"] .equipe-exterieur .milieu-central-1   { top: 220px; left: 65%; }
[data-formation="4-4-2"] .equipe-exterieur .milieu-central-2   { top: 220px; left: 35%; }
[data-formation="4-4-2"] .equipe-exterieur .ailier-droit       { top: 220px; left: 85%; }
[data-formation="4-4-2"] .equipe-exterieur .avant-centre       { top: 380px; left: 65%; }
[data-formation="4-4-2"] .equipe-exterieur .ailier-gauche      { top: 380px; left: 35%; }

/* Positions — 4-2-3-1 */
[data-formation="4-2-3-1"] .equipe-domicile .gardien            { bottom: 30px;  left: 50%; }
[data-formation="4-2-3-1"] .equipe-domicile .lateral-droit      { bottom: 110px; left: 85%; }
[data-formation="4-2-3-1"] .equipe-domicile .defenseur-central-1{ bottom: 110px; left: 35%; }
[data-formation="4-2-3-1"] .equipe-domicile .defenseur-central-2{ bottom: 110px; left: 65%; }
[data-formation="4-2-3-1"] .equipe-domicile .lateral-gauche     { bottom: 110px; left: 15%; }
[data-formation="4-2-3-1"] .equipe-domicile .milieu-defensif    { bottom: 200px; left: 35%; }
[data-formation="4-2-3-1"] .equipe-domicile .milieu-central-1   { bottom: 200px; left: 65%; }
[data-formation="4-2-3-1"] .equipe-domicile .milieu-central-2   { bottom: 290px; left: 50%; }
[data-formation="4-2-3-1"] .equipe-domicile .ailier-droit       { bottom: 290px; left: 80%; }
[data-formation="4-2-3-1"] .equipe-domicile .avant-centre       { bottom: 390px; left: 50%; }
[data-formation="4-2-3-1"] .equipe-domicile .ailier-gauche      { bottom: 290px; left: 20%; }

[data-formation="4-2-3-1"] .equipe-exterieur .gardien            { top: 30px;  left: 50%; }
[data-formation="4-2-3-1"] .equipe-exterieur .lateral-droit      { top: 110px; left: 15%; }
[data-formation="4-2-3-1"] .equipe-exterieur .defenseur-central-1{ top: 110px; left: 65%; }
[data-formation="4-2-3-1"] .equipe-exterieur .defenseur-central-2{ top: 110px; left: 35%; }
[data-formation="4-2-3-1"] .equipe-exterieur .lateral-gauche     { top: 110px; left: 85%; }
[data-formation="4-2-3-1"] .equipe-exterieur .milieu-defensif    { top: 200px; left: 65%; }
[data-formation="4-2-3-1"] .equipe-exterieur .milieu-central-1   { top: 200px; left: 35%; }
[data-formation="4-2-3-1"] .equipe-exterieur .milieu-central-2   { top: 290px; left: 50%; }
[data-formation="4-2-3-1"] .equipe-exterieur .ailier-droit       { top: 290px; left: 20%; }
[data-formation="4-2-3-1"] .equipe-exterieur .avant-centre       { top: 390px; left: 50%; }
[data-formation="4-2-3-1"] .equipe-exterieur .ailier-gauche      { top: 290px; left: 80%; }

/* Positions — 3-5-2 */
[data-formation="3-5-2"] .equipe-domicile .gardien            { bottom: 30px;  left: 50%; }
[data-formation="3-5-2"] .equipe-domicile .lateral-gauche     { bottom: 110px; left: 75%; }
[data-formation="3-5-2"] .equipe-domicile .lateral-droit      { bottom: 110px; left: 25%; }
[data-formation="3-5-2"] .equipe-domicile .defenseur-central-2{ bottom: 110px; left: 50%; }
[data-formation="3-5-2"] .equipe-domicile .milieu-defensif    { bottom: 220px; left: 15%; }
[data-formation="3-5-2"] .equipe-domicile .defenseur-central-1{ bottom: 220px; left: 85%; }
[data-formation="3-5-2"] .equipe-domicile .milieu-central-1   { bottom: 270px; left: 30%; }
[data-formation="3-5-2"] .equipe-domicile .milieu-central-2   { bottom: 220px; left: 50%; }
[data-formation="3-5-2"] .equipe-domicile .ailier-droit       { bottom: 270px; left: 70%; }
[data-formation="3-5-2"] .equipe-domicile .avant-centre       { bottom: 380px; left: 30%; }
[data-formation="3-5-2"] .equipe-domicile .ailier-gauche      { bottom: 380px; left: 70%; }

[data-formation="3-5-2"] .equipe-exterieur .gardien            { top: 30px;  left: 50%; }
[data-formation="3-5-2"] .equipe-exterieur .lateral-droit      { top: 110px; left: 25%; }
[data-formation="3-5-2"] .equipe-exterieur .lateral-gauche     { top: 110px; left: 75%; }
[data-formation="3-5-2"] .equipe-exterieur .defenseur-central-2{ top: 110px; left: 50%; }
[data-formation="3-5-2"] .equipe-exterieur .milieu-defensif    { top: 220px; left: 85%; }
[data-formation="3-5-2"] .equipe-exterieur .defenseur-central-1{ top: 220px; left: 15%; }
[data-formation="3-5-2"] .equipe-exterieur .milieu-central-1   { top: 270px; left: 70%; }
[data-formation="3-5-2"] .equipe-exterieur .milieu-central-2   { top: 220px; left: 50%; }
[data-formation="3-5-2"] .equipe-exterieur .ailier-droit       { top: 270px; left: 30%; }
[data-formation="3-5-2"] .equipe-exterieur .avant-centre       { top: 380px; left: 70%; }
[data-formation="3-5-2"] .equipe-exterieur .ailier-gauche      { top: 380px; left: 30%; }

/* Positions — 5-3-2 */
[data-formation="5-3-2"] .equipe-domicile .gardien            { bottom: 30px;  left: 50%; }
[data-formation="5-3-2"] .equipe-domicile .lateral-droit      { bottom: 120px; left: 90%; }
[data-formation="5-3-2"] .equipe-domicile .defenseur-central-1{ bottom: 110px; left: 30%; }
[data-formation="5-3-2"] .equipe-domicile .defenseur-central-2{ bottom: 110px; left: 70%; }
[data-formation="5-3-2"] .equipe-domicile .lateral-gauche     { bottom: 120px; left: 10%; }
[data-formation="5-3-2"] .equipe-domicile .milieu-defensif    { bottom: 125px; left: 50%; }
[data-formation="5-3-2"] .equipe-domicile .milieu-central-1   { bottom: 240px; left: 30%; }
[data-formation="5-3-2"] .equipe-domicile .milieu-central-2   { bottom: 220px; left: 50%; }
[data-formation="5-3-2"] .equipe-domicile .ailier-droit       { bottom: 240px; left: 70%; }
[data-formation="5-3-2"] .equipe-domicile .avant-centre       { bottom: 380px; left: 30%; }
[data-formation="5-3-2"] .equipe-domicile .ailier-gauche      { bottom: 380px; left: 70%; }

[data-formation="5-3-2"] .equipe-exterieur .gardien            { top: 30px;  left: 50%; }
[data-formation="5-3-2"] .equipe-exterieur .lateral-droit      { top: 120px; left: 10%; }
[data-formation="5-3-2"] .equipe-exterieur .defenseur-central-1{ top: 110px; left: 70%; }
[data-formation="5-3-2"] .equipe-exterieur .defenseur-central-2{ top: 110px; left: 30%; }
[data-formation="5-3-2"] .equipe-exterieur .lateral-gauche     { top: 120px; left: 90%; }
[data-formation="5-3-2"] .equipe-exterieur .milieu-defensif    { top: 125px; left: 50%; }
[data-formation="5-3-2"] .equipe-exterieur .milieu-central-1   { top: 240px; left: 70%; }
[data-formation="5-3-2"] .equipe-exterieur .milieu-central-2   { top: 220px; left: 50%; }
[data-formation="5-3-2"] .equipe-exterieur .ailier-droit       { top: 240px; left: 30%; }
[data-formation="5-3-2"] .equipe-exterieur .avant-centre       { top: 380px; left: 70%; }
[data-formation="5-3-2"] .equipe-exterieur .ailier-gauche      { top: 380px; left: 30%; }

.no-compo-msg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  background: rgba(0,0,0,0.5);
  padding: 20px 28px;
  border-radius: 12px;
  max-width: 80%;
}
.no-compo-msg i { font-size: 2.5rem; display: block; margin-bottom: 10px; opacity: 0.5; }

/* ===== SECTION STATS ===== */
.badge-sim {
  background: rgba(255,153,0,0.2);
  color: #ff9900;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,153,0,0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.stat-item {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px;
}
.stat-label {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
}
.stat-bar {
  display: flex;
  height: 28px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.07);
}
.stat-home, .stat-away {
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 11px;
}
.stat-home { background: #3498db; }
.stat-away { background: #e74c3c; }
.stat-values  { display: flex; justify-content: space-between; align-items: center; }
.stat-home-val, .stat-away-val { font-size: 22px; font-weight: 700; color: white; }

/* ===== MODAL JOUEUR ===== */
.player-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.player-modal.show { display: flex; }

.player-modal-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  color: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: fadeIn 0.25s ease;
}

.player-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.player-modal-head h3 { font-size: 17px; }
.player-modal-close {
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  font-size: 20px; cursor: pointer;
  transition: color 0.2s;
}
.player-modal-close:hover { color: white; }

.player-modal-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.player-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: white;
  flex-shrink: 0;
}

.player-details { flex: 1; }

.player-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 13px;
}
.player-detail-row span { color: rgba(255,255,255,0.5); }
.player-detail-row strong { color: white; }

/* ===== TOAST ===== */
.toast-notif {
  position: fixed;
  top: 20px; right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.toast-notif.show { opacity: 1; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-15px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse   { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes spin    { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .comp-wrapper { flex-direction: column; }
  .matches-sidebar { width: 100%; position: static; max-height: 260px; }
  .matches-list { max-height: 170px; }
  .cotes-trio { flex-direction: column; }
}

@media (max-width: 600px) {
  .match-header-teams { flex-direction: column; gap: 8px; }
  .header-team { justify-content: center; }
  .header-team-right { justify-content: center; }
  .terrain { height: 500px; }
  .joueur { width: 44px; height: 44px; }
  .joueur-num { font-size: 11px; }
  .joueur-nom { font-size: 7px; }
  .comp-tab span { display: none; }
  .comp-tab { font-size: 15px; }
  .matches-grid { grid-template-columns: 1fr; }
  .live-score-card { flex-direction: column; gap: 16px; padding: 18px 14px; }
  .live-vs { order: -1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
