/* Styles pour la modale des spectacles enrichis */

/* Fond de la modale */
.spectacle-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

/* Contenu de la modale */
.spectacle-modal-content {
  background-color: #fff;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

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

/* Bouton de fermeture */
.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: #333;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}

.close-modal:hover {
  color: #000;
}

/* En-tête de la modale */
.spectacle-modal-header {
  padding: 20px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #eee;
}

.spectacle-modal-header h2 {
  margin: 0 0 10px 0;
  font-size: 28px;
  color: #333;
}

.spectacle-modal-header h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  color: #666;
}

.spectacle-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 16px;
  color: #777;
}

/* Corps de la modale */
.spectacle-modal-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .spectacle-modal-body {
    grid-template-columns: 1fr 1fr;
  }
}

/* Image principale */
.spectacle-modal-image img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Détails du spectacle */
.spectacle-modal-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.spectacle-modal-soustitre {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  color: #555;
}

.spectacle-modal-description {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.spectacle-modal-age-duree {
  font-size: 14px;
  color: #777;
  margin-top: auto;
}

/* Onglets */
.spectacle-modal-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-top: 20px;
}

.spectacle-modal-tab {
  padding: 10px 20px;
  cursor: pointer;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  margin-right: 5px;
  transition: background-color 0.3s;
}

.spectacle-modal-tab.active {
  background-color: #fff;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
  font-weight: bold;
}

.spectacle-modal-tab:hover:not(.active) {
  background-color: #e9e9e9;
}

/* Contenu des onglets */
.spectacle-modal-tab-content {
  padding: 20px 0;
  display: none;
}

.spectacle-modal-tab-content.active {
  display: block;
}

/* Galerie d'images */
.spectacle-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.gallery-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-image:hover {
  transform: scale(1.05);
}

/* Vidéo */
.spectacle-modal-video {
  position: relative;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  margin-top: 15px;
}

.spectacle-modal-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 5px;
}

/* Critiques */
.spectacle-modal-critiques {
  margin-top: 15px;
}

.critique {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
  border-left: 3px solid #ddd;
}

.critique-source {
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.critique-texte {
  font-style: italic;
  color: #666;
}

/* Dates de tournée */
.spectacle-modal-dates {
  margin-top: 15px;
}

.date-tournee {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  color: #555;
}

.date-tournee:last-child {
  border-bottom: none;
}

/* Informations sur la compagnie */
.compagnie-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.compagnie-info h3 {
  margin-top: 0;
  color: #333;
}

.compagnie-description {
  margin-bottom: 15px;
  line-height: 1.6;
}

.compagnie-membres {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.membre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
}

.membre-nom {
  font-weight: bold;
  margin-bottom: 5px;
}

.membre-role {
  color: #666;
  font-style: italic;
  margin-bottom: 10px;
}

.membre-bio {
  font-size: 14px;
  line-height: 1.5;
}

.compagnie-site {
  margin-top: 15px;
}

.compagnie-site a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s;
}

.compagnie-site a:hover {
  color: #004499;
  text-decoration: underline;
}

.compagnie-spectacles {
  margin-top: 15px;
}

.compagnie-spectacles h4 {
  margin-bottom: 10px;
}

.spectacle-precedent {
  padding: 5px 0;
}

.compagnie-photo {
  margin-top: 15px;
}

.compagnie-photo img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 767px) {
  .spectacle-modal-content {
    width: 95%;
  }
  
  .spectacle-modal-header h2 {
    font-size: 24px;
  }
  
  .spectacle-modal-header h3 {
    font-size: 18px;
  }
  
  .spectacle-modal-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
  }
  
  .spectacle-modal-gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .compagnie-membres {
    grid-template-columns: 1fr;
  }
}
