/* Animations Premium - Artistiques et Spectaculaires */

/* Animation de révélation magique */
.magical-reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.3) rotateX(90deg);
    transform-style: preserve-3d;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(10px);
}

.magical-reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
}

/* Animation de particules flottantes */
.floating-particles {
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.5s ease-out;
}

.floating-particles.visible {
    opacity: 1;
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
}

.floating-particles.visible::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #28a745, #20c997, #17a2b8);
    border-radius: 50%;
    animation: particle-float 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.floating-particles.visible::after {
    content: '';
    position: absolute;
    top: -30px;
    right: 20%;
    width: 3px;
    height: 3px;
    background: linear-gradient(45deg, #ffc107, #fd7e14, #dc3545);
    border-radius: 50%;
    animation: particle-float 4s ease-in-out infinite reverse;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

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

@keyframes particle-float {
    0%, 100% { 
        transform: translateY(0px) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-15px) scale(1.2);
        opacity: 1;
    }
}

/* Animation de néon lumineux */
.neon-glow {
    opacity: 0;
    transform: scale(0.5) rotate(-5deg);
    transition: all 1s ease-out;
    filter: brightness(0) blur(5px);
}

.neon-glow.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: brightness(1.2) blur(0);
    animation: neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
    0% { 
        filter: brightness(1.2) drop-shadow(0 0 10px rgba(40, 167, 69, 0.8));
    }
    100% { 
        filter: brightness(1.5) drop-shadow(0 0 20px rgba(40, 167, 69, 1));
    }
}

/* Animation de liquide fluide */
.liquid-morph {
    opacity: 0;
    transform: scale(0.8) skewY(15deg);
    transition: all 1.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 50% 50% 50% 50% / 60% 40% 40% 60%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.liquid-morph.visible {
    opacity: 1;
    transform: scale(1) skewY(0deg);
    border-radius: 15px;
    animation: liquid-blob 8s ease-in-out infinite;
}

@keyframes liquid-blob {
    0%, 100% { 
        border-radius: 60% 40% 30% 70% / 60% 40% 70% 40%;
        transform: rotate(0deg);
    }
    50% { 
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(180deg);
    }
}

/* Animation de verre dépoli */
.glass-morphism {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 1.1s ease-out;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.glass-morphism.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: glass-shimmer 3s ease-in-out infinite;
}

@keyframes glass-shimmer {
    0%, 100% { 
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    50% { 
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* Animation d'aurore boréale */
.aurora-effect {
    opacity: 0;
    transform: translateY(50px) scale(0.7);
    transition: all 1.4s ease-out;
    background: linear-gradient(45deg, #00c9ff, #92fe9d, #fc00ff, #00c9ff);
    background-size: 400% 400%;
    filter: hue-rotate(0deg);
}

.aurora-effect.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: aurora-flow 8s ease-in-out infinite, hue-rotate 6s linear infinite;
}

@keyframes aurora-flow {
    0%, 100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg) brightness(1);
    }
    50% { 
        background-position: 100% 50%;
        filter: hue-rotate(180deg) brightness(1.2);
    }
}

@keyframes hue-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Animation de métamorphose */
.morphing-card {
    opacity: 0;
    transform: rotateY(90deg) scale(0.5);
    transition: all 1.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.morphing-card.visible {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
    animation: morph-shape 10s ease-in-out infinite;
}

@keyframes morph-shape {
    0%, 100% { 
        border-radius: 15px;
        transform: rotateY(0deg) scale(1);
    }
    25% { 
        border-radius: 50% 15px 50% 15px;
        transform: rotateY(90deg) scale(1.05);
    }
    50% { 
        border-radius: 15px 50% 15px 50%;
        transform: rotateY(180deg) scale(1);
    }
    75% { 
        border-radius: 50% 15px 50% 15px;
        transform: rotateY(270deg) scale(0.95);
    }
}

/* Animation de particules stellaires */
.stardust-effect {
    opacity: 0;
    transform: translateY(40px) scale(0);
    transition: all 1.8s ease-out;
    position: relative;
    overflow: visible;
}

.stardust-effect.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: stardust-burst 2s ease-out forwards;
}

.stardust-effect.visible::before,
.stardust-effect.visible::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

.stardust-effect.visible::before {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.stardust-effect.visible::after {
    top: 80%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes stardust-burst {
    0% { 
        transform: translateY(40px) scale(0) rotate(0deg);
        opacity: 0;
    }
    50% { 
        transform: translateY(0) scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% { 
        transform: translateY(0) scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0;
        transform: scale(0);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% { 
        opacity: 1;
        transform: scale(1.5);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
}

/* Animation de vague fluide */
.wave-motion {
    opacity: 0;
    transform: translateY(30px) translateX(-20px);
    transition: all 1.5s cubic-bezier(0.4, 0, 0.6, 1);
}

.wave-motion.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
    animation: wave-flow 4s ease-in-out infinite;
}

@keyframes wave-flow {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% { 
        transform: translateY(-5px) translateX(10px) rotate(2deg);
    }
    50% { 
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    75% { 
        transform: translateY(5px) translateX(-10px) rotate(-2deg);
    }
}

/* Animation de portail dimensionnel */
.portal-effect {
    opacity: 0;
    transform: scale(0) rotate(720deg);
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    background: radial-gradient(circle, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
}

.portal-effect.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: portal-spin 8s linear infinite, portal-pulse 3s ease-in-out infinite;
}

@keyframes portal-spin {
    0% { 
        background-position: 0% 50%;
        border-radius: 50%;
    }
    50% { 
        background-position: 100% 50%;
        border-radius: 30% 70% 30% 70%;
    }
    100% { 
        background-position: 200% 50%;
        border-radius: 50%;
    }
}

@keyframes portal-pulse {
    0%, 100% { 
        box-shadow: 0 0 0 rgba(102, 126, 234, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
        transform: scale(1.05);
    }
}

/* Animation de feuilles d'automne */
.autumn-leaves {
    opacity: 0;
    transform: translateY(-50px) rotate(180deg) scale(0.5);
    transition: all 2s ease-out;
    position: relative;
}

.autumn-leaves.visible {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    animation: fall-leaves 10s ease-in-out infinite;
}

.autumn-leaves.visible::before,
.autumn-leaves.visible::after {
    content: '🍂';
    position: absolute;
    font-size: 20px;
    animation: leaf-float 6s ease-in-out infinite;
}

.autumn-leaves.visible::before {
    top: -30px;
    left: 10%;
    animation-delay: 0s;
}

.autumn-leaves.visible::after {
    top: -25px;
    right: 15%;
    animation-delay: 2s;
    content: '🍁';
}

@keyframes fall-leaves {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% { 
        transform: translateY(10px) rotate(45deg) scale(1.1);
    }
    50% { 
        transform: translateY(-5px) rotate(-30deg) scale(0.95);
    }
    75% { 
        transform: translateY(15px) rotate(60deg) scale(1.05);
    }
}

@keyframes leaf-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Animation de cristal */
.crystal-effect {
    opacity: 0;
    transform: scale(0.3) rotate(45deg);
    transition: all 1.7s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 
        0 0 20px rgba(255,255,255,0.3),
        inset 0 0 20px rgba(255,255,255,0.1);
}

.crystal-effect.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: crystal-shine 4s ease-in-out infinite, crystal-rotate 20s linear infinite;
}

@keyframes crystal-shine {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(255,255,255,0.3),
            inset 0 0 20px rgba(255,255,255,0.1);
    }
    50% { 
        box-shadow: 
            0 0 40px rgba(255,255,255,0.6),
            inset 0 0 40px rgba(255,255,255,0.2);
    }
}

@keyframes crystal-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Effets hover avancés */
.magical-reveal:hover {
    transform: translateY(-10px) scale(1.05) rotateY(15deg);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.neon-glow:hover {
    filter: brightness(1.8) drop-shadow(0 0 30px rgba(40, 167, 69, 1));
    transform: scale(1.1);
}

.liquid-morph:hover {
    border-radius: 50% 50% 20% 50%;
    transform: scale(1.1) rotate(5deg);
}

.glass-morphism:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-5px) scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
    .magical-reveal,
    .neon-glow,
    .liquid-morph,
    .glass-morphism,
    .aurora-effect,
    .morphing-card,
    .stardust-effect,
    .portal-effect {
        transform: translateY(20px) scale(0.9);
        transition-duration: 0.8s;
    }
    
    .floating-particles::before,
    .floating-particles::after,
    .stardust-effect.visible::before,
    .stardust-effect.visible::after {
        display: none;
    }
}

/* Préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    .magical-reveal,
    .neon-glow,
    .liquid-morph,
    .glass-morphism,
    .aurora-effect,
    .morphing-card,
    .stardust-effect,
    .portal-effect,
    .floating-particles,
    .wave-motion,
    .autumn-leaves,
    .crystal-effect {
        animation: none !important;
        transition: opacity 0.3s ease !important;
        transform: none !important;
    }
    
    .magical-reveal.visible,
    .neon-glow.visible,
    .liquid-morph.visible,
    .glass-morphism.visible,
    .aurora-effect.visible,
    .morphing-card.visible,
    .stardust-effect.visible,
    .portal-effect.visible,
    .floating-particles.visible,
    .wave-motion.visible,
    .autumn-leaves.visible,
    .crystal-effect.visible {
        opacity: 1;
        transform: none;
    }
}
