/* Global loader — Projet Démuni */
.pd-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.pd-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: pdLoaderIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pdLoaderIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.pd-loader-orbit {
  position: relative;
  width: 80px;
  height: 80px;
}

.pd-loader-orbit::before,
.pd-loader-orbit::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.pd-loader-orbit::before {
  border-top-color: #ffd700;
  border-right-color: rgba(255, 215, 0, 0.25);
  animation: pdSpin 1.1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.pd-loader-orbit::after {
  inset: 12px;
  border-bottom-color: #2563c7;
  border-left-color: rgba(37, 99, 199, 0.3);
  animation: pdSpin 0.85s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

.pd-loader-gem {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  animation: pdGemPulse 1.6s ease-in-out infinite;
}

@keyframes pdSpin {
  to { transform: rotate(360deg); }
}

@keyframes pdGemPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.9); }
}

.pd-loader-text {
  font-family: 'Comfortaa', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #8fa8c0;
  letter-spacing: 0.4px;
  min-height: 1.2em;
  animation: pdTextPulse 2s ease-in-out infinite;
}

@keyframes pdTextPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.pd-loader-dots {
  display: flex;
  gap: 6px;
  margin-top: -8px;
}

.pd-loader-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd700;
  animation: pdDotBounce 1.2s ease-in-out infinite;
}

.pd-loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.pd-loader-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pdDotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pd-loader-orbit::before,
  .pd-loader-orbit::after,
  .pd-loader-gem,
  .pd-loader-text,
  .pd-loader-dots span,
  .pd-loader-inner {
    animation: none !important;
  }
}
