/* ============================================================
   LOGIN PAGE — SOGENTIS (2025)
   Fichier : static/accounts_users/css/login.css
   Optimisé, harmonisé, multi-langues, RTL-ready
   Bouton Se connecter centré et responsive
   ============================================================ */

/* ------------------------------------------------------------
   WRAPPER
   ------------------------------------------------------------ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 2;
}

/* ------------------------------------------------------------
   CARD (Glassmorphism Premium)
   ------------------------------------------------------------ */
.auth-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1.1rem;
  border: 0;
  box-shadow: 0 10px 35px rgba(0,0,0,.15);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  max-width: 420px;
  width: 100%;
}

.auth-card .card-body {
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
}

/* ------------------------------------------------------------
   TITRES
   ------------------------------------------------------------ */
.auth-card h1,
.auth-card h3 {
  font-weight: 700;
  text-align: center;
  margin-bottom: .25rem;
}

.auth-card .small {
  color: #6c757d;
  text-align: center;
}

/* ------------------------------------------------------------
   FORM
   ------------------------------------------------------------ */
.auth-card .form-label {
  font-weight: 600;
  margin-bottom: .35rem;
}

.auth-card .form-control {
  height: 44px;
  padding: .5rem .75rem;
  border-radius: .5rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-card .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13,110,253,.25);
}

.invalid-feedback.d-block {
  font-size: .9rem;
}

/* ------------------------------------------------------------
   INPUT GROUP (password + toggle)
   ------------------------------------------------------------ */
.auth-card .input-group > .form-control {
  border-right: 0;
}

.auth-card .input-group .btn {
  border-color: #ced4da;
  background: #fff;
}

.auth-card #togglePassword {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* CAPS LOCK HINT */
#capsLockHint {
  font-size: .85rem;
  display: none;
}

/* ------------------------------------------------------------
   BOUTON LOGIN
   ------------------------------------------------------------ */
.auth-card .btn-primary {
  display: inline-block;
  min-width: 180px;
  max-width: 260px;
  width: auto;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  border-radius: 0.6rem;
  box-shadow: 0 6px 18px rgba(13,110,253,0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  margin: 0 auto;
}

.auth-card .btn-primary:hover {
  box-shadow: 0 8px 22px rgba(13,110,253,0.22);
}

.auth-card .btn-primary:active {
  transform: translateY(1px);
}

/* Wrapper pour centrer le bouton */
.auth-card .btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* ------------------------------------------------------------
   LIENS SECONDAIRES
   ------------------------------------------------------------ */
.auth-card .small a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s ease;
}

.auth-card .small a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .auth-card .form-control {
    height: 42px;
  }
  .auth-card .card-body {
    padding: 1.1rem;
  }
}

@media (max-width: 480px) {
  .auth-card .btn-primary {
    min-width: 140px;
    max-width: 200px;
    padding: 0.55rem 1.2rem;
  }
}

/* ------------------------------------------------------------
   NAVIGATEURS — masquage œil/password natif
   ------------------------------------------------------------ */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
}

/* ------------------------------------------------------------
   MODE RTL (Arabic, Hebrew…)
   ------------------------------------------------------------ */
html[dir="rtl"] .input-group > .form-control {
  border-left: 0;
  border-right: 1px solid #ced4da;
}

html[dir="rtl"] .input-group .btn {
  border-right: 0;
  border-left: 1px solid #ced4da;
}

html[dir="rtl"] #togglePassword {
  border-left: 1px solid #ced4da;
  border-right: 0;
}
