/* EUROCOPY - Préchargeur élégant */

/* Préchargeur principal */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
  /*
   opacity: 0;
   visibility: hidden;
  */
}

/* Animation du logo pendant le chargement */
.preloader-logo {
  width: 150px;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(0.95); opacity: 0.8; }
  to { transform: scale(1.05); opacity: 1; }
}

/* Animation loader principal */
.loader {
  position: relative;
  width: 60px;
  height: 60px;
}

.loader-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-radius: 50%;
}

.loader-circle-1 {
  border-top-color: #C5E96B;
  animation: spin 1s linear infinite;
}

.loader-circle-2 {
  border-right-color: #C5E96B;
  /* border-right-color: #fff; */
  animation: spin 1s linear infinite reverse;
}

.loader-circle-3 {
  border-bottom-color: #182f27;
  animation: spin 2s linear infinite;
}

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

/* Texte de chargement */
.loading-text {
  margin-top: 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  color: #182f27;
  font-weight: 600;
  letter-spacing: 2px;
}

.loading-text:after {
  content: '...';
  animation: dots 1.5s infinite;
  display: inline-block;
  width: 20px;
  text-align: left;
}

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

/* Points animés */
.loading-dots {
  display: flex;
  margin-top: 15px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 5px;
  background-color: #182f27;
  animation: jump 1.5s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
  background-color: #C5E96B;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
  background-color: #182f27;
}

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

/* Compteur de chargement */
.loading-progress {
  margin-top: 20px;
  width: 200px;
  height: 4px;
  background-color: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(45deg, #182f27, #C5E96B);
  width: 0;
  border-radius: 2px;
  animation: progress 2.5s ease-out forwards;
}

@keyframes progress {
  0% { width: 0; }
  50% { width: 65%; }
  80% { width: 85%; }
  100% { width: 100%; }
}

/* Animation de progression texte */
.loading-percentage {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: #09215c;
  margin-top: 10px;
  font-weight: 600;
}

.loading-percentage span {
  display: inline-block;
  min-width: 40px;
  text-align: left;
  animation: percentage 2.5s ease-out forwards;
}

@keyframes percentage {
  0% { content: '0%'; }
  50% { content: '65%'; }
  80% { content: '85%'; }
  100% { content: '100%'; }
}

/* Responsive */
@media (max-width: 768px) {
  .preloader-logo {
    width: 120px;
  }
  
  .loading-progress {
    width: 150px;
  }
  
  .loading-text {
    font-size: 14px;
  }
}
