/* -------- Responsive -------- */

/* Grands écrans (jusqu'à 1200px) */
@media (max-width: 1200px) {
  nav {
    gap: 20px;
  }
  .banner {
    height: 350px;
  }
  .banner-track img {
    height: 350px;
  }
  .card {
    min-width: 180px;
  }
  .card img {
    height: 250px;
  }
}

/* Tablettes (jusqu'à 992px) */
@media (max-width: 992px) {
  header {
    padding: 10px 20px;
  }
  .logo-text {
    font-size: 1.6rem;
  }
  nav {
    display: none; /* On cache le menu horizontal */
  }
  .menu-button {
    display: block; /* On affiche le bouton menu burger */
  }
  .right-navbar {
    width: 180px;
  }
  .banner {
    height: 300px;
  }
  .banner-track img {
    height: 300px;
  }
  .card {
    min-width: 160px;
  }
  .card img {
    height: 220px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Mobiles (jusqu'à 768px) */
@media (max-width: 768px) {
  .logo-text {
    font-size: 1.4rem;
  }
  .search-icon {
    margin-left: 10px;
  }
  #searchInput.active {
    width: 140px;
  }
  .banner {
    height: 250px;
  }
  .banner-track img {
    height: 250px;
  }
  .card {
    min-width: 140px;
  }
  .card img {
    height: 200px;
  }
  .footer-links, .footer-social {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Petits mobiles (jusqu'à 576px) */
@media (max-width: 576px) {
  header {
    padding: 8px 15px;
  }
  .logo-container img {
    height: 30px;
  }
  .logo-text {
    font-size: 1.2rem;
  }
  .login-container .login-btn {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  .right-navbar {
    width: 160px;
  }
  .banner {
    height: 200px;
  }
  .banner-track img {
    height: 200px;
  }
  .card {
    min-width: 120px;
  }
  .card img {
    height: 180px;
  }
  .footer {
    font-size: 0.8rem;
    padding: 30px 10px 10px;
  }
}

/* Reset et bases */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #1a0d00; /* Fond sombre orange */
    color: #f8f8f2; /* Blanc cassé */
}

/* Compensation du header fixe */
main {
    padding-top: 80px; /* hauteur approximative du header */
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  background-color: #331a00;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-container img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: #ff9800; /* Orange vif */
}

/* Menu centré */
nav {
  display: flex;
  gap: 30px;
  flex: 1;
  justify-content: center; /* centre horizontalement */
}

nav a {
  text-decoration: none;
  color: #f8f8f2;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ff9800;
}

/* Recherche */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    font-size: 1.6rem;
    color: #ff9800;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: 20px;
}

.search-icon:hover {
    color: #ffa733;
}

#searchInput {
    width: 0;
    opacity: 0;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 5px;
    border: none;
    background-color: #333;
    color: #fff;
    transition: width 0.4s ease, opacity 0.4s ease;
    font-size: 1rem;
}

#searchInput.active {
    width: 180px;
    opacity: 1;
}

/* Bouton Connexion */
.login-container .login-btn {
    padding: 8px 15px;
    background-color: #ff9800;
    color: #1a0d00;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.login-container .login-btn:hover {
    background-color: #ffa733;
}

/* Banderole défilante */
.banner {
    margin-top: 80px; /* pour ne pas être sous le header */
    overflow: hidden;
    width: 100%;
    height: 400px;
    position: relative;
}

.banner-track {
    display: flex;
    width: max-content;
    animation: bannerScroll 80s linear infinite;
}

.banner-track img {
    height: 400px;
    width: calc(400px * 0.5625); /* 16:9 ratio */
    object-fit: cover;
    border-radius: 8px;
    margin-right: 0;
}

@keyframes bannerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Carrousels */
.carousel {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

/* Hide scrollbar (optionnel) */
.carousel-track::-webkit-scrollbar {
    display: none;
}
.carousel-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Cartes films/séries/direct */
.card {
    min-width: 200px;
    margin: 0 10px;
    background-color: #331a00;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #ff9800;
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.card h3 {
    text-align: center;
    padding: 8px 5px;
    color: #ff9800;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* --- NAV BAR DROITE --- */

.right-navbar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 220px;
    background-color: #331a00;
    box-shadow: -2px 0 5px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Pour sous le header */
    z-index: 1100;
}

.right-navbar a {
    color: #f8f8f2;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 15px 25px;
    border-bottom: 1px solid #4b2e00;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.right-navbar a:hover {
    background-color: #ff9800;
    color: #1a0d00;
}

/* Bouton menu */
.menu-button {
    position: fixed;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: #ff9800;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1200;
    transition: color 0.3s ease;
}

.menu-button:hover {
    color: #ffa733;
}

.footer {
  background-color: #1a0d00;
  color: #fff;
  padding: 40px 20px 20px;
  margin-top: 60px;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  height: 40px;
}

.footer-links a {
  color: #ff9800;
  margin-right: 15px;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-social a {
  color: #fff;
  margin-left: 10px;
  font-size: 1.2rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  color: #ccc;
  font-size: 0.8rem;
  border-top: 1px solid #333;
  padding-top: 10px;
}
