* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}
    
#genre-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

#genre-filter button {
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f5f5f5;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

#reset-filters {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background-color: #ff7300;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.mbtn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background-color: hsl(0, 100%, 50%);
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

#genre-filter button:hover {
  background-color: #e0e0e0;
  border-color: #aaa;
}

#genre-filter button.active {
  background-color: #e50914; /* couleur du bouton actif */
  border-color: #e50914;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


.back-button {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: #e50914;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

body {
  background-color: #0f0f0f;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden; /* Empêche le débordement horizontal global */
}

.c-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: transparent;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  max-width: 100%; /* Assure que la nav ne dépasse pas */
}

.c-logo {
  display: flex;
  align-items: center;
}

.c-logo img {
  height: 100px;
  width: auto;
  max-width: 100%; /* Image responsive */
}

.cnav {
  display: flex;
}

.cnav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  flex-wrap: wrap; /* Permet de passer à la ligne si nécessaire */
}

.cnav li {
  margin: 0;
}

.cnav a {
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap; /* Empêche le texte de se casser */
}

.cnav a:hover {
  color: #e50914;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  width: 100%; /* Assure que le conteneur prend toute la largeur disponible */
}

header {
  text-align: center;
  width: 100%;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #e50914;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #aaa;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap; /* Permet de passer à la ligne sur mobile */
}

.stat-item {
  text-align: center;
  min-width: 120px; /* Évite un écrasement des éléments */
}

.stat-number {
  font-size: 1.2rem;
  color: #e50914;
  font-weight: bold;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e50914, transparent);
  margin: 5px 0;
  width: 100%;
}

.search-container {
  text-align: center;
  margin: 10px 0;
  width: 100%;
}

.search-box {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #333;
  border-radius: 30px;
  background-color: #1a1a1a;
  width: 100%;
  max-width: 500px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  padding: 5px;
  outline: none;
  width: 100%; /* Assure que l'input prend toute la largeur disponible */
}

.search-box input::placeholder {
  color: #666;
}

.search-icon {
  color: #666;
  margin-right: 10px;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
  margin-bottom: 40px;
  width: 100%;
}

.movie-card {
  background-color: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  width:95%;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

.movie-image {
  width: 100%;
  /* height: 350px; */
  overflow: hidden;
  position: relative;
}

.movie-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.movie-header {
  padding: 15px;
  background-color: #222;
  border-bottom: 1px solid #333;
}

.movie-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-info {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.movie-details {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 0px;
}

.highlight {
  color: #e50914;
  font-weight: bold;
}

.movie-description {
  font-size: 0.85rem;
  color: #888;
}

.release-info {
  text-align: center;
  margin: 40px 0;
  padding: 20px;
  background: linear-gradient(90deg, transparent, #1a1a1a, transparent);
  width: 100%;
}

.release-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #e50914;
  margin-bottom: 10px;
}

.release-date {
  font-size: 1.1rem;
  color: #aaa;
}

footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #666;
  border-top: 1px solid #333;
  width: 100%;
}

.pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  gap: 10px;
  flex-wrap: wrap; /* Permet de passer à la ligne si nécessaire */
  width: 100%;
}

.pagination button {
  padding: 8px 15px;
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background-color: #e50914;
  border-color: #e50914;
}

.pagination button.active {
  background-color: #e50914;
  border-color: #e50914;
  font-weight: bold;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #aaa;
  font-style: italic;
  grid-column: 1 / -1;
}

.error {
  text-align: center;
  padding: 40px;
  color: #e50914;
  background-color: #1a1a1a;
  border-radius: 8px;
  margin: 20px 0;
  grid-column: 1 / -1;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #222;
  color: #666;
  font-size: 0.9rem;
  text-align: center;
  height: 100%;
  padding: 20px;
}

.search-info {
  text-align: center;
  margin-bottom: 20px;
  color: #aaa;
  width: 100%;
}

.clear-search {
  display: inline-block;
  margin-left: 10px;
  padding: 5px 10px;
  background-color: #333;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.clear-search:hover {
  background-color: #e50914;
}

/* Version responsive pour mobile */
@media (max-width: 768px) {
  .c-nav {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .cnav ul {
    gap: 1rem;
    justify-content: center;
  }
  
  .cnav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .movie-image {
    height: 280px;
  }
  
  .stats {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .movies-grid {
    grid-template-columns: 1fr;
  }
  
  .stats {
    gap: 10px;
  }
  
  .pagination {
    gap: 5px;
  }
  
  .pagination button {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  
  .container {
    padding: 10px;
  }
}

.notification {
    position: fixed;
    bottom: 40px;
    right: 20px;
    padding: 15px 25px;
    background-color: #e50914;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.add-button {
  background-color: #e50914;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-button:hover {
  background-color: #d40813;
}

.is_nouveaute {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 20px;
}

.slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
}


.slidesdessin {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slide {
  min-width: 200px;
  margin-right: 10px;
  flex-shrink: 0;
}

.slide .movie-card {
  width: 200px;
}

@media (max-width: 600px) {
  .slide .movie-card {
    width: 150px;
  }
}
