/*
 * ================================================================
 * SEQUR.CA - ADVANCED ANIMATIONS CSS
 * Particles Background + Scroll Animations + 3D Tilt Cards
 * ================================================================
 */

/* ====================================
   PARTICLES BACKGROUND CONTAINER
   ==================================== */

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0e1a 0%, #111827 50%, #1a202e 100%);
    pointer-events: none;
}

/* Overlay subtil pour améliorer lisibilité du texte */
#particles-js::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(10, 14, 26, 0.3) 100%);
    pointer-events: none;
}

/* ====================================
   SCROLL REVEAL ANIMATIONS
   ==================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes de direction */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Stagger items (délai progressif) */
.scroll-reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================
   3D CARD TILT EFFECT
   ==================================== */

.tilt-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.tilt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 212, 255, 0.15) 0%,
        transparent 50%
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.tilt-card:hover::before {
    opacity: 1;
}

/* Shine effect sur hover */
.tilt-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.tilt-card:hover::after {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Contenu de la card en 3D */
.tilt-card-content {
    position: relative;
    z-index: 2;
    transform: translateZ(20px);
}

/* ====================================
   ENHANCED NAVBAR SCROLL
   ==================================== */

.navbar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    background: rgba(10, 14, 26, 0.98) !important;
    backdrop-filter: blur(20px) saturate(180%);
}

/* ====================================
   COUNTER ANIMATIONS
   ==================================== */

.counter-animate {
    display: inline-block;
    transition: all 0.3s ease;
}

.counter-animate.counting {
    color: var(--primary-cyber);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ====================================
   PARALLAX ELEMENTS
   ==================================== */

.parallax {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ====================================
   LOADING STATES
   ==================================== */

.loading-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ====================================
   ENHANCED BUTTON INTERACTIONS
   ==================================== */

.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enhanced:active::before {
    width: 300px;
    height: 300px;
    transition: width 0s, height 0s;
}

/* ====================================
   TEXT ANIMATIONS
   ==================================== */

.text-glow {
    animation: text-glow 2s ease-in-out infinite;
}

@keyframes text-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.8),
                     0 0 30px rgba(0, 212, 255, 0.6);
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--primary-cyber);
    white-space: nowrap;
    animation: typing 3.5s steps(40) 1s 1 normal both,
               blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ====================================
   FLOATING ELEMENTS
   ==================================== */

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation-slow {
    animation: float 8s ease-in-out infinite;
}

.float-animation-fast {
    animation: float 4s ease-in-out infinite;
}

/* ====================================
   PULSE ANIMATIONS
   ==================================== */

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.7);
    }
}

/* ====================================
   GRADIENT ANIMATIONS
   ==================================== */

.gradient-shift {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

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

/* ====================================
   HOVER LIFT EFFECT (global)
   ==================================== */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ====================================
   RESPONSIVE ANIMATIONS
   ==================================== */

/* Réduire animations sur mobile pour performance */
@media (max-width: 768px) {
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-scale {
        transition-duration: 0.4s;
    }

    /* Désactiver tilt sur mobile (pas de hover) */
    .tilt-card {
        transform: none !important;
    }

    .tilt-card::before,
    .tilt-card::after {
        display: none;
    }
}

/* Respecter prefers-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-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-scale,
    .scroll-reveal-item {
        opacity: 1;
        transform: none;
    }
}

/* ====================================
   PERFORMANCE OPTIMIZATIONS
   ==================================== */

/* Hint browser for animations */
.will-animate {
    will-change: transform, opacity;
}

/* GPU acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zoom-in {
    animation: zoomIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ====================================
   END ANIMATIONS CSS
   ==================================== */
