/**
 * CYBERPUNK CATEGORY PAGE - LE CSS LE PLUS SPECTACULAIRE DU WEB
 * Grille hexagonale, effets Matrix, animations jamais vues
 */

/* Variables cyberpunk */
:root {
    --hex-size: 400px;
    --hex-margin: 20px;
    --neon-cyan: #00f5ff;
    --neon-pink: #ff006e;
    --neon-purple: #bd00ff;
    --neon-green: #00ff88;
    --dark-bg: rgba(10, 10, 10, 0.95);
    --matrix-green: #00ff00;
}

@media (max-width: 1400px) {
    :root {
        --hex-size: 350px;
    }
}

/* Header de catégorie spectaculaire */
.category-header-cyberpunk {
    position: relative;
    min-height: 220px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    overflow: hidden;
    margin-bottom: 8px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 5% 100%, 0 85%);
}

/* Scan overlay animé */
.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 245, 255, 0.1) 50%,
        transparent 100%
    );
    animation: scanVertical 6s linear infinite;
    pointer-events: none;
}

@keyframes scanVertical {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Particules flottantes */
.category-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: floatUp var(--duration) linear infinite;
    animation-delay: var(--delay);
    left: calc(var(--delay) * 5%);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Titre avec effet glitch */
.category-title-container {
    position: relative;
    z-index: 2;
    text-align: center;
    /* padding: 60px 20px; */
}

.category-title {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 0;
    color: var(--neon-cyan);
    text-shadow: 
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 30px var(--neon-cyan);
    position: relative;
}

/* Effet glitch sur le titre */
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 2.5s infinite;
    color: var(--neon-pink);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 2.5s infinite;
    color: var(--neon-purple);
    z-index: -2;
}

@keyframes glitch-1 {
    0% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(66% 0 10% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(15% 0 65% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-2px, 2px);
    }
    80% {
        clip-path: inset(25% 0 45% 0);
        transform: translate(2px, -2px);
    }
    100% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(0);
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: inset(65% 0 10% 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(15% 0 65% 0);
        transform: translate(2px, -2px);
    }
    40% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-2px, 2px);
    }
    60% {
        clip-path: inset(25% 0 45% 0);
        transform: translate(2px, -2px);
    }
    80% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    100% {
        clip-path: inset(65% 0 10% 0);
        transform: translate(0);
    }
}

.title-prefix,
.title-suffix {
    font-size: 16px;
    color: var(--neon-purple);
    display: block;
    margin: 10px 0;
    opacity: 0.8;
}

/* Description de catégorie */
.category-description {
    margin-top: 20px;
    font-size: 18px;
    color: #ccc;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Statistiques animées */
.category-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.stat-value.pulse-neon {
    animation: pulsate 2s ease-in-out infinite;
}

@keyframes pulsate {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--neon-green),
            0 0 20px var(--neon-green);
    }
    50% {
        text-shadow: 
            0 0 20px var(--neon-green),
            0 0 40px var(--neon-green),
            0 0 60px var(--neon-green);
    }
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* Sous-catégories cyberpunk */
.subcategories-cyberpunk {
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--neon-purple);
}

.sub-title {
    font-family: 'Courier New', monospace;
    color: var(--neon-green);
    margin-bottom: 20px;
    font-size: 20px;
}

.terminal-prompt {
    color: var(--neon-cyan);
    animation: blink 1s infinite;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.subcategory-item {
    position: relative;
    display: block;
    padding: 20px;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.subcategory-item:hover {
    transform: translateY(-5px);
    border-color: var(--neon-pink);
    background: rgba(255, 0, 110, 0.1);
    box-shadow: 0 10px 30px rgba(255, 0, 110, 0.3);
}

.sub-hologram {
    position: relative;
    height: 100px;
    margin-bottom: 15px;
    overflow: hidden;
}

.sub-hologram img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%);
    transition: filter 0.3s ease;
}

.subcategory-item:hover .sub-hologram img {
    filter: grayscale(0%);
}

.hologram-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 245, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.subcategory-item:hover .hologram-effect {
    transform: translateX(100%);
}

.sub-name {
    font-weight: bold;
    color: var(--neon-cyan);
    margin-bottom: 5px;
}

.sub-count {
    font-size: 12px;
    color: #888;
}

/* Sélecteur de vue */
.products-top-cyberpunk {
    margin-bottom: 30px;
}

.view-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.view-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-btn:hover,
.view-btn.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: scale(1.1);
}

.view-btn.active {
    background: rgba(0, 245, 255, 0.2);
    box-shadow: 0 0 20px var(--neon-cyan);
}

/* Terminal de filtres */
.filter-terminal {
    background: #000;
    border: 2px solid var(--neon-green);
    border-radius: 5px;
    margin-bottom: 30px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.terminal-header {
    background: #222;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--neon-green);
}

.terminal-title {
    color: var(--neon-green);
    font-size: 14px;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #27c93f;
}

.control.close {
    background: #ff5f56;
}

.terminal-body {
    padding: 20px;
    min-height: 100px;
}

.terminal-line {
    display: flex;
    align-items: center;
    color: var(--neon-green);
}

/* Œil animé qui clignote */
.animated-eye {
    display: inline-block;
    animation: eyeBlink 4s infinite;
}

@keyframes eyeBlink {
    0%, 45%, 55%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.1);
    }
}

/* Style pour le bouton Voir le produit */
.action-btn.view-product {
    background: linear-gradient(45deg, #0066cc 0%, #00ff88 100%);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn.view-product:hover {
    background: linear-gradient(45deg, #00ff88 0%, #0066cc 100%);
    transform: translateY(-2px);
}

/* Ajuster la grille des boutons pour 3 éléments */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Modal amélioré pour l'aperçu rapide */
.quickview-modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 50px rgba(0, 230, 255, 0.5);
}

.quickview-modal-content .product-images,
.quickview-modal-content .product-information {
    padding: 20px;
}

.quickview-modal-content .product-title {
    color: var(--neon-blue);
    font-size: 24px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.quickview-modal-content .product-price {
    color: var(--neon-green);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.prompt {
    margin-right: 10px;
}

/* Modal Quickview Cyberpunk */
.quickview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quickview-overlay.active {
    opacity: 1;
}

.quickview-modal {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.quickview-modal-content {
    background: #000;
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    box-shadow: 
        0 0 50px rgba(0, 230, 255, 0.5),
        inset 0 0 30px rgba(0, 230, 255, 0.1);
    position: relative;
    padding: 40px;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: var(--neon-red);
    color: #000;
    transform: rotate(90deg);
}

.loading-animation {
    text-align: center;
    padding: 60px;
    color: var(--neon-green);
}

.cyber-loader {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(0, 255, 136, 0.2);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.quickview-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.quickview-images {
    position: relative;
}

.quickview-images img {
    width: 100%;
    height: auto;
    border: 1px solid var(--neon-blue);
    border-radius: 5px;
}

.quickview-info {
    color: #fff;
}

.quickview-info .product-title {
    color: var(--neon-blue);
    font-size: 28px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 230, 255, 0.5);
}

.quickview-info .product-price {
    color: var(--neon-green);
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.quickview-info .product-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 30px;
}

.view-full-details {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    color: #000;
    padding: 15px 30px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.view-full-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 230, 255, 0.5);
}

.view-full-details .arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.view-full-details:hover .arrow {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 768px) {
    .quickview-inner {
        grid-template-columns: 1fr;
    }
    
    .quickview-modal-content {
        padding: 20px;
    }
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--neon-green);
    font-family: inherit;
    flex: 1;
    font-size: 14px;
}

.cursor-blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Container principal des produits */
.products-container-cyberpunk {
    position: relative;
    min-height: 600px;
    width: 100%;
    max-width: 100%;
}

/* Vue Hexagonale */
.products-hexagon-grid {
    position: relative;
    padding: 40px 0;
}

/* Canvas pour Matrix rain */
.matrix-rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

/* Ligne de scan qui parcourt la grille */
.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    box-shadow: 0 0 20px var(--neon-cyan);
    animation: scanHorizontal 8s linear infinite;
    pointer-events: none;
}

@keyframes scanHorizontal {
    0% { top: 0%; }
    100% { top: 100%; }
}

/* Container hexagonal responsive - 2 colonnes 50/50 */
.hexagon-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding: 40px;
    justify-items: center;
    width: 100%;
    max-width: none;
}

@media (max-width: 768px) {
    .hexagon-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }
}

/* Wrapper pour chaque hexagone */
.hexagon-wrapper {
    position: relative;
    width: var(--hex-size);
    height: calc(var(--hex-size) * 0.866);
    margin: var(--hex-margin);
    opacity: 0;
    animation: hexAppear 0.6s ease-out forwards;
    animation-delay: calc(var(--index) * 0.1s);
}

@keyframes hexAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Item hexagonal */
.hexagon-item {
    position: relative;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.hexagon-item:hover {
    transform: translateY(-10px) scale(1.05);
    z-index: 10;
}

/* Forme hexagonale avec clip-path */
.hexagon-shape {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid transparent;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hexagon-item:hover .hexagon-shape {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: scale(1.02);
}

/* Intérieur de l'hexagone */
.hexagon-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

/* Container d'image produit */
.product-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(0.7);
}

.hexagon-item:hover .product-image {
    transform: scale(1.1);
    filter: brightness(1);
}

/* Effet hologramme sur l'image */
.hologram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 245, 255, 0.03) 2px,
        rgba(0, 245, 255, 0.03) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hexagon-item:hover .hologram-overlay {
    opacity: 1;
    animation: hologramScan 2s linear infinite;
}

@keyframes hologramScan {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

/* Effet de glitch */
.glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.hexagon-item:hover .glitch-effect {
    opacity: 1;
    animation: rgbGlitch 0.3s infinite;
}

@keyframes rgbGlitch {
    0% {
        background: none;
    }
    20% {
        background: rgba(255, 0, 0, 0.1);
        transform: translateX(-2px);
    }
    40% {
        background: rgba(0, 255, 0, 0.1);
        transform: translateX(2px);
    }
    60% {
        background: rgba(0, 0, 255, 0.1);
        transform: translateY(-2px);
    }
    80% {
        background: none;
        transform: translate(0);
    }
    100% {
        background: none;
    }
}

/* Overlay d'informations produit */
.product-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.hexagon-item:hover .product-info-overlay {
    transform: translateY(0);
}

/* Nom du produit */
.product-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--neon-cyan);
    margin: 0 0 15px 0;
    text-shadow: 0 0 5px var(--neon-cyan);
    line-height: 1.3;
}

/* Titre sur l'image au hover */
.image-title-overlay {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.hexagon-item:hover .image-title-overlay {
    opacity: 1;
    visibility: visible;
}

/* Background avec effet gradient animé */
.title-background {
    position: absolute;
    top: -20px;
    left: -50%;
    width: 200%;
    height: auto;
    padding: 40px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0) 70%);
    animation: backgroundPulse 3s ease-in-out infinite;
    backdrop-filter: blur(5px);
}

@keyframes backgroundPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.95;
    }
}

/* Scanner qui traverse le titre */
.title-scanner {
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 200px;
    background: linear-gradient(
        0deg,
        transparent 0%,
        transparent 40%,
        rgba(0, 245, 255, 0.1) 50%,
        transparent 60%,
        transparent 100%
    );
    animation: scanTitle 3s linear infinite;
}

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

/* Contenu du titre */
.title-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 90%;
}

/* Titre avec effet glitch */
.title-glitch {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    text-shadow: 
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 30px var(--neon-cyan),
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    position: relative;
    animation: textGlow 2s ease-in-out infinite alternate;
    line-height: 1.2;
    padding: 12px 20px;
    border: 1px solid var(--neon-cyan);
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 
        inset 0 0 20px rgba(0, 245, 255, 0.2),
        0 0 20px rgba(0, 245, 255, 0.5);
    max-width: 90%;
    margin: 0 auto;
}

@keyframes textGlow {
    0% {
        text-shadow: 
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan),
            0 0 30px var(--neon-cyan),
            1px 1px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000;
        border-color: var(--neon-cyan);
        box-shadow: 
            inset 0 0 20px rgba(0, 245, 255, 0.2),
            0 0 20px rgba(0, 245, 255, 0.5);
    }
    100% {
        text-shadow: 
            0 0 20px var(--neon-cyan),
            0 0 30px var(--neon-cyan),
            0 0 40px var(--neon-cyan),
            1px 1px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000;
        border-color: var(--neon-cyan);
        box-shadow: 
            inset 0 0 30px rgba(0, 245, 255, 0.3),
            0 0 30px rgba(0, 245, 255, 0.7);
    }
}

/* Effet glitch sur le titre */
.title-glitch::before,
.title-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.title-glitch::before {
    animation: glitchText1 2.5s infinite;
    color: #00ff00;  /* Vert clair */
    z-index: -1;
    opacity: 1;
    text-shadow: 0 0 10px #00ff00;
}

.title-glitch::after {
    animation: glitchText2 2.5s infinite;
    color: #ff8800;  /* Orange clair */
    z-index: -2;
    opacity: 1;
    text-shadow: 0 0 10px #ff8800;
}

@keyframes glitchText1 {
    0% {
        clip-path: inset(40% 0 60% 0);
        transform: translate(0);
    }
    10% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-3px, 3px);
    }
    20% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-3px, 3px);
    }
    30% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(3px, -3px);
    }
    40% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(3px, -3px);
    }
    50% {
        clip-path: inset(10% 0 85% 0);
        transform: translate(-2px, 2px);
    }
    60% {
        clip-path: inset(10% 0 85% 0);
        transform: translate(-2px, 2px);
    }
    70% {
        clip-path: inset(50% 0 50% 0);
        transform: translate(2px, -2px);
    }
    80% {
        clip-path: inset(50% 0 50% 0);
        transform: translate(2px, -2px);
    }
    90% {
        clip-path: inset(40% 0 60% 0);
        transform: translate(0);
    }
    100% {
        clip-path: inset(40% 0 60% 0);
        transform: translate(0);
    }
}

@keyframes glitchText2 {
    0% {
        clip-path: inset(65% 0 35% 0);
        transform: translate(0);
    }
    10% {
        clip-path: inset(10% 0 85% 0);
        transform: translate(3px, -3px);
    }
    20% {
        clip-path: inset(10% 0 85% 0);
        transform: translate(3px, -3px);
    }
    30% {
        clip-path: inset(50% 0 50% 0);
        transform: translate(-3px, 3px);
    }
    40% {
        clip-path: inset(50% 0 50% 0);
        transform: translate(-3px, 3px);
    }
    50% {
        clip-path: inset(30% 0 70% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(30% 0 70% 0);
        transform: translate(2px, -2px);
    }
    70% {
        clip-path: inset(80% 0 10% 0);
        transform: translate(-2px, 2px);
    }
    80% {
        clip-path: inset(80% 0 10% 0);
        transform: translate(-2px, 2px);
    }
    90% {
        clip-path: inset(65% 0 35% 0);
        transform: translate(0);
    }
    100% {
        clip-path: inset(65% 0 35% 0);
        transform: translate(0);
    }
}

/* Container des particules */
.title-particles-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Étincelles qui tournent autour du titre */
.title-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    opacity: 0;
    animation: sparkRotate 2s ease-out infinite;
    animation-delay: var(--delay);
    transform-origin: center;
}

@keyframes sparkRotate {
    0% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(60px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(120px) scale(0);
        opacity: 0;
    }
}

/* Animation d'entrée du titre */
.hexagon-item:hover .title-glitch {
    animation: titleEntry 0.5s ease-out, textGlow 2s ease-in-out infinite alternate 0.5s;
}

@keyframes titleEntry {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-90deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Effet de distorsion sur hover */
.hexagon-item:hover .image-title-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 245, 255, 0.03) 2px,
        rgba(0, 245, 255, 0.03) 4px
    );
    animation: distortion 0.5s linear infinite;
}

@keyframes distortion {
    0% { transform: translateX(0); }
    100% { transform: translateX(4px); }
}

/* Responsive pour le titre sur image */
@media (max-width: 992px) {
    .title-glitch {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .title-glitch {
        font-size: 18px;
        letter-spacing: 1px;
    }
}

/* Titre flottant au hover - DÉSACTIVÉ car remplacé par le titre sur image */
.product-title-hover {
    display: none !important;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(26, 26, 26, 0.98));
    border: 2px solid var(--neon-cyan);
    padding: 20px 30px;
    border-radius: 0;
    white-space: normal;
    max-width: 280px;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 
        0 0 30px rgba(0, 245, 255, 0.5),
        inset 0 0 20px rgba(0, 245, 255, 0.1);
    clip-path: polygon(
        0 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.product-title-hover::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink), var(--neon-cyan));
    background-size: 400% 400%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderGradient 3s ease infinite;
    clip-path: inherit;
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.product-title-hover.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.product-title-hover.show::before {
    opacity: 1;
}

/* Effet de scan sur le titre */
.product-title-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.product-title-hover.show::after {
    left: 100%;
}

/* Particules autour du titre */
.title-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.title-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--neon-cyan);
    opacity: 0;
}

.product-title-hover.show .title-particle {
    animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1);
        opacity: 0;
    }
}

/* Prix avec animation compteur */
.product-price {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    margin-bottom: 15px;
}

.price-symbol {
    font-size: 24px;
    opacity: 0.8;
}

/* Barre de stock */
.stock-bar {
    margin-bottom: 15px;
}

.stock-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stock-meter {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.stock-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    box-shadow: 0 0 10px var(--neon-green);
    transition: width 0.3s ease;
}

/* Actions rapides */
.quick-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.action-btn {
    flex: 1;
    padding: 15px 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-purple);
    color: var(--neon-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: bold;
}

.action-btn .btn-text {
    display: inline-block;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.action-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.2);
    transform: scale(1.05);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.5), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.btn-icon {
    display: inline-block;
    margin-left: 8px;
    font-size: 20px;
    vertical-align: middle;
}

/* Badges produit */
.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 3;
}

.badge-cyber {
    padding: 4px 10px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

.badge-new {
    background: var(--neon-green);
    color: #000;
    animation: badgePulse 2s infinite;
}

.badge-discount {
    background: var(--neon-pink);
    color: #fff;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 5px currentColor;
    }
    50% {
        box-shadow: 0 0 20px currentColor;
    }
}

/* Bordure SVG animée */
.hexagon-border {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hexagon-item:hover .hexagon-border {
    opacity: 1;
}

/* Vue Matrix Stream */
.products-matrix-stream {
    display: none;
    background: #000;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.products-matrix-stream.active {
    display: block;
}

.matrix-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2px;
    position: relative;
}

.matrix-product-card {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid var(--matrix-green);
    padding: 10px;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.matrix-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 0, 0.1);
    transition: left 0.5s ease;
}

.matrix-product-card:hover::before {
    left: 0;
}

.matrix-product-card:hover {
    background: rgba(0, 255, 0, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 20px var(--matrix-green);
}

.matrix-image {
    width: 80px;
    height: 80px;
    position: relative;
    overflow: hidden;
}

.matrix-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.8);
    transition: filter 0.3s ease;
}

.matrix-product-card:hover .matrix-image img {
    filter: grayscale(0%) brightness(1);
}

.matrix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 255, 0, 0.1) 1px,
        rgba(0, 255, 0, 0.1) 2px
    );
    animation: matrixScan 1s linear infinite;
}

@keyframes matrixScan {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.matrix-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.matrix-info h3 {
    font-size: 14px;
    color: var(--matrix-green);
    margin: 0;
    font-family: 'Courier New', monospace;
}

.matrix-price {
    font-size: 20px;
    color: var(--neon-green);
    font-weight: bold;
    text-shadow: 0 0 5px var(--neon-green);
}

.matrix-data {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #0f0;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

/* Vue Terminal */
.products-terminal-view {
    display: none;
    background: #000;
    padding: 20px;
    font-family: 'Courier New', monospace;
}

.products-terminal-view.active {
    display: block;
}

.terminal-container {
    background: #0a0a0a;
    border: 1px solid var(--neon-green);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.terminal-output {
    color: #0f0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre;
    overflow-x: auto;
}

.terminal-output .green {
    color: var(--neon-green);
}

.terminal-output .blue {
    color: var(--neon-cyan);
}

.terminal-output .yellow {
    color: #ff0;
}

.terminal-link {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

.terminal-link:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
}

.cursor {
    animation: blink 1s infinite;
}

/* Gestion des vues */
.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* Responsive */
@media (max-width: 1200px) {
    :root {
        --hex-size: 320px;
    }
}

@media (max-width: 992px) {
    :root {
        --hex-size: 280px;
    }
}

@media (max-width: 768px) {
    .category-title {
        font-size: 32px;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    :root {
        --hex-size: 240px;
        --hex-margin: 15px;
    }
    
    .filter-terminal {
        font-size: 12px;
    }
    
    .view-selector {
        flex-wrap: wrap;
    }
}

/* Animations d'entrée pour pagination */
.hexagon-wrapper {
    animation: hexSlideIn 0.6s ease-out forwards;
}

@keyframes hexSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Effet de chargement */
.products-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading-text {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    animation: loadingPulse 1s infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Optimisations performance */
.hexagon-item {
    will-change: transform;
}

.product-image {
    will-change: transform, filter;
}

.hologram-overlay,
.glitch-effect {
    will-change: opacity;
}

/* Easter egg : Mode Matrix complet */
body.matrix-mode {
    background: #000;
    color: var(--matrix-green);
}

body.matrix-mode * {
    color: var(--matrix-green) !important;
    border-color: var(--matrix-green) !important;
}

/* Message "No products" stylisé */
.no-products-cyberpunk {
    text-align: center;
    padding: 100px 20px;
    color: var(--neon-cyan);
}

.no-products-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate360 4s linear infinite;
}

@keyframes rotate360 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-products-text {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--neon-cyan);
}