/* ===================================
   Animations Spéciales Mr Jus
   =================================== */

/* Animation de liquide qui coule */
@keyframes liquid-flow {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }
}

/* Animation de bulles */
@keyframes bubble-rise {
    0% {
        transform: translateY(100%) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-20px) scale(1);
        opacity: 0;
    }
}

/* Effet de vague pour les boutons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:before {
    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:before {
    width: 300px;
    height: 300px;
}

/* Animation de chargement style jus */
.juice-loader {
    width: 40px;
    height: 60px;
    border: 3px solid var(--primary);
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

.juice-loader:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    animation: fill-glass 2s ease-in-out infinite;
}

@keyframes fill-glass {
    0% { height: 0; }
    50% { height: 100%; }
    100% { height: 0; }
}

/* Effet de brillance sur les images produits */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: transform 0.6s;
}

.shine-effect:hover:before {
    transform: rotate(45deg) translate(100%, 100%);
}

/* Animation pour les badges de stock */
@keyframes stock-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

.stock-low {
    animation: stock-pulse 2s infinite;
}

/* Effet de rotation 3D pour les cards */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(-5deg);
}

/* Animation d'apparition élégante */
@keyframes elegant-fade {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.elegant-appear {
    animation: elegant-fade 0.8s ease-out forwards;
}

/* Effet de particules pour célébration */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary);
    animation: confetti-fall 3s linear;
}

/* Hover effect pour les produits avec zoom */
.product-hover {
    overflow: hidden;
    position: relative;
}

.product-hover img {
    transition: transform 0.5s ease;
}

.product-hover:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* Animation de coeur pour les favoris */
@keyframes heart-beat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.heart-animation {
    animation: heart-beat 0.8s ease;
}

/* Loading dots animation */
.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 3px;
    animation: loading-dots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}