/**
 * Reinit Skeleton Overlay
 * Affiche un skeleton loader pendant la ré-initialisation de l'authentification (sleep mode wake)
 */

.reinit-skeleton-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary, #ffffff);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

[data-theme="dark"] .reinit-skeleton-overlay {
  background: var(--bg-primary, #262624);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.reinit-skeleton-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 400px;
  padding: 32px;
}

.reinit-skeleton-logo {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary, #2f2f2e);
  letter-spacing: -0.02em;
}

.reinit-skeleton-message {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary, rgba(47, 47, 46, 0.7));
  display: flex;
  align-items: center;
  gap: 8px;
}

.reinit-skeleton-dots {
  display: inline-flex;
  gap: 3px;
}

.reinit-skeleton-dots span {
  width: 4px;
  height: 4px;
  background: var(--text-secondary, rgba(47, 47, 46, 0.7));
  border-radius: 50%;
  animation: dotPulse 1.4s infinite ease-in-out;
}

.reinit-skeleton-dots span:nth-child(1) {
  animation-delay: 0s;
}

.reinit-skeleton-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.reinit-skeleton-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.skeleton-loader-container {
  width: 100%;
  max-width: 300px;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(
    90deg,
    var(--skeleton-base, rgba(47, 47, 46, 0.1)) 25%,
    var(--skeleton-shimmer, rgba(47, 47, 46, 0.2)) 50%,
    var(--skeleton-base, rgba(47, 47, 46, 0.1)) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

[data-theme="dark"] .skeleton-line {
  background: linear-gradient(
    90deg,
    var(--skeleton-base, rgba(255, 255, 255, 0.05)) 25%,
    var(--skeleton-shimmer, rgba(255, 255, 255, 0.1)) 50%,
    var(--skeleton-base, rgba(255, 255, 255, 0.05)) 75%
  );
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .reinit-skeleton-overlay,
  .reinit-skeleton-dots span,
  .skeleton-line {
    animation: none !important;
  }
}
