/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --netflix-red: #e50914;
    --netflix-black: #141414;
    --netflix-dark: #000000;
    --netflix-gray: #808080;
    --netflix-light-gray: #b3b3b3;
    --netflix-white: #ffffff;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--netflix-black);
    color: var(--netflix-white);
    overflow-x: hidden;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 10%, transparent);
    padding: 0 4%;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background-color: var(--netflix-black);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--netflix-red);
    cursor: pointer;
    letter-spacing: -2px;
}

.logo h1 span {
    color: var(--netflix-white);
}

.nav-menu {
    display: flex;
    gap: 20px;
    margin-left: 40px;
}

.nav-menu a {
    color: var(--netflix-light-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--netflix-white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-btn,
.notification {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 5px;
}

.search-btn svg,
.notification svg {
    display: block;
}

.notification .badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--netflix-red);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
}

/* Hero Banner */
.hero {
    position: relative;
    height: 80vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    padding: 0 4%;
    margin-top: 70px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.05" /%3E%3C/svg%3E');
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(0deg, var(--netflix-black) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-play {
    background-color: var(--netflix-white);
    color: var(--netflix-black);
}

.btn-play:hover {
    background-color: rgba(255, 255, 255, 0.85);
}

.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: var(--netflix-white);
}

.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.5);
}

/* Content Sections */
.content {
    padding: 0 4%;
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

.content-row {
    margin-bottom: 50px;
}

.row-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--netflix-white);
}

.row-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--netflix-gray) transparent;
}

.row-slider::-webkit-scrollbar {
    height: 8px;
}

.row-slider::-webkit-scrollbar-track {
    background: transparent;
}

.row-slider::-webkit-scrollbar-thumb {
    background-color: var(--netflix-gray);
    border-radius: 10px;
}

/* Video Cards */
.video-card {
    flex: 0 0 300px;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #181818;
    border-radius: 6px;
    overflow: hidden;
}

.video-card:hover {
    transform: scale(1.05);
    z-index: 50;
}

.card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-new {
    background-color: var(--netflix-red);
    color: white;
}

.badge-trending {
    background-color: #ff6b00;
    color: white;
}

.card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}

.card-top10 {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background-color: var(--netflix-red);
    color: white;
    padding: 8px 10px;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    border-radius: 4px;
}

.card-info {
    padding: 15px;
}

.card-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--netflix-light-gray);
    margin-bottom: 10px;
}

.card-languages {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lang-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: var(--netflix-light-gray);
}

/* Video Player Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.player-container {
    position: relative;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
}

#videoPlayer {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
}

.player-controls-overlay {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.player-controls-overlay > * {
    pointer-events: auto;
}

.video-info-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.video-info-overlay p {
    font-size: 1rem;
    color: var(--netflix-light-gray);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.audio-track-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.audio-track-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
}

#audioTrackSelect {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 150px;
}

#audioTrackSelect:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#audioTrackSelect option {
    background-color: #181818;
    color: white;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .video-card {
        flex: 0 0 250px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero {
        height: 60vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .video-card {
        flex: 0 0 200px;
    }
    
    .row-title {
        font-size: 1.2rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .player-controls-overlay {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .video-info-overlay h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .video-card {
        flex: 0 0 150px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
}
/* ====== CORRECTIONS AJOUTÉES : Bouton + sur hover ====== */
.video-card {
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.video-card:hover .card-overlay {
    opacity: 1;
    pointer-events: all;
}

.btn-add-to-mylist {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--netflix-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-to-mylist:hover {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
    transform: scale(1.1);
}

.btn-add-to-mylist svg {
    width: 28px;
    height: 28px;
}

.btn-add-to-mylist.in-list {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
}

.btn-add-to-mylist.in-list svg {
    transform: rotate(45deg);
}

.overlay-title {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}
