/*
 Theme Name:   Hulyx
 Template:     tikswipe
 Version:      2.8.9
 Description:  Version Native MP4 - GPU Optimized (Color Variables Centralized)
*/

:root {
    /* --- ACCENTS (HIGHLIGHTS) --- */
    --h-accent-red:      #ff3b30; /* Rouge (Strobe / Retention / Danger) */
    --h-accent-blue:     #00eaff; /* Cyan (HUD / Électrique / Actif) */
    --h-accent-gold:     #f4c025; /* Doré (Identité / Premium / RPG) */
    
    /* Variantes avec opacité (utiles pour les lueurs/glows) */
    --h-accent-red-glow:  rgba(255, 59, 48, 0.4);
    --h-accent-blue-glow: rgba(0, 234, 255, 0.3);
    --h-accent-gold-glow: rgba(244, 192, 37, 0.25);

    /* --- FONDS & SURFACES --- */
    --h-bg-main:          #000000; /* Noir pur (Viewport / Body) */
    --h-bg-surface:       #0a0a0a; /* Noir légèrement gris (Modales / Panels) */
    --h-bg-card:          #111111; /* Couleur de carte (Items / Inputs) */
    --h-bg-overlay:       rgba(0, 0, 0, 0.7); /* Voile pour overlays */

    /* --- BORDURES & LIGNES --- */
    --h-border-subtle:    rgba(255, 255, 255, 0.05);
    --h-border-active:    rgba(255, 255, 255, 0.1);

    /* --- TEXTE --- */
    --h-text-primary:     #ffffff;
    --h-text-muted:       #666666;
    --h-text-dim:         #333333;
}

body.hulyx-color-active #hulyx-video-viewport video,
    body.hulyx-color-active .swiper-slide video,
    body.hulyx-color-active .tikswipe-video-container video {
        filter: grayscale(0%) saturate(120%) hue-rotate(9deg) contrast(120%) brightness(110%) !important;
        transition: filter 0.4s ease-in-out;
    }

/**
 * HULYX UI NORMALIZATION & VIEWPORT
 */

.swiper.hulyx-main-swiper {
    position: relative;
    overflow: hidden; 
}

/**
 * Hulyx Scroll UI CSS
 * Version: 1.1.1 - GPU Optimization
 */

#hulyx-pc-navigation {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) translateZ(0); 
    z-index: 15 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: none;
}

.hulyx-nav-btn {
    pointer-events: auto !important;
    background: var(--h-bg-overlay);
    border: 1px solid var(--h-border-active);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, border-color 0.2s;
    padding: 12px;
    outline: none;
}

.hulyx-nav-btn:hover {
    background: var(--h-accent-blue-glow);
    border-color: var(--h-accent-blue);
    transform: scale(1.15) translateZ(0);
}

.hulyx-nav-btn:active {
    transform: scale(0.95);
}

@media (max-width: 767.98px) {
    #hulyx-pc-navigation { display: none !important; }
}

/* 1. Base & Shells */
body.hulyx-locked { 
    overflow: hidden !important; 
    touch-action: none; 
}

.hulyx-video-shell { 
    pointer-events: none; 
    background: var(--h-bg-main); 
    position: absolute; 
    inset: 0; 
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 5; 
}

.hulyx-video-shell video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transform: translateZ(0); 
}

/* 2. Navigation & Footer Sync (Z-index Fix) */
#tikswipe-footer-nav, 
.tikswipe-footer-nav, 
#hulyx-footer-nav { 
    z-index: 17 !important; 
    position: fixed !important; 
    pointer-events: auto !important; 
}

/* 3. Mobile Viewport Normalization (60px Footer) */
@media (max-width: 767.98px) {
    .swiper, 
    .swiper-container, 
    .tikswipe-video-container,
    #hulyx-video-viewport { 
        height: calc(100dvh - 60px) !important; 
        max-height: calc(100dvh - 60px) !important; 
    }
    
    .swiper-slide { 
        height: 100% !important; 
    }
}

/* --- QUALITY TOGGLE SD/HD --- */
.h-menu-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--h-border-subtle);
    padding-bottom: 8px;
}

.h-quality-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    padding: 3px 6px;
    background: var(--h-border-subtle);
    border-radius: 12px;
    user-select: none;
    transition: all 0.3s ease;
}

.h-quality-btn .toggle-track {
    width: 22px;
    height: 12px;
    background: var(--h-bg-card);
    border-radius: 10px;
    position: relative;
    border: 1px solid var(--h-border-active);
}

.h-quality-btn .toggle-knob {
    width: 8px;
    height: 8px;
    background: var(--h-text-dim);
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.h-quality-btn.is-hd .toggle-track { background: var(--h-accent-red); border-color: var(--h-accent-red); }
.h-quality-btn.is-hd .toggle-knob { left: 11px; background: var(--h-text-primary);  box-shadow: none !important; }
.h-quality-btn.is-hd .label-hd { color: var(--h-text-primary); }
.h-quality-btn:not(.is-hd) .label-sd { color: var(--h-text-primary); }
.h-quality-btn span { color: var(--h-text-muted); transition: color 0.2s; }

#rpg-fill-xp { 
    background: var(--h-text-primary); 
    box-shadow: none !important;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/**
 * Hulyx Radial Menu Styling
 */
#hulyx-radial-menu {
    position: fixed;
    width: 200px; height: 200px;
    z-index: 20 !important;
    pointer-events: none;
    visibility: hidden; 
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.3s;
}

#hulyx-radial-menu.is-visible { 
    visibility: visible; 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
    pointer-events: auto; 
}

.radial-item {
    position: absolute; 
    width: 55px; 
    height: 55px;
    background: var(--h-bg-overlay); 
    border: 2px solid var(--h-accent-blue); 
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    color: var(--h-accent-blue); 
    font-size: 9px; 
    font-weight: bold;
    left: 50%; 
    top: 50%; 
    margin-left: -27.5px; 
    margin-top: -27.5px;
    transition: all 0.25s ease;
}

#hulyx-radial-menu.is-visible .item-top    { transform: translateY(-60px); }
#hulyx-radial-menu.is-visible .item-bottom { transform: translateY(60px); }
#hulyx-radial-menu.is-visible .item-right  { transform: translateX(60px); }
#hulyx-radial-menu.is-visible .item-left   { transform: translateX(-60px); }

.radial-item.is-selected {
    background: var(--h-accent-blue);
    color: var(--h-bg-main);
    box-shadow: none !important;
    transform: scale(1.2);
}

#hulyx-radial-menu.is-visible .item-top.is-selected    { transform: translateY(-60px) scale(1.2); }
#hulyx-radial-menu.is-visible .item-bottom.is-selected { transform: translateY(60px) scale(1.2); }
#hulyx-radial-menu.is-visible .item-right.is-selected  { transform: translateX(60px) scale(1.2); }
#hulyx-radial-menu.is-visible .item-left.is-selected   { transform: translateX(-60px) scale(1.2); }

#hulyx-hold-loader {
    position: fixed;
    width: 90px;
    height: 90px;
    margin: 0;
    pointer-events: none;
    z-index: 19 !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#hulyx-hold-loader.is-visible { opacity: 1; }
#hulyx-hold-loader svg { transform: rotate(-90deg); filter: drop-shadow(0 0 10px var(--h-accent-blue)); }
#hulyx-hold-loader circle { fill: none; stroke-width: 6; stroke-linecap: round; }
#hulyx-hold-loader .track { stroke: var(--h-accent-blue-glow); }
#hulyx-hold-loader .fill {
    stroke: var(--h-accent-blue);
    stroke-dasharray: 226; 
    stroke-dashoffset: 226;
    transition: none;
}
#hulyx-hold-loader.is-charging .fill {
    transition: stroke-dashoffset 0.5s linear;
    stroke-dashoffset: 0;
}

/**
 * Hulyx RPG HUD - Low Z Architecture (Max 20)
 */
#menu-header-navigation, #menu-mobile-icon {
    display: none !important;
}

.swiper-slide {
    position: relative !important;
    display: flex !important;
    justify-content: center !important; 
    align-items: flex-start !important; 
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    background: transparent !important; 
}

.hulyx-video-shell {
    position: relative !important;
    background: var(--h-bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    #hulyx-tutorial-overlay, .h-auth-overlay-system {
        z-index: 15 !important; 
    }
}

@media (max-width: 767.98px) {
    #hulyx-tutorial-overlay, .h-auth-overlay-system {
        z-index: 15 !important; 
    }
}

.hulyx-native-video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: center center;
    display: block;
}

/* PC : Viewport 9:16 Centré */
@media (min-width: 768px) {
    .hulyx-video-shell {
        height: 100dvh !important;
        aspect-ratio: 9 / 16 !important;
        box-shadow: none;
    }
    .hulyx-native-video {
        width: 100%;
        height: 100%;
        object-fit: contain !important;
    }
}

/* MOBILE : Full Screen Crop */
@media (max-width: 767.98px) {
    .hulyx-video-shell {
        width: 100% !important;
        height: calc(100dvh - 60px) !important;
        aspect-ratio: auto !important;
    }
    .hulyx-native-video {
        width: 100%;
        height: 100%;
        object-fit: cover !important;
    }
}

/* --- LOGO & HEADER VISIBILITY --- */
.site-header {
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important;
    background: transparent !important; 
    z-index: 10 !important; 
    display: block !important;
}

.logo, .custom-logo, .custom-logo-link {
    display: inline-block;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
}

/* --- GESTION OPACITÉ FOOTER (Gris à Blanc) --- */
#hulyx-footer-nav .hulyx-nav-item .hulyx-icon-wrap {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

#hulyx-footer-nav .hulyx-nav-item.active .hulyx-icon-wrap, 
.is-active .hulyx-icon-wrap {
    opacity: 1 !important;
}

.custom-logo {
    padding: 10px !important;
    margin-top: 40px !important;
}

#menu-mobile-icon, .h-nav-tutorial-item, .hulyx-arrows-stack {
    display: none !important;
}

@media (max-width: 767px) {
    .custom-logo {
       display:none !important;
    }
}

/* --- CONFIGURATION FOOTER PC --- */
@media (min-width: 768px) {
    #hulyx-footer-nav {
        position: fixed !important;
        top: 50% !important;
        bottom: auto !important;
        left: calc(50% + (100dvh * 9 / 16 / 2) + 40px) !important;
        transform: translateY(-50%) !important;
        width: 70px !important;
        height: auto !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 30px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 17 !important;
    }
    .h-nav-tutorial-item {
        display: flex !important;
        order: -1 !important; 
    }
    #hulyx-footer-nav .hulyx-nav-item {
        width: 50px !important;
        height: 50px !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #hulyx-footer-nav .hulyx-icon-wrap {
        transform: rotate(0deg) !important; 
    }
}

.h-nav-item-wrapper:hover, .hulyx-nav-item:hover {
    background-color: transparent !important;
}

/* --- TIK SWIPE UI CLEANUP --- */
#switch-to-grid, .nav-item, .enlight-content,
.swiper-button-next, .swiper-button-prev, .swiper-button-disabled, 
.single-content-infos, .copy-link, .comment-icon, 
.comment-closed, .add-to-fav, .add-fav {
    display: none !important;
}

/* --- UI COMPONENTS --- */
.slide-bg { background-color: rgba(0, 0, 0, 0) !important; }
.video-item video, .video-player { opacity: 0 !important; pointer-events: none !important; }

/* --- GESTION DES FILTRES COULEUR / B&W --- */

/* État par défaut : Couleur naturelle (grayscale désactivé) */
.swiper-slide video, 
#hulyx-video-viewport video,
.hulyx-video-shell video,
.hulyx-native-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0%); 
    transform: translateZ(0);
    will-change: filter;
    transition: filter 0.5s ease-in-out;
}



/* État activé par le bouton : Noir et Blanc (B&W) */
body.hulyx-color-active .swiper-slide video,
body.hulyx-color-active #hulyx-video-viewport video,
body.hulyx-color-active .tikswipe-video-container video,
body.hulyx-color-active .hulyx-native-video {
     filter: grayscale(0%) saturate(130%) hue-rotate(6deg) contrast(125%) brightness(105%) !important;
}

#hulyx-video-viewport { 
    position: fixed; inset: 0; width: 100vw; height: 100dvh; 
    z-index: -2 !important; background: var(--h-bg-main); overflow: hidden; 
}

/**
 * Swiper Viewport Constraint
 */
.swiper {
    width: 100vw;
    height: 100vh;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

@media (min-width: 768px) {
    .swiper {
        width: calc(100vh * 9 / 16) !important; 
        margin: 0 auto !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        box-shadow: none; 
    }
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}