/* CSS optimisé pour la page performers.php */

/* Menu hamburger et navigation latérale */
.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  padding: 10px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.05);
}

.hamburger {
  width: 25px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
  transform-origin: top left;
}

.hamburger span:nth-child(2) {
  transform-origin: center;
}

.hamburger span:nth-child(3) {
  transform-origin: bottom left;
}

.menu-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(2px, -2px);
}

.menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(2px, 2px);
}

/* Navigation latérale */
.side-nav {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  z-index: 9999;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.side-nav.active {
  left: 0;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-content {
  padding: 30px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.nav-content img {
  max-width: 200px;
  height: auto;
  margin-bottom: 30px;
  align-self: center;
  transition: transform 0.3s ease;
}

.nav-content img:hover {
  transform: scale(1.05);
}

.nav-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.nav-content ul li {
  margin-bottom: 10px;
}

.nav-content ul li a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.nav-content ul li a i {
  margin-right: 15px;
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
  color: #ff0000;
}

.nav-content ul li a:hover,
.nav-content ul li a.active {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #fff;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.5);
}

.nav-content ul li a:hover i,
.nav-content ul li a.active i {
  color: #fff;
}

/* Structure de base */
.performers-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 15px;
  min-height: 70vh;
}

/* Header avec logo et recherche */
.logo-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
}

.logo-header img {
  max-width: 200px;
  height: auto;
  transition: transform 0.3s ease;
}

.logo-header img:hover {
  transform: scale(1.05);
}

.nav-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  margin-bottom: 20px;
}

.nav-header .search-box {
  max-width: 600px;
  width: 100%;
  position: relative;
}

.nav-header .search-box form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 5px;
  backdrop-filter: blur(10px);
}

.nav-header .input-search {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  padding: 12px 20px;
  font-size: 16px;
  outline: none;
}

.nav-header .input-search::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.nav-header .btn-search {
  background: #ff0000;
  border: none;
  color: white;
  padding: 12px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-header .btn-search:hover {
  background: #cc0000;
  transform: scale(1.05);
}

/* En-tête de section modernisé */
.section-header {
  margin-bottom: 40px;
  text-align: center;
  contain: layout;
  background: rgba(0, 0, 0, 0.2);
  padding: 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header h1 {
  font-size: 2.8rem;
  margin: 0 0 20px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #ff0000 0%, #ff4040 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header i {
  color: #ff0000;
  filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.4));
  text-shadow: none;
  -webkit-text-fill-color: #ff0000;
}

.performers-count {
  color: #ccc;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 20px;
  border-radius: 25px;
  display: inline-flex;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.performers-count i {
  color: #ff0000;
  font-size: 1.1rem;
}

/* Filtres alphabétiques optimisés */
.alpha-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  contain: layout;
}

.alpha-filters a {
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  padding: 0 12px;
  font-size: 0.95rem;
  will-change: transform, background-color;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alpha-filters a:hover {
  background: rgba(255, 0, 0, 0.3);
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.alpha-filters a.active {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #fff;
  border-color: #ff0000;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
  transform: translateY(-1px);
}

/* Grille des performers optimisée */
.performers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  contain: layout;
  padding: 10px 0;
}

.performer-card {
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  will-change: transform, box-shadow;
  contain: layout;
  position: relative;
}

.performer-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 0, 0, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.performer-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 0, 0, 0.2);
}

.performer-card:hover::before {
  opacity: 1;
}

.performer-card a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #fff;
  position: relative;
  z-index: 2;
  outline: none;
}

.performer-card a:focus {
  outline: 2px solid #ff0000;
  outline-offset: 2px;
}

/* Container d'image avec overlay */
.performer-img-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border-radius: 8px 8px 0 0;
}

.performer-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Lazy loading placeholder optimisé */
.lazy-image {
  background: linear-gradient(45deg, #333, #555);
  background-size: 20px 20px;
  animation: loading-shimmer 1.5s infinite ease-in-out;
}

@keyframes loading-shimmer {
  0% {
    background-position: -20px 0;
  }
  100% {
    background-position: 20px 0;
  }
}

.lazy-image[src] {
  animation: none;
  background: none;
}

.performer-card:hover .performer-img-container img {
  transform: scale(1.1) rotate(2deg);
}

/* Overlay d'image avec icône */
.image-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.image-overlay i {
  color: #fff;
  font-size: 18px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.performer-card:hover .image-overlay {
  transform: translate(-50%, -50%) scale(1);
}

/* Information du performer */
.performer-card h3 {
  padding: 16px 16px 8px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
  text-align: center;
}

.performer-card:hover h3 {
  color: #ff2020;
  text-shadow: 0 0 8px rgba(255, 32, 32, 0.5);
}

.video-count {
  padding: 8px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #aaa;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  transition: color 0.3s ease;
}

.video-count i {
  color: #ff0000;
}

.performer-card:hover .video-count {
  color: #ddd;
}

/* Message d'absence de résultats */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.no-results i {
  font-size: 4rem;
  color: #666;
  margin-bottom: 20px;
  display: block;
}

.no-results p {
  font-size: 1.3rem;
  color: #ccc;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Pagination moderne */
.pagination-container {
  margin-top: 50px;
  text-align: center;
  padding: 20px 0;
}

.pagination {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 15px;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 25px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
  justify-content: center;
}

.page-item {
  display: flex;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-link:hover {
  background: rgba(255, 0, 0, 0.3);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 3px 8px rgba(255, 0, 0, 0.2);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #fff;
  border-color: #ff0000;
  box-shadow: 0 3px 8px rgba(255, 0, 0, 0.4);
}

.page-item.disabled .page-link {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
  transform: none;
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  pointer-events: none;
}

/* Indicateur de chargement */
.loading-indicator {
  text-align: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
}

.loading-indicator i {
  font-size: 2rem;
  color: #ff0000;
  margin-bottom: 15px;
  display: block;
}

.loading-indicator span {
  color: #ccc;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Sélecteur de langue moderne */
.language-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  font-size: 14px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.language-selector:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.selected-language {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  color: #fff;
  transition: all 0.3s ease;
}

.selected-language:hover {
  background: rgba(255, 255, 255, 0.1);
}

.flag-emoji {
  font-size: 18px;
  margin-right: 8px;
}

.lang-name {
  margin-right: 8px;
}

.selected-language .fa-chevron-down {
  transition: transform 0.3s ease;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.language-selector.active .fa-chevron-down {
  transform: rotate(180deg);
}

.languages-dropdown {
  max-height: 0;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.7);
}

.languages-dropdown.show {
  max-height: 300px;
  overflow-y: auto;
}

.languages-dropdown li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.languages-dropdown a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.languages-dropdown a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .performers-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }

  .section-header h1 {
    font-size: 2.4rem;
  }

  .alpha-filters {
    gap: 6px;
    padding: 15px;
  }

  .alpha-filters a {
    min-width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .side-nav {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    top: 15px;
    left: 15px;
    padding: 8px;
  }

  .hamburger {
    width: 22px;
    height: 18px;
  }

  .hamburger span {
    height: 2px;
  }

  .side-nav {
    width: 260px;
  }

  .nav-content {
    padding: 20px 15px;
  }

  .nav-content ul li a {
    padding: 12px 15px;
    font-size: 0.95rem;
  }

  .nav-content ul li a i {
    font-size: 1.1rem;
    margin-right: 12px;
  }

  .logo-header {
    margin: 10px 0;
    padding: 10px;
  }

  .logo-header img {
    max-width: 150px;
  }

  .nav-header {
    padding: 15px;
    margin-bottom: 15px;
  }

  .nav-header .input-search {
    padding: 10px 15px;
    font-size: 14px;
  }

  .nav-header .btn-search {
    padding: 10px 14px;
    min-width: 42px;
    height: 42px;
  }

  .performers-page {
    padding: 15px 10px;
  }

  .section-header {
    padding: 20px;
  }

  .section-header h1 {
    font-size: 2rem;
    flex-direction: column;
    gap: 10px;
  }

  .performers-count {
    font-size: 1rem;
    padding: 10px 16px;
  }

  .alpha-filters {
    gap: 4px;
    padding: 12px;
  }

  .alpha-filters a {
    min-width: 34px;
    height: 34px;
    font-size: 0.85rem;
    padding: 0 8px;
  }

  .performers-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .performer-card h3 {
    padding: 12px 12px 6px;
    font-size: 1rem;
  }

  .video-count {
    padding: 6px 12px 12px;
    font-size: 0.85rem;
  }

  .language-selector {
    top: 15px;
    right: 15px;
    font-size: 13px;
  }

  .flag-emoji {
    font-size: 16px;
  }

  .lang-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .performers-page {
    padding: 10px 5px;
  }

  .section-header {
    padding: 15px;
    margin-bottom: 25px;
  }

  .section-header h1 {
    font-size: 1.6rem;
  }

  .alpha-filters {
    padding: 10px;
    gap: 3px;
  }

  .alpha-filters a {
    min-width: 30px;
    height: 30px;
    font-size: 0.8rem;
    padding: 0 6px;
  }

  .performers-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .performer-card h3 {
    padding: 10px 8px 4px;
    font-size: 0.9rem;
  }

  .video-count {
    padding: 4px 8px 10px;
    font-size: 0.8rem;
  }

  .pagination {
    gap: 4px;
    padding: 10px;
  }

  .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.9rem;
  }

  .no-results {
    padding: 40px 15px;
  }

  .no-results i {
    font-size: 3rem;
  }

  .no-results p {
    font-size: 1.1rem;
  }
}

/* Optimisations pour les préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  .performer-card,
  .performer-img-container img,
  .alpha-filters a,
  .page-link,
  .image-overlay {
    transition: none;
  }

  .performer-card:hover .performer-img-container img {
    transform: none;
  }

  .performer-card:hover,
  .image-overlay {
    transform: none;
  }

  .lazy-image {
    animation: none;
  }
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
  .performer-card,
  .section-header,
  .alpha-filters {
    border: 2px solid rgba(255, 255, 255, 0.2);
  }

  .alpha-filters a,
  .page-link {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }

  .performer-card h3,
  .video-count {
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  }
}

/* Mode sombre amélioré */
@media (prefers-color-scheme: dark) {
  .performer-card {
    background: rgba(20, 20, 20, 0.8);
  }

  .section-header {
    background: rgba(10, 10, 10, 0.5);
  }

  .performers-count {
    color: #e0e0e0;
  }
}

/* Loading skeleton pour un meilleur UX */
.performer-card.skeleton {
  background: rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.performer-card.skeleton::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
