/* Custom Styles & Animations */

/* ============================================
   THEME - Mode Sombre Uniquement
   ============================================ */

/* Variables CSS */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --border-color: #252542;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #60a5fa, #a78bfa);
}

/* Selection color */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* Glow animation for hero text */
@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.5),
                     0 0 30px rgba(59, 130, 246, 0.3);
    }
    to {
        text-shadow: 0 0 30px rgba(59, 130, 246, 0.8),
                     0 0 50px rgba(59, 130, 246, 0.5),
                     0 0 70px rgba(139, 92, 246, 0.4);
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse animation variant */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Gradient border animation */
@keyframes gradient-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Card hover effects */
.group {
    transition: all 0.3s ease;
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-4px);
}

/* Button hover glow */
.btn-glow {
    position: relative;
    overflow: hidden;
}

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

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

/* Canvas container */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Section dividers */
.section-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, #252542, transparent);
}

/* Code block styling */
code, .font-mono {
    font-feature-settings: "liga" 1, "calt" 1;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading animation */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated underline for links */
.animated-underline {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* Particle effect container */
.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    /* Mobile navigation improvements */
    nav {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Better touch targets on mobile */
    button, a {
        min-height: 44px;
    }
    
    /* Optimize service cards for mobile */
    .gsap-service-card {
        margin-bottom: 1rem;
    }
    
    /* Stats smaller on mobile */
    .gsap-hero-stats .text-3xl {
        font-size: 2rem;
    }
    
    /* CTA buttons full width on mobile */
    .gsap-hero-cta a {
        width: 100%;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable GSAP animations for reduced motion */
    .gsap-hero-badge,
    .gsap-hero-title,
    .gsap-hero-subtitle,
    .gsap-hero-cta,
    .gsap-service-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
