/* =========================================================
   PAGE MOVIES
   Cette feuille de style est spécifique à movies.html
   ========================================================= */

.movies-page{
  background:#0b0f1a;
  color:#ffffff;
  font-family:Arial, Helvetica, sans-serif;
}

/* Conteneur centré */
.movies-page .container{
  max-width:1400px;
  margin:0 auto;
  padding:0 20px;
}

/* =========================================================
   HEADER / MENU
   Même base que la home, avec search bar intégrée
   ========================================================= */

.movies-page .header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(11,15,26,0.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.movies-page .nav-container{
  min-height:72px;
  display:flex;
  align-items:center;
  gap:18px;
}

.movies-page .logo img{
  height:52px;
  display:block;
}

/* Search bar dans le header */
.movies-page .header-search{
  flex:1;
  max-width:460px;
  position:relative;
}

.movies-page .header-search input{
  width:100%;
  height:44px;
  border:none;
  outline:none;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  color:#ffffff;
  padding:0 16px 0 46px;
  font-size:14px;
}

.movies-page .header-search input::placeholder{
  color:rgba(255,255,255,0.62);
}

.movies-page .header-search-icon{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  opacity:0.75;
}

/* Menu */
.movies-page .nav-links{
  display:flex;
  align-items:center;
  gap:26px;
  margin-left:auto;
}

.movies-page .nav-links a{
  color:#e9e9e9;
  text-decoration:none;
  font-size:14px;
  transition:0.2s ease;
}

.movies-page .nav-links a:hover{
  color:#ff7a18;
}

/* Dropdown */
.movies-page .dropdown{
  position:relative;
}

.movies-page .dropdown-menu{
  display:none;
  position:absolute;
  top:30px;
  left:0;
  min-width:180px;
  padding:10px;
  background:#161b2a;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,0.35);
}

.movies-page .dropdown-menu a{
  display:block;
  padding:8px 10px;
  border-radius:8px;
}

.movies-page .dropdown-menu a:hover{
  background:rgba(255,255,255,0.06);
}

.movies-page .dropdown:hover .dropdown-menu{
  display:block;
}

/* Hamburger */
.movies-page .hamburger{
  display:none;
  cursor:pointer;
  margin-left:auto;
}

.movies-page .hamburger img{
  width:24px;
  height:24px;
  display:block;
}

/* =========================================================
   ENTÊTE DE PAGE
   ========================================================= */

.movies-page .movies-page-content{
  padding-top:28px;
  padding-bottom:50px;
}

.movies-page .page-head{
  margin-bottom:24px;
}

.movies-page .page-head h1{
  font-size:26px;
  margin-bottom:8px;
}

.movies-page .page-head p{
  color:rgba(255,255,255,0.65);
  font-size:14px;
}

/* =========================================================
   FILTRES
   ========================================================= */

.movies-page .filters{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-bottom:28px;
}

.movies-page .filter-row{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:12px;
  align-items:start;
}

.movies-page .filter-title{
  color:rgba(255,255,255,0.7);
  font-size:14px;
  padding-top:8px;
}

.movies-page .filter-options{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.movies-page .filter-options button{
  border:none;
  outline:none;
  cursor:pointer;
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  color:#d8d8d8;
  background:rgba(255,255,255,0.06);
  transition:0.2s ease;
}

.movies-page .filter-options button:hover{
  background:rgba(255,255,255,0.12);
}

.movies-page .filter-options button.active{
  background:#ff7a18;
  color:#ffffff;
  box-shadow:0 8px 20px rgba(255,122,24,0.28);
}

/* =========================================================
   GRID FILMS
   7 films sur PC
   3 films sur mobile
   ========================================================= */

.movies-page .movies-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:16px;
}

.movies-page .movie-card{
  background:#121826;
  border-radius:14px;
  overflow:hidden;
  cursor:pointer;
  transition:transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow:0 10px 25px rgba(0,0,0,0.18);
}

.movies-page .movie-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 35px rgba(0,0,0,0.35);
}

.movies-page .movie-poster-wrap{
  position:relative;
  overflow:hidden;
}

.movies-page .movie-card img{
  width:100%;
  aspect-ratio:2/3;
  object-fit:cover;
  display:block;
}

/* Badge année */
.movies-page .movie-year{
  position:absolute;
  top:10px;
  left:10px;
  background:#21c06b;
  color:#ffffff;
  font-size:12px;
  font-weight:bold;
  padding:4px 8px;
  border-radius:8px;
}

/* Badge rating */
.movies-page .movie-rating{
  position:absolute;
  right:10px;
  bottom:10px;
  background:rgba(0,0,0,0.55);
  color:#ffd966;
  font-size:12px;
  font-weight:bold;
  padding:4px 8px;
  border-radius:8px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

.movies-page .movie-info{
  padding:10px 10px 12px;
}

.movies-page .movie-title{
  font-size:13px;
  line-height:1.35;
  color:#f0f0f0;
  min-height:34px;
}

/* Aucun résultat */
.movies-page .empty-state{
  margin-top:20px;
  padding:18px;
  text-align:center;
  border-radius:14px;
  background:rgba(255,255,255,0.05);
  color:rgba(255,255,255,0.72);
}

/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width:1100px){
  .movies-page .movies-grid{
    grid-template-columns:repeat(5, minmax(0, 1fr));
  }
}

/* =========================================================
   MOBILE
   Search bar toujours visible
   Filtres mobile-friendly
   ========================================================= */

@media (max-width:768px){

  .movies-page .nav-container{
    flex-wrap:wrap;
    gap:12px;
    padding:12px 0;
  }

  .movies-page .logo{
    order:1;
  }

  .movies-page .hamburger{
    display:flex;
    order:2;
  }

  /* Search bar visible aussi sur mobile */
  .movies-page .header-search{
    order:3;
    flex:0 0 100%;
    max-width:none;
  }

  /* Menu hamburger */
  .movies-page .nav-links{
    display:none;
    order:4;
    width:100%;
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
    margin-left:0;
    padding:6px 0 2px;
  }

  .movies-page .nav-links.show{
    display:flex;
  }

  /* Le dropdown reste lisible sur mobile */
  .movies-page .dropdown{
    width:100%;
  }

  .movies-page .dropdown-menu{
    position:static;
    display:flex;
    flex-direction:column;
    background:transparent;
    border:none;
    box-shadow:none;
    padding:8px 0 0 16px;
  }

  /* Filtres mobile-friendly */
  .movies-page .filter-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .movies-page .filter-title{
    padding-top:0;
  }

  /* Chaque ligne de filtres scroll horizontal sur mobile */
  .movies-page .filter-options{
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:4px;
    -ms-overflow-style:none;
    scrollbar-width:none;
  }

  .movies-page .filter-options::-webkit-scrollbar{
    display:none;
  }

  .movies-page .filter-options button{
    white-space:nowrap;
    flex:0 0 auto;
  }

  /* 3 films par ligne sur mobile */
  .movies-page .movies-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
  }

  .movies-page .movie-title{
    font-size:12px;
    min-height:32px;
  }

  .movies-page .page-head h1{
    font-size:22px;
  }
}

/* Menu : garder le sous-menu visible au hover sur parent ou sur le menu */
.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1b1d2a;
  padding: 10px;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: opacity 0.2s ease;
  z-index: 1000;
}

/* Ici la correction clé */
.nav-links .dropdown:hover .dropdown-menu,
.nav-links .dropdown-menu:hover {
  display: flex;
  flex-direction: column;
}

.nav-links .dropdown-menu a {
  display: block;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-links .dropdown-menu a:hover {
  background: rgba(255,107,0,0.1);
}