/* =====================================================================
   Page de connexion — styles dédiés (chargés uniquement sur /login)
   ===================================================================== */
html {
  font-size: 15px;
}

body.auth-login {
  background: #20014f;
  background: #20014f url(/images/login/bg-xs.jpg) no-repeat center center;
  background-size: cover;
}

/* =====================================================================
   Page de connexion — composition deux colonnes (maquette APOR)
   ===================================================================== */
body.auth-login .auth-shell {
  display: block;
  padding: 0;
  min-height: 100vh;
}

body.auth-login .flash {
  position: fixed;
  top: 1.067rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  margin: 0;
}

.login-split {
  --lp-pink: #ec3a82;
  --lp-coral: #f76b6b;
  --lp-orange: #ff7a21;
  --lp-gold: #f6c453;
  --lp-ink: #160726;
  --grad-accent: linear-gradient(90deg, #f7a23b, #f6c453);
  --grad-btn: linear-gradient(95deg, #e6565d 0%, #ad5fb3 100%);

  display: grid;
  grid-template-columns: minmax(28rem, 42%) 1fr;
  min-height: 100vh;
}

/* ── Panneau gauche : dégradé violet profond + texture pointillée ── */
.login-panel {
  position: relative;
  display: flex;
  overflow: hidden;
}


.login-panel-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34.333rem;
  margin: auto;
  padding: 3.2rem 3.733rem;
  display: flex;
  flex-direction: column;
}

.login-logo {
  width: 100%;
  max-width: clamp(10rem, 20vw, 20rem);
  margin-bottom: 2.133rem;
}

.login-title {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}

.login-tagline {
  margin: 0.667rem 0 0;
  font-size: clamp(1.7rem, 2vw, 1.933rem);
  font-weight: 500;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-right: -5rem;
}

.login-lead {
  margin: 2rem 0 2rem;
  color: #e7f2f7;
  font-size: 1.2rem;
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  line-height: 1.6;
  margin-right: -4rem;
}

.login-error {
  margin-bottom: 1.2rem;
  padding: 0.733rem 0.933rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(236, 58, 130, .4);
  background: rgba(236, 58, 130, .14);
  color: #ffd7e6;
  font-size: 0.9rem;
}

/* ── Champs ── */
.login-input {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.933rem;
}

.login-input input {
  width: 100%;
  height: 3.733rem;
  padding: 0 1.067rem 0 4rem;
  border: 0;
  border-radius: 1.067rem;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font: inherit;
  font-size: 0.967rem;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.login-input input:autofill,
.login-input input:-webkit-autofill,
.login-input input:-webkit-autofill:hover,
.login-input input:-webkit-autofill:focus,
.login-input input:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px #8a6ea7 inset;
  -webkit-box-shadow: 0 0 0 1000px #8a6ea7 inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}

.login-input-icon {
  position: absolute;
  left: 0.667rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.533rem;
  height: 2.533rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.733rem;
  color: #fff;
}

.login-input-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Bouton afficher/masquer adapté au champ sombre */
.login-input.password-field input {
  padding-right: 3.467rem;
}

.login-input .password-toggle {
  left: auto;
  right: 0.667rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  color: rgba(225, 220, 245, .6);
}

.login-input .password-toggle:hover {
  color: #fff;
}

/* ── Actions ── */
.login-actions {
  display: flex;
  align-items: center;
  gap: 1.467rem;
  margin-top: 3.333rem;
  justify-content: space-between;
}

.login-btn {
  height: 3.467rem;
  padding: 0 2.267rem;
  border: 0;
  border-radius: 2rem;
  cursor: pointer;
  font-size: clamp(14px, 1.3vw, 1.433rem);
  font-weight: 700;
  color: #fff;
  background: var(--grad-btn);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(236, 58, 130, .25);
  filter: brightness(1.04);
}

.login-btn:active {
  transform: translateY(0);
}

.login-forgot {
  color: var(--lp-orange);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.login-forgot:hover {
  color: var(--lp-pink);
}

.login-url {
  margin-top: auto;
  padding-top: 2.167rem;
  color: rgba(210, 200, 235, .5);
  font-size: 0.833rem;
  text-decoration: none;
}

.login-url:hover {
  color: rgba(210, 200, 235, .8);
}

/* ── Visuel droit : photo plein cadre + avatars flottants ── */
.login-visual {
  position: relative;
  overflow: hidden;
  margin-left: -6vw;
}

.login-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 97%;
  object-fit: contain;
  object-position: bottom center;
  bottom: 1px;
  top: 6%;
}

.login-visual::after {
  content: "";
  height: 100%;
  display: block;
  width: 60%;
  background: url(/images/login/login-eclat.png) no-repeat bottom right;
  background-size: contain;
  position: absolute;
  top: 0;
  mix-blend-mode: color-dodge;
  z-index: -1;
}

.login-ava {
  position: absolute;
  z-index: 3;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.login-ava-1 {
  width: 5vw;
  height: 5vw;
  top: 7%;
  left: 6.5%;
}

.login-ava-2 {
  width: 5vw;
  height: 5vw;
  bottom: 12%;
  left: 9%;
}

.login-ava-3 {
  width: 6.4vw;
  height: 6.4vw;
  bottom: 15.7%;
  right: 9%;
}

@media (min-width: 1921px) {
  html {
    font-size: 17px;
  }
}

@media (min-height: 921px) {
  html {
    font-size: 17px;
  }
}

/* ── Modale « Mot de passe oublié » ── */
.login-modal[hidden] {
  display: none;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.333rem;
}

.login-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 4, 40, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.login-modal-box {
  position: relative;
  width: 100%;
  max-width: 27rem;
  padding: 2.4rem 2.133rem 2.133rem;
  border-radius: 1.333rem;
  background: linear-gradient(160deg, #2a1050 0%, #1b0833 100%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: login-modal-in .2s ease;
}

@keyframes login-modal-in {
  from {
    opacity: 0;
    transform: translateY(0.667rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-modal-close {
  position: absolute;
  top: 0.933rem;
  right: 0.933rem;
  width: 2.133rem;
  height: 2.133rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.667rem;
  background: rgba(255, 255, 255, .06);
  color: rgba(225, 220, 245, .65);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.login-modal-close:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.login-modal-close svg {
  width: 1.067rem;
  height: 1.067rem;
}

.login-modal-title {
  margin: 0;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
}

.login-modal-sub {
  margin: 0.533rem 0 1.6rem;
  color: rgba(225, 220, 245, .7);
  font-size: 0.933rem;
  line-height: 1.5;
}

.login-modal.has-feedback .login-modal-sub {
  display: none;
}

.login-modal.has-feedback .login-modal-body {
  margin-top: 1.6rem;
}

.login-modal-success {
  margin: 0;
  padding: 0.933rem 1rem;
  border-radius: 0.8rem;
  background: rgba(120, 220, 160, .12);
  border: 1px solid rgba(120, 220, 160, .35);
  color: #c8f5db;
  font-size: 0.933rem;
  line-height: 1.5;
}

.login-reset-submit {
  margin-top: 0.4rem;
  border: 1px solid #ffffff;
  box-shadow: none;
  font-size: 1rem;
  display: flex;
  margin: 2rem auto 0;
  align-items: center;
  justify-content: center;
}

.login-reset-submit:hover {
  box-shadow: none;
  background: rgba(255, 255, 255, .11);

}

/* ── Responsive : on masque le visuel et on empile ── */
@media (max-width: 980px) {
  .login-split {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel-inner {
    max-width: 30.667rem;
    padding: 2.667rem 1.867rem;
  }

  .login-lead,
  .login-tagline {
    margin-right: 0;
  }
}