/* ========================================
   THÈME CHC - CARQUEFOU HOCKEY CLUB
   Design Rouge Officiel
   ======================================== */

:root {
  --primary-red: #d41516;        /* Rouge CHC Officiel */
  --primary-dark: #a80e0f;       /* Rouge foncé */
  --chc-grey: #232932;           /* Gris CHC */
  --white: #FFFFFF;
  --black: #1a1a1a;
  --light-bg: #f8f9fa;
  --text-primary: #333333;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #ff4444;
  --info: #17a2b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.6;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
  background: var(--primary-red);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo:hover {
  opacity: 0.9;
}

.logo-emoji {
  font-size: 32px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
  padding: 8px 0;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  opacity: 0.8;
  border-bottom-color: var(--white);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

main {
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-title {
  font-size: 42px;
  font-weight: bold;
  color: var(--primary-red);
  margin-bottom: 10px;
  border-bottom: 4px solid var(--primary-red);
  padding-bottom: 15px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 30px;
}

/* ========================================
   BANNEAU EN DIRECT
   ======================================== */

.live-banner {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(196, 30, 58, 0.6); }
}

.live-badge {
  display: inline-block;
  background: #ff4444;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49%, 100% { opacity: 1; }
  50%, 99% { opacity: 0.7; }
}

.live-banner h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.live-match-info {
  font-size: 18px;
  line-height: 1.8;
}

.live-score {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin: 15px 0;
}

/* ========================================
   CARDS & GRILLES
   ======================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 4px solid var(--primary-red);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(196, 30, 58, 0.2);
}

.card-header {
  background: var(--primary-red);
  color: var(--white);
  padding: 20px;
  font-size: 18px;
  font-weight: bold;
}

.card-body {
  padding: 20px;
}

.card-title {
  color: var(--primary-red);
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}

.card-text {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ========================================
   MATCHS GRILLE
   ======================================== */

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.match-card {
  background: var(--white);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.match-card:hover {
  border-color: var(--primary-red);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
}

.match-card.live {
  border-color: var(--danger);
  background: #fff5f5;
}

.match-date {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.match-teams {
  font-weight: 600;
  margin: 15px 0;
  line-height: 1.8;
}

.match-score {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-red);
  text-align: center;
  margin: 15px 0;
}

.match-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.status-upcoming {
  background: #e7f3ff;
  color: #0056b3;
}

.status-live {
  background: #ff4444;
  color: var(--white);
  animation: blink 1s infinite;
}

.status-finished {
  background: #e8f5e9;
  color: var(--success);
}

/* ========================================
   FILTRES
   ======================================== */

.filters-container {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-group {
  margin-bottom: 15px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-weight: bold;
  color: var(--primary-red);
  margin-bottom: 10px;
  font-size: 14px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  background: var(--white);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
  font-size: 13px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-red);
  color: var(--white);
  border-color: var(--primary-red);
}

/* ========================================
   CLASSEMENTS (STANDINGS)
   ======================================== */

.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin: 20px 0;
}

.standings-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.standings-header {
  background: var(--primary-red);
  color: var(--white);
  padding: 20px;
  font-weight: bold;
  font-size: 16px;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.standings-table thead {
  background: var(--light-bg);
  border-bottom: 2px solid var(--primary-red);
}

.standings-table th {
  padding: 12px;
  text-align: left;
  font-weight: bold;
  color: var(--primary-red);
}

.standings-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.standings-table tbody tr:hover {
  background: var(--light-bg);
}

.position {
  font-weight: bold;
  color: var(--primary-red);
  width: 30px;
}

.team-name {
  flex: 1;
}

.points {
  font-weight: bold;
  text-align: right;
}

/* ========================================
   TABS
   ======================================== */

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
}

.tab-button {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--primary-red);
}

.tab-button.active {
  color: var(--primary-red);
  border-bottom-color: var(--primary-red);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  background: var(--chc-grey);
  color: var(--white);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h3 {
  color: var(--primary-red);
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--primary-red);
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--text-secondary);
  font-size: 13px;
  opacity: 0.8;
}

/* ========================================
   BOUTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-red);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  font-size: 14px;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
  background: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--text-primary);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ========================================
   UTILITAIRES
   ======================================== */

.text-center {
  text-align: center;
}

.text-red {
  color: var(--primary-red);
}

.text-muted {
  color: var(--text-secondary);
  font-size: 14px;
}

.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.hidden {
  display: none !important;
}

.loading {
  text-align: center;
  padding: 30px;
  color: var(--text-secondary);
}

.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-message {
  background: #fee;
  border-left: 4px solid var(--danger);
  padding: 15px;
  border-radius: 5px;
  color: var(--danger);
  margin-bottom: 20px;
}

/* ========================================
   CHAMPIONSHIP CARDS
   ======================================== */

.championship-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 25px 20px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--text-primary);
  min-height: 180px;
}

.championship-card:hover {
  border-color: var(--primary-red);
  box-shadow: 0 4px 16px rgba(212, 21, 22, 0.15);
  transform: translateY(-4px);
}

.championship-card.active {
  border-color: var(--primary-red);
  background: linear-gradient(135deg, rgba(212, 21, 22, 0.05) 0%, rgba(212, 21, 22, 0.02) 100%);
  box-shadow: 0 4px 16px rgba(212, 21, 22, 0.2);
}

.championship-card h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: var(--primary-red);
  font-weight: 600;
}

.championship-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  nav ul {
    gap: 15px;
    justify-content: center;
    order: 3;
    flex-basis: 100%;
  }

  .page-title {
    font-size: 28px;
  }

  .cards-grid,
  .matches-grid,
  .standings-grid {
    grid-template-columns: 1fr;
  }

  .match-score {
    font-size: 24px;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .filter-btn {
    flex: 1;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .standings-table th,
  .standings-table td {
    padding: 8px;
    font-size: 12px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 15px;
  }

  .logo {
    font-size: 20px;
  }

  .page-title {
    font-size: 22px;
  }

  nav ul {
    gap: 10px;
  }

  nav a {
    font-size: 12px;
  }

  .container {
    padding: 20px 15px;
  }

  .live-banner {
    padding: 15px;
  }

  .live-banner h2 {
    font-size: 18px;
  }

  .match-card {
    padding: 15px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 12px;
  }

  .championship-card {
    padding: 15px;
  }

  .championship-card h3 {
    font-size: 16px;
  }

  .championship-card p {
    font-size: 12px;
  }
}
