* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: #0b0b0b; color: #ffffff; font-family: 'Helvetica Neue', Arial, sans-serif; overflow-x: hidden; }

/* NAVBAR */
.navbar { position: fixed; top: 0; width: 100%; padding: 15px 4%; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%); z-index: 100; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.logo { font-family: 'Montserrat', sans-serif; color: #e50914; font-size: 28px; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.logo-sub { font-size: 10px; color: #b3b3b3; letter-spacing: 3px; text-transform: uppercase; margin-top: -5px; font-block: block; }

/* PROFIL BADGE IN NAVBAR */
.profile-badge { display: flex; align-items: center; gap: 8px; cursor: pointer; background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 4px; }
.profile-badge img { width: 28px; height: 28px; border-radius: 4px; }
.profile-badge span { font-size: 0.85rem; font-weight: bold; }

/* PROFILES OVERLAY (NETFLIX "QUI REGARDE ?") */
.profile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #141414; z-index: 2000; display: flex; justify-content: center; align-items: center; }
.profile-container { text-align: center; }
.profile-container h1 { font-size: 3.5rem; margin-bottom: 40px; }
.profiles-grid { display: flex; gap: 25px; justify-content: center; margin-bottom: 30px; }
.profile-card { display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.2s; }
.profile-card:hover { transform: scale(1.08); }
.profile-card img { width: 120px; height: 120px; border-radius: 8px; margin-bottom: 10px; border: 2px solid transparent; }
.profile-card:hover img { border-color: #fff; }
.profile-card span { color: #808080; font-size: 1.1rem; }
.profile-card:hover span { color: #fff; }
.profile-add-btn { background: transparent; border: 1px solid #808080; color: #808080; padding: 8px 20px; cursor: pointer; font-size: 1rem; }

/* PRIME BADGE & HERO BANNER */
.hero { position: relative; height: 80vh; background-size: cover; background-position: center top; display: flex; align-items: center; padding-left: 4%; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(11, 11, 11, 0.9) 0%, rgba(11, 11, 11, 0.1) 50%, rgba(11, 11, 11, 0) 100%), linear-gradient(to top, #0b0b0b 0%, transparent 30%); }
.hero-content { position: relative; z-index: 10; max-width: 650px; }
.prime-badge { display: inline-block; background: #00a8e1; color: white; font-weight: bold; font-size: 0.75rem; padding: 3px 8px; border-radius: 3px; margin-bottom: 10px; text-transform: uppercase; }
.hero-content h1 { font-size: 3.2rem; font-weight: bold; margin-bottom: 15px; }
.play-btn { padding: 12px 28px; font-size: 1.1rem; font-weight: bold; border-radius: 4px; background: #ffffff; color: #000; border: none; cursor: pointer; transition: background 0.2s; }
.play-btn:hover { background: #e6e6e6; }

/* RECHERCHE */
.search-container { position: relative; width: 280px; }
.search-input-wrapper { display: flex; align-items: center; background: rgba(0,0,0,0.75); border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; padding: 6px 10px; }
#searchInput { background: transparent; border: none; color: white; width: 100%; outline: none; margin-left: 8px; }
.search-dropdown { position: absolute; top: 110%; left: 0; width: 100%; background: #141414; border: 1px solid #333; border-radius: 6px; max-height: 400px; overflow-y: auto; z-index: 105; }
.search-suggestion-item { display: flex; gap: 10px; padding: 8px; cursor: pointer; border-bottom: 1px solid #222; }
.search-suggestion-img { width: 40px; height: 60px; object-fit: cover; border-radius: 4px; }
.search-suggestion-title { font-size: 0.9rem; font-weight: bold; }

/* GENRE BAR */
.genre-bar { display: flex; gap: 10px; padding: 20px 4%; overflow-x: auto; background: #0b0b0b; }
.genre-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 6px 16px; border-radius: 20px; cursor: pointer; white-space: nowrap; }
.genre-btn.active { background: #e50914; border-color: #e50914; }

/* CAROUSEL CARDS */
main { padding: 0 4%; }
.carousel-section { margin-bottom: 35px; }
.carousel-section h2 { font-size: 1.3rem; margin-bottom: 12px; }
.carousel { display: flex; gap: 12px; overflow-x: auto; padding: 10px 0; }
.carousel::-webkit-scrollbar { display: none; }
.media-card-wrapper { flex: 0 0 calc(100% / 6); min-width: 150px; position: relative; cursor: pointer; transition: transform 0.3s; }
.media-card-wrapper:hover { transform: scale(1.06); z-index: 10; }
.movie-card { width: 100%; border-radius: 4px; display: block; }

/* MA LISTE (GRILLE ET CARTE COMPLETE) */
.rich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.rich-card { background: #181818; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #282828; cursor: pointer; }
.rich-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.rich-card-details { padding: 12px; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; flex-grow: 1; }
.rich-card-title { font-weight: bold; font-size: 0.95rem; }
.rich-card-actions { display: flex; gap: 8px; }
.play-sm-btn { background: #fff; color: #000; border: none; padding: 6px 12px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.8rem; }
.remove-btn { background: rgba(255,255,255,0.1); color: #ff4d4d; border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }

/* MODALE ET LECTEUR */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; display: flex; justify-content: center; align-items: center; }
.modal-content { background: #181818; width: 90%; max-width: 700px; border-radius: 8px; overflow: hidden; position: relative; }
.modal-backdrop { height: 320px; background-size: cover; background-position: center top; }
.modal-info { padding: 20px 25px; }
.modal-meta { display: flex; gap: 12px; align-items: center; margin: 10px 0; font-size: 0.9rem; }
.match-score { color: #46d369; font-weight: bold; }
.quality-badge { border: 1px solid #aaa; font-size: 0.7rem; padding: 1px 4px; border-radius: 2px; }
.modal-actions { display: flex; gap: 10px; margin-top: 15px; }
.secondary-btn { background: rgba(109,109,110,0.7); color: white; border: none; padding: 10px 20px; border-radius: 4px; font-weight: bold; cursor: pointer; }

#playerSection { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.player-wrapper { width: 90%; max-width: 1100px; }
.video-container { position: relative; width: 100%; aspect-ratio: 16/9; background: #111; }
#iframePlayer { width: 100%; height: 100%; border: none; }
.hidden { display: none !important; }
