/* =====================================================
   trailers-page.css — Page dédiée Bandes-annonces
   Regarde Movie
===================================================== */

/* =====================================================
   HERO
===================================================== */
.tp-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  margin-top: 64px; /* header fixe */
}

.tp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: blur(2px) brightness(0.45);
  transform: scale(1.04);
  transition: background-image 0.8s ease;
}

.tp-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.85) 80%,
    var(--bg-main) 100%
  );
}

.tp-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 32px 24px;
}

.tp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.tp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 2px;
  color: #fff;
  line-height: 1;
  margin-bottom: 10px;
}
.tp-hero-title span { color: var(--accent); }

.tp-hero-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}

/* Featured trailer dans le hero */
.tp-hero-featured {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tp-featured-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
  padding-left: 3px;
}
.tp-featured-play:hover { transform: scale(1.1); background: #c00; }

.tp-featured-info { color: #fff; }
.tp-featured-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 3px;
}
.tp-featured-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Skeleton featured */
.tp-featured-skeleton { display: flex; flex-direction: column; gap: 8px; }
.tp-sk-line {
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  animation: tp-pulse 1.4s ease infinite;
}
@keyframes tp-pulse { 0%,100%{opacity:.4} 50%{opacity:.8} }

/* Stats hero */
.tp-hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}

.tp-stat {
  flex: 1;
  padding: 14px 24px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.tp-stat:last-child { border-right: none; }

.tp-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 1px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 2px;
}
.tp-stat-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* =====================================================
   TOOLBAR
===================================================== */
.tp-toolbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tp-filters-wrap { flex: 1; min-width: 0; }
.tp-filters { display: flex; gap: 6px; flex-wrap: wrap; }

/* Réutilise .trailer-filter-btn de trailers.css */

.tp-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 7px 16px;
  flex-shrink: 0;
}
.tp-search-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.tp-search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  width: 160px;
}

/* =====================================================
   GRILLE PRINCIPALE
===================================================== */
.tp-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.tp-section { padding-top: 24px; }

/* Override trailers.css : mode grille au lieu de scroll horizontal */
.tp-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  overflow-x: unset !important;
  padding-bottom: 0 !important;
  flex-direction: unset !important;
}

/* Les cards dans la grille prennent toute la largeur */
.tp-grid .trailer-card {
  flex: unset !important;
  min-width: unset !important;
  max-width: unset !important;
  width: 100%;
}

.tp-grid-wrap { position: relative; }

/* Masquer la scrollbar custom sur la grille principale */
.tp-grid-wrap .trailer-scrollbar-track { display: none; }

/* Bouton charger plus */
.tp-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.tp-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.tp-load-more-btn:hover { border-color: var(--accent); transform: translateY(-2px); }

/* =====================================================
   SPOTLIGHT
===================================================== */
.tp-spotlight {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.tp-spotlight-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.tp-spotlight-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tp-spotlight-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-left: 4px;
}

.tp-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Card spotlight — plus grande avec overlay titre */
.tp-spotlight-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  background: var(--bg-surface);
}
.tp-spotlight-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.tp-spotlight-card:hover img { transform: scale(1.06); }

.tp-spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  transition: background .25s;
}
.tp-spotlight-card:hover .tp-spotlight-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.3) 60%);
}

.tp-spotlight-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(229,9,20,0.88);
  border: 2px solid rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  padding-left: 3px;
}
.tp-spotlight-card:hover .tp-spotlight-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.tp-spotlight-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}
.tp-spotlight-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tp-spotlight-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
}
.tp-spotlight-sub-title {
  font-size: 0.68rem;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================
   SECTION SÉRIES
===================================================== */
.tp-series-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  position: relative;
}

.tp-series-header {
  margin-bottom: 20px;
}
.tp-series-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grille séries — scroll horizontal */
.tp-series-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.tp-series-grid::-webkit-scrollbar { display: none; }

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
  .tp-hero-content { padding: 40px 24px 20px; }
  .tp-main { padding: 0 24px 60px; }
  .tp-toolbar { padding: 16px 24px 0; }
  .tp-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .tp-spotlight-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

@media (max-width: 640px) {
  .tp-hero { min-height: 300px; }
  .tp-hero-title { font-size: 2rem; }
  .tp-hero-stats { flex-wrap: wrap; }
  .tp-stat { flex: 1 1 33%; padding: 10px 12px; }
  .tp-toolbar { flex-direction: column; align-items: stretch; }
  .tp-search-wrap input { width: 100%; }
  .tp-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tp-spotlight-grid { grid-template-columns: 1fr; }
  .tp-main { padding: 0 16px 60px; }
  .tp-toolbar { padding: 14px 16px 0; }
}
