/* ==========================================================================
   Bandeau Matchs Header Défilant — MadeInFoot
   ========================================================================== */

.mif-header-ticker {
  width: 100%;
  height: 52px;
  overflow: hidden;
  position: relative;
  z-index: 40;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mif-header-ticker__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

/* Logo Ligue Fixe */
.mif-header-ticker__league {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
}

.mif-header-ticker__league-logo {
  height: 32px;
  max-width: 80px;
  object-fit: contain;
}

/* Zone Défilante (Ticker Wrapper) */
.mif-header-ticker__scroll-wrapper {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  margin: 0 12px;
  mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
}

.mif-header-ticker__track {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  animation: matchHeaderScroll 45s linear infinite;
  will-change: transform;
}

/* Pause au survol */
.mif-header-ticker__scroll-wrapper:hover .mif-header-ticker__track {
  animation-play-state: paused;
}

@keyframes matchHeaderScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Élément de Match (Cliquable) */
.mif-header-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.mif-header-ticker__item,
.mif-header-ticker__item:hover,
.mif-header-ticker__item:focus,
.mif-header-ticker__item:active,
.mif-header-ticker__item:visited {
  color: inherit !important;
  text-decoration: none !important;
  outline: none;
}

.mif-header-ticker__item:hover,
.mif-header-ticker__item:focus {
  background: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.mif-header-ticker__item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Équipe */
.mif-header-ticker__team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mif-header-ticker__team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

.mif-header-ticker__team-name {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Statut / Score / Heure */
.mif-header-ticker__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mif-header-ticker__btn-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e74c3c;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  transition: transform 0.2s ease;
  white-space: nowrap;
}

.mif-header-ticker__btn-live:hover {
  transform: scale(1.05);
  color: #ffffff;
}

.mif-header-ticker__pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulseDot 1.2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.4); }
}

.mif-header-ticker__score-played {
  display: inline-block;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.mif-header-ticker__time {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  white-space: nowrap;
}

/* CTA Pronostics Fixe */
.mif-header-ticker__cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
}

.mif-header-ticker__cta-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #10b981;
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1.1;
  white-space: nowrap;
}

.mif-header-ticker__cta-btn:hover {
  background: #059669;
  color: #ffffff;
  transform: translateY(-1px);
}

.mif-header-ticker__cta-text {
  font-size: 12px;
}

.mif-header-ticker__cta-subtext {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 1px;
}

/* Responsive Mobile */
@media (max-width: 640px) {
  .mif-header-ticker {
    height: 46px;
  }
  .mif-header-ticker__league-logo {
    height: 24px;
  }
  .mif-header-ticker__team-name {
    display: none; /* Masque le texte des équipes sur très petit écran pour plus de fluidité */
  }
  .mif-header-ticker__cta-subtext {
    display: none;
  }
  .mif-header-ticker__cta-btn {
    padding: 6px 10px;
  }
}
