/* ==================== VARIABLES THÈME ==================== */

:root[data-theme="dark"] {
    /* Couleurs principales */
    --bg-primary: #0a0a1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(0, 0, 0, 0.7);
    --bg-hover: rgba(0, 212, 255, 0.1);
    
    /* Texte */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    
    /* Accents */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099cc;
    --accent-success: #00ff00;
    --accent-warning: #ffc800;
    --accent-error: #ff0000;
    
    /* Bordures */
    --border-color: rgba(0, 212, 255, 0.3);
    --border-hover: rgba(0, 212, 255, 0.6);
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.5);
    
    /* Overlay */
    --overlay: rgba(0, 0, 0, 0.8);
}

:root[data-theme="light"] {
    /* Couleurs principales */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-hover: rgba(0, 150, 200, 0.1);
    
    /* Texte */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #777777;
    
    /* Accents */
    --accent-primary: #0096c7;
    --accent-secondary: #0077b6;
    --accent-success: #00c851;
    --accent-warning: #ff8800;
    --accent-error: #cc0000;
    
    /* Bordures */
    --border-color: rgba(0, 150, 200, 0.3);
    --border-hover: rgba(0, 150, 200, 0.6);
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 150, 200, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 150, 200, 0.3);
    
    /* Overlay */
    --overlay: rgba(0, 0, 0, 0.6);
}

/* ==================== ANIMATIONS ==================== */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide In From Bottom */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Glow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px var(--accent-primary);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-primary);
    }
}

/* ==================== CLASSES UTILITAIRES ==================== */

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideInUp 0.4s ease;
}

.animate-slide-right {
    animation: slideInRight 0.4s ease;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Transitions smooth */
.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ==================== THEME TOGGLE BUTTON ==================== */

.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-secondary);
    color: var(--bg-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.theme-toggle:active {
    transform: rotate(180deg) scale(0.95);
}

/* Icon rotation */
.theme-toggle .icon {
    transition: transform 0.3s ease;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .theme-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

/* ==================== DRAG & DROP ==================== */

.draggable {
    cursor: move;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.draggable:hover {
    transform: scale(1.02);
}

.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.drag-over {
    border: 2px dashed var(--accent-primary);
    background: var(--bg-hover);
}

.drop-zone {
    min-height: 100px;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.drop-zone.active {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}
