/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.25;
    }
}

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

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Scroll Wheel Animation */
@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
}

/* Node Glow Animation */
@keyframes nodeGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 228, 184, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 228, 184, 0.6);
        transform: scale(1.05);
    }
}

/* Flow Line Animation */
@keyframes flowLine {
    0% {
        opacity: 0;
        width: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        width: 32px;
    }
}

/* Logo Scroll Animation */
@keyframes logoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Rotate Animation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* Base hidden state for scroll animations */
.scroll-hidden {
    opacity: 0;
}

/* Reveal animation classes */
.reveal {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-right {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-scale {
    animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger delays for multiple elements */
.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }
.reveal-delay-5 { animation-delay: 0.5s; }
.reveal-delay-6 { animation-delay: 0.6s; }

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 228, 184, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

/* ========================================
   HOVER ANIMATIONS
   ======================================== */

/* Glow on hover */
.hover-glow {
    transition: all var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 40px rgba(0, 228, 184, 0.4);
    transform: translateY(-2px);
}

/* Scale on hover */
.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Lift on hover */
.hover-lift {
    transition: all var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

/* Gradient text animation */
.gradient-text-animated {
    background: linear-gradient(
        90deg,
        var(--color-primary),
        var(--color-accent),
        var(--color-secondary),
        var(--color-primary)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
}

/* Typing animation */
.typing {
    overflow: hidden;
    border-right: 2px solid var(--color-primary);
    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 {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--color-primary);
    }
}

/* ========================================
   PARTICLE ANIMATIONS
   ======================================== */

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ========================================
   TRANSITIONS
   ======================================== */

/* Smooth all transitions */
.transition-all {
    transition: all var(--transition-base);
}

.transition-slow {
    transition: all var(--transition-slow);
}

/* Specific property transitions */
.transition-colors {
    transition: color var(--transition-base),
                background-color var(--transition-base),
                border-color var(--transition-base);
}

.transition-transform {
    transition: transform var(--transition-base);
}

.transition-opacity {
    transition: opacity var(--transition-base);
}

/* ========================================
   UTILITY ANIMATIONS
   ======================================== */

/* Blur in */
@keyframes blurIn {
    from {
        filter: blur(10px);
        opacity: 0;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

.blur-in {
    animation: blurIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide in from bottom */
@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-bottom {
    animation: slideInBottom 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Zoom in */
@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

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

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

/* Reduce motion for users who prefer it */
@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;
    }
    
    .float,
    .bounce,
    .pulse {
        animation: none !important;
    }
}

/* ========================================
   INTERACTIVE ANIMATIONS
   ======================================== */

/* Button press animation */
.btn-press:active {
    transform: scale(0.95);
}

/* Card flip animation */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    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;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   SLOGAN SECTION ANIMATIONS
   ======================================== */

/* Breathe animation for background */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Breathe text animation */
@keyframes breathe-text {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

/* Pulse glow animation for gradient text */
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 228, 184, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 35px rgba(0, 228, 184, 0.9));
    }
}

/* Pulse arrow animation */
@keyframes pulse-arrow {
    0%, 100% {
        transform: scale(1) translateX(0);
        filter: drop-shadow(0 0 20px rgba(0, 228, 184, 0.6));
    }
    50% {
        transform: scale(1.1) translateX(5px);
        filter: drop-shadow(0 0 30px rgba(0, 228, 184, 0.9));
    }
}

/* Pulse arrow animation - version rotée pour responsive */
@keyframes pulse-arrow-rotated {
    0%, 100% {
        transform: rotate(90deg) scale(1) translateX(0);
        filter: drop-shadow(0 0 20px rgba(0, 228, 184, 0.6));
    }
    50% {
        transform: rotate(90deg) scale(1.1) translateX(5px);
        filter: drop-shadow(0 0 30px rgba(0, 228, 184, 0.9));
    }
}

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

/* Slow rotation animation */
@keyframes rotate-slow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

/* Gradient rotation for cards */
@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
