/* ========== BARRE DE RECHERCHE ========== */
#casino-search-bar {
  max-width: 600px;
  margin: 0 auto 20px auto;
  position: relative;
}

#search-games {
  width: 100%;
  padding: 12px 45px 12px 20px;
  font-size: 16px;
  border: 2px solid #444;
  border-radius: 25px;
  background: #1a1a1a;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
}

#search-games:focus {
  border-color: #e63946;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.3);
}

#search-games::placeholder {
  color: #777;
}

.clear-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: #555;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: #e63946;
  transform: translateY(-50%) scale(1.1);
}

/* Compteur de résultats */
.search-count {
  text-align: center;
  color: #FFD700;
  font-size: 14px;
  margin-bottom: 15px;
  font-weight: bold;
}

/* Message aucun résultat */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 18px;
}

.no-results p {
  margin: 0;
}

/* ========== FILTRES AVEC COMPTEURS ========== */
#casino-games-filter {
  text-align: center;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  margin: 5px;
  border: none;
  background: #444;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.filter-btn:hover {
  background: #555;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #f5b914;
}

/* Compteur dans les boutons */
.filter-btn .count {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}

/* ========== GRILLE DES JEUX ========== */
#casino-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* ========== CARTES DE JEUX ========== */
.jeu-card {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  padding: 15px;
  color: #fff;
  transition: all 0.3s ease;
}

.jeu-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.2);
}

/* Image du jeu */
.jeu-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Titre du jeu */
.jeu-title {
  font-size: 18px;
  margin: 10px 0 5px 0;
  color: #FFD700;
  font-weight: bold;
}

/* Développeur */
.jeu-developpeur {
  font-size: 14px;
  color: #999;
  margin: 5px 0 10px 0;
  font-style: italic;
}

/* ========== ÉTOILES (Système CSS pur) ========== */
.etoiles {
  display: inline-block;
  position: relative;
  font-size: 20px;
  margin: 10px 0;
  letter-spacing: 2px;
  font-family: Arial, sans-serif;
}

/* Étoiles vides (fond gris) */
.etoiles::before {
  content: "☆☆☆☆☆";
  color: #555;
  letter-spacing: 2px;
}

/* Étoiles pleines (superposées en jaune) */
.etoiles::after {
  content: "★★★★★";
  color: #f5b301;
  position: absolute;
  left: 0;
  top: 0;
  letter-spacing: 2px;
  overflow: hidden;
  white-space: nowrap;
}

/* Largeur dynamique selon la note */
.etoiles[data-rating="1"]::after { width: 20%; }
.etoiles[data-rating="1.5"]::after { width: 30%; }
.etoiles[data-rating="2"]::after { width: 40%; }
.etoiles[data-rating="2.5"]::after { width: 50%; }
.etoiles[data-rating="3"]::after { width: 60%; }
.etoiles[data-rating="3.5"]::after { width: 70%; }
.etoiles[data-rating="4"]::after { width: 80%; }
.etoiles[data-rating="4.5"]::after { width: 90%; }
.etoiles[data-rating="5"]::after { width: 100%; }
.etoiles[data-rating="0"]::after { width: 0%; }

/* ========== BOUTON JOUER ========== */
.btn-jouer {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background: #f6b914;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-jouer:hover {
  background: #d62839;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(230, 57, 70, 0.3);
}

/* ========== ANIMATION DE FILTRAGE ========== */
.jeu-card.hidden {
  display: none;
}

.jeu-card.visible {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Highlight lors de la recherche */
.jeu-card.search-match {
  animation: pulse 0.5s ease;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  #casino-games-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .jeu-title {
    font-size: 16px;
  }
  
  .btn-jouer {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  #search-games {
    font-size: 14px;
    padding: 10px 40px 10px 15px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}