/**
 * Styles CSS pour les décorations de Noël
 * Module ChristmasDecor pour PrestaShop
 */

/* Empêcher le débordement horizontal/vertical causé par les animations */
html.christmas-active,
html.christmas-active body {
    overflow-x: hidden;
}

/* Container principal des décorations */
#christmas-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483647;
    overflow: hidden;
}

/* Container pour les flocons de neige Type 1 */
#christmas-snowflakes-type1-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483646;
    overflow: hidden;
}

/* Container pour les flocons de neige Type 2 */
#christmas-snowflakes-type2-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483645;
    overflow: hidden;
}

/* Container pour les flocons de neige Type 3 */
#christmas-snowflakes-type3-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483644;
    overflow: hidden;
}

/* Container pour les bonbons de Noël */
#christmas-candies-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483643;
    overflow: hidden;
}

/* Container pour les bonhommes de neige */
#christmas-snowman-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483642;
    overflow: hidden;
}

/* ========================================
   FLOCONS DE NEIGE (Lottie)
   ======================================== */

.christmas-snowflake-lottie {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    animation: snowfall linear infinite;
    opacity: 0.8;
}

/* Animation de chute des flocons */
@keyframes snowfall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh - 100px)) rotate(360deg);
        opacity: 0;
    }
}

/* Variations de taille selon l'intensité */
.christmas-intensity-low .christmas-snowflake-lottie {
    width: 40px;
    height: 40px;
}

.christmas-intensity-high .christmas-snowflake-lottie {
    width: 80px;
    height: 80px;
}

/* ========================================
   BONBONS DE NOËL (Lottie)
   ======================================== */

.christmas-candy-lottie {
    position: absolute;
    width: 100px;
    height: 100px;
    pointer-events: none;
    opacity: 0.9;
    animation: candyFloat 3s ease-in-out infinite;
}

/* Animation de flottement des bonbons */
@keyframes candyFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Variations de taille selon l'intensité */
.christmas-intensity-low .christmas-candy-lottie {
    width: 80px;
    height: 80px;
}

.christmas-intensity-high .christmas-candy-lottie {
    width: 120px;
    height: 120px;
}

/* ========================================
   BONHOMMES DE NEIGE (Lottie)
   ======================================== */

.christmas-snowman-lottie {
    position: absolute;
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
    pointer-events: none;
    opacity: 0.9;
    animation: snowmanBounce 4s ease-in-out infinite;
}

.christmas-snowman-lottie svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Animation de rebond des bonhommes de neige */
@keyframes snowmanBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

/* Variations de taille selon l'intensité */
.christmas-intensity-low .christmas-snowman-lottie {
    width: 55px;
    height: 55px;
}

.christmas-intensity-high .christmas-snowman-lottie {
    width: 85px;
    height: 85px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablette */
@media (max-width: 1024px) {
    .christmas-snowflake-lottie {
        width: 50px;
        height: 50px;
    }

    .christmas-candy-lottie {
        width: 80px;
        height: 80px;
    }

    .christmas-snowman-lottie {
        width: 60px;
        height: 60px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .christmas-snowflake-lottie {
        width: 40px;
        height: 40px;
    }

    .christmas-candy-lottie {
        width: 60px;
        height: 60px;
    }

    .christmas-snowman-lottie {
        width: 50px;
        height: 50px;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .christmas-snowflake-lottie {
        width: 30px;
        height: 30px;
    }

    .christmas-candy-lottie {
        width: 50px;
        height: 50px;
    }

    .christmas-snowman-lottie {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   PERFORMANCES
   ======================================== */

/* Optimisation des animations */
.christmas-snowflake-lottie,
.christmas-candy-lottie,
.christmas-snowman-lottie {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Réduire les animations pour les appareils moins performants */
@media (prefers-reduced-motion: reduce) {
    .christmas-snowflake-lottie,
    .christmas-candy-lottie,
    .christmas-snowman-lottie {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
