/* === Global Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: black;
  color: white;
  overflow: hidden;
  height: 100vh;
  position: relative; /* nécessaire pour le pseudo-élément animé */
}

/* === Arrière-plan animé === */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: 
    linear-gradient(60deg, transparent 90%, red 75%) 0 0,
    linear-gradient(-60deg, transparent 90%, red 75%) 0 0;
  background-size: 25px 25px;
  z-index: -1;
  pointer-events: none;
  animation: moveDiagonally 30s linear infinite;
}

@keyframes moveDiagonally {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

/* === Logo + Bouton Aide === */
.logo-container {
  position: fixed;
  top: 20px; right: 35px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  pointer-events: auto;
}

.logo {
  width: 80px;
  height: auto;
}

.help-btn {
  background-color: white;
  color: black;
  width: 40px;   /* carré assez grand pour "Aide ?" */
  height: 40px;
  border: none;
  border-radius: 10; /* carré strict */
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;              /* pour centrer le texte */
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.help-btn:hover {
  background-color: #ddd; /* effet visible au survol */
}

/* === Écran d'aide === */
#help-screen {
  background-color: white;
  color: black;
  height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 20; /* au-dessus du fond animé */
}

.help-content h2 {
  margin-bottom: 15px;
}

.help-content p {
  font-size: 16px;
  line-height: 1.5;
  white-space: normal; /* assure que <br> est respecté */
}

/* === Intro Screen === */
.intro-screen {
  background: linear-gradient(to right, black, white, red, white, black);
  width: 100%; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-logo {
  width: 375px;
  animation: fadeInZoom 1.2s ease-in-out;
}

@keyframes fadeInZoom {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}

/* === Home Screen === */
#home-screen {
  padding: 20px;
  overflow-y: auto;
  height: 100vh;
  position: relative;
  z-index: 5;
}

#search {
  width: 100%;
  max-width: 200px;
  padding: 10px;
  font-size: 15px;
  border-radius: 7px;
  border: 2px solid red;
  margin-bottom: 10px;
  margin-top: 20px; /* décale vers le bas */
  background-color: white;
  color: black;
}
h3 {
  margin-top: 40px;
  margin-bottom: 10px;
  font-size: 30px;
}

/* === Carousel === */
.carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  padding-bottom: 10px;
}

.serie-card {
  min-width: 150px;;
  cursor: pointer;
  transition: transform 0.1s;
}

.serie-card:hover { transform: scale(1.1); }

.serie-card img {
  width: 100%;
  height: 240px;
  border-radius: 20px;
  object-fit: cover;
}

.serie-card p {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  border: 1px solid white;
}

/* === Series Menu, Episodes, Seasons === */
#series-menu,
#episode-list,
#season-list,
#video-player {
  padding: 20px;
  height: 100vh;
  overflow-y: auto;
  position: relative;
}

/* Fond flouté générique */
.series-background {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: 0;
}

/* Flou spécifique par écran */
#series-menu .series-background { filter: blur(2px); }
#season-list .series-background { filter: blur(9px); }

.series-content,
.season-content {
  position: relative;
  z-index: 2; /* contenu au-dessus du fond flouté */
}

/* === Boutons === */
button {
  background-color: #e50914;
  color: white;
  padding: 12px 20px;
  margin: 10px 5px 10px 0;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover { background-color: #f40612; }

.btn-retour {
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 3px;
  background-color: #555;
}

.btn-retour:hover { background-color: #777; }

/* === Rating === */
.rating-container { margin-top: 20px; font-size: 14px; }
.rating-label { margin-right: 50px; }

.stars span {
  font-size: 20px;
  color: #777;
  cursor: pointer;
  transition: color 0.2s;
}

.stars span:hover,
.stars span.active { color: gold; }

/* === Episodes & Seasons Buttons === */
#episodes-container button,
#seasons-container button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
  background-color: #333;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

#seasons-container button:hover {
  background-color: #e50914;
  color: white;
  transform: scale(1.02);
}

/* === Video Player === */
#video-player video {
  width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  background-color: black;
  margin-bottom: 15px;
}

/* === Utilitaires === */
.hidden { display: none !important; }
