/**
 * CSS Commun pour toutes les animations saisonnières
 */

#seasonal-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Élément d'animation générique */
.seasonal-element {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

/* Flocons de neige */
.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

@keyframes sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(30px);
    }
}

/* Feuilles d'automne */
.leaf {
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: fall-leaf linear infinite, spin linear infinite;
}

@keyframes fall-leaf {
    0% {
        transform: translateY(-10vh) translateX(0);
    }
    100% {
        transform: translateY(110vh) translateX(50px);
    }
}

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

/* Fantômes */
.ghost {
    width: 40px;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: float-ghost linear infinite, wave linear infinite;
}

@keyframes float-ghost {
    0% {
        transform: translateY(110vh);
    }
    100% {
        transform: translateY(-10vh);
    }
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0) scaleX(1);
    }
    25% {
        transform: translateX(-20px) scaleX(0.9);
    }
    75% {
        transform: translateX(20px) scaleX(1.1);
    }
}

/* Feux d'artifice */
.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    animation: explode 1s ease-out;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

/* Pétales de fleurs */
.petal {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: fall-petal linear infinite, sway-petal ease-in-out infinite;
}

@keyframes fall-petal {
    0% {
        transform: translateY(-10vh);
    }
    100% {
        transform: translateY(110vh);
    }
}

@keyframes sway-petal {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(20px) rotate(10deg);
    }
    75% {
        transform: translateX(-20px) rotate(-10deg);
    }
}

/* Confettis */
.confetti {
    width: 10px;
    height: 15px;
    animation: fall-confetti linear infinite;
}

@keyframes fall-confetti {
    0% {
        transform: translateY(-10vh) rotate(0deg) translateX(0);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(90deg) translateX(-20px);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(20px);
    }
    75% {
        transform: translateY(75vh) rotate(270deg) translateX(-20px);
    }
    100% {
        transform: translateY(110vh) rotate(360deg) translateX(0);
        opacity: 0.3;
    }
}

/* Étoiles filantes */
.star {
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    animation: shoot-star linear infinite;
}

@keyframes shoot-star {
    0% {
        transform: translate(-10vw, -10vh);
        opacity: 1;
    }
    100% {
        transform: translate(110vw, 110vh);
        opacity: 0;
    }
}

.star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    transform: translateX(-100px) rotate(-45deg);
}

/* Désactivation sur mobile si nécessaire */
@media (max-width: 768px) {
    body.seasonal-disable-mobile #seasonal-animation-container {
        display: none;
    }
}
