/* Loading Screen Inspiré du TikTok dev_flash */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-container {
  position: relative;
  width: 200px;
  height: 200px;
}

/* Cercles animés */
.loading-circle {
  position: absolute;
  border-radius: 50%;
  border: 4px solid transparent;
}

.circle-1 {
  width: 180px;
  height: 180px;
  border-top-color: #fff;
  border-right-color: #fff;
  animation: rotate 1.5s linear infinite;
  top: 10px;
  left: 10px;
}

.circle-2 {
  width: 140px;
  height: 140px;
  border-bottom-color: rgba(255, 255, 255, 0.7);
  border-left-color: rgba(255, 255, 255, 0.7);
  animation: rotate-reverse 2s linear infinite;
  top: 30px;
  left: 30px;
}

.circle-3 {
  width: 100px;
  height: 100px;
  border-top-color: rgba(255, 255, 255, 0.5);
  border-right-color: rgba(255, 255, 255, 0.5);
  animation: rotate 2.5s linear infinite;
  top: 50px;
  left: 50px;
}

/* Logo central */
.loading-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Texte de chargement */
.loading-text {
  margin-top: 240px;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 2px;
  animation: fadeInOut 2s ease-in-out infinite;
}

.loading-dots {
  display: inline-block;
  width: 30px;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

/* Particules flottantes */
.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: float 3s ease-in-out infinite;
}

.particle:nth-child(1) { left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 40%; animation-delay: 0.5s; }
.particle:nth-child(3) { left: 60%; animation-delay: 1s; }
.particle:nth-child(4) { left: 80%; animation-delay: 1.5s; }

/* Animations */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

@keyframes float {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px);
    opacity: 0;
  }
}

/* Barre de progression */
.progress-bar-container {
  position: absolute;
  bottom: 100px;
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: white;
  width: 0%;
  animation: progress 3s ease-out forwards;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes progress {
  0% { width: 0%; }
  100% { width: 100%; }
}
