/**
 * CATEGORY SIDEBAR CYBERPUNK - Effets spectaculaires pour le menu latéral
 * Le plus beau titre de catégorie jamais créé !
 */

/* Block principal */
.block-categories {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 2px solid var(--neon-cyan, #00f5ff);
    padding: 0;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(0, 245, 255, 0.5),
        inset 0 0 20px rgba(0, 245, 255, 0.1);
    animation: blockPulse 4s ease-in-out infinite;
}

@keyframes blockPulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(0, 245, 255, 0.5),
            inset 0 0 20px rgba(0, 245, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(0, 245, 255, 0.7),
            inset 0 0 30px rgba(0, 245, 255, 0.2);
    }
}

/* Effet de scan vertical */
.block-categories::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 245, 255, 0.2) 50%,
        transparent 100%
    );
    animation: sidebarScan 5s linear infinite;
}

@keyframes sidebarScan {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* Effet de particules */
.block-categories::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, var(--neon-cyan, #00f5ff), transparent),
        radial-gradient(2px 2px at 60% 70%, var(--neon-purple, #bd00ff), transparent),
        radial-gradient(1px 1px at 90% 10%, var(--neon-pink, #ff006e), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.5;
    animation: particlesFloat 20s linear infinite;
    pointer-events: none;
}

@keyframes particlesFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -200px); }
}

/* Menu principal */
.category-top-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Items du menu */
.category-top-menu > li {
    position: relative;
    margin: 0;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    overflow: hidden;
}

.category-top-menu > li:last-child {
    border-bottom: none;
}

/* Effet de hover sur li */
.category-top-menu > li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.category-top-menu > li:hover::before {
    left: 100%;
}

/* Liens avec effet cyberpunk spectaculaire */
.category-top-menu a {
    display: block;
    padding: 20px 25px;
    color: var(--neon-cyan, #00f5ff) !important;
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 
        0 0 10px var(--neon-cyan, #00f5ff),
        0 0 20px var(--neon-cyan, #00f5ff),
        0 0 30px var(--neon-cyan, #00f5ff);
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 
            0 0 10px var(--neon-cyan, #00f5ff),
            0 0 20px var(--neon-cyan, #00f5ff),
            0 0 30px var(--neon-cyan, #00f5ff);
    }
    100% {
        text-shadow: 
            0 0 20px var(--neon-cyan, #00f5ff),
            0 0 30px var(--neon-cyan, #00f5ff),
            0 0 40px var(--neon-cyan, #00f5ff);
    }
}

/* Effet glitch sur le texte */
.category-top-menu a::before,
.category-top-menu a::after {
    content: attr(href);
    position: absolute;
    top: 50%;
    left: 25px;
    transform: translateY(-50%);
    width: calc(100% - 50px);
    overflow: hidden;
    pointer-events: none;
}

.category-top-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Animation glitch au hover */
.category-top-menu a:hover {
    color: var(--neon-pink, #ff006e) !important;
    transform: translateX(5px);
    animation: glitchText 0.3s infinite;
}

@keyframes glitchText {
    0% {
        text-shadow: 
            0 0 10px var(--neon-cyan, #00f5ff),
            2px 2px 0 var(--neon-pink, #ff006e),
            -2px -2px 0 var(--neon-purple, #bd00ff);
    }
    25% {
        text-shadow: 
            0 0 10px var(--neon-cyan, #00f5ff),
            -2px 2px 0 var(--neon-pink, #ff006e),
            2px -2px 0 var(--neon-purple, #bd00ff);
    }
    50% {
        text-shadow: 
            0 0 10px var(--neon-cyan, #00f5ff),
            2px -2px 0 var(--neon-pink, #ff006e),
            -2px 2px 0 var(--neon-purple, #bd00ff);
    }
    75% {
        text-shadow: 
            0 0 10px var(--neon-cyan, #00f5ff),
            -2px -2px 0 var(--neon-pink, #ff006e),
            2px 2px 0 var(--neon-purple, #bd00ff);
    }
    100% {
        text-shadow: 
            0 0 10px var(--neon-cyan, #00f5ff),
            2px 2px 0 var(--neon-pink, #ff006e),
            -2px -2px 0 var(--neon-purple, #bd00ff);
    }
}

/* Indicateur de bordure animée */
.category-top-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan, #00f5ff), var(--neon-purple, #bd00ff), var(--neon-pink, #ff006e));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--neon-cyan, #00f5ff);
}

.category-top-menu a:hover::after {
    width: 100%;
    animation: borderRainbow 2s linear infinite;
}

@keyframes borderRainbow {
    0% { 
        background-position: 0% 50%;
        box-shadow: 0 0 10px var(--neon-cyan, #00f5ff);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 0 0 20px var(--neon-purple, #bd00ff);
    }
    100% { 
        background-position: 0% 50%;
        box-shadow: 0 0 10px var(--neon-pink, #ff006e);
    }
}

/* Icône animée avant le texte */
.category-top-menu a::before {
    content: '▶';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--neon-purple, #bd00ff);
    animation: iconPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

@keyframes iconPulse {
    0%, 100% { 
        transform: translateY(-50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
    }
}

.category-top-menu a:hover::before {
    transform: translateY(-50%) translateX(5px) rotate(90deg);
    color: var(--neon-pink, #ff006e);
}

/* Effet de distorsion pour le bloc entier */
.block-categories:hover {
    animation: blockDistort 0.5s ease-in-out;
}

@keyframes blockDistort {
    0%, 100% { transform: skew(0deg); }
    25% { transform: skew(1deg); }
    75% { transform: skew(-1deg); }
}

/* Coins coupés cyberpunk */
.block-categories {
    clip-path: polygon(
        0 10px,
        10px 0,
        100% 0,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0 100%
    );
}

/* Responsive */
@media (max-width: 768px) {
    .category-top-menu a {
        font-size: 16px;
        padding: 15px 20px;
        letter-spacing: 1px;
    }
}

/* Mode actif/sélectionné */
.category-top-menu li.active > a,
.category-top-menu li.current > a {
    background: rgba(0, 245, 255, 0.1);
    color: var(--neon-green, #00ff88) !important;
    border-left: 4px solid var(--neon-green, #00ff88);
    padding-left: 21px;
}

/* Effet Matrix rain sur le bloc (optionnel) */
@keyframes matrixRain {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100px;
    }
}

/* Ajout d'un effet de ligne de code qui défile */
.block-categories {
    position: relative;
}

.block-categories::before {
    content: '// CATEGORY.MODULE.LOADED';
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 10px;
    color: var(--neon-green, #00ff88);
    font-family: 'Courier New', monospace;
    opacity: 0.5;
    letter-spacing: 1px;
    animation: codeScroll 10s linear infinite;
}

@keyframes codeScroll {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}