/* ============================================================
   AUTH LAYOUT — auth.css
   Pages : login, forgot-password, reset-password, change-password
   ============================================================ */

/* ---- Reset & base ---- */
body.auth-body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Public Sans', sans-serif;
  background: #f4f5f7;
}

/* ---- Conteneur principal ---- */
.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-wrapper {
  width: 100%;
  min-height: 100vh;
}

.auth-content-row {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ---- Panneau gauche (formulaire) ---- */
.auth-left {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  background: #ffffff;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Carte du formulaire */
.auth-left > div {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ---- Logo ---- */
.auth-header {
  margin-bottom: 28px;
  text-align: center;
}

.auth-header img {
  max-height: 140px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* ---- Titre de page (ex: "Sécurité Renforcée") ---- */
.auth-left .text-center.mb-4 h3 {
  font-size: 20px;
  font-weight: 700;
  color: #4361ee;
  margin-bottom: 6px;
}

.auth-left .text-center.mb-4 p {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.5;
}

/* ---- Alertes ---- */
.auth-left .alert {
  border-radius: 8px;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ---- Formulaire ---- */
.auth-form-group {
  width: 100%;
}

.auth-left .form-group {
  margin-bottom: 16px;
  width: 100%;
}

.auth-left .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

/* Champs de saisie */
.auth-left .form-control {
  font-size: 14px;
  padding: 10px 14px;
  height: 44px;
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-left .form-control:focus {
  border-color: #4361ee;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
  outline: none;
}

.auth-left .form-control[readonly] {
  background: #f1f5f9;
  color: #94a3b8;
}

/* ---- Input-group (toggle mot de passe) ---- */
.auth-left .input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  flex-wrap: nowrap;
}

.auth-left .input-group .form-control {
  flex: 1 1 auto;
  width: auto;
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.auth-left .input-group .form-control:focus {
  z-index: 3;
}

.auth-left .input-group-text {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: 0 14px;
  color: #64748b;
  display: flex;
  align-items: center;
}

/* Bouton toggle (btn-outline-secondary dans un input-group) */
.auth-left .input-group .btn-outline-secondary {
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #e2e8f0;
  border-left: none !important;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.auth-left .input-group .btn-outline-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.auth-left .input-group .form-control:focus + .btn-outline-secondary {
  border-color: #4361ee;
}

/* ---- Se souvenir / Mot de passe oublié ---- */
.auth-left .form-check-label {
  font-size: 13px;
  color: #6c757d;
}

.auth-left .link-primary {
  font-size: 13px;
  color: #4361ee;
  text-decoration: none;
  font-weight: 500;
}

.auth-left .link-primary:hover {
  text-decoration: underline;
}

/* ---- Bouton principal ---- */
.auth-left .btn-primary.btn-lg {
  height: 46px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  border-radius: 8px;
  background: #4361ee;
  border-color: #4361ee;
  letter-spacing: 0.3px;
  margin-top: 8px;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s, transform 0.1s;
}

.auth-left .btn-primary.btn-lg:hover {
  background: #3451d1;
  border-color: #3451d1;
  transform: translateY(-1px);
}

.auth-left .btn-primary.btn-lg:active {
  transform: translateY(0);
}

/* ---- Footer / texte bas de page ---- */
.auth-left .text-muted {
  font-size: 12px;
  color: #94a3b8;
}

/* ---- Panneau droit (image décorative) ---- */
.auth-right {
  flex: 1 1 50%;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(135deg, #4361ee 0%, #764ba2 100%);
}

.auth-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablette (≤ 992px) */
@media (max-width: 992px) {
  .auth-right {
    display: none;
  }

  .auth-left {
    flex: 1 1 100%;
    padding: 40px 32px;
  }

  .auth-left > div {
    max-width: 480px;
  }

  .auth-header img {
    max-height: 120px;
  }
}

/* Mobile (≤ 576px) */
@media (max-width: 576px) {
  .auth-left {
    padding: 32px 20px;
    justify-content: flex-start;
    padding-top: 40px;
  }

  .auth-left > div {
    max-width: 100%;
  }

  .auth-header img {
    max-height: 100px;
  }

  .auth-header {
    margin-bottom: 20px;
  }

  .auth-left .form-control {
    font-size: 14px;
    height: 42px;
  }

  .auth-left .input-group .btn-outline-secondary {
    height: 42px;
  }

  .auth-left .btn-primary.btn-lg {
    height: 42px;
    font-size: 14px;
  }

  /* "Se souvenir / Mot de passe oublié" en colonne si trop étroit */
  .auth-left .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Très petit écran (≤ 360px) */
@media (max-width: 360px) {
  .auth-left {
    padding: 24px 14px;
    padding-top: 30px;
  }

  .auth-header img {
    max-height: 80px;
  }
}
