/* ========================================
   ANIMATIONS SAISONNIERES - Lunaris V5
   Flocons interactifs, animations fluides
   ======================================== */

/* ========== BANDEAU PROMO ANIMÉ ========== */
.promo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, var(--primary, #a169f7), var(--secondary, #8a45e4), var(--accent, #f1c40f), var(--primary, #a169f7));
  background-size: 300% 100%;
  animation: bannerGradient 4s ease infinite;
  padding: 12px 50px 12px 20px;
  text-align: center;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.promo-banner.theme-noel {
  background: linear-gradient(90deg, #c0392b, #27ae60, #c0392b, #27ae60);
  background-size: 300% 100%;
}

.promo-banner.theme-halloween {
  background: linear-gradient(90deg, #e67e22, #8e44ad, #2c3e50, #e67e22);
  background-size: 300% 100%;
}

.promo-banner.theme-ete {
  background: linear-gradient(90deg, #f39c12, #e74c3c, #3498db, #f39c12);
  background-size: 300% 100%;
}

.promo-banner .banner-icon {
  font-size: 1.2rem;
  animation: iconBounce 1s ease-in-out infinite;
}

.promo-banner .banner-text {
  flex: 1;
}

.promo-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
  margin-left: 8px;
}

.promo-banner a:hover {
  text-decoration: none;
}

.promo-banner .close-banner {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.promo-banner .close-banner:hover {
  opacity: 1;
  background: rgba(255,255,255,0.3);
  transform: translateY(-50%) scale(1.1);
}

@keyframes bannerGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Adjust body/header when banner is present */
body.has-banner {
  padding-top: 48px;
}

body.has-banner header {
  top: 48px !important;
}

body.has-banner header.fixed-header {
  top: 68px !important;
}

/* ========== CONTAINER SAISONNIER GLOBAL ========== */
#season-effects-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

#season-effects-container > * {
  pointer-events: auto;
}

/* ========== NOEL - Flocons de neige ========== */
.snowflake {
  position: fixed;
  color: #fff;
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(255,255,255,0.9);
  user-select: none;
  z-index: 1;
  pointer-events: auto;
  cursor: default;
  opacity: 0.9;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.snowflake:hover {
  transform: scale(1.8) rotate(180deg) !important;
  opacity: 1;
  text-shadow: 0 0 20px rgba(255,255,255,1);
}

/* Static snowflakes fallback (CSS only) */
.snowflakes-static {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.snowflakes-static .snowflake {
  position: absolute;
  animation: snowfallStatic linear infinite;
  pointer-events: none;
}

@keyframes snowfallStatic {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 1;
  }
  25% {
    transform: translateY(25vh) rotate(90deg) translateX(20px);
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(-20px);
  }
  75% {
    transform: translateY(75vh) rotate(270deg) translateX(15px);
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(-15px);
    opacity: 0.3;
  }
}

/* Generate multiple snowflakes with different positions and timings */
.snowflakes-static .snowflake:nth-child(1) { left: 3%; font-size: 0.9em; animation-duration: 12s; animation-delay: -2s; }
.snowflakes-static .snowflake:nth-child(2) { left: 8%; font-size: 1.3em; animation-duration: 15s; animation-delay: -4s; }
.snowflakes-static .snowflake:nth-child(3) { left: 13%; font-size: 1em; animation-duration: 10s; animation-delay: -6s; }
.snowflakes-static .snowflake:nth-child(4) { left: 18%; font-size: 1.2em; animation-duration: 18s; animation-delay: -8s; }
.snowflakes-static .snowflake:nth-child(5) { left: 23%; font-size: 0.8em; animation-duration: 14s; animation-delay: -1s; }
.snowflakes-static .snowflake:nth-child(6) { left: 28%; font-size: 1.4em; animation-duration: 11s; animation-delay: -3s; }
.snowflakes-static .snowflake:nth-child(7) { left: 33%; font-size: 0.95em; animation-duration: 16s; animation-delay: -5s; }
.snowflakes-static .snowflake:nth-child(8) { left: 38%; font-size: 1.1em; animation-duration: 13s; animation-delay: -7s; }
.snowflakes-static .snowflake:nth-child(9) { left: 43%; font-size: 0.85em; animation-duration: 17s; animation-delay: -9s; }
.snowflakes-static .snowflake:nth-child(10) { left: 48%; font-size: 1.25em; animation-duration: 12s; animation-delay: -11s; }
.snowflakes-static .snowflake:nth-child(11) { left: 53%; font-size: 1em; animation-duration: 14s; animation-delay: 0s; }
.snowflakes-static .snowflake:nth-child(12) { left: 58%; font-size: 0.9em; animation-duration: 15s; animation-delay: -2s; }
.snowflakes-static .snowflake:nth-child(13) { left: 63%; font-size: 1.3em; animation-duration: 11s; animation-delay: -4s; }
.snowflakes-static .snowflake:nth-child(14) { left: 68%; font-size: 1em; animation-duration: 16s; animation-delay: -6s; }
.snowflakes-static .snowflake:nth-child(15) { left: 73%; font-size: 1.15em; animation-duration: 13s; animation-delay: -8s; }
.snowflakes-static .snowflake:nth-child(16) { left: 78%; font-size: 0.8em; animation-duration: 18s; animation-delay: -10s; }
.snowflakes-static .snowflake:nth-child(17) { left: 83%; font-size: 1.35em; animation-duration: 12s; animation-delay: -1s; }
.snowflakes-static .snowflake:nth-child(18) { left: 88%; font-size: 0.95em; animation-duration: 15s; animation-delay: -3s; }
.snowflakes-static .snowflake:nth-child(19) { left: 93%; font-size: 1.1em; animation-duration: 14s; animation-delay: -5s; }
.snowflakes-static .snowflake:nth-child(20) { left: 97%; font-size: 0.85em; animation-duration: 17s; animation-delay: -7s; }

/* ========== HIVER - Cristaux et brume ========== */
.ice-crystal {
  position: absolute;
  color: rgba(173, 216, 230, 0.8);
  font-size: 1.5rem;
  text-shadow: 0 0 15px rgba(135, 206, 250, 0.8);
  pointer-events: auto;
}

.ice-crystal:hover {
  text-shadow: 0 0 25px rgba(135, 206, 250, 1);
  transform: scale(1.3) !important;
}

.winter-mist {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(200, 230, 255, 0.2), transparent);
  pointer-events: none;
  z-index: 0;
  animation: mistMove 12s ease-in-out infinite;
}

@keyframes mistMove {
  0%, 100% { opacity: 0.5; transform: translateX(0) scaleY(1); }
  25% { opacity: 0.7; transform: translateX(-15px) scaleY(1.1); }
  50% { opacity: 0.9; transform: translateX(10px) scaleY(0.95); }
  75% { opacity: 0.6; transform: translateX(-20px) scaleY(1.05); }
}

/* ========== ETE - Particules dorées et soleil ========== */
.sun-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.4));
  box-shadow: 0 0 20px rgba(255, 200, 50, 0.6);
  pointer-events: none;
}

.summer-glow {
  position: fixed;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 200, 50, 0.3) 0%, rgba(255, 150, 0, 0.1) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: sunGlow 10s ease-in-out infinite;
}

@keyframes sunGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.4); opacity: 0.9; }
}

/* Heat wave effect */
.summer-heat {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(255, 200, 100, 0.1), transparent);
  pointer-events: none;
  animation: heatWave 3s ease-in-out infinite;
}

@keyframes heatWave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.2); }
}

/* ========== HALLOWEEN - Complet ========== */
.bat {
  position: absolute;
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(128, 0, 128, 0.6));
  opacity: 0.9;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.bat:hover {
  transform: scale(1.4) !important;
  filter: drop-shadow(0 0 15px rgba(255, 100, 0, 0.8));
}

.pumpkin {
  position: absolute;
  font-size: 2.5rem;
  filter: drop-shadow(0 0 15px rgba(255, 100, 0, 0.6));
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pumpkin:hover {
  transform: scale(1.2) rotate(10deg) !important;
}

.halloween-fog {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(to top, 
    rgba(128, 0, 128, 0.3), 
    rgba(75, 0, 130, 0.2), 
    rgba(50, 0, 80, 0.1),
    transparent
  );
  pointer-events: none;
  z-index: 0;
  animation: fogPulse 6s ease-in-out infinite;
}

@keyframes fogPulse {
  0%, 100% { opacity: 0.7; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

.ghost {
  position: absolute;
  opacity: 0.7;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
  animation: ghostFloat 6s ease-in-out infinite;
}

@keyframes ghostFloat {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.5; }
  25% { transform: translateY(-30px) translateX(15px) rotate(5deg); opacity: 0.8; }
  50% { transform: translateY(-15px) translateX(-20px) rotate(-3deg); opacity: 0.6; }
  75% { transform: translateY(-40px) translateX(10px) rotate(3deg); opacity: 0.9; }
}

/* Spooky vignette */
.halloween-vignette {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ========== NOUVEL AN - Confettis et feux d'artifice ========== */
.confetti {
  position: absolute;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: sparkleAnim 2s ease-in-out infinite;
}

@keyframes sparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(180deg); }
}

/* Firework effect */
.firework {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fireworkBurst 1.5s ease-out forwards;
}

@keyframes fireworkBurst {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* ========== NOUVEL AN CHINOIS ========== */
.lantern {
  position: absolute;
  font-size: 2.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 50, 0, 0.7));
  cursor: pointer;
  transition: transform 0.3s;
}

.lantern:hover {
  transform: scale(1.2) !important;
  filter: drop-shadow(0 0 30px rgba(255, 50, 0, 1));
}

/* Red overlay */
.chinese-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(200, 0, 0, 0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .promo-banner {
    font-size: 0.85rem;
    padding: 10px 45px 10px 15px;
  }
  
  .promo-banner .banner-icon {
    font-size: 1rem;
  }
  
  body.has-banner {
    padding-top: 44px;
  }
  
  body.has-banner header {
    top: 44px !important;
  }
  
  .snowflake, .ice-crystal, .bat, .pumpkin, .lantern {
    font-size: 0.8em !important;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .snowflake,
  .ice-crystal,
  .sun-particle,
  .bat,
  .pumpkin,
  .confetti,
  .sparkle,
  .lantern,
  .ghost {
    animation: none !important;
    transition: none !important;
  }
  
  .promo-banner {
    animation: none;
    background-size: 100% 100%;
  }
}
