/* =================================================================================================
   LE LOADER « QUARANTAINE » (06/11/2026) -- le meme que dans le jeu (SSurvivorLoader, SurvivorFrontEnd.cpp).
   Au centre de la page, sur un voile noir a 40 % et floute ; il s'efface quand la page a fini de charger
   (assets/loader.js). Animation d'origine de l'auteur : halo qui pulse, trois ondes de sonar decalees de
   0,8 s, icone qui apparait et s'efface, le tout sur un cycle de 2,4 s.
   ================================================================================================= */
:root {
  --vert-fonce: #14532d;
  --vert-fonce-glow: rgba(20, 83, 45, 0.8);
}

.rx-chargement {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 1; visibility: visible;
  transition: opacity .45s ease, visibility .45s ease;
}
.rx-chargement.fini { opacity: 0; visibility: hidden; pointer-events: none; }

.rx-chargement .loader {
  position: relative; width: 260px; height: 260px;
  display: flex; align-items: center; justify-content: center;
}

.rx-chargement .halo {
  position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 83, 45, 0.6) 0%, rgba(20, 83, 45, 0.15) 55%, transparent 70%);
  z-index: 1;
  animation: rx-pulse 2.4s ease-in-out infinite;
}
@keyframes rx-pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

.rx-chargement .sonar {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, transparent 60%, rgba(20, 83, 45, 0.4) 80%, var(--vert-fonce) 98%, transparent 100%);
  border: 2px solid var(--vert-fonce);
  box-shadow: 0 0 12px var(--vert-fonce-glow), inset 0 0 12px var(--vert-fonce-glow);
  opacity: 0; transform: scale(0.15); pointer-events: none;
  animation: rx-onde 2.4s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
.rx-chargement .sonar:nth-child(2) { animation-delay: 0.8s; }
.rx-chargement .sonar:nth-child(3) { animation-delay: 1.6s; }
@keyframes rx-onde {
  0% { transform: scale(0.15); opacity: 0; }
  20% { opacity: 0.95; }
  100% { transform: scale(1.25); opacity: 0; }
}

.rx-chargement .icone-wrapper {
  position: relative; z-index: 2; width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  animation: rx-apparait 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.rx-chargement .icone {
  width: 100%; height: 100%; object-fit: contain;
  filter: invert(24%) sepia(50%) saturate(1400%) hue-rotate(95deg) brightness(60%) contrast(110%) drop-shadow(0 0 8px rgba(20, 83, 45, 0.8));
}
@keyframes rx-apparait {
  0% { opacity: 0; transform: scale(0.7); }
  30% { opacity: 1; transform: scale(1); }
  65% { opacity: 0.95; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
  .rx-chargement .halo, .rx-chargement .sonar, .rx-chargement .icone-wrapper { animation-duration: 4.8s; }
}
