* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", sans-serif;
  background: #1a1a2e;
  color: white;
  height: 100vh;
  overflow: hidden;
}

/* --- ANIMATIONS DE SORTIE --- */
@keyframes fadeOutBanner {
  0%, 85% { transform: translateY(0); opacity: 1; } /* Reste visible 10s (85% de 12s) */
  100% { transform: translateY(-100%); opacity: 0; display: none; } /* Disparaît à la fin */
}

@keyframes expandApp {
  0%, 85% { top: 44px; } /* Laisse la place à la bannière */
  100% { top: 0; } /* Remonte pour prendre tout l'écran */
}

/* --- BANDE D'ATTENTION --- */
.alert-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #dc2626);
  background-size: 200% 100%;
  color: white;
  text-align: center;
  padding: 0 20px;
  font-weight: 600;
  font-size: 14px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  
  /* On applique l'animation de dégradé et l'animation de sortie (12 secondes) */
  animation: alertGradient 3s ease infinite, fadeOutBanner 12s forwards;
}

.alert-banner::before {
  content: "⚠️";
  font-size: 16px;
}

/* --- CONTENEUR APP --- */
.app-container {
  position: fixed;
  inset: 0;
  top: 44px; /* Décalage initial */
  display: flex;
  flex-direction: column;
  background: #000;
  /* L'application s'agrandit quand la bannière part */
  animation: expandApp 12s forwards;
}

#service-frame {
  flex: 1; width: 100%; height: 100%; border: none;
}

/* --- CHARGEMENT & AUTRES --- */
.loading-overlay {
  position: absolute; inset: 0;
  background: #0a0a0a;
  display: flex; justify-content: center; align-items: center;
  z-index: 50;
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

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

.hidden { display: none !important; }
