/* Décor partagé : seuls transform et opacity sont animés. */
.autumn-leaves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.autumn-leaf {
  position: absolute;
  top: -90px;
  left: var(--left);
  width: var(--size, 32px);
  color: var(--leaf-color, #dfab60);
  opacity: 0;
  animation: autumn-fall var(--duration, 24s) var(--delay, 0s) linear infinite;
}

.autumn-leaf svg {
  display: block;
  width: 100%;
  height: auto;
}

.autumn-leaf:nth-child(1) { --left: 7%; --size: 38px; --duration: 26s; --delay: -5s; }
.autumn-leaf:nth-child(2) { --left: 20%; --size: 26px; --duration: 31s; --delay: -20s; --leaf-color: #d47e55; }
.autumn-leaf:nth-child(3) { --left: 79%; --size: 42px; --duration: 28s; --delay: -12s; --leaf-color: #d3944b; }
.autumn-leaf:nth-child(4) { --left: 91%; --size: 30px; --duration: 34s; --delay: -26s; }
.autumn-leaf:nth-child(5) { --left: 35%; --size: 24px; --duration: 29s; --delay: -9s; --leaf-color: #c77350; }
.autumn-leaf:nth-child(6) { --left: 65%; --size: 34px; --duration: 32s; --delay: -24s; }
.autumn-leaf:nth-child(7) { --left: 13%; --size: 22px; --duration: 25s; --delay: -17s; --leaf-color: #e8c58b; }
.autumn-leaf:nth-child(8) { --left: 86%; --size: 28px; --duration: 30s; --delay: -3s; --leaf-color: #bf7055; }

@keyframes autumn-fall {
  0% { transform: translate(0, 0) rotate(-25deg); opacity: 0; }
  10% { opacity: .65; }
  30% { transform: translate(24px, 36vh) rotate(35deg); }
  60% { transform: translate(-18px, 72vh) rotate(-15deg); opacity: .55; }
  85% { opacity: .45; }
  100% { transform: translate(16px, calc(120vh + 100px)) rotate(65deg); opacity: 0; }
}

.autumn-sprig {
  position: absolute;
  top: 7px;
  width: 66px;
  height: 76px;
  pointer-events: none;
  transform-origin: 20% 95%;
  animation: autumn-sway 7s ease-in-out infinite;
}

.autumn-sprig--left { left: 9px; }
.autumn-sprig--right {
  right: 9px;
  scale: -1 1;
  transform-origin: 50% 95%;
  animation-delay: -3.5s;
}

@keyframes autumn-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}

@media (max-width: 768px) {
  .autumn-leaf:nth-child(n + 5) { display: none; }
  .autumn-sprig { width: 42px; height: 54px; top: 10px; }
  .autumn-sprig--left { left: 3px; }
  .autumn-sprig--right { right: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .autumn-leaf {
    animation: none;
    top: 15%;
    opacity: .4;
    transform: rotate(-25deg);
  }
  .autumn-leaf:nth-child(even) { top: 72%; transform: rotate(30deg); }
  .autumn-leaf:nth-child(n + 5) { display: none; }
  .autumn-sprig { animation: none; }
}
