/*
  Loader brand eCarti — affiché AVANT que l'app Angular ne soit bootée,
  puis remplacé par <jhi-app> au premier render.

  Composition :
    - mark eCarti centré qui pulse doucement (scale 0.94 → 1.06)
    - anneau autour du mark qui tourne avec un dégradé brand (violet → rose)
    - sous-titre "eCarti" en typo capitale espacée qui pulse en opacité

  Tout est en CSS pur (pas de JS) — l'animation démarre avant même
  le chargement du bundle Angular.
*/

.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 9999;
}

.ecarti-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* Stack ring + mark — superposés via positionnement absolu */
.ecarti-loader-stack {
  position: relative;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anneau qui tourne — bordures partielles colorées brand pour l'effet de rotation. */
.ecarti-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(124, 58, 237, 0.12);
  border-top-color: #7c3aed;
  border-right-color: #ec4899;
  animation: ecarti-spin 1.2s linear infinite;
}

/* Mark eCarti qui pulse doucement. */
.ecarti-loader-mark {
  width: 64px;
  height: 64px;
  display: block;
  animation: ecarti-pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.25));
}

/* Texte "eCarti" sous le loader — fade in/out. */
.ecarti-loader-text {
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #64748b;
  animation: ecarti-fade 1.6s ease-in-out infinite;
}

@keyframes ecarti-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ecarti-pulse {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes ecarti-fade {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

/* Respect du paramètre OS "reduce motion" — on coupe les animations. */
@media (prefers-reduced-motion: reduce) {
  .ecarti-loader-ring,
  .ecarti-loader-mark,
  .ecarti-loader-text {
    animation: none;
  }
}
