/* ============================================
   ANIMATIONS SPECTACULAIRES & MODERNES
   Earthstralia - Effets visuels avancés
   ============================================ */

/* Animations de base */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations de gradient animé */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* Animation de brillance (shimmer) */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation de pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Animation de bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Animation de rotation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* Animation de glow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 208, 132, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 208, 132, 0.8), 0 0 60px rgba(6, 147, 227, 0.5);
    }
}

/* Animation de particules flottantes */
@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Animation de texte dévoilé */
@keyframes revealText {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Animation de ligne qui se dessine */
@keyframes drawLine {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================
   APPLICATIONS DES ANIMATIONS
   ============================================ */

/* Hero Section - Animations spectaculaires */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.1) 0%, rgba(6, 147, 227, 0.1) 50%, rgba(0, 208, 132, 0.1) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title-main {
    animation: fadeInDown 1s ease-out 0.2s both;
}

.hero-title-sub {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-description {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stats {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-cta {
    animation: fadeInUp 1s ease-out 1s both;
}

/* Stats avec effet de compteur animé */
.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    animation: pulse 2s ease-in-out infinite;
}

.stat-number {
    background: linear-gradient(135deg, #00d084 0%, #0693e3 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    font-weight: 900;
}

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

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

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

.btn-primary {
    animation: glow 3s ease-in-out infinite;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 208, 132, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

/* Cards avec animations */
.service-card,
.pricing-card,
.testimonial-card,
.result-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out both;
}

.service-card:hover,
.pricing-card:hover,
.testimonial-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }
.pricing-card:nth-child(4) { animation-delay: 0.4s; }

/* Badges animés */
.pricing-badge,
.service-badge {
    animation: bounce 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.pricing-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: rotate 3s linear infinite;
}

/* Section avec effet parallaxe */
.hero-background-image {
    animation: float 20s ease-in-out infinite;
    transform-origin: center;
}

/* Video banner avec effet */
.video-banner {
    position: relative;
    overflow: hidden;
}

.video-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.05) 0%, rgba(6, 147, 227, 0.05) 100%);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    z-index: 0;
}

.video-wrapper {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.video-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 208, 132, 0.3);
}

/* Icons avec animation */
.service-icon,
.proof-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}

.service-icon:nth-child(odd) {
    animation-delay: 0.5s;
}

.service-icon:nth-child(even) {
    animation-delay: 1s;
}

/* Navigation avec effet glassmorphism amélioré */
.navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-menu li a {
    position: relative;
    transition: all 0.3s ease;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d084, #0693e3);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

/* Stats avec effet de révélation */
.result-number {
    font-weight: 900;
    background: linear-gradient(135deg, #00d084 0%, #0693e3 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Formulaires avec animations */
.form-group input,
.form-group textarea,
.form-group select {
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 208, 132, 0.2);
}

/* Footer avec effet */
.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d084, #0693e3, transparent);
    animation: shimmer 3s linear infinite;
}

/* Effet de révélation au scroll */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animations directionnelles */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Effet de particules en arrière-plan (CSS pur) */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(0, 208, 132, 0.8), transparent);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 15s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 20s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 19s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 17s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 21s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1.5s; animation-duration: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 3.5s; animation-duration: 22s; }

/* CTA Section avec effet spécial */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 208, 132, 0.1), transparent);
    animation: rotate 20s linear infinite;
}

.cta-content {
    position: relative;
    z-index: 1;
}

/* Loading animation pour les images */
img {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

img.loaded {
    opacity: 1;
}

/* Ripple effect pour boutons */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn {
    position: relative;
    overflow: hidden;
}

/* Amélioration des transitions globales */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Effet de cursor personnalisé (optionnel) */
.cursor-glow {
    cursor: pointer;
    position: relative;
}

.cursor-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 208, 132, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.cursor-glow:hover::after {
    width: 200px;
    height: 200px;
}

/* Responsive - Désactiver certaines animations sur mobile */
@media (max-width: 768px) {
    .particles-bg {
        display: none;
    }
    
    .hero::before {
        animation: none;
    }
    
    * {
        animation-duration: 0.5s !important;
    }
}

/* Préférences d'accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

