/* ============================================
   PREDILIS LOGO ANIMATION — GSAP Edition
   ============================================ */

/* Container principal */
.logo-animation-container {
  position: relative;
  width: 280px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-animation-container.size-sm { width: 180px; height: 120px; }
.logo-animation-container.size-md { width: 280px; height: 180px; }
.logo-animation-container.size-lg { width: 380px; height: 240px; }
.logo-animation-container.size-xl { width: 480px; height: 300px; }

/* SVG wrap */
.logo-svg-wrap {
  position: relative;
  z-index: 2;
  width: 70%;
  height: auto;
}

.logo-animated {
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.9);
}

.logo-animated path {
  transition: fill 1.5s ease;
}

/* Glow principal */
.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center,
    rgba(122, 164, 238, 0.22) 0%,
    rgba(90, 180, 255, 0.15) 40%,
    transparent 75%);
  filter: blur(40px);
  opacity: 0;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

/* Glow secondaire */
.logo-glow-secondary {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center,
    rgba(140, 210, 255, 0.09) 0%,
    transparent 70%);
  filter: blur(55px);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

/* ECG heartbeat line */
.logo-ecg {
  position: absolute;
  width: 200%;
  height: 100%;
  top: 50%;
  left: -50%;
  transform: translateY(-50%);
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
}

/* Conteneur des particules */
.logo-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

/* Particule etoile IA (4 cotes) */
.logo-particle-star {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  pointer-events: none;
}

.logo-particle-star svg {
  width: 100%;
  height: 100%;
}

/* Text rotator */
.logo-text-rotator {
  position: relative;
  width: 300px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--md-blue, #6EA5F4);
  opacity: 0;
  margin-top: 16px;
  letter-spacing: 0.3px;
  line-height: 1.5;
  z-index: 2;
}

/* Text fixe */
.logo-text {
  color: var(--md-lavender, #BAA2E0);
  font-weight: 700;
  margin-top: 20px;
  font-size: 1.1rem;
  text-align: center;
  z-index: 2;
  position: relative;
  animation: logoTextPulse 2s ease-in-out infinite;
}

@keyframes logoTextPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ============================================
   VARIANTES
   ============================================ */

/* Version statique */
.logo-animation-container.static .logo-animated {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 0 16px rgba(122, 164, 238, 0.45));
}

.logo-animation-container.static .logo-glow {
  opacity: 0.5;
}

/* Sans particules */
.logo-animation-container.no-particles .logo-particles {
  display: none;
}

/* ============================================
   OVERLAY (loading screen)
   ============================================ */
.logo-animation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(1 14 39 / 88%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.logo-animation-overlay.active {
  display: flex;
}

/* Variante dark (comme animations.html) */
.logo-animation-overlay.logo-dark {
  background: #061f3d;
}

.logo-dark .logo-text-rotator {
  color: rgba(255, 255, 255, 0.85);
}

.logo-dark .logo-text {
  color: rgba(255, 255, 255, 0.85);
}

.logo-dark .logo-ecg path {
  stroke: rgba(0, 200, 255, 0.5);
}

.logo-dark .logo-glow {
  background: radial-gradient(circle at center,
    rgba(0, 200, 255, 0.25) 0%,
    transparent 70%);
}
