/* Overlay plein écran pour l'avalanche de cadeaux */
.gift-avalanche-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9000;
}

/* Conteneur d’un cadeau */
.gift {
    position: absolute;
    will-change: transform;
}

/* Image du cadeau */
.gift img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Étoiles d'explosion */
.star {
    position: absolute;
    width: 28px;
    height: 28px;
    pointer-events: none;
    opacity: 0;
    transform-origin: center center;
    animation: star-explode 900ms ease-out forwards;
}

.star svg {
    width: 100%;
    height: 100%;
    display: block;
}

.star svg path {
    fill: #ffd700;
    stroke: #ffae00;
    stroke-width: 1;
}

@keyframes star-explode {
    from {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 1;
    }
    to {
        transform: translate(calc(-50% + var(--dx)),
        calc(-50% + var(--dy))) scale(1.8);
        opacity: 0;
    }
}

/* Bonhomme de neige en bas de l'écran */
#snowman {
    position: fixed;
    bottom: 0;
    width: 160px;
    height: auto;
    z-index: 9050;
    pointer-events: none;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Père Noël volant */
#santa {
    position: fixed;
    width: 450px;
    height: auto;
    z-index: 9100;
    pointer-events: auto;
}

/* Particules de neige derrière le traineau */
.particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff, #cfe8ff);
    pointer-events: none;
    opacity: 0.9;
    box-shadow: 0 0 6px rgba(255,255,255,0.9);
    animation: snow-particle 2s linear forwards;
}

@keyframes snow-particle {
    from { transform: translateY(0); opacity: 0.9; }
    to   { transform: translateY(20px); opacity: 0; }
}

/* Image POUF */
#poufImage {
    position: fixed;
    display: none;
    z-index: 9200;
    pointer-events: none;
    transform-origin: center center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Overlay pour la neige */
.snow-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 100; /* bien en dessous de l'avalanche (9000+) et du Père Noël */
}

/* Flocon individuel */
.snowflake {
    position: absolute;
    top: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff, rgba(255,255,255,0.5));
    opacity: 0.95;
    box-shadow: 0 0 8px rgba(255,255,255,0.9);
    pointer-events: none;
    animation: snow-fall var(--duration, 10s) linear forwards;
}

/* Animation de chute avec dérive horizontale */
@keyframes snow-fall {
    0% {
        transform: translate3d(0, -10px, 0);
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--drift, 40px), 110vh, 0);
        opacity: 0;
    }
}
body.has-xmas-background .main-wrapper {
    background-image: url('../img/events/noel/back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Éclaircissement */
body.has-xmas-background .main-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.35); /* éclaircir davantage si tu veux */
    z-index: -1;
    pointer-events: none;
}