/* Page auth (login) — design type ProWash, couleurs Lusinage */
:root {
  --lx-auth-primary: #112364;
  --lx-auth-primary-hover: #0c1a4f;
  --lx-auth-ink: #0f172a;
  --lx-auth-muted: #64748b;
  --lx-auth-muted-2: #94a3b8;
  --lx-auth-soft: #f1f5f9;
  --lx-auth-border: rgba(17, 35, 100, 0.14);
}

.lx-auth-page {
  min-height: calc(100svh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(17, 35, 100, 0.08), transparent 60%),
    #f8fafc;
}

.lx-auth-page__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--lx-auth-border);
  box-shadow: 0 32px 80px rgba(17, 35, 100, 0.14);
  overflow: hidden;
}

.lx-auth-page__card.is-loading .lx-auth-page__head,
.lx-auth-page__card.is-loading .lx-auth-page__body {
  pointer-events: none;
  user-select: none;
}

/* Overlay chargement — même langage que le visualiseur 3D */
.lx-auth-page__loading {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(17, 35, 100, 0.14), transparent 70%),
    rgba(247, 249, 255, 0.88);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  border-radius: inherit;
}

.lx-auth-page__loading[hidden] {
  display: none !important;
}

.lx-auth-page__loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 320px);
  padding: 8px 8px 4px;
  text-align: center;
  animation: lx-auth-page-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lx-auth-page__orb {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  perspective: 700px;
}

.lx-auth-page__orb::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(17, 35, 100, 0.2), rgba(17, 35, 100, 0.05) 55%, transparent 72%);
  animation: lx-auth-page-pulse 2.2s ease-in-out infinite;
}

.lx-auth-page__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(17, 35, 100, 0.14);
  border-top-color: #112364;
  border-right-color: rgba(17, 35, 100, 0.45);
  animation: lx-auth-page-spin 1.15s cubic-bezier(0.55, 0.15, 0.35, 0.95) infinite;
  pointer-events: none;
}

.lx-auth-page__ring--b {
  inset: 10px;
  border-top-color: #2a4580;
  border-right-color: rgba(42, 69, 128, 0.35);
  animation-duration: 1.7s;
  animation-direction: reverse;
  opacity: 0.75;
}

.lx-auth-page__ring--c {
  inset: 22px;
  border-top-color: rgba(17, 35, 100, 0.35);
  border-right-color: rgba(17, 35, 100, 0.12);
  animation-duration: 2.35s;
  opacity: 0.55;
}

.lx-auth-page__cube {
  position: relative;
  width: 42px;
  height: 42px;
  transform-style: preserve-3d;
  animation: lx-auth-page-cube 2.4s ease-in-out infinite;
}

.lx-auth-page__face {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(17, 35, 100, 0.55);
  background: rgba(17, 35, 100, 0.08);
  border-radius: 3px;
}

.lx-auth-page__face--f { transform: translateZ(21px); }
.lx-auth-page__face--b { transform: rotateY(180deg) translateZ(21px); }
.lx-auth-page__face--r { transform: rotateY(90deg) translateZ(21px); }
.lx-auth-page__face--l { transform: rotateY(-90deg) translateZ(21px); }
.lx-auth-page__face--t { transform: rotateX(90deg) translateZ(21px); background: rgba(17, 35, 100, 0.14); }
.lx-auth-page__face--bt { transform: rotateX(-90deg) translateZ(21px); }

.lx-auth-page__check {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.28s ease, transform 0.28s ease;
  color: #16a34a;
  pointer-events: none;
}

.lx-auth-page__check svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 4px 12px rgba(22, 163, 74, 0.35));
}

.lx-auth-page__loading-card.is-success .lx-auth-page__cube,
.lx-auth-page__loading-card.is-success .lx-auth-page__ring {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lx-auth-page__loading-card.is-success .lx-auth-page__check {
  opacity: 1;
  transform: scale(1);
}

.lx-auth-page__loading-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lx-auth-primary);
}

.lx-auth-page__loading-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}

.lx-auth-page__loading-text {
  margin: 0 0 14px;
  max-width: 280px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #475569;
}

.lx-auth-page__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
}

.lx-auth-page__steps span {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
  color: #64748b;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.lx-auth-page__steps span.is-active {
  color: #112364;
  background: rgba(17, 35, 100, 0.1);
  border-color: rgba(17, 35, 100, 0.18);
  transform: translateY(-1px);
}

.lx-auth-page__steps span.is-done {
  color: #15803d;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.18);
}

.lx-auth-page__bar {
  width: min(100%, 240px);
  height: 7px;
  margin: 0 auto 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.lx-auth-page__bar i {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #112364 0%, #2a4580 55%, #4a6aa8 100%);
  box-shadow: 0 0 16px rgba(17, 35, 100, 0.35);
  animation: lx-auth-page-bar 1.35s ease-in-out infinite;
}

.lx-auth-page__loading-card.is-success .lx-auth-page__bar i,
.lx-auth-page__loading-card[data-phase="2"] .lx-auth-page__bar i {
  animation: none;
  width: 100%;
}

.lx-auth-page__loading-card[data-phase="1"] .lx-auth-page__bar i {
  width: 62%;
}

.lx-auth-page__loading-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: #64748b;
  min-height: 1.2em;
}

@keyframes lx-auth-page-spin {
  to { transform: rotate(360deg); }
}

@keyframes lx-auth-page-cube {
  0%, 100% { transform: rotateX(-22deg) rotateY(28deg) scale(1); }
  50% { transform: rotateX(-28deg) rotateY(208deg) scale(1.06); }
}

@keyframes lx-auth-page-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@keyframes lx-auth-page-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes lx-auth-page-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .lx-auth-page__ring,
  .lx-auth-page__cube,
  .lx-auth-page__orb::before,
  .lx-auth-page__bar i,
  .lx-auth-page__loading-card {
    animation: none !important;
  }
  .lx-auth-page__bar i { width: 70%; transform: none; }
}

.lx-auth-page__head {
  padding: 28px 28px 0;
}

.lx-auth-page__head h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 800;
  color: var(--lx-auth-primary);
  line-height: 1.2;
}

.lx-auth-page__head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lx-auth-muted);
}

.lx-auth-page__body {
  padding: 24px 28px 28px;
}

.lx-auth-page__google-host {
  position: relative;
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid var(--lx-auth-border);
  background: #fff;
  overflow: hidden;
}

.lx-auth-page__google-facade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--lx-auth-primary);
  pointer-events: none;
  z-index: 0;
}

.lx-auth-page__google-gis {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.02;
}

.lx-auth-page__google-gis iframe,
.lx-auth-page__google-gis > div {
  width: 100% !important;
  max-width: 100% !important;
}

.lx-auth-page__google-host:hover {
  background: var(--lx-auth-soft);
  border-color: rgba(17, 35, 100, 0.28);
  box-shadow: 0 4px 16px rgba(17, 35, 100, 0.08);
}

.lx-auth-page__sso-extra {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lx-auth-page__sso-extra a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: var(--lx-auth-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none !important;
  transition: border-color 0.2s, background 0.2s;
}

.lx-auth-page__sso-extra a:hover {
  background: var(--lx-auth-soft);
  border-color: rgba(17, 35, 100, 0.22);
}

.lx-auth-page__or {
  position: relative;
  text-align: center;
  margin: 22px 0;
}

.lx-auth-page__or span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lx-auth-muted-2);
  background: #fff;
}

.lx-auth-page__or::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(17, 35, 100, 0.1);
}

.lx-auth-page__field {
  margin-bottom: 18px;
}

.lx-auth-page__field label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--lx-auth-primary);
  margin-bottom: 8px;
}

.lx-auth-page__field label .req {
  color: #c0392b;
}

.lx-auth-page__field input.form-control {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--lx-auth-border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--lx-auth-ink);
  background: #fff !important;
  box-shadow: none;
}

.lx-auth-page__field input.form-control:focus {
  outline: none;
  border-color: var(--lx-auth-primary);
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.5);
}

.lx-auth-page__input-wrap {
  position: relative;
}

.lx-auth-page__field--password input.form-control {
  padding-right: 48px;
}

.lx-auth-page__toggle-pwd {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--lx-auth-muted);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.lx-auth-page__toggle-pwd:hover {
  color: var(--lx-auth-primary);
  background: var(--lx-auth-soft);
}

.lx-auth-page__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 14px;
}

.lx-auth-page__remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lx-auth-muted);
  margin: 0;
  cursor: pointer;
}

.lx-auth-page__remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--lx-auth-primary);
}

.lx-auth-page__forgot {
  color: var(--lx-auth-primary);
  font-weight: 650;
  text-decoration: none;
}

.lx-auth-page__forgot:hover {
  text-decoration: underline;
}

.lx-auth-page__submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  min-height: 54px;
  font-size: 17px;
  font-weight: 650;
  color: #fff !important;
  background: #112364 !important;
  background-color: #112364 !important;
  background-image: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.25s, transform 0.2s;
}

.lx-auth-page__submit:hover {
  background: #0c1a4f !important;
  background-color: #0c1a4f !important;
  transform: translateY(-1px);
  color: #fff !important;
}

.lx-auth-page__foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(17, 35, 100, 0.08);
  text-align: center;
  font-size: 14px;
  color: var(--lx-auth-muted);
}

.lx-auth-page__foot a {
  color: var(--lx-auth-primary);
  font-weight: 650;
  text-decoration: none;
}

.lx-auth-page__foot a:hover {
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  .lx-auth-page__head,
  .lx-auth-page__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .lx-auth-page__sso-extra {
    grid-template-columns: 1fr;
  }
}
