/* Styles spécifiques à la page vidéo */

/* Structure principale */
.video-detail-page {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px 15px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* Container vidéo pleine largeur */
.video-container-fullwidth {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 25px;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  background: #000;
}

.video-container-fullwidth iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Styles spécifiques pour les lecteurs Eporner */
.video-container-fullwidth iframe[src*="eporner.com"] {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.video-error {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 300px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-align: center;
}

.video-error i {
  font-size: 2.5rem;
  color: #ff0000;
  margin-bottom: 15px;
}

.video-error p {
  font-size: 1.1rem;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #ddd;
}

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

.video-description {
  margin: 25px 0;
  color: #eee;
  line-height: 1.7;
  font-size: 0.95rem;
}

.report-button {
  background-color: #ffc107;
  color: #333;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.report-button i {
  color: #333;
}

.report-button:hover {
  background-color: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.report-button:disabled {
  background-color: #6c757d;
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.report-button:disabled i {
  color: #ccc;
}

.video-description {
  margin: 25px 0;
  color: #eee;
  line-height: 1.7;
  font-size: 0.95rem;
}

.video-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.video-channel,
.video-performers,
.video-categories,
.video-tags {
  background: rgba(0, 0, 0, 0.15);
  padding: 20px;
  border-radius: 8px;
}

.video-channel a,
.video-performers h2,
.video-categories h3,
.video-tags h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin: 0 0 15px;
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
}

.video-channel a i,
.video-performers h2 i,
.video-categories h3 i,
.video-tags h3 i {
  color: #ff0000;
}

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

.performers-list,
.categories-list,
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.performer-tag,
.category-tag,
.tag {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  will-change: background-color, transform;
}

.performer-tag:hover,
.category-tag:hover,
.tag:hover {
  background: #ff0000;
  color: #fff;
  transform: translateY(-1px);
}

/* Vidéos similaires */
.similar-videos {
  margin-top: 40px;
}

.similar-videos h2 {
  font-size: 1.6rem;
  margin-bottom: 25px;
  text-align: center;
  color: #fff;
}

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

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

.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: block;
  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;
  will-change: transform;
}

.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);
  padding: 20px 10px 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

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

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

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

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

/* Section métadonnées */
.video-metadata-section {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.video-metadata-section h1 {
  font-size: 1.8rem;
  margin: 0 0 20px;
  color: #fff;
  line-height: 1.4;
  border-left: 4px solid #ff0000;
  padding-left: 15px;
}

/* 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);
}

/* Styles pour le 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: 200px;
}

.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);
}

.fade-in {
  animation: fadeIn 0.3s forwards;
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading skeleton pour les vidéos similaires */
.video-item.skeleton {
  background: rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.video-item.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%;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .video-details-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .video-detail-page {
    padding: 15px;
  }

  .video-metadata-section h1 {
    font-size: 1.5rem;
  }

  .video-meta {
    font-size: 0.85rem;
  }

  .report-button {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

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

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

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

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

  .lang-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .video-details-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .video-channel,
  .video-performers,
  .video-categories,
  .video-tags {
    padding: 15px;
  }

  .similar-videos h2 {
    font-size: 1.4rem;
  }

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

/* Optimisations pour les performances */
@media (prefers-reduced-motion: reduce) {
  .video-item,
  .video-thumbnail img,
  .performer-tag,
  .category-tag,
  .tag {
    transition: none;
  }

  .video-item:hover .video-thumbnail img {
    transform: none;
  }
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
  .video-meta span,
  .performer-tag,
  .category-tag,
  .tag {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .report-button {
    border: 2px solid #333;
  }
}

/* Ajustements responsive pour le container vidéo */
@media (max-width: 1200px) {
  .video-container-fullwidth {
    max-width: 100%;
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (max-width: 768px) {
  .logo-header {
    margin: 10px 0;
    padding: 10px;
  }

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

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

  .nav-header .search-box {
    max-width: 100%;
  }

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

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