/* ==========================================================
   login-background.css
    Fond animé de l'écran de connexion (#authScreen) :
   ========================================================== */
/* La carte de connexion passe au-dessus du fond */
#authScreen .auth-card {
  position: relative;
  z-index: 1;
  box-shadow: 0 30px 80px rgba(10, 6, 50, .55), 0 0 0 1px rgba(255, 255, 255, .08);
}

/* Le fond est dans #authScreen : il disparaît tout seul
   quand l'écran de connexion est masqué (.screen { display:none }) */
.lbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 12% 0%, rgba(125, 112, 255, .35), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(143, 134, 255, .45), transparent 60%),
    linear-gradient(150deg, #150F52, #231B78 55%, #3A31A8);
}

/* Papier Seyès : lignes fines toutes les 24px, lignes fortes toutes les 96px */
.lbg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(190, 184, 255, .20) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(190, 184, 255, .20) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(190, 184, 255, .08) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px;
}

.lbg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lbg-axes { opacity: 0; transition: opacity .8s; }

/* Formules décoratives dans les coins */
.lbg-formula {
  position: absolute;
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  color: rgba(228, 225, 255, .55);
  font-size: clamp(16px, 1.8vw, 24px);
  white-space: nowrap;
}
.lbg-f1 { top: 9%;     left: 5%;  }
.lbg-f2 { top: 14%;    right: 5%; }
.lbg-f3 { bottom: 20%; left: 4%;  }
.lbg-f4 { bottom: 12%; right: 4%; }

/* Légende de l'animation (formule de Taylor en cours) */
.lbg-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  min-height: 2.4em;
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 19px);
  color: #F4F2FF;
}
.lbg-caption b { font-weight: 400; color: #FFC857; }
.lbg-caption small {
  display: block;
  margin-top: 3px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-style: normal;
  font-size: 12.5px;
  color: #B9B5E8;
}

/* Mobile : on allège */
@media (max-width: 700px) {
  .lbg-f2, .lbg-f3 { display: none; }
  .lbg-f1 { top: 4%; }
  .lbg-f4 { bottom: 14%; }
}

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  .lbg *, .lbg-axes { transition: none !important; }
}
