*{
    box-sizing:border-box;
    margin:0;
    padding:0;
    font-family:Inter, Arial, sans-serif;
}

body{
    background:#0b1020;
    color:#fff;
    overflow-x:hidden;
}

body.modal-open{
    overflow-y:scroll;
    position:fixed;
    width:100%;
}

html,
body{
    scrollbar-width:none; /* Firefox */
    -ms-overflow-style:none; /* IE / Edge ancien */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar{
    display:none; /* Chrome, Safari, Edge */
}

a{
    color:inherit;
    text-decoration:none;
}

/* retirer le focus bleu des boutons du player */

.player-btn:focus{
    outline:none;
}

.player-btn:focus-visible{
    outline:none;
}

.player-btn::-moz-focus-inner{
    border:0;
}

.navbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:18px 28px;

    background:linear-gradient(
        to bottom,
        rgba(11,16,32,.82) 0%,
        rgba(11,16,32,.45) 45%,
        rgba(11,16,32,0) 100%
    );
}

.logo{
    font-size:28px;
    font-weight:800;
    letter-spacing:1px;
    color:#6ea8ff;
}

.logo{
    display:flex;
    align-items:center;
    text-decoration:none;
}

.logo img{
    height:42px;
    width:auto;
    display:block;
}

.account-menu{
    position:relative;
    display:flex;
    align-items:center;
    margin-left:auto;
}

.account-summary{
    display:flex;
    align-items:center;
    gap:12px;
}

.account-greeting{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    text-align:right;
}

.account-hello{
    font-size:14px;
    font-weight:700;
    color:#fff;
    display:flex;
    align-items:center;
    gap:8px;
}

.account-plan{
    font-size:12px;
    color:#aab2c5;
    font-weight:600;
}

.premium-text{
    color:#f6c453;
}

.admin-icon{
    color:#6ea8ff;
    font-size:13px;
}

.profile-trigger{
    width:46px;
    height:46px;
    border-radius:50%;
    overflow:hidden;
    border:2px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.08);
    padding:0;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s ease;
}

.profile-trigger:hover{
    transform:scale(1.04);
    border-color:rgba(255,255,255,.3);
}

.profile-trigger img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.premium-avatar{
    border:2px solid #f6c453;
    box-shadow:0 0 0 2px rgba(246,196,83,.18);
}

.premium-avatar:hover{
    border:2px solid #f6c453;
}

.account-dropdown{
    position:absolute;
    top:calc(100% + 14px);
    right:0;
    min-width:220px;
    background:rgba(15,23,42,.98);
    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
    padding:10px;
    opacity:0;
    visibility:hidden;
    transform:translateY(10px);
    transition:.2s ease;
    z-index:1200;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.account-dropdown a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 14px;
    border-radius:12px;
    color:#e7edf9;
    font-size:14px;
    transition:.2s ease;
}

.account-dropdown a:hover{
    background:rgba(255,255,255,.07);
    color:#fff;
}

.account-dropdown i{
    width:16px;
    text-align:center;
    color:#9fb0cf;
}

@media (max-width: 900px){
    .account-greeting{
        display:none;
    }
}

.nav-links{
    position:absolute;
    left:50%;
    transform:translateX(-50%);

    display:flex;
    gap:22px;
    align-items:center;
}

.nav-links a{
    color:#ddd;
    transition:.2s ease;
    font-size: 30px;
}

.nav-links a:hover{
    color:#fff;
}

.hero-content{
    max-width:700px;
}

.badge{
    display:inline-block;
    margin-bottom:14px;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(110,168,255,.18);
    color:#9cc2ff;
    font-size:13px;
    font-weight:700;
}

.hero h1{
    font-size:56px;
    line-height:1.04;
    margin-bottom:16px;
}

.hero p{
    color:#d4d8e4;
    font-size:18px;
    line-height:1.6;
    margin-bottom:26px;
    max-width:620px;
}

.hero-buttons{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    align-items:center;
}

.btn{
    padding:14px 22px;
    border:none;
    border-radius:14px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
}

.btn-primary{
    background:#6ea8ff;
    color:#07101f;
    margin-top:10px;
}

.logo img{
    height:40px;
    width:auto;
    display:block;
}

.btn-primary:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 30px rgba(110,168,255,.25);
}

.btn-secondary{
    background:rgba(255,255,255,.12);
    color:#fff;
    border:1px solid rgba(255,255,255,.1);
}

.btn-secondary:hover{
    background:rgba(255,255,255,.18);
}

.btn-info{
    background:rgba(255,255,255,.12);
    color:#fff;
    border:1px solid rgba(255,255,255,.1);
    width:32px;
    height:32px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    flex:0 0 32px;
    font-size:16px;
    line-height:1;
}

.btn-info:hover{
    background:rgba(255,255,255,.18);
}

.section{
    padding:28px 40px 10px;
}

.section h2{
    font-size:24px;
    margin-bottom:18px;
}

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
    gap:18px;
}

.card{
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.06);
    border-radius:18px;
    overflow:hidden;
    transition:.25s ease;
    position:relative;
    max-width:240px;
}

.card:hover{
    transform:translateY(-6px) scale(1.02);
    box-shadow:0 18px 40px rgba(0,0,0,.25);
    cursor:pointer !important;
}

.card img{
    width:100%;
    height:270px;
    object-fit:cover;
    display:block;
    background:#141c30;
}

.card-body{
    padding:14px;
}

.card-title{
    font-size:15px;
    font-weight:700;
    margin-bottom:8px;
}

.card-meta{
    color:#aab2c5;
    font-size:13px;
}

.card-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:10px;
}

.card-actions .btn{
    flex:0 0 auto;
}

.empty{
    padding:24px;
    background:rgba(255,255,255,.05);
    border-radius:16px;
    color:#c7cede;
}

.footer{
    padding:40px;
    text-align:center;
    color:#8d96ad;
}

.close-btn{
    background:rgba(255, 255, 255, 0);
    border:1px solid rgba(255, 255, 255, 0);
    color:#fff;
    width:44px;
    height:44px;
    border-radius:999px;
    font-size:32px;
    line-height:1;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition: 0.5s;
}

.close-btn:hover{
    color: rgb(100, 0, 0);
}

#infoPlayBtn {
    background-color: white;
    box-shadow: none;
}

/* =========================
   PREMIUM ALERT
========================= */

.premium-alert{
    position:fixed;
    inset:0;

    display:flex;
    align-items:center;
    justify-content:center;

    background:rgba(0,0,0,.55);

    backdrop-filter:blur(6px);

    opacity:0;
    pointer-events:none;

    transition:.25s ease;

    z-index:999999;
}

.premium-alert.show{
    opacity:1;
    pointer-events:auto;
}

.premium-alert-box{

    width:320px;
    padding:28px;

    background:#0b1020;

    border-radius:14px;

    text-align:center;

    box-shadow:0 10px 40px rgba(0,0,0,.6);

    transform:scale(.9);
    transition:.25s ease;
}

.premium-alert.show .premium-alert-box{
    transform:scale(1);
}

.premium-alert-icon{
    font-size:26px;
    color:#ffd35a;
    margin-bottom:12px;
}

.premium-alert-title{
    font-size:18px;
    font-weight:600;
    margin-bottom:6px;
}

.premium-alert-text{
    font-size:14px;
    opacity:.8;
    margin-bottom:18px;
}

.premium-alert-btn{

    padding:10px 16px;

    border:none;
    border-radius:8px;

    background:#6ea8ff;
    color:white;

    cursor:pointer;

    font-weight:500;

    transition:.2s;
}

.premium-alert-btn:hover{
    background:#5a97f5;
}

/*--------------Page si 3 lignes---------------*/

.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
    flex-wrap:wrap;
}

.section-head h2{
    margin:0;
}

.section-pagination{
    display:none;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.section-pagination.show{
    display:flex;
}

.page-indicator{
    font-size:14px;
    color:rgba(255,255,255,.8);
    font-weight:600;
}

.page-nav-btn{
    width:36px;
    height:36px;
    border:none;
    border-radius:10px;
    background:rgba(255,255,255,.08);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:.2s ease;
}

.page-nav-btn:hover{
    background:rgba(255,255,255,.16);
}

.page-nav-btn:disabled{
    opacity:.4;
    cursor:not-allowed;
}

.media-card.paginated-hidden{
    display:none !important;
}

/*--------------Popup telecharger serie---------------*/

.download-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.8);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:99999;
}

.download-modal.active{
    display:flex;
}

.download-box{
    width:650px;
    max-height:80vh;
    background:#0b1020;
    border-radius:14px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.download-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 22px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.download-list{
    overflow-y:auto;
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.download-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 14px;
    border-radius:10px;
    background:#11162a;
}

.download-item-title{
    font-size:14px;
}

.download-btn-episode{
    background:#6ea8ff;
    border:none;
    padding:6px 12px;
    border-radius:8px;
    cursor:pointer;
    color:#fff;
}

/*-------------favori----------------*/

.favorite-btn{
    width:42px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:10px;
    border:none;

    background:#1c2238;
    color:#fff;

    cursor:pointer;

    transition:.25s;
    margin-top: 5%;
}

#infoModal .favorite-btn{
    position: relative;
    top: 2px;
    border-radius: 100px;
}

#serieModal .serie-actions{
    display:flex;
    align-items:center;
    gap:15px;
}

#serieFavoriteBtn{
    border-radius:100px !important;
    margin-top: 40px;
}

.favorite-btn:hover{
    color:#ff6e6e;
    transform:scale(1.08);
}

.favorite-btn.active{

    color:#ff4d6d;

}

.favorite-btn.animate i{
    animation:heartPop 1.5s ease;
}

@keyframes heartPop{

    0%{
        transform:scale(1);
    }

    40%{
        transform:scale(1.35);
    }

    70%{
        transform:scale(0.9);
    }

    100%{
        transform:scale(1);
    }

}

/*----------btn download-------------*/

.download-btn{
    width:42px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;
    border:none;

    background:#1c2238;
    color:#fff;

    cursor:pointer;

    transition:.25s;
    margin-top: 5%;
}

.download-btn i{
    font-size:16px;
}

.download-btn:hover{
    background:#6ea8ff;
    transform:scale(1.08);
}

.download-btn:active{
    transform:scale(.95);
}

#serieDownloadBtn {
    margin-top: 40px !important;
}

/* =========================
   PLAYER
========================= */

.player-modal{
    position:fixed;
    inset:0;
    z-index:10000; /* FIX : toujours devant les infos */
    display:none;
    background:rgba(4,8,18,0);
    backdrop-filter:blur(0px);
    -webkit-backdrop-filter:blur(0px);
    opacity:0;
    pointer-events:none;
    transition:
        opacity .35s ease,
        background .35s ease,
        backdrop-filter .35s ease,
        -webkit-backdrop-filter .35s ease;
}

.player-modal.active{
    opacity:1;
    pointer-events:auto;
    background:rgba(4,8,18,.9);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.player-only-wrap{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    transform:scale(.985);
    opacity:0;
    transition:
        transform .35s ease,
        opacity .35s ease;
}

.player-modal.active .player-only-wrap{
    transform:scale(1);
    opacity:1;
}

.player-topbar{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    padding:22px 24px;
    background:linear-gradient(to bottom, rgba(0,0,0,.78), rgba(0,0,0,0));
    z-index:7;
    pointer-events:none;
    transition:opacity 1s ease;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.player-title{
    font-size:18px;
    font-weight:400;
    color:#fff;
    max-width:70vw;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.player-topbar-actions{
    display:flex;
    align-items:center;
    gap:10px;
    pointer-events:auto;
}

.player-close{
    position:absolute;
    top:24px;
    right:24px;
    z-index:8;
    transition:opacity 1s ease, color .3s ease;
}

.player-controls{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
}

.player-center{
    display:flex;
    align-items:center;
    gap:22px;
}

.player-left{
    min-width:120px;
}

.player-right{
    display:flex;
    align-items:center;
    gap:14px;
}

/* =========================
   PLAYER UI
========================= */

.player-ui{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    padding:18px;
    background:linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
    display:flex;
    flex-direction:column;
    gap:12px;
    z-index:7;
    transition:opacity 1s ease;
}

.player-progress-row{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
}

.player-time-side{
    min-width:58px;
    font-size:13px;
    color:#e5e7eb;
    text-align:center;
    white-space:nowrap;
}

.player-progress{
    flex:1;
    height:6px;
    background:rgba(255,255,255,.2);
    border-radius:20px;
    cursor:pointer;
    position:relative;
    overflow:hidden;
}

.player-progress-bar{
    height:100%;
    width:0%;
    background:#6ea8ff;
    border-radius:20px;
}

.player-controls{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    flex-wrap:wrap;
}

.player-left,
.player-right{
    display:flex;
    align-items:center;
    gap:18px;
}

.player-btn{
    background:none;
    border:none;
    color:#fff;
    font-size:18px;
    cursor:pointer;
    padding:6px;
    transition:
        color .2s ease,
        transform .2s ease,
        opacity 1s ease;
}

.player-btn:hover{
    color:#6ea8ff;
    transform:scale(1.05);
}

.player-btn:focus,
.player-btn:focus-visible{
    outline:none;
    box-shadow:none;
}

.player-btn::-moz-focus-inner{
    border:0;
}

.player-finish-time{
    font-size:13px;
    color:#ddd;
    font-weight:700;
    white-space:nowrap;
}

.player-volume{
    width:60% !important;
    height:4px;
    cursor:pointer;
}

.player-top-btn{
    position:absolute;
    top:28px;
    right:90px; /* espace avec le bouton fermer */

    width:40px;
    height:40px;
    font-size: 20px;

    border:none;
    border-radius:999px;
    color:#fff;

    background-color: #00000000;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease,
        opacity 1s ease;
}

.serie-poster-side{
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    z-index:0;
    transition:.5s ease;
}

.player-top-btn:hover{
    color:#6ea8ff;
    transform:scale(1.08);
}

.player-top-btn:focus,
.player-top-btn:focus-visible{
    outline:none;
    box-shadow:none;
}

#volumeIcon:hover {
    cursor: pointer !important;
}

.player-volume-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    cursor: pointer !important;
}

/* =========================
   FULLSCREEN VIDEO
========================= */

#playerWrap:fullscreen{
    width:100vw;
    height:100vh;
}

#playerWrap:fullscreen #videoPlayer{
    width:100vw;
    height:100vh;
    max-height:none;
    border-radius:0;
    object-fit:contain;
}

/* =========================
   AUTO HIDE CONTROLS
========================= */

.player-ui,
.player-topbar,
.player-close{
    transition:opacity 1s ease;
}

.hide-controls{
    opacity:0;
    pointer-events:none;
}

/* ANCIEN MODAL GÉNÉRIQUE */
.modal{
    position:fixed;
    inset:0;
    background:rgba(2,6,17,.85);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:999;
    padding:20px;
}

.modal.active{
    display:flex;
}

.card-poster{
    cursor:pointer;
    transition:transform .25s ease, filter .25s ease;
}

.card-poster:hover{
    transform:scale(1.04);
    filter:brightness(1.1);
}

.modal-content{
    width:min(960px, 100%);
    background:#0f172a;
    border:1px solid rgba(255,255,255,.08);
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 30px 80px rgba(0,0,0,.4);
}

.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 20px;
    background:rgba(255,255,255,.03);
}

.modal-header h3{
    font-size:18px;
}

video{
    width:100%;
    display:block;
    background:#000;
    max-height:78vh;
}

/* INFO FULLSCREEN */
.info-modal{
    position:fixed;
    inset:0;
    width:100vw;
    height:100vh;
    display:none;
    z-index:9000; /* FIX */
    opacity:0;
    pointer-events:none;
    background:#070b16;
    transition:opacity .3s ease;
}

.info-modal.active{
    display:block;
    opacity:1;
    pointer-events:auto;
}

.info-content{
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
    border-radius:0;
    transform:scale(1);
    opacity:1;
    transition:none;
}

.cinematic-info{
    display:block;
}

.info-backdrop{
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    z-index:0;
}

.info-backdrop::after{
    content:"";
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            to right,
            rgba(7,11,22,.98) 0%,
            rgba(7,11,22,.95) 28%,
            rgba(7,11,22,.80) 45%,
            rgba(7,11,22,.45) 65%,
            rgba(7,11,22,.15) 85%,
            rgba(7,11,22,0) 100%
        ),
        linear-gradient(
            to top,
            rgba(7,11,22,.95) 0%,
            rgba(7,11,22,.35) 40%,
            rgba(7,11,22,.05) 100%
        );
}

.info-sidebar{
    position:relative;
    z-index:2;
    width:520px;
    height:100%;
    padding:80px 60px;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    text-align:left;
}

.info-topbar{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:22px;
}

.info-title{
    font-size:60px;
    font-weight:900;
    line-height:1.05;
    margin:0;
}

.info-meta-wrap{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
}

.info-meta{
    color:#c8d0e2;
    margin-bottom:10px;
    font-size:15px;
    line-height:1.45;
}

.info-overview{
    margin-top:14px;
    color:#f3f6fc;
    line-height:1.72;
    font-size:16px;
    max-width:420px;
}

.info-actions{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:18px;
}

/*------------ Barre de recherche --------*/

.search-box{
    position:relative;
    display:flex;
    align-items:center;
    margin-left:8px;
}

.search-toggle{
    width:42px;
    height:42px;
    border:none;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:.25s ease;
    flex:0 0 42px;
}

.search-toggle:hover{
    background:rgba(255,255,255,.14);
}

.search-input-wrap{
    width:0;
    opacity:0;
    overflow:hidden;
    transition:.28s ease;
}

.search-box:hover .search-input-wrap,
.search-box.active .search-input-wrap{
    width:260px;
    opacity:1;
    margin-left:10px;
}

.search-input{
    width:100%;
    height:42px;
    border:none;
    outline:none;
    border-radius:999px;
    padding:0 16px;
    background:rgba(255,255,255,.10);
    color:#fff;
    font-size:14px;
}

.search-input::placeholder{
    color:#b7c0d3;
}

.search-results{
    position:absolute;
    top:calc(100% + 12px);
    left:0;
    width:320px;
    background:rgba(15,23,42,.98);
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
    padding:8px;
    opacity:0;
    visibility:hidden;
    transform:translateY(8px);
    transition:.2s ease;
    z-index:1500;
}

.search-results.active{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.search-result-item{
    width:100%;
    border:none;
    background:transparent;
    color:#fff;
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px;
    border-radius:14px;
    cursor:pointer;
    text-align:left;
    transition:.2s ease;
}

.search-result-item:hover{
    background:rgba(255,255,255,.07);
}

.search-result-item img{
    width:46px;
    height:66px;
    object-fit:cover;
    border-radius:8px;
    background:#1a2337;
    flex:0 0 46px;
}

.search-result-text{
    min-width:0;
}

.search-result-title{
    font-size:14px;
    font-weight:700;
    color:#fff;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.search-result-meta{
    font-size:12px;
    color:#aab2c5;
    margin-top:4px;
}

.search-empty{
    padding:14px 12px;
    color:#aab2c5;
    font-size:14px;
    text-align:center;
}

@media (max-width: 900px){
    .search-box:hover .search-input-wrap,
    .search-box.active .search-input-wrap{
        width:180px;
    }

    .search-results{
        width:280px;
        left:auto;
        right:0;
    }
}

/* Filtres */

.filters-box{
    position:relative;
    margin-left:10px;
}

.filters-toggle{
    width:42px;
    height:42px;
    border:none;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:.25s ease;
}

.filters-toggle:hover{
    background:rgba(255,255,255,.14);
    transform:scale(1.05);
}

.filters-panel{
    position:absolute;
    top:calc(100% + 12px);
    left:50%;
    transform:translateX(-50%) translateY(8px);
    width:300px;
    background:rgba(15,23,42,.98);
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
    padding:16px;
    opacity:0;
    visibility:hidden;
    transition:.22s ease;
    z-index:1500;
}

.filters-box:hover .filters-panel,
.filters-box.active .filters-panel{
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}

.filters-title{
    font-size:16px;
    font-weight:800;
    margin-bottom:14px;
    color:#fff;
}

.filter-group{
    margin-bottom:12px;
}

.filter-group label{
    display:block;
    font-size:13px;
    color:#bfc8da;
    margin-bottom:6px;
}

.filter-group select,
.filter-group input{
    width:100%;
    height:42px;
    border:none;
    outline:none;
    border-radius:12px;
    padding:0 12px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:14px;
}

.filter-group select option{
    background:#0f172a;
    color:#fff;
}

.filters-actions{
    display:flex;
    gap:10px;
    margin-top:14px;
}

.filters-actions .btn{
    flex:1;
    margin-top:0;
}

@media (max-width: 900px){
    .filters-panel{
        left:auto;
        right:0;
        transform:translateY(8px);
    }

    .filters-box:hover .filters-panel,
    .filters-box.active .filters-panel{
        transform:translateY(0);
    }
}

/* Animation card filmet série */

.grid .media-card{
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
    will-change: opacity, transform;
}

.grid .media-card.show{
    opacity: 1;
    transform: translateY(0) scale(1);
}

/*--------fleche haut page---------*/

.hero-scroll-indicator{
    position:absolute;
    left:50%;
    bottom:26px;
    transform:translateX(-50%);
    z-index:6;

    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;

    text-decoration:none;
    opacity:.9;
    transition:
        opacity .3s ease,
        transform .3s ease;
}

.hero-scroll-indicator:hover{
    opacity:1;
    transform:translateX(-50%) translateY(2px);
}

.hero-scroll-arrow{
    color:#fff;
    font-size:14px;
    animation:heroScrollBounce 1.8s ease-in-out infinite;
}

.hero-scroll-indicator.hidden{
    opacity:0;
    pointer-events:none;
    transform:translateX(-50%) translateY(12px);
}

@keyframes heroScrollBounce{
    0%, 100%{
        transform:translateY(0);
    }
    50%{
        transform:translateY(6px);
    }
}

/*-----slider menu------*/

.hero{
    position:relative;
    width:100%;
    height:100vh;
    min-height:100vh;
    overflow:hidden;
}

.hero-slider{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
}

.hero-slide{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    opacity:0;
    pointer-events:none;
    transition:opacity .7s ease;
    display:flex;
    align-items:flex-end;
    padding:120px 50px 50px;
    background-size:cover !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
}

.hero-slide.active{
    opacity:1;
    pointer-events:auto;
    z-index:1;
}

.hero-content{
    max-width:700px;
    position:relative;
    z-index:2;
}

.hero-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    z-index:5;
    width:42px;
    height:42px;
    border:none;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:rgba(255,255,255,.75);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.25s ease;
    opacity:.55;
    backdrop-filter:blur(4px);
}

.hero-arrow:hover{
    background:rgba(255,255,255,.14);
    color:#fff;
    opacity:.9;
}

.hero-arrow-left{
    left:18px;
}

.hero-arrow-right{
    right:18px;
}

/*--------*/

.avatar-wrapper{
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    transition: transform .2s ease;
}

.avatar-wrapper:hover{
    transform: scale(1.04);
}

.profile-trigger{
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.avatar-wrapper:hover .profile-trigger{
    border-color: rgba(255,255,255,.3);
}

.profile-trigger img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* premium */
.premium-avatar-wrapper::after{
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid #f6c453;
    box-shadow: 0 0 0 2px rgba(246,196,83,.18);
    pointer-events: none;
    z-index: 2;
}

.premium-avatar-wrapper:hover::after{
    border-color: #f6c453;
    box-shadow: 0 0 0 2px rgba(246,196,83,.24);
}

/* admin */
.admin-badge{
    position: absolute;
    bottom: -7px;      /* colle au bord du rond */
    left: 50%;         /* centre horizontal */
    transform: translateX(-50%);
    z-index: 3;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.admin-badge i{
    font-size: 12px;
    color: #00ff04;
    line-height: 1;
}

/* =========================
   Player
========================= */

.player-ui{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    padding:18px;
    background:linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
    display:flex;
    flex-direction:column;
    gap:10px;
}

.player-progress{
    width:100%;
    height:6px;
    background:rgba(255,255,255,.2);
    border-radius:20px;
    cursor:pointer;
    position:relative;
}

.player-progress-bar{
    height:100%;
    width:0%;
    background:#6ea8ff;
    border-radius:20px;
}

.player-controls{
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.player-left,
.player-right{
    display:flex;
    align-items:center;
    gap:14px;
}

.player-btn{
    background:none;
    border:none;
    color:#fff;
    font-size:18px;
    cursor:pointer;
    padding:6px;
}

.player-btn:hover{
    color:#6ea8ff;
}

.player-time{
    font-size:13px;
    color:#ddd;
}

.player-volume{
    width:90px;
}

/* =========================
   SERIE POPUP
========================= */

.serie-modal{
    position:fixed;
    inset:0;
    width:100vw;
    height:100vh;
    display:none;
    z-index:9000; /* FIX */
    opacity:0;
    pointer-events:none;
    background:#070b16;
    transition:opacity .3s ease;
}

.serie-modal.active{
    display:block;
    opacity:1;
    pointer-events:auto;
}

.serie-content{
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
    border-radius:0;
    transform:scale(1);
    opacity:1;
    transition:none;
    display:block;
}

/* droite = image de la série */
.serie-poster-side{
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    z-index:0;
}

.serie-overlay{
    content:"";
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            to right,
            rgba(7,11,22,.98) 0%,
            rgba(7,11,22,.95) 28%,
            rgba(7,11,22,.80) 45%,
            rgba(7,11,22,.45) 65%,
            rgba(7,11,22,.15) 85%,
            rgba(7,11,22,0) 100%
        ),
        linear-gradient(
            to top,
            rgba(7,11,22,.95) 0%,
            rgba(7,11,22,.35) 40%,
            rgba(7,11,22,.05) 100%
        );
    z-index:1;
}

/* gauche = infos */
.serie-sidebar{
    position:relative;
    z-index:3;
    width:520px;
    height:100%;
    padding:80px 60px;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    text-align:left;
}

.serie-topbar{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:22px;
}

.serie-title{
    font-size:60px;
    font-weight:900;
    line-height:1.05;
    margin:0;
}

.serie-meta-wrap{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
}

.serie-meta{
    color:#c8d0e2;
    margin-bottom:10px;
    font-size:15px;
    line-height:1.45;
}

.serie-overview{
    margin-top:14px;
    color:#f3f6fc;
    line-height:1.72;
    font-size:16px;
    max-width:420px;
}

.serie-episodes-overlay{
    position:absolute;
    top:50%;
    left:68%;
    transform:translate(-50%, -50%);
    width:55%;          /* plus étroit */
    max-width:1000px;

    max-height:78vh;
    overflow-y:auto;

    z-index:3;
    padding:14px;

    display:flex;
    flex-direction:column;
}

.serie-episodes-overlay:hover{
    cursor: pointer !important;
}

/* saison */
.season-overlay-block{
    width:100%;
    max-width:none;
    margin-bottom:22px;
}

/* titre saison */
.season-overlay-title{
    font-size:26px;
    margin-bottom:14px;
    color:#fff;
    font-weight:800;
    text-align:left;
}

/* épisode */
.episode-overlay-card{
    width:100%;
    display:grid;
    grid-template-columns:180px 1fr 64px;
    align-items:center;
    gap:16px;
    padding:14px;
    border-radius:14px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.05);
    transition:.2s ease;
    margin-bottom:10px;
}

.episode-overlay-card:hover{
    background:rgba(255,255,255,.10);
}

/* image épisode */
.episode-thumb{
    width:180px;
    height:102px;
    object-fit:cover;
    border-radius:10px;
    display:block;
    flex-shrink:0;
}

/* texte épisode */
.episode-overlay-left{
    flex:1;
    min-width:0;
}

.episode-overlay-title{
    font-weight:700;
    color:#fff;
    margin-bottom:6px;
    font-size:15px;
}

.episode-overlay-overview{
    font-size:13px;
}

/* bouton play */
.play-episode-btn{
    width:52px;
    min-width:52px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
}

/* états */
.loading-text{
    color:#aab2c5;
    padding:10px 0;
    text-align:center;
}

.error-text{
    color:#ff8d8d;
    padding:10px 0;
    text-align:center;
}

/* scroll */
.serie-episodes-overlay::-webkit-scrollbar{
    width:8px;
}

.serie-episodes-overlay::-webkit-scrollbar-track{
    background:transparent;
}

.serie-episodes-overlay::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.18);
    border-radius:20px;
}

/* responsive */
@media (max-width: 1100px){
    .serie-sidebar{
        width:470px;
        padding:60px 40px;
    }

    .serie-title{
        font-size:50px;
    }

    .serie-overview{
        max-width:380px;
    }

    .serie-episodes-overlay{
        left:70%;
        width:56%;
    }

    .episode-overlay-card{
        grid-template-columns:150px 1fr 60px;
    }

    .episode-thumb{
        width:150px;
        height:84px;
    }
}

@media (max-width: 980px){
    .serie-sidebar{
        width:100%;
        max-width:560px;
        padding:40px 24px;
    }

    .serie-title{
        font-size:40px;
    }

    .serie-overview{
        max-width:none;
    }

    .serie-episodes-overlay{
        top:auto;
        left:24px;
        right:24px;
        bottom:24px;
        transform:none;
        width:auto;
        max-height:42vh;
        padding:8px;
    }

    .episode-overlay-card{
        grid-template-columns:140px 1fr 56px;
    }

    .episode-thumb{
        width:140px;
        height:80px;
    }
}

@media (max-width: 768px){
    .serie-sidebar{
        padding:28px 18px;
        width:100%;
        max-width:100%;
    }

    .serie-title{
        font-size:34px;
    }

    .serie-meta{
        font-size:14px;
    }

    .serie-overview{
        font-size:15px;
        line-height:1.65;
        max-width:none;
    }

    .serie-episodes-overlay{
        left:14px;
        right:14px;
        bottom:14px;
        max-height:44vh;
        padding:6px;
    }

    .season-overlay-block{
        max-width:100%;
    }

    .episode-overlay-card{
        grid-template-columns:1fr;
        align-items:flex-start;
    }

    .episode-thumb{
        width:100%;
        height:180px;
    }

    .play-episode-btn{
        width:100%;
        min-width:0;
        justify-content:center;
    }
}