:root {
            --bg-color: #0b131a;
            --sidebar-color: #070d12;
            --accent-color: #25803d;
            --text-gray: #b0b0b0;
            --orange-viikali : #d14124;
            --sidebar-width-min: 70px;
            --sidebar-width-max: 230px;
            --transition-speed: 0.5s;
            --transition-timing: cubic-bezier(0.25, 1, 0.5, 1);
        }

        * { 
            margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, sans-serif; 
          }

        body {
            background-color: var(--bg-color);
            color: white;
            overflow-x: hidden;
            height: 100vh;
            display: flex;
            flex-direction: column;
            background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(31, 52, 84, 0.25) 50%), 
                              linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 255, 0, 0.06));
            background-size: 100% 4px, 3px 100%;
        }

        /* --- HEADER --- */
        header.navbar {
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 25px;
            position: fixed;
            width: 100%;
            z-index: 1001;
            background: rgba(11, 19, 26, 0.95);
            border-bottom: 1px solid #1a2631;
        }

        .header-left { display: flex; align-items: center; gap: 15px; }
        
        .menu-toggle { 
            font-size: 22px; 
            cursor: pointer; 
            color: white; 
            transition: color 0.3s;
            width: 40px;
        }
        .menu-toggle:hover { color: var(--accent-color); }

        .logo img {width: 150px; display: block; }

        .header-right { display: flex; align-items: center; gap: 15px; }
        .account-status {
            font-size: 12px;
            letter-spacing: 0.4px;
            text-transform: uppercase;
            color: var(--text-gray);
        }
        .btn-login {
            background: transparent;
            border: 1px solid var(--accent-color);
            color: white;
            padding: 8px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
            transition: 0.3s;
        }

        .btn-login a {text-decoration: none; color: aliceblue;}
        .btn-login:hover { background: #2a3d4f; border-color: #555; }

        .crown-icon {
            background: transparent;
            border: 1px solid var(--orange-viikali);
            width: 35px; height: 35px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%;
        }

        .crown-icon a {color: var(--orange-viikali); text-decoration: none;}

        /* --- SIDEBAR --- */
        .sidebar {
            width: var(--sidebar-width-min);
            height: 100vh;
            background: var(--sidebar-color);
            position: fixed;
            top: 0;
            left: 0;
            padding-top: 80px;
            transition: width var(--transition-speed) var(--transition-timing);
            z-index: 1000;
            border-right: 1px solid #1a2631;
            overflow: hidden;
        }

        .sidebar.active { width: var(--sidebar-width-max); }

        .side-nav { display: flex; flex-direction: column; height: 100%; }
        .side-nav a {
            display: flex;
            align-items: center;
            padding: 18px 24px;
            color: var(--text-gray);
            text-decoration: none;
            white-space: nowrap;
            transition: 0.3s;
        }

        .side-nav a:hover { color: var(--accent-color); background: rgba(56, 224, 56, 0.05); }
        .side-nav i { min-width: 25px; font-size: 20px; }
        .side-nav span { 
            margin-left: 20px; 
            opacity: 0; 
            transition: opacity 0.3s; 
        }
        .sidebar.active span { opacity: 1; }

        .logout { color: #ff4d4d !important; margin-top: auto; padding-bottom: 100px !important; }

        /* --- MAIN CONTENT (PUSHED) --- */
        .main-container {
            display: flex;
            flex-grow: 1;
            padding-top: 70px;
        }

        main {
            flex-grow: 1;
            margin-left: var(--sidebar-width-min);
            transition: margin-left var(--transition-speed) var(--transition-timing);
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
        }

        .sidebar.active + main {
            margin-left: var(--sidebar-width-max);
        }

        /* === CAROUSEL 3D === */
        .container {
            width: 100%;
            height: 80vh;
            display: flex;
            justify-content: center;
            align-items: center;
            perspective: 1500px;
            position: relative;
            overflow: hidden;
            touch-action: pan-y; 
        }

        .box {
            position: relative;
            width: 200px;
            height: 300px;
            transform-style: preserve-3d;
            transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
        }

        .main-slider-box {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            -webkit-box-reflect: below 15px linear-gradient(transparent, transparent, rgba(0,0,0,0.2));
            user-select: none;
        }

        .main-slider-img img { width: 100%; height: 100%; object-fit: cover; }
         /* Icone Premium */
        .premium-tag {
            position: absolute;
            top: 10px;
            left: 10px;
            background: var(--accent-color);
            color: black;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
            z-index: 5;
            box-shadow: 0 2px 5px rgba(0,0,0,0.5);
        }

        .main-slider-text {
            position: absolute;
            bottom: 0; width: 100%;
            padding: 15px;
            background: linear-gradient(transparent, #0b131aec);
        }

        .quality { background: var(--accent-color); color: black; padding: 2px 8px; font-size: 10px; border-radius: 3px; font-weight: bold;}

        .movie-name {margin-top: 10px;}

        .series-subtitle {
            margin-top: 8px;
            color: #d2d8dc;
            font-size: 11px;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            opacity: 0.9;
        }


        .mobile-tab-bar {
            display: none;
        }

        .mobile-tab-bar .tab-item {
            color: white;
            text-decoration: none;
            text-align: center;
            font-size: 12px;
            display: flex;
            flex-direction: column;
            gap: 5px;
            align-items: center;
        }

        .mobile-tab-bar .tab-item i {
            font-size: 18px;
        }

        .mobile-tab-bar .tab-item span {
            font-size: 11px;
        }

        .footer {
            background: #080c0f;
            padding: 30px 5%;
            border-top: 1px solid #1a2631;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 40px;
            width: 100%;
            flex-wrap: wrap;
            gap: 20px;
        }

        .footer-logo p {
            color: #555;
            font-size: 0.85rem;
            line-height: 1.4;
            margin: 0;
        }

        .footer-legal {
            max-width: 500px;
            text-align: left;
            color: #666;
            font-size: 0.9rem;
        }

        .footer-legal a {
            color: #888;
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .mobile-tab-bar {
              display: flex;
              position: fixed;
              bottom: 0;
              width: 100%;
              height: 70px;
              background: #000;
              justify-content: space-around;
              align-items: center;
            }
          
            .mobile-tab-bar a {
              color: white;
              text-align: center;
              font-size: 12px;
            }
          
            .mobile-tab-bar i {
              display: block;
              font-size: 18px;
            }

            .footer {
                margin-bottom: 70px;
            }
          }

            .series-title-text {
            margin-top: 6px;
            color: #ffffff;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            line-height: 1.2;
         }

         .category-section {
             padding: 40px 5%;
             -webkit-overflow-scrolling: touch;
             display: block;
         }

          .swiper {
            width: 100%;
          }
          
          .swiper-slide {
            width: 250px;
            height: 350px;
            border-radius: 10px;
            overflow: hidden;
          }
          
          .card-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }

        /* === DIRECTION BUTTONS === */
        .btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 50px;
            height: 50px;
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            cursor: pointer;
            z-index: 100;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: 0.3s;
        }
        .btn:hover { background: var(--accent-color); border-color: var(--accent-color); color: black; }
        .btn i { font-size: 20px; }
        .prev { left: 5%; }
        .next { right: 5%; }

         /* --- MOBILE --- */
         @media (max-width: 760px) {

             :root {
             /* Évite les saccades et s'adapte parfaitement aux navigateurs mobiles */
             --full-height: 100dvh; 
             }

             body {
                height: auto !important;
                min-height: var(--full-height);
                overflow-x: hidden;
                overflow-y: auto !important; /* Force le scroll vertical global */
                display: block; /* Permet un empilement naturel des blocs */      
             }

             .main-container {
                 width: 100vw;
                 display: block; /* On passe en block pour que le contenu s'empile verticalement */
                 padding-top: 0;
                 min-height: auto;
             }
             .container {
                height: var(--full-height); /* Prend exactement l'écran initial */
                width: 100vw;
                display: flex;
                justify-content: center;
                align-items: center;
                perspective: 1500px;
                position: relative;
                overflow: hidden;
                /* IMPORTANT : Permet le swipe horizontal ET le scroll vertical naturel de la page */
                touch-action: pan-x pan-y; 
                flex-shrink: 0;
                padding-top: 0px; /* Laisse la place pour ton header fixe */
             }
             .box {
                 width: 250px;
                 height: 360px;
                 transform-style: preserve-3d;
             }
             .main-slider-img {
                 width: 100%;
                 height: 100%;
                 object-fit: cover;
             }
             .main-slider-box {
                 border-radius: 12px;
            
             }
             .sidebar { left: -100%; width: 100% !important; background: #0b131a;}
             .sidebar.active { left: 0; }
             main {
                 margin-left: 0 !important;
                 width: 100vw;
             }
                          }
             .swiper {
                 overflow-y: visible;
                 overflow-x: visible;
             }
             .btn { display: flex; }
             .menu-toggle {display: none;}
             .account-status {
                 display: none;
                         }
        
                         
         
    
