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

:root {
  --color-primary: #d41516;
  --color-secondary: #232932;
  --color-bg: #f5f7fa;
  --color-white: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #7f8c8d;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-border: #e1e8ed;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ==================== HEADER ==================== */
.header {
  background: rgba(35, 41, 50, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--color-white);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top {
  padding: 25px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo img {
  width: 100px;
  height: 100px;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-info {
  display: flex;
  gap: 20px;
  transition: all 0.3s ease;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.info-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.info-icon {
  font-size: 1.8rem;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.info-value {
  font-size: 1rem;
  color: var(--color-white);
  font-weight: 700;
}

/* Navigation */
.nav {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav .container {
  display: flex;
  gap: 0;
}

.nav-link {
  flex: 1;
  padding: 16px 30px;
  background: transparent;
  color: var(--color-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 3px solid transparent;
}

.nav-icon {
  font-size: 1.3rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(212, 21, 22, 0.6);
}

.nav-link.active {
  background: rgba(212, 21, 22, 0.15);
  border-bottom-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(212, 21, 22, 0.2);
}

/* ==================== MAIN CONTENT ==================== */
.main {
  flex: 1;
  padding: 40px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-secondary)
  );
  border-radius: 2px;
}

/* ==================== LOADING & ERROR STATES ==================== */
.loading {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

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

.error-message {
  background: #fee;
  border: 2px solid #fcc;
  color: #c33;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
}

/* ==================== DAY SECTIONS ==================== */
.day-section {
  margin-bottom: 50px;
}

.day-header {
  background: linear-gradient(135deg, var(--color-primary), #b61214);
  color: var(--color-white);
  padding: 20px 25px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 150px;
  z-index: 50;
  transition: top 0.3s ease;
}

.day-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ==================== MATCHES GRID ==================== */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 25px;
}

.match-card {
  background: var(--color-white);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.match-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--color-secondary),
    var(--color-primary)
  );
  opacity: 0.8;
}

.match-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-8px);
}

.match-time {
  align-self: flex-start;
  background: rgba(35, 41, 50, 0.05);
  color: var(--color-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0 25px;
  flex: 1;
}

.team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.match-card:hover .team {
  background: #fff;
  border-color: #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.team-name {
  flex: 1;
  color: var(--color-text);
  font-weight: 700;
}

.team-score {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  background: rgba(212, 21, 22, 0.08);
  padding: 4px 12px;
  border-radius: 8px;
  min-width: 45px;
  text-align: center;
}

.match-vs {
  display: none;
}

.match-status {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.match-status.scheduled {
  background: #f0f4f8;
  color: #627d98;
}

.match-status.finished {
  background: #e3f9e5;
  color: #1f9d55;
}

.match-status.live {
  background: #fff5f5;
  color: #e02424;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 3px rgba(224, 36, 36, 0.1);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ==================== CARQUEFOU STYLES ==================== */
.team-carquefou {
  font-weight: 900;
  color: var(--color-primary);
  font-size: 1.2rem;
}

.carquefou-match {
  border: 1px solid rgba(212, 21, 22, 0.2);
  background: linear-gradient(145deg, #ffffff, #fff5f5);
  box-shadow: 0 10px 30px rgba(212, 21, 22, 0.08);
}

.carquefou-match::before {
  height: 8px;
  background: var(--color-primary);
}

.carquefou-match:hover {
  box-shadow: 0 20px 40px rgba(212, 21, 22, 0.15);
  transform: translateY(-8px);
}

/* ==================== VIDEO SECTIONS ==================== */
.video-section {
  margin-bottom: 50px;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.video-header h3 {
  font-size: 1.5rem;
  color: var(--color-secondary);
  font-weight: 700;
}

.live-badge {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s infinite;
}

.live-badge::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow-lg);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

.video-description {
  margin-top: 15px;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border-left: 4px solid var(--color-primary);
  padding: 25px;
  border-radius: var(--radius);
  margin-top: 30px;
}

.info-box h4 {
  color: var(--color-secondary);
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.info-box ul {
  list-style: none;
  padding: 0;
}

.info-box li {
  padding: 8px 0;
  color: var(--color-text);
  position: relative;
  padding-left: 25px;
}

.info-box li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 40px 0 30px;
  text-align: center;
  margin-top: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-white);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(212, 21, 22, 0.3);
}

.footer p {
  margin: 5px 0;
}

.organizer {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

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

/* Menu Burger - Caché par défaut sur desktop */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  z-index: 10;
}

.burger-menu:hover {
  background: rgba(255, 255, 255, 0.2);
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
  /* Header compact */
  .header-top {
    padding: 15px 0;
  }

  .header-top .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .header-brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .logo img {
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
  }

  .brand-text {
    transition: all 0.3s ease;
  }

  .title {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
  }

  .subtitle {
    font-size: 0.75rem;
    transition: all 0.3s ease;
  }

  /* Cacher les infos dates/lieu sur mobile */
  .header-info {
    display: none;
  }

  /* Afficher le menu burger */
  .burger-menu {
    display: flex;
  }

  /* Navigation mobile */
  .nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav.nav-open {
    max-height: 200px;
  }

  .nav .container {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-start;
    gap: 12px;
  }

  .nav-link span:last-child {
    display: inline;
  }

  .nav-icon {
    font-size: 1.2rem;
  }

  /* Header scrollé - Seulement le logo */
  .header-scrolled .header-top {
    padding: 8px 0;
  }

  .header-scrolled .logo img {
    width: 40px;
    height: 40px;
  }

  .header-scrolled .brand-text {
    display: none;
  }

  .header-scrolled .burger-menu {
    width: 38px;
    height: 38px;
  }

  /* Day header sticky ajusté pour mobile */
  .day-header {
    top: 56px;
    padding: 15px 20px;
    border-radius: 10px;
  }

  .day-header h3 {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .video-section {
    padding: 20px;
  }

  .video-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .header-top {
    padding: 12px 0;
  }

  .logo img {
    width: 45px;
    height: 45px;
  }

  .title {
    font-size: 1rem;
  }

  .subtitle {
    font-size: 0.7rem;
  }

  .header-scrolled .logo img {
    width: 36px;
    height: 36px;
  }

  .day-header {
    top: 52px;
    padding: 12px 16px;
  }

  .day-header h3 {
    font-size: 1rem;
  }

  .match-card {
    padding: 15px;
  }

  .team {
    font-size: 0.95rem;
  }
}
