/* public/css/loader.css */

/* Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Logo */
.loader-logo {
  animation: logoFadeIn 0.5s ease-out;
}

.loader-logo-img {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

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

/* Animation circulaire */
.loader-animation {
  position: relative;
  width: 60px;
  height: 60px;
}

.loader-circle {
  width: 60px;
  height: 60px;
  border: 2px solid #e9ecef;
  border-radius: 50%;
  position: relative;
  animation: rotate 1.5s linear infinite;
}

.loader-path {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 60px;
  height: 60px;
  border: 2px solid transparent;
  border-top: 2px solid #00305C;
  border-right: 2px solid #00305C;
  border-radius: 50%;
  animation: dash 1s ease-in-out infinite;
}

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

@keyframes dash {
  0% {
    border-top-color: #00305C;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
  }
  25% {
    border-top-color: #00305C;
    border-right-color: #00305C;
    border-bottom-color: transparent;
    border-left-color: transparent;
  }
  50% {
    border-top-color: #00305C;
    border-right-color: #00305C;
    border-bottom-color: #00305C;
    border-left-color: transparent;
  }
  75% {
    border-top-color: #00305C;
    border-right-color: #00305C;
    border-bottom-color: #00305C;
    border-left-color: #00305C;
  }
  100% {
    border-top-color: #00305C;
    border-right-color: #00305C;
    border-bottom-color: #00305C;
    border-left-color: #00305C;
  }
}

/* Barre de progression */
.loader-progress {
  width: 150px;
  height: 2px;
  background: #e9ecef;
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00305C, #7fb3c3);
  border-radius: 1px;
  width: 0%;
  transition: width 0.2s ease;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .loader-logo-img {
    height: 60px;
  }

  .loader-circle,
  .loader-path {
    width: 50px;
    height: 50px;
  }

  .loader-progress {
    width: 120px;
  }

  .loader-content {
    gap: 20px;
  }
}
