/* ============================================
   COMMON.CSS - BanasTechnologie
   Cursor System + Particle Burst
   Identique à NPH
   ============================================ */

/* ========================================
   VARIABLES PAR PAGE
   ======================================== */
:root {
    /* Index - Cyan/Violet (défaut) */
    --cursor-primary: #00ffc8;
    --cursor-secondary: rgba(139, 92, 246, 0.5);
    --cursor-hover: #ec4899;
    --cursor-click: #8b5cf6;
    
    /* Scrollbar */
    --scroll-c1: #00ffc8;
    --scroll-c2: #8b5cf6;
    --scroll-c3: #ec4899;
    --scroll-c4: #f59e0b;
}

body.page-about {
    --cursor-primary: #22c55e;
    --cursor-secondary: rgba(245, 158, 11, 0.5);
    --cursor-hover: #f59e0b;
    --cursor-click: #8b5cf6;
    --scroll-c1: #22c55e;
    --scroll-c2: #f59e0b;
    --scroll-c3: #8b5cf6;
    --scroll-c4: #ff6b9d;
}

body.page-nph {
    --cursor-primary: #00ffc8;
    --cursor-secondary: rgba(139, 92, 246, 0.5);
    --cursor-hover: #ec4899;
    --cursor-click: #8b5cf6;
    --scroll-c1: #00ffc8;
    --scroll-c2: #8b5cf6;
    --scroll-c3: #ec4899;
    --scroll-c4: #f59e0b;
}

body.page-fp {
    --cursor-primary: #f59e0b;
    --cursor-secondary: rgba(236, 72, 153, 0.5);
    --cursor-hover: #ec4899;
    --cursor-click: #8b5cf6;
    --scroll-c1: #f59e0b;
    --scroll-c2: #ec4899;
    --scroll-c3: #8b5cf6;
    --scroll-c4: #00ffc8;
}

body.page-master {
    --cursor-primary: #f59e0b;
    --cursor-secondary: rgba(16, 185, 129, 0.5);
    --cursor-hover: #10b981;
    --cursor-click: #8b5cf6;
    --scroll-c1: #f59e0b;
    --scroll-c2: #10b981;
    --scroll-c3: #8b5cf6;
    --scroll-c4: #00ffc8;
}

/* ========================================
   CURSOR SYSTEM - Identique NPH
   ======================================== */

/* Cacher cursor natif */
body {
    cursor: none;
}

a, button, [role="button"], input, textarea, select,
.clickable, .interactive, .nav-back, .nav-cta,
.layer-card, .tech-item, .year-card, .innovation-card,
.feature-card, .step-card, .future-box, .github-neon-btn,
.back-to-top, .detail-card, .circuit-node, .milestone-item,
.skill-card, .pub-item, .research-card, .variant-card,
.social-link, .passion-card, .objective-card, .orbital-skill,
.glitch-wrapper, .timeline-item {
    cursor: none;
}

/* DOT */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--cursor-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 
        0 0 10px var(--cursor-primary),
        0 0 20px var(--cursor-primary),
        0 0 40px rgba(0, 255, 200, 0.5);
}

.cursor-dot.hovering {
    transform: translate(-50%, -50%) scale(1.5);
    background: var(--cursor-hover);
    box-shadow: 
        0 0 15px var(--cursor-hover),
        0 0 30px var(--cursor-hover),
        0 0 60px rgba(236, 72, 153, 0.6);
}

.cursor-dot.clicking {
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--cursor-click);
    box-shadow: 
        0 0 20px var(--cursor-click),
        0 0 40px var(--cursor-click);
}

/* RING */
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--cursor-secondary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease-out;
    box-shadow: 
        0 0 15px var(--cursor-secondary),
        inset 0 0 15px var(--cursor-secondary);
}

.cursor-ring.hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(236, 72, 153, 0.6);
}

.cursor-ring.clicking {
    width: 30px;
    height: 30px;
    border-color: var(--cursor-click);
}

/* TRAIL */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--cursor-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--cursor-primary);
}

/* GLOW */
.cursor-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(0, 255, 200, 0.08) 0%,
        rgba(139, 92, 246, 0.04) 40%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
}

/* ========================================
   PARTICLE ANIMATIONS
   ======================================== */
@keyframes flashPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes ringExpand {
    0% {
        width: 8px;
        height: 8px;
        opacity: 1;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* ========================================
   RESPONSIVE - Désactiver sur mobile
   ======================================== */
@media (max-width: 1024px), (hover: none) {
    .cursor-dot,
    .cursor-ring,
    .cursor-trail,
    .cursor-glow {
        display: none !important;
    }
    
    body,
    a, button {
        cursor: auto;
    }
    
    a, button {
        cursor: pointer;
    }
}

/* ========================================
   SCROLLBAR NÉON
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 20, 0.9);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--scroll-c1) 0%,
        var(--scroll-c2) 33%,
        var(--scroll-c3) 66%,
        var(--scroll-c4) 100%
    );
    border-radius: 10px;
    border: 2px solid rgba(10, 10, 20, 0.9);
    box-shadow: 
        0 0 10px var(--scroll-c1),
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        var(--scroll-c2) 0%,
        var(--scroll-c3) 33%,
        var(--scroll-c4) 66%,
        var(--scroll-c1) 100%
    );
    box-shadow: 
        0 0 15px var(--scroll-c2),
        0 0 30px rgba(255, 255, 255, 0.2),
        inset 0 0 15px rgba(255, 255, 255, 0.15);
}

::-webkit-scrollbar-thumb:active {
    box-shadow: 
        0 0 20px var(--scroll-c3),
        0 0 40px var(--scroll-c1);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-c1) rgba(10, 10, 20, 0.9);
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
    background: var(--cursor-primary);
    color: #0a0a14;
}

::-moz-selection {
    background: var(--cursor-primary);
    color: #0a0a14;
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */
html {
    scroll-behavior: smooth;
}