/* cds-loader.css — v1.16b.58 — animation de chargement CDS Digital (portail + Matières + SOFTBUDGET + GRH)
   Voile plein écran avec anneau multicolore tournant autour du logo Soft Solutions, et état « occupé »
   des boutons pendant le traitement d'un formulaire. Chargé par cds-loader.js (même dossier). */

#cdsLoader {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s ease, visibility 0s linear .22s;
}
#cdsLoader.on { opacity: 1; visibility: visible; pointer-events: all; transition: opacity .18s ease; }

.cds-loader-ring {
  position: relative; width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cds-loader-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #e11d48, #f59e0b, #22c55e, #0ea5e9, #6366f1, #d946ef, #e11d48);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  animation: cdsSpin 1.1s linear infinite;
}
.cds-loader-ring::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: conic-gradient(from 180deg, transparent 0 70%, rgba(14,165,233,.55) 85%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: cdsSpin 1.6s linear infinite reverse;
}
.cds-loader-logo {
  width: 52px; height: 52px; border-radius: 12px; position: relative; z-index: 1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
  animation: cdsPulse 1.6s ease-in-out infinite;
}
.cds-loader-text {
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; color: #334155;
}
.cds-loader-text small { display: block; font-weight: 400; letter-spacing: 0; text-transform: none; color: #64748b; margin-top: 3px; }

@keyframes cdsSpin  { to { transform: rotate(360deg); } }
@keyframes cdsPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* Bouton pendant le traitement : anneau multicolore réduit à gauche du libellé */
.cds-btn-busy {
  position: relative; pointer-events: none; opacity: .85; cursor: progress !important;
}
.cds-btn-busy::before {
  content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  vertical-align: -2px; margin-right: 7px;
  background: conic-gradient(from 0deg, #e11d48, #f59e0b, #22c55e, #0ea5e9, #6366f1, #d946ef, #e11d48);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: cdsSpin .9s linear infinite;
}
.cds-btn-busy > i:first-child, .cds-btn-busy > .fa:first-child, .cds-btn-busy > .fas:first-child { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cds-loader-ring::before, .cds-loader-ring::after, .cds-btn-busy::before { animation-duration: 2.4s; }
  .cds-loader-logo { animation: none; }
}
@media print { #cdsLoader { display: none !important; } }
