.loader-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 120px;
}

.loader {
  width: 40px;
  height: 40px;
  position: relative;
}

.loader::before,
.loader::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.loader::before {
  inset: 0;
  border: 3px solid #E5E7EB;
  border-top-color: #3467e7;
  animation: spin 0.8s linear infinite;
}

.loader::after {
  width: 60%;
  height: 60%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid transparent;
  border-top-color: #f79536;
  animation: spin-inner 0.6s linear infinite reverse;
}

@keyframes spin-inner {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-sm {
  width: 24px;
  height: 24px;
}

.loader-sm::before {
  border-width: 2px;
}

.loader-sm::after {
  border-width: 2px;
}

/* ── Skeleton shimmer ───────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
  color: transparent !important;
  user-select: none;
  display: inline-block;
  vertical-align: middle;
}

/* Skeleton sur fond sombre (header profil) */
.skeleton-dark {
  background: linear-gradient(90deg, rgba(255,255,255,.12) 25%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.12) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
  color: transparent !important;
  user-select: none;
  display: inline-block;
  vertical-align: middle;
}

/* Overlay chargement sur une carte */
.card-loading {
  position: relative;
  pointer-events: none;
}
.card-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.7);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
