/* Modal Produit - Style Epic Games */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  animation: fadeIn 0.3s ease;
}

.product-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1400px;
  max-height: 90vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  height: 100%;
  max-height: 90vh;
  overflow: hidden;
}

/* Galerie d'images */
.modal-gallery {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f0f1e;
  border-radius: 12px;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

.gallery-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 5px;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.thumbnail {
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.thumbnail:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.3);
}

.thumbnail.active {
  opacity: 1;
  border-color: var(--primary-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Informations produit */
.modal-info {
  background: rgba(0, 0, 0, 0.3);
  padding: 40px;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-info::-webkit-scrollbar {
  width: 8px;
}

.modal-info::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.modal-info::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.product-header {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.product-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 191, 255, 0.3);
}

.product-title-section h2 {
  font-size: 2rem;
  color: white;
  margin: 0 0 8px 0;
}

.product-developer {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.product-developer span {
  color: var(--primary-color);
  font-weight: 600;
}

.product-price {
  margin-top: 12px;
}

.price-amount {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.price-amount.free {
  background: linear-gradient(135deg, #00ff88, #00cc6a);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.price-amount.one-time {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.price-amount.subscription {
  background: linear-gradient(135deg, #ff9500, #ff5e00);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.product-description {
  margin: 30px 0;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.product-features {
  margin: 30px 0;
}

.product-features h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.product-features ul {
  list-style: none;
  padding: 0;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.8);
}

.product-features li i {
  color: var(--primary-color);
  font-size: 1rem;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
}

.product-tags .tag {
  padding: 8px 16px;
  background: rgba(0, 191, 255, 0.1);
  border: 1px solid rgba(0, 191, 255, 0.3);
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 15px;
  margin: 40px 0;
}

.product-actions button {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-library {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-library:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-library.in-library {
  background: rgba(0, 255, 0, 0.1);
  border-color: rgba(0, 255, 0, 0.3);
  color: #00ff00;
}

.btn-access {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.btn-access:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
}

.btn-access i, .btn-library i {
  font-size: 1.1rem;
}

.product-info-grid {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-value {
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

/* Subscription Requirements Section */
.subscription-requirements {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.requirements-title {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-weight: 600;
}

.plan-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.plan-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.plan-badge i {
  font-size: 1.5rem;
}

.plan-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.plan-badge.active {
  border-color: var(--primary-color);
  background: rgba(0, 255, 255, 0.1);
  color: var(--primary-color);
}

.plan-badge.free.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.plan-badge.beginner.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.plan-badge.advanced.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.plan-badge.premium.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.plan-details {
  display: none;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border-left: 3px solid var(--primary-color);
  animation: slideDown 0.3s ease;
}

.plan-details.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plan-detail-content h4 {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.plan-detail-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
  line-height: 1.6;
}

#planDetailFeatures {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

#planDetailFeatures li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

#planDetailFeatures li i {
  color: var(--primary-color);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  
  .modal-gallery {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-gallery, .modal-info {
    padding: 20px;
  }
  
  .product-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .gallery-nav {
    width: 40px;
    height: 40px;
  }
  
  .thumbnail {
    width: 100px;
  }

  .plan-badges {
    grid-template-columns: repeat(2, 1fr);
  }
}
