/* ===================================================
   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; }
/* =============================================================================
   TERRAIN — styles communs (vue publique compositions.html)
   Les positions viennent de football.css / handball.css / basketball.css / tennis.css
   chargés dynamiquement selon le sport.
   ============================================================================= */

/* Boîte terrain */
.terrain {
  width: 100%;
  height: 650px;
  position: relative;
  border: 3px solid rgba(255,255,255,0.85);
  border-radius: 5px;
  margin: 12px auto;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.3);
}

/* Conteneurs équipes */
.equipe-domicile,
.equipe-exterieur {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ── Cases joueurs (classe .joueur dans compositions.html) ─────────────────
   Équivalent de .position-drop dans configuration_capitaine.html
   Les sport.css les positionnent via :
     .equipe-domicile .gardien { bottom: 30px; left: 50%; }
   ─────────────────────────────────────────────────────────────────────── */
.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: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  color: white;
  font-size: 10px;
  text-align: center;
  user-select: none;
  z-index: 2;
}
.joueur:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  z-index: 10;
}
.joueur.vide {
  background: rgba(128,128,128,0.35) !important;
  border-style: dashed;
  border-color: rgba(255,255,255,0.2);
}

/* Numéro et nom dans la case */
.joueur-num {
  color: white;
  font-weight: 800;
  font-size: 13px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  line-height: 1;
}
.joueur-nom {
  color: white;
  font-size: 7.5px;
  font-weight: 500;
  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);
  margin-top: 1px;
}

/* Message aucune composition */
.no-compo-msg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  background: rgba(0,0,0,0.55);
  padding: 18px 24px;
  border-radius: 10px;
  pointer-events: none;
}
.no-compo-msg i { display: block; font-size: 28px; margin-bottom: 8px; opacity: 0.5; }



.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; }


/* =============================================================================
   STATISTIQUES DU MATCH — section stats
   ============================================================================= */

#statsContainer {
  padding: 0.5rem 0;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}

.stat-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: background 0.2s;
}
.stat-item:hover {
  background: rgba(255,255,255,0.07);
}

/* Label */
.stat-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.65rem;
}
.stat-label i {
  color: #22c55e;
  font-size: 0.78rem;
}

/* Barre de possession */
.stat-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  gap: 2px;
}
.stat-home {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 8px 0 0 8px;
  transition: width 0.6s ease;
  min-width: 36px;
}
.stat-away {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 0 8px 8px 0;
  transition: width 0.6s ease;
  min-width: 36px;
}

/* Valeurs numériques (tirs, corners...) */
.stat-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.stat-home-val,
.stat-away-val {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  min-width: 48px;
  text-align: center;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
}
.stat-home-val {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.stat-away-val {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Séparateur VS entre les deux valeurs */
.stat-values::after {
  content: 'VS';
  font-size: 0.62rem;
  font-weight: 800;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.1em;
  flex: 1;
  text-align: center;
}

/* Titre section stats */
.stats-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stats-section-title i { color: #22c55e; }

/* =============================================================================
   CHRONOLOGIE (Direct) — amélioration visuelle palette stade
   ============================================================================= */

/* Wrap principal */
.chronologie-wrap {
  background: rgba(4, 28, 53, 0.6) !important;
  border: 1px solid rgba(34, 197, 94, 0.12) !important;
  backdrop-filter: blur(16px) !important;
}

/* Header */
.chronologie-head {
  border-bottom-color: rgba(34, 197, 94, 0.15) !important;
}
.chronologie-head h3 {
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.25rem !important;
  letter-spacing: 0.04em;
}

/* Ligne verticale verte */
.chronologie-line::before {
  background: linear-gradient(to bottom,
    #22c55e 0%,
    #0ea5e9 50%,
    #ef4444 100%) !important;
  width: 3px !important;
  border-radius: 3px;
}

/* Scrollbar */
.chronologie-line::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.3) !important;
}

/* Événement base */
.chronologie-event {
  background: rgba(255,255,255,0.05) !important;
  border-radius: 10px !important;
  border-left-width: 4px !important;
  border-left-color: rgba(14, 165, 233, 0.6) !important;
}
.chronologie-event:hover {
  background: rgba(34, 197, 94, 0.08) !important;
  border-left-color: #22c55e !important;
}

/* Point sur la ligne */
.chronologie-event::before {
  width: 14px !important; height: 14px !important;
  background: #041c35 !important;
  border: 3px solid #0ea5e9 !important;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

/* Types d'événements — couleurs palette stade */
.chronologie-event.event-but {
  border-left-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.1) !important;
}
.chronologie-event.event-but::before {
  border-color: #22c55e !important;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.chronologie-event.event-carton-jaune {
  border-left-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.1) !important;
}
.chronologie-event.event-carton-jaune::before {
  border-color: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.chronologie-event.event-carton-rouge {
  border-left-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}
.chronologie-event.event-carton-rouge::before {
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.chronologie-event.event-remplacement {
  border-left-color: #06b6d4 !important;
  background: rgba(6, 182, 212, 0.1) !important;
}
.chronologie-event.event-remplacement::before {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.chronologie-event.event-penalty {
  border-left-color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.1) !important;
}
.chronologie-event.event-penalty::before {
  border-color: #a855f7 !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

/* Contenu événement */
.chronologie-event-time {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.07);
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px !important;
  color: rgba(255,255,255,0.7) !important;
  font-weight: 700;
}
.chronologie-event-icon {
  font-size: 1.5rem !important;
}
.chronologie-event-player {
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin-bottom: 3px !important;
}
.chronologie-event-description {
  font-size: 0.85rem !important;
  color: rgba(255,255,255,0.6) !important;
}
.chronologie-event-team {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 5px;
  background: rgba(255,255,255,0.06);
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px !important;
  color: rgba(255,255,255,0.5) !important;
  font-style: normal !important;
}

/* État vide */
.chronologie-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255,255,255,0.35) !important;
  display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem;
}
.chronologie-empty i {
  font-size: 2.5rem !important;
  color: rgba(34, 197, 94, 0.3) !important;
  display: block !important;
}

/* Animation entrée événement */
@keyframes chronoSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.chronologie-event {
  animation: chronoSlideIn 0.4s ease both !important;
}

/* =============================================================================
   MODAL JOUEUR
   ============================================================================= */

.player-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(2, 13, 26, 0.85);
  backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.player-modal.show { display: flex; animation: modalFadeIn 0.25s ease; }

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

.player-modal-card {
  background: linear-gradient(145deg, #041c35, #062910);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}

/* Header modal */
.player-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid rgba(34, 197, 94, 0.12);
}
.player-modal-head h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: #fff; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; flex-shrink: 0;
  transition: all 0.2s;
}
.player-modal-close:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}

/* Corps modal */
.player-modal-body {
  padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}

/* Avatar numéro */
.player-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem; font-weight: 700; color: #fff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
  border: 3px solid rgba(255,255,255,0.15);
}

/* Détails joueur */
.player-details {
  width: 100%;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.player-detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
}
.player-detail-row span {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.player-detail-row span i { color: #22c55e; font-size: 0.75rem; }
.player-detail-row strong {
  font-size: 0.92rem; color: #fff; font-weight: 700;
  text-align: right; max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* =============================================================================
   RESPONSIVE MOBILE — max 640px
   ============================================================================= */
@media (max-width: 640px) {

  /* Chronologie */
  .chronologie-wrap { padding: 14px !important; }
  .chronologie-head h3 { font-size: 1rem !important; }
  .chronologie-line { padding-left: 28px !important; max-height: 420px !important; }
  .chronologie-line::before { left: 10px !important; }
  .chronologie-event { padding: 10px 12px !important; margin-bottom: 14px !important; }
  .chronologie-event::before { left: -26px !important; width: 10px !important; height: 10px !important; }
  .chronologie-event-player { font-size: 0.9rem !important; }
  .chronologie-event-icon { font-size: 1.1rem !important; }

  /* Stats */
  .stat-home-val,
  .stat-away-val { font-size: 1.3rem !important; min-width: 38px !important; }
  .stat-label { font-size: 0.76rem !important; }
  .stat-item { padding: 0.8rem 1rem !important; }

  /* Onglets */
  .comp-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .comp-tabs::-webkit-scrollbar { display: none; }
  .comp-tab {
    white-space: nowrap;
    font-size: 0.78rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Section matchs */
  .match-card { padding: 12px !important; }
  .team-logo  { width: 36px !important; height: 36px !important; font-size: 11px !important; }
  .team-score { font-size: 1.4rem !important; }
  .team-name  { font-size: 0.78rem !important; }

  /* Cotes */
  .cotes-trio { flex-direction: column !important; gap: 8px !important; }
  .cote-card  { padding: 12px !important; }
  .cotes-match-title { flex-wrap: wrap !important; gap: 8px !important; }

  /* Modal joueur */
  .player-modal-card { max-width: 100% !important; margin: 0 0.5rem; }
  .player-avatar { width: 58px !important; height: 58px !important; font-size: 1.4rem !important; }
  .player-detail-row { padding: 0.5rem 0.75rem !important; }
  .player-detail-row strong { font-size: 0.85rem !important; }

  /* Terrain */
  .terrain { height: 480px !important; }
  .joueur  { width: 42px !important; height: 42px !important; }
  .joueur-num { font-size: 11px !important; }
  .joueur-nom { font-size: 7px !important; }

  /* Team switch */
  .team-switch { border-radius: 12px !important; }
  .switch-btn  { padding: 8px 6px !important; font-size: 11px !important; }
}

/* =============================================================================
   RESPONSIVE LAYOUT — sidebar passe EN BAS sur mobile
   ============================================================================= */
@media (max-width: 768px) {

  /* Wrapper devient colonne — contenu principal EN HAUT, sidebar EN BAS */
  .comp-wrapper {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
  }

  /* Sidebar — pleine largeur, EN HAUT en premier */
  .matches-sidebar {
    width: 100% !important;
    order: 1 !important;
    position: static !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    border-radius: 12px !important;
  }

  /* Contenu principal — pleine largeur, EN BAS */
  .comp-main {
    width: 100% !important;
    order: 2 !important;
    border-radius: 12px !important;
    padding: 12px !important;
  }

  /* Filtres filières — scroll horizontal au lieu d'enroulement */
  .filiere-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 10px 12px !important;
    scrollbar-width: none !important;
  }
  .filiere-filters::-webkit-scrollbar { display: none; }
  .filiere-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
  }

  /* Liste matchs — grille 2 colonnes au lieu de liste verticale */
  .matches-list {
    padding: 8px 10px 12px !important;
    max-height: 320px !important;
    overflow-y: auto !important;
  }

  /* Label filière en bas de sidebar */
  .sidebar-filiere-label {
    font-size: 0.68rem !important;
    margin: 0.8rem 0 0.4rem 0.25rem !important;
  }

  /* Items match — plus compacts */
  .match-item {
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
  }
  .match-item-names {
    font-size: 0.78rem !important;
  }
  .team-chip {
    width: 26px !important; height: 26px !important;
    font-size: 9px !important;
  }
  .match-item-meta {
    font-size: 0.7rem !important;
  }

  /* Header sidebar plus compact */
  .sidebar-header {
    padding: 10px 14px !important;
  }
  .sidebar-header h3 {
    font-size: 13px !important;
  }

  /* Onglets — scroll horizontal */
  .comp-tabs {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 0 !important;
  }
  .comp-tabs::-webkit-scrollbar { display: none; }
  .comp-tab {
    flex-shrink: 0 !important;
    font-size: 0.78rem !important;
    padding: 0.55rem 0.85rem !important;
    white-space: nowrap !important;
  }

  /* Match header card */
  .match-header-card { padding: 12px !important; }
  .match-header-teams { gap: 8px !important; }
  .header-team-name { font-size: 0.85rem !important; }
  .header-score { font-size: 2rem !important; }
}
