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

.rb {
  font-family: 'Roboto', sans-serif;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ✅ Container principal (en dessous de la navbar) */
.ctn {
  position: relative;
  z-index: 1010; /* au-dessus de l'ombre mais en dessous de navbar */
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  padding-top: 100px; /* Espace pour éviter que le contenu passe sous la navbar */
}

body {
  background-color: #0a0a0a; /* noir profond */
  background-image:
    radial-gradient(circle at 15% 30%, rgba(97, 0, 0, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(220, 20, 60, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(110, 22, 22, 0.12) 0%, transparent 50%),
    url('https://cinepulse.to/assets/pipes-D68q0iVI.svg');
  color: white;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem 4rem;
  overflow-x: hidden;
}

img.logo-top10 {
  width: 80px;
  margin-bottom: 1rem;
  user-select: none;
  filter: drop-shadow(0 0 5px #d53737aa);
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-align: center;
}

.subtitle {
  color: #d53737;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Boutons toggle */
.toggle-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.toggle-button {
  cursor: pointer;
  padding: 0.6rem 1.6rem;
  font-weight: 600;
  border-radius: 8px;
  background-color: #1e1e1e;
  color: white;
  box-shadow: inset 0 0 0 1px #444;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
}

.toggle-button.active {
  background-color: #ff0000;
  box-shadow: 0 0 8px #d53737aa;
}

/* Grille 2×5 */
.movies-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  width: 100%;
  max-width: 1200px;
  padding-bottom: 1rem;
}

.movie-card {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px #000;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #1e1e1e;
}

.movie-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #d53737cc;
  z-index: 5;
}

.movie-poster {
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

/* Numéro stylisé */
.movie-number {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 2px #8f00005d;
  text-shadow:
    0 0 10px #d53737,
    0 0 8px #000;
}

/* Titre sous l’affiche */
.movie-title {
  padding: 0.6rem 0.8rem;
  font-weight: 600;
  font-size: 1rem;
  color: #f5f5f5;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: #2a2a2a;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 1000px) {
  .movies-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .movies-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .movies-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .movies-container {
    grid-template-columns: repeat(1, 1fr);
  }
}