body {
  font-family: 'Inter', sans-serif;
  background-color: #000;
  color: #f0f0f0;
  margin: 0;
  padding: 0;
}

/* === LOGO FIXÉ EN HAUT À GAUCHE === */
.home-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  display: inline-block;
}

.logo {
  height: 42px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.1);
}

/* === HEADER === */
.main-header {
  background-color: #111;
  padding: 15px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;  /* centre horizontal */
  justify-content: center;
  gap: 12px;
  min-height: 120px; /* espacement vertical confortable */
}

.home-link {
  position: static; /* dans le flux normal */
  display: block;
  margin: 0 auto;
  width: 42px; /* largeur fixe */
}

.logo {
  display: block;
  margin: 0 auto;
  height: 42px;
}

.main-header h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
  color: #fff;
}

/* Navigation (boutons) */
.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  width: 100%;
  max-width: 280px;  /* limite largeur */
}

.tab {
  width: 100%;
  font-size: 14px;
  padding: 10px 0;
  border-radius: 6px;
  background-color: transparent;
  color: #fff;
  border: 1px solid #666;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tab {
  background: transparent;
  color: #fff;
  border: 2px solid #444;
  padding: 10px 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tab:hover {
  border-color: #fff;
  color: #fff;
  background: transparent;
}

.tab.active {
  border-color: #00ff80;
  color: #fff;
  background: transparent;
}


/* === MATCH CONTAINER === */
.match-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.match-day-header {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

.match-card {
  background-color: #1a1a1a;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s ease;
}

.match-card:hover {
  background-color: #222;
}

.match-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.match-info > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.match-info strong {
  font-size: 16px;
  font-weight: 600;
}

.match-info small {
  font-size: 13px;
  color: #aaa;
}

.status-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status {
  font-size: 14px;
  color: #00ff80;
  font-weight: 600;
}

.tv-logo {
  height: 20px;
  max-width: 80px;
  object-fit: contain;
  filter: brightness(1.2);
  display: inline-block;
  vertical-align: middle;
}

.favorite-icon {
  font-size: 18px;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s ease;
}

.favorite-icon.active {
  color: #ffd700;
}

/* === FOOTER === */
footer {
  background-color: #111;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #777;
  border-top: 1px solid #222;
}

/* === RESPONSIVE === */
@media screen and (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .match-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 10px;
    margin: 4px 0;
  }

  .match-card img {
    width: 35px;
    height: 35px;
  }

  .favorite-icon {
    font-size: 14px;
    margin-right: 4px;
  }

  .match-info strong {
    font-size: 13px;
    font-weight: 600;
  }

  .match-info small {
    font-size: 11px;
    color: #aaa;
  }

  .status-container {
    flex-direction: row;
    justify-content: flex-start;
  }

  .status {
    font-size: 11px;
  }

  .tv-logo {
    height: 30px;
    max-width: 50px;
  }

  .match-day-header {
    font-size: 12px;
    margin: 6px 0 4px 0;
  }

  .tab {
    font-size: 13px;
    padding: 8px 5px;
  }
  #favorite-leagues-list {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .favorite-league-card {
    padding: 6px;
    gap: 6px;
  }
  .favorite-league-card span {
    font-size: 12px;
  }
}

/* Container header + logo + titre + boutons centrés et plus compacts sur mobile */
.main-header {
  padding: 15px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;  /* centre horizontal */
  justify-content: center;
  gap: 12px;
  min-height: 120px;
}

.home-link {
  position: static;
  display: block;
  margin: 0 auto;
  width: 42px;
}

.logo {
  height: 42px;
  display: block;
  margin: 0 auto;
}

.main-header h1 {
  font-size: 20px;
  margin: 0 0 12px 20px;
  font-weight: 700;
  color: #fff;
}

/* Boutons centrés et empilés verticalement */
.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
}

.tab {
  width: 100%;
  max-width: 280px;
  font-size: 14px;
  padding: 10px 0;
  border-radius: 6px;
}

.match {
  display: flex;
  justify-content: center; /* Centre horizontalement */
  align-items: center;     /* Centre verticalement si hauteur fixée */
  height: 100px;           /* Hauteur suffisante pour un bon centrage vertical */
  color: #aaa;             /* Couleur grisée claire */
  font-size: 16px;
  text-align: center;
  margin: 20px auto;
}

/* === SELECTEUR DE JOUR POUR LES MATCHS À VENIR === */
.day-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px;
  background-color: #111;
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 999;
}

.day-button {
  flex: 1 0 auto;
  background: transparent;
  color: #fff;
  border: 2px solid #444;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  min-width: 90px;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

/* ✅ Contour blanc au survol */
.day-button:hover {
  border-color: #fff;
  color: #fff;
  background: transparent;
}

/* ✅ Contour vert quand actif, sans fond */
.day-button.active {
  border-color: #00ff80;
  color: #fff;
  background: transparent;
}




.day-selector-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 10px;
}

.day-carousel {
  display: flex;
  gap: 8px;
  overflow: hidden;
  width: 100%;
  max-width: 550px; /* correspond à ~5 boutons visibles */
}





.scroll-btn {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 10px;
}

.scroll-btn:hover {
  color: #00ff80;
}


/* === MENU DÉROULANT FAVORIS (MULTISELECT) === */
.favorites-dropdown {
  max-width: 900px;
  margin: 20px auto;
  color: #fff;
  font-size: 14px;
  padding: 10px 0;
}

.favorites-dropdown {
  max-width: 900px;
  margin: 20px auto;
  color: #00ff80;
  font-size: 15px;
  font-weight: 600;
}

.favorites-dropdown label {
  display: block;
  margin-bottom: 8px;
}

#league-select {
  width: 100%;
  height: 200px;
  padding: 10px;
  font-size: 14px;
  border: 2px solid #00ff80;
  background-color: #111;
  color: #f0f0f0;
  border-radius: 6px;
  outline: none;
}

#league-select option {
  background-color: #1a1a1a;
  color: #f0f0f0;
  padding: 6px;
  border-bottom: 1px solid #333;
  cursor: pointer;
}

#league-select option:checked {
  background-color: #00ff80;
  color: #000;
}

#favorite-leagues-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 20px;
  padding: 10px;
}


.favorite-league-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background-color: #1a1a1a;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #333;
  transition: all 0.2s ease;
}

.favorite-league-card:hover {
  border-color: #00ff80;
}

.favorite-league-card img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.favorite-league-card .star {
  font-size: 18px;
  color: #888;
}

.favorite-league-card.active .star {
  color: #00ff80;
}

.favorite-league-card span {
  font-size: 14px;
  color: #f0f0f0;
}

.search-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 10px;
  background-color: #000;
}

.search-bar {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid #00ff80;
  border-radius: 8px;
  background-color: #111;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar:focus {
  border-color: #00ff80;
  box-shadow: 0 0 8px rgba(0, 255, 128, 0.4);
}

.search-note {
  margin-top: 8px;
  font-size: 13px;
  color: #888;
  text-align: center;
  font-style: italic;
}

@media screen and (max-width: 480px) {
  .search-bar {
    max-width: 90%;
    font-size: 13px;
    padding: 8px 10px;
  }

  .search-note {
    font-size: 11px;
    padding: 0 10px;
    margin-top: 6px;
    text-align: center;
    color: #888;
  }

  .search-wrapper {
    padding: 12px 0 6px;
  }
}

.day-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.day-carousel::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.day-button {
  scroll-snap-align: start;
}

.favorites-note {
  text-align: center;
  font-size: 14px;
  color: #aaa;
  font-style: italic;
  max-width: 800px;
  margin: 10px auto 20px;
  padding: 0 12px;
}

.competition-block {
  margin-bottom: 30px;
}

.competition-title {
  font-size: 18px;
  font-weight: 700;
  color: #00ff80;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}