/*
Theme Name: Astra Child
Template: astra
Version: 1.0.0
Description: Thème enfant Astra pour FC Saint-Cloud - Design professionnel
*/

/* ============================================
   VARIABLES CSS - COULEURS & ESPACEMENTS
   ============================================ */
:root {
  --primary-color: #003366;
  --primary-hover: #0055aa;
  --secondary-color: #1a5490;
  --accent-color: #ff6b35;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-dark: #1a1a1a;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
.archive-matchs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.matchs-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.matchs-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.matchs-header p {
  font-size: 1.25rem;
  color: var(--text-light);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FILTRES SECTION
   ============================================ */
.matchs-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  justify-content: center;
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.matchs-filters select {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  min-width: 200px;
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.matchs-filters select:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.matchs-filters select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.btn-filtrer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-filtrer:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--secondary-color) 100%);
}

.btn-filtrer:active {
  transform: translateY(0);
}

/* ============================================
   GRID DES MATCHS
   ============================================ */
.matchs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .matchs-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ============================================
   CARD DE MATCH - Design moderne basé sur maquette Figma
   ============================================ */
.match-card {
  background: linear-gradient(135deg, #002b5c 0%, #003d7a 100%);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 43, 92, 0.3);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
  color: #ffffff;
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffb703 0%, #ffd60a 100%);
}

.match-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 43, 92, 0.4);
}

.match-card-header {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.match-card-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.match-card-competition-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-card-competition-type::before {
  content: '🏆';
  font-size: 0.9rem;
}

.match-card-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.match-card-status.programme {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.match-card-status.joue {
  background: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.match-card-status.reporte {
  background: rgba(251, 191, 36, 0.3);
  color: #fde047;
}

.match-card-status.annule {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.match-card-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.match-card-body {
  padding: 2.5rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  margin-bottom: 2rem;
}

.match-team {
  flex: 0 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.match-team-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* Logo équipe à domicile : pas de fond, le logo est déjà circulaire et blanc */
.match-team.match-team-home .match-team-logo {
  background: transparent;
  padding: 0;
  border: none;
}

/* Logo équipe adverse : fond rouge seulement si c'est un placeholder (géré par le placeholder) */
.match-team.match-team-away .match-team-logo {
  background: transparent;
  padding: 0;
  border: none;
}

.match-card:hover .match-team-logo {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.match-team-logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.match-team.match-team-away .match-team-logo-placeholder {
  background: rgba(239, 68, 68, 0.95);
}

.match-card:hover .match-team-logo-placeholder {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.match-team-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
  max-width: 120px;
  text-align: center;
}

.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 80px;
  max-width: 120px;
  flex: 0 0 auto;
  order: 2; /* Forcer l'ordre au milieu */
}

/* Logo domicile - ordre 1 */
.match-team.match-team-home {
  order: 1;
}

/* Logo adverse - ordre 3 */
.match-team.match-team-away {
  order: 3;
}

.match-score-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  white-space: nowrap; /* Empêcher le score de se couper */
}

.match-score-separator {
  font-size: 3rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -2px;
}

.match-score-separator.vs {
  font-size: 2rem;
  font-weight: 700;
  color: #ffb703;
  text-shadow: 0 2px 8px rgba(255, 183, 3, 0.3);
  white-space: nowrap;
}

.match-card-footer {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.match-card-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.match-card-info-item svg {
  width: 16px;
  height: 16px;
  fill: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.match-card-time {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffb703;
  text-align: center;
  margin-top: 0.5rem;
}

.btn-match {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-match:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.competition-logo-small {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}

/* ============================================
   RESPONSIVE - MATCH CARDS
   ============================================ */
@media (max-width: 768px) {
  .match-card {
    min-height: 280px;
  }

  .match-card-header {
    padding: 1rem 1.25rem;
  }

  .match-card-body {
    padding: 2rem 1rem;
  }

  /* Assurer l'ordre horizontal : Logo | VS/Score | Logo */
  .match-teams {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
  }

  .match-team {
    flex: 0 0 auto;
  }

  .match-team.match-team-home {
    order: 1;
  }

  .match-score {
    flex: 0 0 auto;
    min-width: 70px;
    max-width: 100px;
    order: 2;
  }

  .match-team.match-team-away {
    order: 3;
  }

  .match-team-logo,
  .match-team-logo-placeholder {
    width: 85px;
    height: 85px;
  }

  .match-team-name {
    font-size: 0.85rem;
    max-width: 110px;
    word-wrap: break-word;
    hyphens: auto;
  }

  .match-score-numbers {
    font-size: 2.25rem;
    white-space: nowrap;
  }

  .match-score-separator.vs {
    font-size: 2.25rem;
    white-space: nowrap;
  }

  .match-card-footer {
    padding: 1rem 1.25rem;
  }

  .match-card-time {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Assurer l'ordre horizontal : Logo | VS/Score | Logo */
  .match-teams {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
  }

  .match-team {
    flex: 0 0 auto;
  }

  .match-team.match-team-home {
    order: 1;
  }

  .match-score {
    flex: 0 0 auto;
    min-width: 65px;
    max-width: 90px;
    order: 2;
  }

  .match-team.match-team-away {
    order: 3;
  }

  .match-team-logo,
  .match-team-logo-placeholder {
    width: 75px;
    height: 75px;
  }

  .match-team-name {
    max-width: 100px;
    font-size: 0.8rem;
  }

  .match-score-numbers {
    font-size: 2rem;
    white-space: nowrap;
  }

  .match-score-separator.vs {
    font-size: 2rem;
    white-space: nowrap;
  }
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination a,
.pagination span,
.pagination-wrapper a,
.pagination-wrapper span {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-dark);
  min-width: 44px;
  text-align: center;
}

.pagination a:hover,
.pagination-wrapper a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pagination .current,
.pagination-wrapper .current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .dots,
.pagination-wrapper .dots,
.pagination .page-numbers.dots,
.pagination-wrapper .page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

/* ============================================
   NO MATCH MESSAGE
   ============================================ */
.no-match {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  grid-column: 1 / -1;
}

.no-match p {
  font-size: 1.25rem;
  color: var(--text-light);
  font-style: italic;
  margin: 0;
}

/* ============================================
   MATCH LOOP (ancien style pour compatibilité)
   ============================================ */
.match-loop {
  background: var(--bg-white);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1000px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.match-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  font-weight: 700;
}

.match-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

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

.match-grid .team img {
  width: 80px;
  height: auto;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.match-grid .details {
  text-align: center;
  flex: 2;
}

.match-grid .details p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: var(--text-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.match-card {
  animation: fadeInUp 0.6s ease-out;
}

.match-card:nth-child(1) { animation-delay: 0.1s; }
.match-card:nth-child(2) { animation-delay: 0.2s; }
.match-card:nth-child(3) { animation-delay: 0.3s; }
.match-card:nth-child(4) { animation-delay: 0.4s; }
.match-card:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .archive-matchs {
    padding: 2rem 1.5rem;
  }
  
  .matchs-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 640px) {
  .archive-matchs {
    padding: 1.5rem 1rem;
  }
  
  .matchs-filters {
    flex-direction: column;
  }
  
  .matchs-filters select {
    width: 100%;
    min-width: auto;
  }
  
  /* Assurer l'ordre horizontal : Logo | VS/Score | Logo (même sur très petits écrans) */
  .match-teams {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
  }
  
  .match-team {
    flex: 0 0 auto;
  }
  
  .match-team.match-team-home {
    order: 1;
  }
  
  .match-score {
    flex: 0 0 auto;
    min-width: 65px;
    max-width: 90px;
    order: 2; /* Score au milieu, pas en premier */
    margin: 0; /* Retirer la marge qui pourrait causer des problèmes */
  }
  
  .match-team.match-team-away {
    order: 3;
  }
  
  .match-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-match {
    width: 100%;
    text-align: center;
  }
}

