/* Styles améliorés pour la page de détail du tag */
.tag-detail-page {
  /*max-width: 1200px;*/
  margin: 0 auto;
  padding: 20px 15px;
}

/* En-tête du tag */
.tag-header {
  margin-bottom: 30px;
  padding: 25px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tag-info h1 {
  font-size: 2.2rem;
  margin: 0 0 15px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tag-info h1 i {
  color: #ff0000;
}

.tag-stats span {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 15px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #fff;
}

.tag-stats i {
  color: #ff0000;
}

/* Section des filtres */
.tag-filters {
  margin-bottom: 30px;
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 10px;
}

.filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
  flex: 1;
}

.filter-group label {
  font-size: 0.9rem;
  color: #aaa;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label i {
  font-size: 0.8rem;
  color: #ff0000;
}

.filter-group select {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 0.95rem;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-group select:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.filter-group select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.3);
}

.btn-filter {
  background-color: #ff0000;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 100px;
}

.btn-filter:hover {
  background-color: #dd0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Grille des vidéos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.video-item {
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  height: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.5);
}

.video-item a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #fff;
}

.video-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.video-item:hover .video-thumbnail img {
  transform: scale(1.1);
}

.video-icons {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #fff;
  padding: 30px 10px 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.video-icons p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.video-item h2 {
  padding: 15px;
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-item:hover h2 {
  color: #ff0000;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  padding: 0 10px;
  font-weight: 500;
}

.pagination a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.pagination a.active {
  background: #ff0000;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.pagination span {
  background: transparent;
  color: #aaa;
}

/* Message quand pas de résultats */
.no-results {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  color: #aaa;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #555;
}

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

/* Responsive */
@media (max-width: 992px) {
  .filters-form {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

  .btn-filter {
    width: 100%;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .tag-info h1 {
    font-size: 1.8rem;
  }

  .tag-stats span {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

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

  .video-item h2 {
    padding: 10px;
    font-size: 0.9rem;
  }

  .video-icons {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .tag-info h1 {
    font-size: 1.6rem;
  }

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

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}
