/* EFFET FLOCONS DE NEIGE - PÉRIODE DE NOËL */

.snowflake {
    position: fixed;
    top: -50px;
    z-index: 9999;
    user-select: none;
    cursor: default;
    pointer-events: none;
    color: #fff;
    font-size: 1em;
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 0.9),
        0 0 15px rgba(212, 165, 116, 0.3);
    animation: fall linear infinite, sway ease-in-out infinite, sparkle ease-in-out infinite;
    animation-duration: 12s, 4s, 5s;
    will-change: transform, opacity;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
        transform: translateY(5vh) rotate(18deg) scale(1);
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

@keyframes sway {
    0%, 100% {
        margin-left: 0;
    }
    50% {
        margin-left: 30px;
    }
}

@keyframes sparkle {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

/* Variations de flocons avec mouvement de balancement */
.snowflake:nth-child(3n+1) {
    animation-duration: 10s, 3.5s, 4.5s;
    font-size: 0.9em;
}

.snowflake:nth-child(3n+2) {
    animation-duration: 14s, 4.5s, 5.5s;
    font-size: 1.1em;
}

.snowflake:nth-child(3n) {
    animation-duration: 11s, 3.8s, 4.8s;
    font-size: 1em;
}

.snowflake:nth-child(5n+1) {
    animation-duration: 13s, 4.2s, 5.2s;
    font-size: 0.85em;
}

.snowflake:nth-child(5n+2) {
    animation-duration: 9s, 3.2s, 4.2s;
    font-size: 1.15em;
}

.snowflake:nth-child(5n+3) {
    animation-duration: 15s, 4.8s, 5.8s;
    font-size: 0.95em;
}

.snowflake:nth-child(5n+4) {
    animation-duration: 10.5s, 3.6s, 4.6s;
    font-size: 1.05em;
}

.snowflake:nth-child(5n) {
    animation-duration: 12.5s, 4.1s, 5.1s;
    font-size: 0.8em;
}

/* Couches de profondeur (effet 3D) */
.snowflake.layer-front {
    z-index: 10000;
    font-size: 1.4em;
    opacity: 1;
}

.snowflake.layer-middle {
    z-index: 9999;
    font-size: 1em;
    opacity: 0.85;
}

.snowflake.layer-back {
    z-index: 9998;
    font-size: 0.7em;
    opacity: 0.6;
    filter: blur(0.5px);
}

/* Effet de gel subtil sur le texte */
.snowflake::before {
    content: attr(data-char);
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(173, 216, 230, 0.3);
    filter: blur(1px);
    z-index: -1;
}

/* Responsive - moins de flocons sur mobile */
@media (max-width: 768px) {
    .snowflake:nth-child(n+11) {
        display: none;
    }
    
    .snowflake {
        font-size: 0.7em;
    }
    
    .snowflake.layer-front {
        font-size: 1.1em;
    }
    
    .snowflake.layer-back {
        display: none;
    }
}

/* Optimisation des performances */
@media (prefers-reduced-motion: reduce) {
    .snowflake {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        opacity: 0 !important;
    }
}
