/* Animations pour la page d'accueil - Optimisation Core Web Vitals */

/* Animation Cœur qui bat */
.beating-heart {
    position: relative;
    width: 80px;
    height: 70px;
    margin: 0 auto;
    animation: heartbeat 1.2s ease-in-out infinite;
    cursor: pointer;
}

.beating-heart:before,
.beating-heart:after {
    content: '';
    width: 40px;
    height: 64px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 40px 40px 0 0;
    transform-origin: 0 100%;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.beating-heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes heartbeat {
    0% { 
        transform: scale(1);
        filter: brightness(1);
    }
    14% { 
        transform: scale(1.15);
        filter: brightness(1.1);
    }
    28% { 
        transform: scale(1);
        filter: brightness(1);
    }
    42% { 
        transform: scale(1.15);
        filter: brightness(1.1);
    }
    70% { 
        transform: scale(1);
        filter: brightness(1);
    }
    100% { 
        transform: scale(1);
        filter: brightness(1);
    }
}

.beating-heart:hover {
    animation-duration: 0.8s;
}

/* Animation supplémentaire pour les pulsations */
.beating-heart::before {
    animation: pulse-ring 1.2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    }
    14%, 42% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.5), 0 0 0 8px rgba(255, 107, 107, 0.1);
    }
    70%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    }
}

/* Optimisation pour les performances */
.beating-heart {
    will-change: transform;
    contain: layout style paint;
}

/* Réduction de l'animation sur mobile pour économiser la batterie */
@media (prefers-reduced-motion: reduce) {
    .beating-heart {
        animation: none;
    }
}

@media (max-width: 768px) {
    .beating-heart {
        animation-duration: 1.5s; /* Plus lent sur mobile */
    }
}
