/* ==========================================================================
   ULIS Loader Component
   Bouclier doré animé pour les états de chargement
   ========================================================================== */

.ulis-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ulis-loader svg {
  display: block;
}

/* Loader avec texte */
.ulis-loader-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ulis-loader-label {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.875rem;
  animation: ulis-pulse 1.5s ease-in-out infinite;
}

/* Loader inline (horizontal) */
.ulis-loader-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.875rem;
}

.ulis-loader-inline .ulis-loader {
  flex-shrink: 0;
}

/* Overlay plein écran */
.ulis-loader-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 14, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Row de tableau avec loader */
.ulis-loader-row td {
  padding: 2rem 1rem !important;
}

/* Animation de pulsation pour le texte */
@keyframes ulis-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Variantes de taille CSS */
.ulis-loader--xs svg { width: 24px; height: 32px; }
.ulis-loader--sm svg { width: 32px; height: 40px; }
.ulis-loader--md svg { width: 48px; height: 64px; }
.ulis-loader--lg svg { width: 64px; height: 80px; }
.ulis-loader--xl svg { width: 96px; height: 128px; }

/* Support thème sombre */
[data-bs-theme="dark"] .ulis-loader-label,
[data-bs-theme="dark"] .ulis-loader-inline {
  color: var(--bs-gray-400, #adb5bd);
}

/* Centrage dans les cards */
.card-body .ulis-loader-text {
  padding: 2rem 0;
}

/* Spinner de bouton (petit loader inline) */
.btn .ulis-loader svg {
  width: 16px;
  height: 20px;
  margin-right: 0.375rem;
}
