/* Animations CSS avancées pour Memora */

/* Effet de glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Effet de néon */
.neon {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px currentColor;
}

/* Effet de glow */
.glow {
    box-shadow: 
        0 0 5px rgba(99, 102, 241, 0.5),
        0 0 10px rgba(99, 102, 241, 0.3),
        0 0 15px rgba(99, 102, 241, 0.2);
}

.glow:hover {
    box-shadow: 
        0 0 10px rgba(99, 102, 241, 0.6),
        0 0 20px rgba(99, 102, 241, 0.4),
        0 0 30px rgba(99, 102, 241, 0.3);
}

/* Effet de gradient animé */
.gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Effet de parallaxe */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Effet de morphing */
.morph {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* Effet de wave */
.wave {
    position: relative;
    overflow: hidden;
}

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

@keyframes wave {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Effet de ripple */
.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.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

/* Effet de tilt */
.tilt {
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Effet de blur au survol */
.blur-hover {
    transition: filter 0.3s;
}

.blur-hover:hover {
    filter: blur(2px);
}

/* Effet de zoom au survol */
.zoom-hover {
    transition: transform 0.3s;
}

.zoom-hover:hover {
    transform: scale(1.1);
}

/* Effet de rotation */
.rotate-hover {
    transition: transform 0.3s;
}

.rotate-hover:hover {
    transform: rotate(5deg);
}

/* Effet de slide */
.slide-hover {
    transition: transform 0.3s;
}

.slide-hover:hover {
    transform: translateX(10px);
}

/* Effet de bounce */
.bounce-hover {
    transition: transform 0.3s;
}

.bounce-hover:hover {
    animation: bounce 0.6s;
}

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

/* Effet de pulse continu */
.pulse-continuous {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Effet de shimmer amélioré */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Effet de loading spinner amélioré */
.spinner-enhanced {
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    animation: spin 1s linear infinite;
    position: relative;
}

.spinner-enhanced::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 0.5s linear infinite reverse;
}

/* Effet de texte dégradé */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Effet de bordure animée */
.border-animated {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.border-animated::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: inherit;
    z-index: -1;
    animation: gradient 3s ease infinite;
    background-size: 200% 200%;
}

/* Effet de focus amélioré */
.focus-ring {
    transition: box-shadow 0.3s;
}

.focus-ring:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 0 0 6px rgba(99, 102, 241, 0.05);
}

/* Effet de skeleton loading amélioré */
.skeleton-enhanced {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

/* Effet de card flip */
.card-flip {
    perspective: 1000px;
}

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

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

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

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