/* ============================================================
   Login page — Variant A (Split Hero)
   Préfixe : lg-
   Ne modifie aucun comportement JS existant.
   ============================================================ */

/* ---------- Reset page-level contraintes Bootstrap/AdminLTE ---------- */
.lg-page {
  margin: 0;
  padding: 28px 32px;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
}

/* ---------- Grille split 55 / 45 ---------- */
.lg-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  width: 100%;
  max-width: 1100px;
  min-height: 560px;
  max-height: 680px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .14), 0 2px 10px rgba(0, 0, 0, .08);
}

/* ---------- Panneau gauche — formulaire ---------- */
.lg-form-panel {
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

/* ---------- Sélecteur de rôle ---------- */
.lg-roles-section {
  margin-bottom: 28px;
}

.lg-roles-label {
  font-size: 11px;
  font-weight: 700;
  color: #979797;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

/* Override complet des .custom-btn sur cette page */
.lg-form-panel .custom-btn {
  background: #fff;
  color: #a03863;
  border: 1.5px solid #a03863;
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  margin: 0 4px 8px 0;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  display: inline-block;
}

.lg-form-panel .custom-btn:hover {
  background: #fdf0f5;
}

.lg-form-panel .custom-btn.active {
  background: #a03863;
  color: #fff;
  box-shadow: 0 2px 8px rgba(160, 56, 99, .28);
}

/* ---------- Badge rôle dans le titre ---------- */
.lg-role-badge {
  color: #a03863;
  font-weight: 700;
}

/* ---------- En-tête du formulaire ---------- */
.lg-head {
  margin-bottom: 28px;
}

.lg-head h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1b2734;
  margin: 0 0 6px;
}

.lg-head p {
  color: #979797;
  font-size: 13px;
  margin: 0;
}

/* ---------- Champs de saisie ---------- */
.lg-field {
  margin-bottom: 20px;
}

.lg-field label.rp-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
}

.lg-form-panel .login-input,
.lg-form-panel .rp-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #fff;
  color: #414141;
  border: 1px solid #d2d6de;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  text-align: left; /* annule l'ancien text-center */
}

.lg-form-panel .login-input::placeholder,
.lg-form-panel .rp-input::placeholder {
  color: #bdbdbd;
}

.lg-form-panel .login-input:focus,
.lg-form-panel .rp-input:focus {
  border-color: #a03863;
  box-shadow: 0 0 0 3px rgba(160, 56, 99, .12);
}

/* ---------- Ligne label + lien mot de passe oublié ---------- */
.lg-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.lg-label-row label {
  margin-bottom: 0;
}

.lg-forgot,
a.lg-forgot,
.frgt-pass,
a.frgt-pass {
  color: #a03863;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.lg-forgot:hover,
a.lg-forgot:hover,
.frgt-pass:hover,
a.frgt-pass:hover {
  text-decoration: underline;
  color: #872f57;
}

/* ---------- Bouton principal ---------- */
.lg-submit-btn {
  width: auto;
  min-width: 180px;
  display: block;
  margin: 8px auto 0;
  background: #a03863;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s ease;
  margin-top: 8px;
}

.lg-submit-btn:hover {
  background: #872f57;
}

/* ---------- Formulaire mot de passe oublié ---------- */
.lg-forgot-head {
  margin-bottom: 22px;
}

.lg-forgot-head h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1b2734;
  margin: 0 0 6px;
}

.lg-forgot-head p {
  color: #979797;
  font-size: 13px;
  margin: 0;
}

.lg-forgot-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.lg-back-link,
a.lg-back-link,
.login-pass,
a.login-pass {
  color: #a03863;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.lg-back-link:hover,
a.lg-back-link:hover,
.login-pass:hover,
a.login-pass:hover {
  text-decoration: underline;
  color: #872f57;
}

/* ---------- Zone alertes (erreur Symfony + ajax) ---------- */
.lg-form-panel .errormsg,
.lg-form-panel .js-error-msg {
  margin-bottom: 12px;
}

.lg-form-panel .alert {
  border-radius: 8px;
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid;
}

/* Override Bootstrap rouge → rose doux */
.lg-form-panel .alert-danger {
  background: #fdecea;
  color: #a32519;
  border-color: #f5c6c0;
}

.lg-form-panel .alert-danger strong {
  color: #a32519;
}

.lg-form-panel .alert-success {
  background: #eef7f1;
  color: #1a6b3a;
  border-color: #b7dfc6;
}

/* Champ en erreur */
.lg-form-panel .login-input.is-error,
.lg-form-panel .rp-input.is-error {
  border-color: #dd4b39;
  box-shadow: 0 0 0 3px rgba(221, 75, 57, .10);
}

/* Texte d'erreur inline sous un champ */
.lg-field-error {
  color: #dd4b39;
  font-size: 12px;
  margin-top: 5px;
}

/* ---------- Panneau droit — marque ---------- */
.lg-brand-panel {
  position: relative;
  background: linear-gradient(160deg, #a03863 0%, #6e1f44 100%);
  color: #fff;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lg-brand-body {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 380px;
}

.lg-brand-title {
  font-family: 'Oswald', 'lane_-_narrowregular', 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.08;
  color: #fff;
  margin: 0 0 18px;
}

.lg-brand-lead {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .85);
  margin: 0;
}

/* ---------- Liste features ---------- */
.lg-features {
  margin-top: 38px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lg-feat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.lg-feat-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.lg-feat-text {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .88);
}

.lg-feat-text strong {
  color: #fff;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
}

/* ---------- Bande de confiance ---------- */
.lg-trust-row {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lg-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, .75);
}

.lg-trust .fa {
  color: rgba(255, 255, 255, .9);
  flex-shrink: 0;
}

/* ---------- Champ mot de passe avec œil ---------- */
.lg-password-wrap {
  position: relative;
}

.lg-password-wrap .login-input,
.lg-password-wrap .rp-input {
  padding-right: 42px;
}

.lg-eye {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #979797;
  font-size: 15px;
  line-height: 1;
  transition: color .15s ease;
}

.lg-eye:hover {
  color: #a03863;
}

/* ---------- Lien inscription (bas du panel marque) ---------- */
.lg-signup-cta {
  margin-top: auto;
  padding-top: 28px;
  font-size: 20px;
  color: rgba(255, 255, 255, .80);
}

.lg-signup-cta a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lg-signup-cta a:hover {
  color: rgba(255, 255, 255, .85);
}

/* ---------- Filigrane décoratif ---------- */
.lg-brand-panel::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 220px;
  height: 130px;
  background-image:
    url("/assets/images/home/icon/mml_rappel_rendez_vous.png"),
    url("/assets/images/home/icon/mml_messagerie_instantanne.png");
  background-repeat: no-repeat;
  background-position: 10% 80%, 85% 50%;
  background-size: 60px, 64px;
  opacity: .12;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

/* ---------- Responsive ---------- */

/* Tablette paysage : panneau droit réduit */
@media (max-width: 1024px) {
  .lg-grid {
    max-width: 820px;
  }

  .lg-brand-title {
    font-size: 32px;
  }

  .lg-brand-panel {
    padding: 36px 30px;
  }

  .lg-features {
    margin-top: 24px;
    gap: 16px;
  }
}

/* Tablette portrait : colonne unique, panneau marque en dessous */
@media (max-width: 768px) {
  .lg-page {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .lg-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    max-width: 480px;
    min-height: unset;
    max-height: unset;
    width: 100%;
  }

  .lg-brand-panel {
    display: flex;
    padding: 32px 28px;
    min-height: 200px;
  }

  .lg-brand-title {
    font-size: 28px;
  }

  .lg-features {
    display: none;
  }

  .lg-brand-body {
    margin: 0;
  }

  .lg-form-panel {
    padding: 36px 32px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .lg-page {
    padding: 12px 10px;
  }

  .lg-grid {
    border-radius: 12px;
    max-width: 100%;
  }

  .lg-form-panel {
    padding: 28px 20px;
  }

  .lg-head h1 {
    font-size: 20px;
  }

  /* Pills sur une seule ligne, scroll horizontal si besoin */
  .lg-roles-section > div {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .lg-roles-section > div::-webkit-scrollbar {
    display: none;
  }

  .lg-form-panel .custom-btn {
    padding: 7px 12px;
    font-size: 11px;
    flex-shrink: 0;
    margin: 0;
  }

  .lg-submit-btn {
    min-width: 140px;
    font-size: 13px;
  }
}
