/* =========================================
   1. POLICES & CONFIGURATION GÉNÉRALE
   ========================================= */

/* Police par défaut (Corps de texte) */
body {
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden; /* Empêche le scroll horizontal indésirable */
  background-color: #ffffff;
  color: #1f2937; /* Gris foncé lisible */
}

/* Police des Titres (Lexend Giga) - Force l'application */
h1, h2, h3, h4, h5, h6,
.font-lexend,
.title-font,
.nav-link,
.btn-title {
  font-family: 'Lexend Giga', sans-serif !important;
}

/* Défilement fluide */
html {
  scroll-behavior: smooth;
}

/* Gestion du décalage des ancres (pour ne pas être caché par le header fixe) */
[id] {
  scroll-margin-top: 100px;
}

/* =========================================
   2. COMPOSANTS UI (BOUTONS, SLIDERS)
   ========================================= */

/* Bouton Principal (Rouge Radiomaker) */
.btn-primary {
  display: inline-block;
  background-color: #E84545;
  color: white;
  border: 1px solid transparent;
  padding: 0.75rem 2rem;
  border-radius: 9999px; /* Forme de pilule */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  font-family: 'Lexend Giga', sans-serif;
  font-size: 0.875rem; /* 14px */
}

.btn-primary:hover {
  background-color: #d63d3d; /* Rouge légèrement plus foncé */
  transform: translateY(-2px); /* Léger effet de soulèvement */
  box-shadow: 0 10px 15px -3px rgba(232, 69, 69, 0.3);
}

/* Swiper (Carrousel) - Personnalisation des points de pagination */
.swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.5) !important;
  width: 10px;
  height: 10px;
  opacity: 1;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background-color: #E84545 !important; /* Rouge Actif */
  width: 12px;
  height: 12px;
  transform: scale(1.2);
}

/* =========================================
   3. ANIMATIONS
   ========================================= */

/* Animation de défilement infini (Logos partenaires) */
@keyframes infinite-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-infinite-scroll {
  /* Vitesse réglée sur 80s pour un défilement doux */
  animation: infinite-scroll 80s linear infinite;
  display: flex; /* Assure que les logos restent en ligne */
}

/* Logos dans le bandeau défilant */
.logo-track img {
  min-width: 150px;
  max-height: 60px;
  flex-shrink: 0;
  object-fit: contain;

  /* Transition fluide pour le zoom et la couleur */
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

/* EFFET ZOOM AU SURVOL DES LOGOS */
.logo-track img:hover {
  transform: scale(1.2); /* Grossit de 20% */
  cursor: pointer;
  z-index: 10;
  /* Force la couleur et l'opacité (outrepasse les classes Tailwind si besoin) */
  filter: grayscale(0) !important;
  opacity: 1 !important;
}

/* ARRÊT DU DÉFILEMENT AU SURVOL */
/* Quand on passe la souris sur la bande, ça s'arrête */
.logo-track:hover .animate-infinite-scroll {
  animation-play-state: paused;
}

/* Animation "Pulse" (Battement de coeur) pour les boutons Play */
@keyframes pulse-play {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 69, 69, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(232, 69, 69, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 69, 69, 0);
  }
}

.pulsing-play-icon {
  animation: pulse-play 2s infinite;
}

/* Fade In simple pour les textes du Hero */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in-up 1s ease-out forwards;
}

/* =========================================
   4. AUDIO PLAYER GLOBAL (Custom Inputs)
   ========================================= */

/* Style personnalisé pour les barres de progression (Range Inputs) */
input[type="range"].custom-range {
  -webkit-appearance: none; /* Supprime le style par défaut */
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2); /* Fond de la barre (gris clair transparent) */
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin: 0;
}

/* Curseur (Thumb) - Webkit (Chrome/Safari) */
input[type="range"].custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #E84545; /* Rouge Radiomaker */
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  margin-top: -4px; /* Nécessaire pour aligner le thumb avec la track sur Webkit */
}

/* Piste (Track) - Webkit */
input[type="range"].custom-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Curseur (Thumb) - Firefox */
input[type="range"].custom-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #E84545;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Piste (Track) - Firefox */
input[type="range"].custom-range::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Effet au survol du curseur */
input[type="range"].custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
input[type="range"].custom-range::-moz-range-thumb:hover {
  transform: scale(1.3);
}

/* =========================================
   5. UTILITAIRES SPÉCIFIQUES
   ========================================= */

/* Pour les cartes audio cliquables */
.audio-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audio-card:hover {
  z-index: 10;
}

/* Correction pour les vidéos en arrière-plan ou dans les cartes */
video {
  display: block;
}
