/* 
 * MyCustomSong - Animations & Effects
 * Animations complémentaires pour le site
 */

/* Animation de fade-in lors du chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation de scale-in */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation de slide-up */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animation de slide-in from left */
@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation de slide-in from right */
@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Animation de wave pour les notes de musique */
@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

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

/* Animation de changement de gradient */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Classes d'animations */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.scale-in {
    animation: scaleIn 0.7s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.7s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.7s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.7s ease-out forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.wave {
    animation: wave 3s infinite;
}

.rotate {
    animation: rotate 10s linear infinite;
}

/* Animation des éléments au scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animations spécifiques */
.hero-section {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.hero-text h1 {
    animation: fadeIn 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-text p {
    animation: fadeIn 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeIn 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-stats {
    animation: fadeIn 1s ease 0.8s forwards;
    opacity: 0;
}

.hero-image {
    animation: scaleIn 1s ease 0.5s forwards;
    opacity: 0;
}

.step-card:nth-child(1) {
    animation: slideUp 0.5s ease 0.1s forwards;
    opacity: 0;
}

.step-card:nth-child(2) {
    animation: slideUp 0.5s ease 0.2s forwards;
    opacity: 0;
}

.step-card:nth-child(3) {
    animation: slideUp 0.5s ease 0.3s forwards;
    opacity: 0;
}

.step-card:nth-child(4) {
    animation: slideUp 0.5s ease 0.4s forwards;
    opacity: 0;
}

.pricing-card {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.pricing-card:nth-child(1) {
    animation-delay: 0.1s;
}

.pricing-card:nth-child(2) {
    animation-delay: 0.3s;
}

.pricing-card:nth-child(3) {
    animation-delay: 0.5s;
}

.play-button:hover i {
    animation: pulse 1s infinite;
}

.btn-primary, .btn-primary:hover {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Effets de survol améliorés */
.song-card:hover .play-button {
    animation: pulse 2s infinite;
}

.footer-col h3::after {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

.gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

.nav-link:hover {
    animation: pulse 1s;
}

/* Animation du lecteur audio */
.progress {
    position: relative;
    overflow: hidden;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 5px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(0);
    animation: progressGlow 2s infinite;
}

@keyframes progressGlow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Animation pour le menu mobile */
.mobile-menu.active {
    animation: slideInRight 0.3s forwards;
}

.mobile-menu.closing {
    animation: slideOutRight 0.3s forwards;
}

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

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Animation des ondes dans le footer */
.wave-1 {
    animation: wave1 20s linear infinite;
}

.wave-2 {
    animation: wave2 15s linear infinite;
}

@keyframes wave1 {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes wave2 {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(25%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Animation du formulaire newsletter */
.newsletter form:focus-within {
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
}

.newsletter button:hover {
    animation: pulse 1s infinite;
}

/* Animation pour FAQ */
.faq-item.active {
    animation: expandFaq 0.3s forwards;
}

@keyframes expandFaq {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(5px);
    }
}