/* ═══════════════════════════════════════════════════════════════════════
   cards.css — Styles de cartes pour les pages de listes publiques
   + match-cards + data-list-table (évaluations/cartons)
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
   Entity Card Base — shared appearance for all entity-type cards
   ═══════════════════════════════════════════════════════════════════════ */
.player-card,
.equipe-card,
.arbitre-card,
.agent-card,
.entraineur-card,
.competition-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  text-align: center;
}

.player-card:hover,
.equipe-card:hover,
.arbitre-card:hover,
.agent-card:hover,
.entraineur-card:hover,
.competition-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Shared flex container for arbitre & agent card grids */
.arbitre-card-container,
.agent-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5em;
}

/* Shared responsive breakpoints for flex-based entity cards */
@media (max-width: 992px) {
  .arbitre-card,
  .agent-card {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 576px) {
  .arbitre-card,
  .agent-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Player Cards — joueurs_list.html
   ═══════════════════════════════════════════════════════════════════════ */
.player-card {
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.joueur-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
}

.equipe-logo {
  width: 1.5em;
  height: 1.5em;
  margin-right: 0.5em;
}

.player-card h5 {
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.player-card p {
  font-size: 0.9rem;
  margin: 3px 0;
  color: #555;
}

.player-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.player-info {
  margin-top: 10px;
}

.player-info h5 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.player-info p {
  margin: 5px 0;
  color: #666;
}

/* ═══════════════════════════════════════════════════════════════════════
   Equipe Cards — equipes_list.html
   ═══════════════════════════════════════════════════════════════════════ */

.equipe-card .equipe-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.equipe-card-item {
  display: block;
}

.equipe-label {
  font-size: 0.85rem;
  color: #888;
}

/* ═══════════════════════════════════════════════════════════════════════
   Arbitre Cards — arbitres_list.html
   ═══════════════════════════════════════════════════════════════════════ */
/* Scoped .equipe-logo override for arbitre cards (1.75em vs 1.5em default) */
.arbitre-card .equipe-logo,
.arbitre-info .equipe-logo {
  width: 1.75em;
  height: 1.75em;
  margin-right: 0.75em;
  margin-left: 0.75em;
}

.arbitre-card {
  flex: 1 1 calc(25% - 1rem);
  max-width: calc(25% - 1rem);
  border: 1px solid #ddd;
  overflow: hidden;
  padding: 1rem;
}

.arbitre-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.arbitre-info {
  margin-top: 10px;
}

.arbitre-info h5 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.arbitre-info p {
  margin: 5px 0;
  color: #666;
}

/* ═══════════════════════════════════════════════════════════════════════
   Agent Cards — agents_list.html
   ═══════════════════════════════════════════════════════════════════════ */
.agent-card {
  flex: 1 1 calc(25% - 1rem);
  max-width: calc(25% - 1rem);
  border: 1px solid #ddd;
  overflow: hidden;
  padding: 1rem;
}

.agent-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.agent-info {
  margin-top: 10px;
}

.agent-info h5 {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.agent-info p {
  margin: 5px 0;
  color: #666;
}

.status-active {
  color: green;
  font-weight: bold;
}

.status-expired {
  color: red;
  font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════════════════
   Entraineur Cards — entraineurs_list.html
   ═══════════════════════════════════════════════════════════════════════ */
.entraineur-card {
  cursor: pointer;
}

.entraineur-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
}

.label-info {
  font-size: 0.85rem;
  color: #888;
}

.entraineur-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 1.5rem;
}

.entraineur-link:hover {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   Competition Cards — competitions_list.html
   ═══════════════════════════════════════════════════════════════════════ */

.competition-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.competition-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 1.25rem 0.75rem;
}

.competition-card-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.competition-card-title {
  min-width: 0;
}

.competition-card-title h5 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competition-label {
  font-size: 0.82rem;
  color: #888;
}

.badge-international {
  background-color: #0d6efd;
  font-size: 0.75rem;
}

.competition-card-season {
  font-size: 0.78rem;
  color: #6c757d;
  font-weight: 600;
  padding: 0 1.25rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.competition-card-season i {
  color: #adb5bd;
  font-size: 0.72rem;
}

.competition-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0.75rem 0;
  margin: 0 1.25rem;
  border-top: 1px solid #f0f0f0;
}

.competition-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.competition-stat .stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
}

.competition-stat .stat-label {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  margin-top: 1px;
}

/* Legacy alias — used in competition_detail.html headers */
.competition-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Competition Detail — badges & selectors (competition_detail.html)
   ═══════════════════════════════════════════════════════════════════════ */
.badge-championship { background-color: #198754; }
.badge-cup { background-color: #dc3545; }
.badge-tournoi { background-color: #6f42c1; }
.season-selector { max-width: 250px; }
.circular-progress {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(#007bff 0deg, #e0e0e0 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  margin: auto;
}
.circular-text {
  position: absolute;
  color: white;
  text-shadow: 0 0 2px rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════════════════════════════════════
   Match Cards — match_list.html (source de vérité)
   Réutilisées dans competition_detail.html
   ═══════════════════════════════════════════════════════════════════════ */
.match-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
  overflow: hidden;
  height: 100%;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.match-card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  font-size: 0.82rem;
  color: #666;
}

.match-card-header .competition-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.match-card-header .competition-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.match-card-body {
  padding: 1.2rem 1rem;
}

.match-teams-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 38%;
  min-width: 0;
}

.match-team .team-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 6px;
}

.match-team .team-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
  word-break: break-word;
}

.match-score {
  width: 24%;
  text-align: center;
  flex-shrink: 0;
}

.match-score .score-main {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.match-score .score-extra {
  font-size: 0.72rem;
  color: #888;
  margin-top: 2px;
  line-height: 1.2;
}

.match-score .score-vs {
  font-size: 1rem;
  color: #aaa;
  font-weight: 500;
}

.match-card-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: #888;
  background: #fafafa;
}

.match-card-footer i {
  color: #aaa;
}

.match-card a.match-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.match-card a.match-card-link:hover {
  color: inherit;
}

.match-team a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.match-team a:hover .team-name {
  color: #0d6efd;
}

.badge-journee {
  background-color: #0d6efd;
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.video-badge {
  color: #0d6efd;
}

/* ═══════════════════════════════════════════════════════════════════════
   Data List Table — évaluations_joueurs.html & cartons_joueurs.html
   Unification de .evaluations-table et .cartons-table
   ═══════════════════════════════════════════════════════════════════════ */
.data-list-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-list-table th,
.data-list-table td {
  padding: 10px;
  text-align: center;
  border: 1px solid #ddd;
}

.data-list-table th {
  background-color: #007bff;
  color: white;
}

.data-list-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.data-list-table tr:hover {
  background-color: #f1f1f1;
}

.no-results {
  text-align: center;
  color: #666;
  margin-top: 20px;
}

.player-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Agent Player Cards — agent_details.html
   ═══════════════════════════════════════════════════════════════════════ */
.agent-player-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.agent-player-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.agent-player-card .card-img-top {
  height: 200px;
  object-fit: cover;
}
