/* ============================================================
   SÉRIES TV — Page liste
   Réutilise les classes .film-* pour cohérence avec Film
   ============================================================ */

.film-affiches-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 190px));
  gap: 22px;
  justify-content: center;
  justify-items: center;
  align-items: start;
  width: 100%;
  margin: 0 auto;
}

.film-affiche-link {
  width: 190px !important;
  max-width: 190px !important;
  flex: 0 0 auto !important;
  text-decoration: none;
}

.film-affiche {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.film-affiche:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.film-affiche img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}

.film-affiche h3 {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 8px;
  margin: 0;
  background: #fafafa;
  color: #1e1b4b;
  border-top: 1px solid #eee;
}

/* ============================================================
   RECHERCHE
   ============================================================ */

.film-search {
  position: relative;
}

#serie-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;
}

/* ============================================================
   BOUTON RETOUR
   ============================================================ */

.back-link {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding: 32px 16px;
}

.back-link .btn-etape {
  padding: 12px 28px !important;
  border-radius: 10px !important;
  border: none !important;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link .btn-etape:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  filter: brightness(1.05);
}

.back-link .btn-etape:active {
  transform: translateY(0);
}

/* ============================================================
   DEBUG SQL
   ============================================================ */

.debug-sql {
  margin: 10px 0 0;
  font-size: 12px;
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 10px;
  border-radius: 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 520px) {
  .film-affiches-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 150px));
  }

  .film-affiche-link {
    width: 150px !important;
    max-width: 150px !important;
  }
}
