/* ========== Base (bootstrap overrides + layout) ========== */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}
body {
  background: #121212;
}

/* Placeholders Bootstrap */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ========== Thème ========== */
:root {
  --orange: #ff7a1a;
}
.navbar-text {
  font-weight: 600;
  color: #fff;
}

/* ========== Carousel logos ========== */

/* Wrapper + flèches (corrigé z-index / clic) */
.logo-carousel-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.logo-carousel {
  position: relative;
  z-index: 1;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 9999px;
  background: #111;
  color: #fff;
  opacity: 0.9;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, opacity 0.2s ease;
  z-index: 5;
  pointer-events: auto;
}
.carousel-btn:hover {
  transform: translateY(-1px);
  opacity: 1;
}
.carousel-btn.left {
  left: 6px;
}
.carousel-btn.right {
  right: 6px;
}
.carousel-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* Carrousel horizontal (snap + scrollbar masquée + fondu bords) */
.logo-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 18px;
  overflow-x: auto;
  padding: 16px 56px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;

  /* cacher la scrollbar */
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 32px,
    #000 calc(100% - 32px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 32px,
    #000 calc(100% - 32px),
    transparent 100%
  );
}
.logo-carousel::-webkit-scrollbar {
  display: none;
} /* Chrome/Safari */

/* Cartes logo */
.logo-item {
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  gap: 8px;
  height: 128px;
  padding: 12px;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.logo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.logo-item img {
  width: 80px;
  height: 80px;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  image-rendering: -webkit-optimize-contrast;
}
.logo-item span {
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
  color: #333;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== Liste & cartes matchs ========== */

.games-list {
  display: grid;
  gap: 18px;
}
@media (min-width: 768px) {
  .games-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .games-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* En-tête équipes */
/* --- Teams row --- */
.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* home | vs | away */
  align-items: center;
  gap: 14px;
}

/* chaque groupe d’équipe = flex */
.team {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* rapprocher les groupes du "vs" */
.teams > .team.home {
  justify-self: end;
} /* pousse le groupe vers le centre */
.teams > .team.away {
  justify-self: start;
} /* idem côté droit */

/* ordre : on garde "nom puis logo" dans le HTML
   mais on inverse visuellement côté away pour avoir le logo près du "vs" */
.team.away {
  flex-direction: row-reverse;
}

/* style des éléments */
.team .name {
  white-space: nowrap;
  font-size: clamp(10px, 4vw, 18px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #111;
}

.team img {
  width: 36px;
  height: 36px;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
}

/* Badge "vs" */
.vs {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Métadonnées */
.meta {
  color: #3c3c3c;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.meta .date {
  font-weight: 600;
}
.score {
  font-weight: 700;
  color: #111;
}

/* Boutons */
.btn-reserve {
  justify-self: start;
  padding: 10px 16px;
  border-radius: 16px;
  text-decoration: none;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 26px rgba(255, 122, 26, 0.25);
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.btn-reserve:hover {
  transform: translateY(-1px);
  opacity: 0.98;
}
.btn-reserve.secondary {
  background: #f6f6f7;
  color: #111;
  box-shadow: none;
}

/* Titres */
h1.mb-4 {
  margin-bottom: 1rem;
  color: #ff8a2a;
}
.h4 {
  font-size: 1.15rem;
  margin: 0.9rem 0 0.65rem;
  color: #fff;
}

/* Carte : fond HOME directement sur .game-card */
.game-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px 16px;
  border: 1px solid #eaeaea;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background-color: #fff; /* fallback si l'image ne charge pas */ /* on a 2 calques: 1 = voile; 2 = image home (inline) */
  background-position: center, center;
  background-size: auto, cover;
  background-repeat: no-repeat, no-repeat;
} /* Diagonale AWAY (une seule surcouche) */
.bg-away {
  position: absolute;
  top: -18%;
  left: -10%;
  width: 140%;
  height: 60%;
  transform: rotate(10deg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
} /* léger voile sur la diagonale pour lisibilité */
.bg-away::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
} /* contenu au-dessus */
.game-card > *:not(.bg-away) {
  position: relative;
  z-index: 1;
}

/* Score propre sous les logos */
.scoreline {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 14px;
  /*background: rgba(255, 255, 255, 0.66);*/
  /*backdrop-filter: blur(2px);*/
  /*border: 1px solid rgba(0, 0, 0, 0.06);*/
}

.scoreline .score {
  font-size: clamp(22px, 4vw, 24px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #111;
}

.scoreline .dash {
  font-size: clamp(18px, 3.2vw, 26px);
  font-weight: 700;
  opacity: 0.9;
}

/* Optionnel: resserrer la meta puisque la date est courte */
.game-card .meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #333;
}

/* Si tu gardes le chip .final-score ailleurs, tu peux le supprimer ou le laisser, ici on ne l’utilise plus */
