:root {
  /* Couleurs */
  --dark-bg: #161b29;
  --darker-bg: #13172b;
  --card-bg: rgba(70, 77, 95, 0.4);
  --selected-bg: #d22b2b; /*#f59e0b;*/
  --white: #ffffff;
  --light-gray: #e5e7eb;

  /* Typographie */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset et Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--dark-bg);
  color: var(--white);
  line-height: 1.6;
}
#headerZerd {
  background: linear-gradient(rgba(0, 0, 0, 0.7) 10%, transparent);
  color: #fff;
}

/* Bannière Hero */
.movie-banner {
  width: 100%;
  height: 600px !important;
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
}

.movie-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(22, 27, 41, 0.4),
    rgba(22, 27, 41, 1)
  );
  z-index: 2;
}

.movie-container {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  margin: -500px auto 0;
  padding: 20px;
}

/* En-tête du Film */
.movie-header {
  display: flex;
  margin-bottom: 30px;
}

.movie-poster {
  width: 220px;
  flex-shrink: 0;
}

.movie-poster img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.movie-details {
  margin-left: 30px;
  flex: 1;
}

.movie-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.movie-subtitle {
  color: var(--light-gray);
  font-size: 1rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.movie-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  color: var(--light-gray);
  font-size: 0.9rem;
}

.trailer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: #ff0000;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.trailer-button:hover {
  background-color: #d90000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.button-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trailer-button svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.movie-features {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  color: var(--light-gray);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  margin-bottom: 1em;
}

.feature-item svg {
  margin-right: 5px;
  /* fill: var(--selected-bg); */
}
.actors,
.director {
  background: transparent;
}
/* Layout principal */
.resumé-and-programmation {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.resumé-section {
  flex: 1;
  min-width: 0;
}

.programmation-section {
  flex: 1;
  min-width: 0;
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 25px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.programmation-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.programmation-title {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.programmation-title svg {
  margin-right: 12px;
  /* fill: var(--selected-bg); */
}

/* Navigation par dates */
.dates-wrapper-container {
  position: relative;
  margin-bottom: 25px;
}

.dates-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
  scroll-behavior: smooth;
}

.dates-wrapper::-webkit-scrollbar {
  display: none;
}

.date-nav-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(70, 77, 95, 0.3);
  border-radius: 8px;
  padding: 12px 15px;
  min-width: 80px;
  cursor: pointer;
  position: relative;
  opacity: 0.8;
  transition: all 0.2s ease;
  line-height: 1;
}

.date-nav-card:hover {
  background: rgba(70, 77, 95, 0.5);
}

.date-nav-card.active {
  background-color: var(--selected-bg);
  color: white;
  opacity: 1;
  transform: scale(1.05);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.2);
}

.date-nav-card:active {
  background-color: var(--selected-bg);
  color: white;
  transform: scale(0.98);
}

.date-nav-card.highlight-click {
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.date-nav-card.active .date-nav-day,
.date-nav-card.active .date-nav-month,
.date-nav-card.active .date-nav-number {
  color: #fff;
  font-weight: 600;
}

.date-nav-card.active .date-nav-number {
  font-weight: bold;
  font-size: 1.2em;
}

.date-nav-month {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 2px;
}

.date-nav-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 5px 0;
}

.date-nav-day {
  font-size: 0.8rem;
  color: var(--light-gray);
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  z-index: 2;
  border: none;
  transition: all 0.3s ease;
}

.nav-arrow:hover {
  background-color: var(--selected-bg);
  color: #1a1f36;
}

.nav-arrow-prev {
  left: -18px;
}

.nav-arrow-next {
  right: -18px;
}

/* Horaires */
.showtimes-container {
  display: none;
  gap: 12px;
  flex-wrap: wrap;
}

.showtimes-container.active {
  display: flex;
}

.showtime-card {
  flex: 0 0 auto;
  width: 120px;
  height: 90px;
  background-color: var(--white);
  color: #1a1f36;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.showtime-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.showtime-hour {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.showtime-version {
  font-size: 0.8rem;
  background: var(--selected-bg);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* Section Résumé */
.resumé-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
}

.resumé-title svg {
  margin-right: 10px;
  fill: var(--selected-bg);
}

.resumé-content {
  font-size: 1rem;
  color: var(--light-gray);
  line-height: 1.7;
  padding: 20px;
  border-radius: 8px;
  backdrop-filter: blur(10px);

  max-height: 170px;       /* correspond à ~2 lignes */
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.resumé-content.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to top, rgba(20,20,20,0.9), rgba(20,20,20,0));
}

.resumé-content.expanded {
  max-height: none; /* tout afficher */
}

.resumé-toggle {
  margin-top: 8px;
  background: none;
  border: 0;
  color: #f60;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
}

/* Films Similaires */
.similar-section {
  margin-top: 40px;
  padding-top: 30px;
  padding-bottom: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.similar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.similar-title {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: #ffffff;
  margin: 0;
}

.similar-title svg {
  margin-right: 12px;
  /* fill: var(--selected-bg); */
}

.similar-nav-arrows {
  display: flex;
  gap: 15px;
}

.similar-nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.similar-nav-arrow:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.similar-nav-arrow svg {
  color: #333;
}

/* Option 1: Grid Layout pour films similaires */
.similar-movies-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

/* Option 2: Swiper pour films similaires */
.similar-movies-swiper {
  width: 100%;
  padding: 10px 0;
}

/* Styles communs pour les cartes de films similaires */
.similar-movie-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.similar-movie-card:hover {
  transform: translateY(-5px);
}

.similar-movie-poster {
  position: relative;
  width: 100%;
  padding-bottom: 150%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.similar-movie-poster img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.similar-movie-card:hover .similar-movie-poster img {
  transform: scale(1.05);
}

.similar-movie-title {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  color: var(--light-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Styles spécifiques pour le Swiper des horaires */
.times-swiper {
  width: 100%;
  height: auto;
  margin: 20px 0;
}

.times-swiper .swiper-wrapper {
  align-items: stretch;
}

.times-swiper .swiper-slide {
  width: 100% !important;
  height: auto;
  padding: 0 10px;
}

.times-swiper .showtimes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px;
  justify-content: flex-start;
  flex-direction: column;
}

/* Navigation Swiper */
.times-swiper .swiper-button-prev,
.times-swiper .swiper-button-next {
  width: 40px;
  height: 40px;
  background-color: rgba(245, 158, 11, 0.8);
  border-radius: 50%;
  color: var(--dark-bg);
  transition: all 0.3s ease;
}

.times-swiper .swiper-button-prev:hover,
.times-swiper .swiper-button-next:hover {
  background-color: var(--selected-bg);
  transform: scale(1.1);
}

.times-swiper .swiper-button-prev::after,
.times-swiper .swiper-button-next::after {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Pagination Swiper */
.times-swiper .swiper-pagination {
  position: relative;
  bottom: auto;
  margin-top: 15px;
}

.times-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

.times-swiper .swiper-pagination-bullet-active {
  background-color: var(--selected-bg);
}

/* Bouton retour */
.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Style pour le sélecteur de ville */
.town-selector {
  margin: 20px 0;
  text-align: center;
}

.town-selector select {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.town-selector select option.no-perfs {
  color: #999;
  font-style: italic;
}

.town-selector select option:disabled {
  color: #ccc;
  background-color: #f5f5f5;
}

.town-info {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 18px;
  color: #333;
}

/* Badge pour les villes sur les cartes de performances */
.town-badge {
  display: inline-block;
  padding: 3px 8px;
  background-color: #f5f5f5;
  color: #333;
  border-radius: 12px;
  font-size: 12px;
  margin-right: 8px;
}

/* Dates avec disponibilités par ville */
.date-nav-card.hidden-date {
  display: none !important;
  opacity: 0.3;
}

/* Cette règle s'applique aux cartes avec la classe has-town-1 (représentant la ville de Signes)
   Elle crée une bordure gauche de 3px d'épaisseur en vert (#4caf50) */
/* .date-nav-card.has-town-1 { */
/* Signes */
/* border-left: 3px solid #4caf50;
} */

/* Cette règle s'applique aux cartes avec la classe has-town-2 (représentant la ville de Riboux)
   Elle crée une bordure gauche de 3px d'épaisseur en bleu (#2196f3) */
/* .date-nav-card.has-town-2 { */
/* Riboux */
/* border-left: 3px solid #2196f3;
} */

/* Message quand pas de séances */
.no-showtimes-msg {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
  display: none; /* caché par défaut */
}

/* Indicateur de cinéma */
.cinema-indicator {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  z-index: 1000;
}

/* Responsive */
@media (max-width: 1024px) {
  .resumé-and-programmation {
    flex-direction: column;
  }

  .resumé-section,
  .programmation-section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .movie-header {
    flex-direction: column;
  }

  .movie-poster {
    width: 180px;
    margin: 0 auto 25px;
  }

  .movie-details {
    margin-left: 0;
    text-align: center;
  }

  .movie-features {
    justify-content: center;
  }

  .date-nav-card {
    min-width: 70px;
    padding: 10px;
  }

  .showtime-card {
    width: 110px;
    height: 80px;
  }

  .similar-movies-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  .times-swiper .swiper-slide {
    padding: 0 5px;
  }

  .times-swiper .showtimes-container {
    gap: 8px;
  }

  .times-swiper .swiper-button-prev,
  .times-swiper .swiper-button-next {
    width: 30px;
    height: 30px;
  }

  .times-swiper .swiper-button-prev::after,
  .times-swiper .swiper-button-next::after {
    font-size: 1rem;
  }

  .back-button {
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .movie-title {
    font-size: 1.2rem;
  }

  .movie-banner {
    height: 500px;
  }

  .movie-container {
    margin-top: -570px;
  }

  .date-nav-card {
    min-width: 60px;
    padding: 8px;
    height: auto;
    font-size: 0.8rem;
  }

  .date-nav-number {
    font-size: 1.2rem;
  }

  .showtime-card {
    width: 100px;
    height: 75px;
  }

  .showtime-hour {
    font-size: 1.1rem;
  }

  .similar-movies-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Style pour l'affichage des horaires */
.showtimes-container {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
}

.town-header {
  margin-bottom: 10px;
}

.town-name {
  font-weight: bold;
  color: var(--selected-bg);
  font-size: 1.1rem;
}

.showtimes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.showtime-card {
  background: rgba(255, 255, 255, 0.9);
  color: #1a1f36;
  border-radius: 5px;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.showtime-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.showtime-hour {
  font-weight: bold;
  font-size: 1.1rem;
}

.showtime-version {
  font-size: 0.8rem;
  background: var(--selected-bg);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 3px;
  font-weight: 600;
}
