/* Étoiles scintillantes des pages de connexion et de mot de passe (mode clair et mode sombre).
   Étoiles à quatre branches avec cœur lumineux et halo, scintillement irrégulier d'une étoile à l'autre. */
.orbits .orb b { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 0; background: none; box-shadow: none; animation: none; overflow: visible;
  --c: #4f46e5; --g: rgba(79, 70, 229, .5); }
.orbits .orb b[style*="0ea5e9"] { --c: #0284c7; --g: rgba(2, 132, 199, .5); }
.orbits .orb b::before, .sparks s::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, #fff 0 15%, var(--c) 48%, var(--c) 100%);
  clip-path: polygon(50% 0, 58% 36%, 100% 50%, 58% 64%, 50% 100%, 42% 64%, 0 50%, 42% 36%);
  animation: star-twinkle var(--tw, 4s) ease-in-out infinite; animation-delay: var(--td, 0s); }
.orbits .orb b::after, .sparks s::after { content: ""; position: absolute; left: 50%; top: 50%; width: 170%; height: 170%; margin: -85% 0 0 -85%; border-radius: 50%;
  background: radial-gradient(circle, var(--g) 0%, transparent 68%);
  animation: star-halo var(--tw, 4s) ease-in-out infinite; animation-delay: var(--td, 0s); }
.orbits .orb:nth-child(2n) b { --tw: 4.2s; --td: -.6s; }
.orbits .orb:nth-child(3n) b { --tw: 3.6s; --td: -1.3s; }
.orbits .orb:nth-child(5n) b { --tw: 5s; --td: -2s; }
.orbits .orb:nth-child(7n) b { --tw: 3.2s; --td: -.9s; }
@keyframes star-twinkle {
  0%, 100% { transform: scale(.75) rotate(0deg); opacity: .5; }
  50% { transform: scale(1.05) rotate(45deg); opacity: .6; }
}
@keyframes star-halo {
  0%, 100% { transform: scale(.7); opacity: .12; }
  50% { transform: scale(1.1); opacity: .35; }
}
/* Petites étoiles fixes, dispersées sur toute la page, qui scintillent à tour de rôle */
.sparks { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sparks s { position: absolute; left: var(--x); top: var(--y); width: calc(var(--s, 10px) * 1.4); height: calc(var(--s, 10px) * 1.4); text-decoration: none;
  --c: #6366f1; --g: rgba(99, 102, 241, .8); }
.sparks s:nth-child(2n) { --c: #0ea5e9; --g: rgba(14, 165, 233, .8); }
/* Mode sombre : étoiles claires, halo lumineux renforcé */
.dark .orbits .orb b { --c: #e0e7ff; --g: rgba(165, 180, 252, .6); }
.dark .orbits .orb b[style*="0ea5e9"] { --c: #bae6fd; --g: rgba(56, 189, 248, .6); }
.dark .sparks s { --c: #e0e7ff; --g: rgba(165, 180, 252, .9); }
.dark .sparks s:nth-child(2n) { --c: #bae6fd; --g: rgba(56, 189, 248, .9); }
.dark .orbits .orb b::after, .dark .sparks s::after { mix-blend-mode: screen; }
@media (prefers-reduced-motion: reduce) {
  .orbits .orb b::before, .orbits .orb b::after, .sparks s::before, .sparks s::after { animation: none; opacity: .6; }
}

/* Les étoiles dispersées sur la page sont supprimées : il ne reste que celles en orbite. */
.sparks { display: none !important; }

/* ===== Design : cartes de connexion et de mot de passe (mêmes couleurs, rendu plus soigné) ===== */
.login-page {
  background:
    radial-gradient(ellipse 60% 50% at 12% 12%, rgba(99, 102, 241, .16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 90% 88%, rgba(14, 165, 233, .13), transparent 70%),
    linear-gradient(180deg, #f8f9fd 0%, #eef1f9 100%);
}
.dark .login-page {
  background:
    radial-gradient(ellipse 60% 50% at 12% 12%, rgba(99, 102, 241, .16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 90% 88%, rgba(14, 165, 233, .10), transparent 70%),
    #0f1115;
}
.login-card {
  width: min(420px, 100%);
  padding: 38px 36px 30px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(99, 102, 241, .16);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(49, 46, 129, .08), 0 40px 80px rgba(49, 46, 129, .10);
  overflow: hidden;
}
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #6366f1, #0ea5e9); }
.dark .login-card { background: rgba(23, 26, 33, .92); border-color: rgba(129, 140, 248, .22); box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
.login-head { margin-bottom: 14px; }
.brand-mark {
  width: 68px; height: 68px; padding: 14px; margin: 0 auto 18px;
  border-radius: 50%; border: 1px solid rgba(99, 102, 241, .22);
  background: radial-gradient(circle at 30% 25%, rgba(99, 102, 241, .14), rgba(14, 165, 233, .06));
  box-shadow: 0 0 0 6px rgba(99, 102, 241, .06);
}
.dark .brand-mark { border-color: rgba(129, 140, 248, .3); box-shadow: 0 0 0 6px rgba(129, 140, 248, .07); }
.login-card h1 { font-size: 24px; }
.login-card p { margin: 6px 0 22px; line-height: 1.5; }
form { gap: 6px; }
label { margin-top: 10px; letter-spacing: .01em; }
input { height: 44px; padding: 0 14px; border-radius: 10px; background: #f8fafc; border-color: #dbe1ec; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input:hover { border-color: #b9c2d3; }
input:focus { background: #fff; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, .14); }
.dark input { background: #11141a; border-color: #303642; }
.dark input:hover { border-color: #465063; }
.dark input:focus { background: #0f1218; border-color: #818cf8; box-shadow: 0 0 0 4px rgba(129, 140, 248, .18); }
.pw-field input { padding-right: 46px; }
.pw-toggle { width: 44px; height: 44px; border-radius: 0 10px 10px 0; }
.pw-toggle:focus-visible { outline-color: #6366f1; }
.primary { min-height: 44px; margin-top: 18px; border-radius: 10px; font-size: 13px; letter-spacing: .02em;
  background: #111827; box-shadow: 0 6px 16px rgba(17, 24, 39, .22); transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.primary:hover { background: #1f2937; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(17, 24, 39, .26); }
.primary:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(17, 24, 39, .2); }
.primary:focus-visible { outline: 3px solid rgba(99, 102, 241, .45); outline-offset: 2px; }
.dark .primary { background: #f1f5f9; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.dark .primary:hover { background: #e2e8f0; }
.error { border: 1px solid #fecdd3; border-radius: 10px; }
.dark .error { border-color: #5b2330; }
.login-card .powered { margin-top: 24px; padding-top: 16px; border-top: 1px solid #edf0f6; letter-spacing: .02em; }
.dark .login-card .powered { border-top-color: #262b35; }
.theme-toggle { box-shadow: 0 6px 16px rgba(49, 46, 129, .08); }
@keyframes field-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.login-card form > * { animation: field-in .5s ease-out both; }
.login-card form > *:nth-child(n+3) { animation-delay: .06s; }
.login-card form > *:nth-child(n+5) { animation-delay: .12s; }
.login-card form > *:nth-child(n+7) { animation-delay: .18s; }
@media (max-width: 440px) { .login-card { padding: 30px 22px 24px; } }
@media (prefers-reduced-motion: reduce) { .login-card form > * { animation: none; } .primary { transition: none; } }
