/* =========================================
   FLOCONS DE NEIGE QUI TOMBENT
   ========================================= */

.snowfall {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}

.snowfall span {
  position: absolute;
  top: -10vh;
  color: #fff;
  font-size: var(--size, 16px);
  line-height: 1;
  opacity: var(--opacity, .85);
  text-shadow: 0 0 6px rgba(200, 220, 255, .9),
               0 0 12px rgba(150, 190, 255, .5);
  animation: snow-fall var(--duration, 10s) linear var(--delay, 0s) infinite;
  will-change: transform;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  /* zone tactile un peu plus large */
  padding: 6px;
  margin: -6px;
}

@keyframes snow-fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  25%  { transform: translate3d(var(--sway, 30px), 25vh, 0) rotate(90deg); }
  50%  { transform: translate3d(calc(var(--sway, 30px) * -0.7), 50vh, 0) rotate(180deg); }
  75%  { transform: translate3d(var(--sway, 30px), 75vh, 0) rotate(270deg); }
  100% { transform: translate3d(0, 110vh, 0) rotate(360deg); }
}

.snowfall span:nth-child(1)  { left: 3%;  --size: 14px; --duration: 12s; --delay: -2s;  --sway: 40px;  --opacity: .85; }
.snowfall span:nth-child(2)  { left: 8%;  --size: 22px; --duration: 15s; --delay: -8s;  --sway: -50px; --opacity: .95; }
.snowfall span:nth-child(3)  { left: 13%; --size: 10px; --duration: 10s; --delay: -3s;  --sway: 35px;  --opacity: .70; }
.snowfall span:nth-child(4)  { left: 19%; --size: 18px; --duration: 18s; --delay: -12s; --sway: -45px; --opacity: .90; }
.snowfall span:nth-child(5)  { left: 25%; --size: 12px; --duration: 11s; --delay: -5s;  --sway: 55px;  --opacity: .75; }
.snowfall span:nth-child(6)  { left: 31%; --size: 26px; --duration: 20s; --delay: -15s; --sway: -40px; --opacity: .95; }
.snowfall span:nth-child(7)  { left: 37%; --size: 15px; --duration: 13s; --delay: -1s;  --sway: 45px;  --opacity: .80; }
.snowfall span:nth-child(8)  { left: 43%; --size: 9px;  --duration: 9s;  --delay: -6s;  --sway: -30px; --opacity: .65; }
.snowfall span:nth-child(9)  { left: 49%; --size: 20px; --duration: 16s; --delay: -10s; --sway: 50px;  --opacity: .90; }
.snowfall span:nth-child(10) { left: 55%; --size: 13px; --duration: 12s; --delay: -4s;  --sway: -55px; --opacity: .75; }
.snowfall span:nth-child(11) { left: 61%; --size: 24px; --duration: 19s; --delay: -14s; --sway: 40px;  --opacity: .95; }
.snowfall span:nth-child(12) { left: 67%; --size: 11px; --duration: 10s; --delay: -7s;  --sway: -35px; --opacity: .70; }
.snowfall span:nth-child(13) { left: 73%; --size: 17px; --duration: 14s; --delay: -2s;  --sway: 60px;  --opacity: .85; }
.snowfall span:nth-child(14) { left: 79%; --size: 8px;  --duration: 8s;  --delay: -5s;  --sway: -25px; --opacity: .60; }
.snowfall span:nth-child(15) { left: 85%; --size: 21px; --duration: 17s; --delay: -11s; --sway: 45px;  --opacity: .90; }
.snowfall span:nth-child(16) { left: 90%; --size: 14px; --duration: 12s; --delay: -9s;  --sway: -50px; --opacity: .80; }
.snowfall span:nth-child(17) { left: 95%; --size: 19px; --duration: 15s; --delay: -3s;  --sway: 35px;  --opacity: .85; }
.snowfall span:nth-child(18) { left: 1%;  --size: 16px; --duration: 13s; --delay: -13s; --sway: -40px; --opacity: .80; }
.snowfall span:nth-child(19) { left: 40%; --size: 23px; --duration: 21s; --delay: -16s; --sway: 55px;  --opacity: .95; }
.snowfall span:nth-child(20) { left: 92%; --size: 12px; --duration: 11s; --delay: -6s;  --sway: -45px; --opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .snowfall { display: none; }
}
