.auth-page-2fa {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 82px);
  background-color: #181c18;
  border: 1px solid #181c18;
}

.auth-page-2fa .page-container-fluid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.auth-page-2fa .page_container {
  display: flex;
  max-width: 380px;
  gap: 150px;
  align-items: center;
  font-family: "Poppins", sans-serif;
  justify-content: center;
  margin: 0 auto;
}

.auth-page-2fa .login-box button:hover {
  background: #1f66d1;
}

.auth-page-2fa .login-box h2 {
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  color: #fff;
  margin: 0px auto 15px;
}

.auth-page-2fa .login-box .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  margin-bottom: 30px;
}

.auth-page-2fa .login-box .icon img.shield {
  width: 100%;
  max-width: 110px;
}

.auth-page-2fa .login-box p {
  font-size: 14px;
  text-align: center;
  opacity: 92%;
  color: #b4b4b4;
}

.auth-page-2fa .otp-inputs {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.auth-page-2fa .otp-inputs input {
  width: 100%;
  padding: 6px;
  margin-bottom: 15px;
  color: #fff;
  font-size: 25px;
  text-align: center;
  background: transparent;
  border: 3px solid #707070;
  border-radius: 8px;
}

.auth-page-2fa .box {
  box-sizing: border-box;
  text-align: center;
  padding: 0;
}

.auth-page-2fa .login-box .form-error {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  color: #fff;
}

.auth-page-2fa .otp-inputs input:focus {
  border-color: #1a85f8;
  outline: none;
  background: transparent !important;
}

.auth-page-2fa .otp-keypad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px 6px;
  padding: 12px;
  background: transparent;
  border: 3px solid #707070;
  border-radius: 12px;
  margin: 40px 0;
}

.auth-page-2fa .otp-keypad button {
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  background: transparent;
  border: 3px solid #707070;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  margin-top: 0;
  padding: 4px 8px;
}

.auth-page-2fa .otp-keypad button.delete {
  font-size: 16px;
}

.auth-page-2fa .otp-keypad button.cancel {
  padding: 0px 16px;
}

.auth-page-2fa .otp-actions {
  grid-column: 2/6;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 5px;
}

.auth-page-2fa .otp-keypad .btn-cancel {
  font-size: 16px;
}

.auth-page-2fa .otp-keypad .btn-verify,
.auth-page-2fa .otp-keypad .btn-verify:hover {
  background: #15af41;
  color: #fff;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 16px;
}

@media (max-width: 768px) {

  .auth-page-2fa {
    margin: 5px 6px 8px;
    border-radius: 5px;
    overflow-y: auto;
    scrollbar-width: none;
    min-height: calc(100vh - 60px - 50px - 8px - 4px);
    max-height: calc(100vh - 60px - 50px - 8px - 4px);
    align-items: flex-start;
    padding: 30px 0px;
    padding-top: 65px;
  }

  .auth-page-2fa .page-container-fluid {
    padding: 0 28px;
  }

  .auth-page-2fa .otp-keypad {
    display: none;
  }

  .auth-page-2fa .login-box .icon {
    margin-bottom: 24px;
  }

  .auth-page-2fa .login-box .icon img.shield {
    max-width: 88px;
  }

  .auth-page-2fa .login-box .icon img.google {
    max-width: 102px;
  }

  .auth-page-2fa .login-box .icon img.email {
    max-width: 88px;
  }

  .auth-page-2fa .login-box h2 {
    font-size: 24px;
    line-height: 109%;
    max-width: 270px;
    margin: 0 auto 20px;
  }

  .auth-page-2fa .login-box p.sub-title {
    font-size: 10px;
    margin-bottom: 80px;
  }

  .auth-page-2fa .otp-inputs input {
    border-width: 3px;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .auth-page-2fa .otp-inputs input:focus {
    outline: 1px solid #1A85F8;
    border: 3px solid #B4B4B4;
  }

  .auth-page-2fa .login-box .form-error {
    font-size: 11px;
    line-height: 147%;
  }

}

@media (max-width: 768px) and (min-width: 581px) {

  .auth-page-2fa .login-box p.sub-title {
    margin-bottom: 50px;
  }

}

/* ============================================================================
   Overlay 2FA V5 : la page auth-2fa est reutilisee comme MODALE plein ecran
   au-dessus du login (#twofa-overlay), pilotee par Login2fa.js.
   ============================================================================ */
/* container fixe plein ecran : neutralise le sizing "page" du mock (margin/max-height/min-height penses pour le flux normal) */
#twofa-overlay.auth-page-2fa { margin: 0 !important; min-height: 0 !important; max-height: none !important; border: 0 !important; overflow-y: auto; }

/* icone selon le type 2FA : classe .twofa-t{type} posee par Login2fa.js (1 PIN / 2 Google / 3 e-mail) */
#twofa-overlay .twofa-icon { display: none; }
#twofa-overlay.twofa-t1 .twofa-icon-shield { display: block; }
#twofa-overlay.twofa-t2 .twofa-icon-google { display: block; }
#twofa-overlay.twofa-t3 .twofa-icon-email { display: block; }
#twofa-overlay:not(.twofa-t1):not(.twofa-t2):not(.twofa-t3) .twofa-icon-shield { display: block; }

/* Le mock ne cappe les icones google/email QU'en mobile -> en desktop elles s'affichent en taille naturelle (enormes). On les aligne sur le shield. */
#twofa-overlay .login-box .icon img.google { width: 100%; max-width: 120px; }
#twofa-overlay .login-box .icon img.email { width: 100%; max-width: 110px; }

/* Login2fa.js teinte #verifyBtn/#cancelBtn en inline depuis .btn-gradient -> on force le look V5 (vert valider, contour gris annuler) */
#twofa-overlay .otp-keypad .btn-verify,
#twofa-overlay .otp-keypad .btn-verify:hover { background: #15af41 !important; border: 3px solid #15af41 !important; color: #fff !important; }
#twofa-overlay .otp-keypad .btn-cancel,
#twofa-overlay .otp-keypad .btn-cancel:hover { background: transparent !important; border: 3px solid #707070 !important; color: #fff !important; }

/* zone message (succes/erreur) ecrite par Login2fa.js */
#twofa-overlay #twofa-msg { min-height: 20px; margin: 0 0 4px; }
#twofa-overlay #twofa-msg:empty { min-height: 0; }

/* bouton "Renvoyer le code" (type e-mail uniquement) */
#twofa-overlay .twofa-resend-wrap { text-align: center; margin-top: 18px; }
#twofa-overlay .twofa-resend { background: transparent; border: 1px solid #1a85f8; color: #1a85f8; border-radius: 8px; padding: 8px 18px; font-size: 14px; font-family: "Poppins", sans-serif; cursor: pointer; }
#twofa-overlay .twofa-resend:hover { background: #1a85f8; color: #fff; }
#twofa-overlay .twofa-resend:disabled { opacity: .6; cursor: default; }

/* secousse sur code invalide (#pinContainer, anim referencee par Login2fa.js) */
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* relais "Annuler" mobile (le vrai #cancelBtn est dans .otp-keypad masquee <768px) : cache en desktop, visible en mobile */
#twofa-overlay .twofa-mobile-actions { display: none; text-align: center; margin-top: 16px; }
#twofa-overlay .twofa-mobile-cancel { background: transparent; border: 3px solid #707070; color: #fff; border-radius: 8px; padding: 8px 26px; font-size: 16px; font-family: "Poppins", sans-serif; cursor: pointer; }
@media (max-width: 768px) {
  #twofa-overlay .twofa-mobile-actions { display: block; }
}

/* ----------------------------------------------------------------------------
   L'overlay 2FA est un composant TOUJOURS sombre (fond #181c18).
   En theme clair, light_theme.css force le texte en sombre (#32323B / #707070)
   MAIS n'eclaircit pas ce fond -> sombre sur sombre. On reaffirme donc des
   couleurs claires, lisibles sur fond sombre. L'ID #twofa-overlay l'emporte sur
   les selecteurs .light-theme .layout-auth .auth-page-2fa ... (id > classes).
   ---------------------------------------------------------------------------- */
.light-theme #twofa-overlay .login-box h2 { color: #fff; }
.light-theme #twofa-overlay .login-box p,
.light-theme #twofa-overlay .login-box p.sub-title { color: #b4b4b4; }
.light-theme #twofa-overlay #twofa-msg { color: #fff; }
.light-theme #twofa-overlay .otp-inputs input { color: #fff; border-color: #707070; }
.light-theme #twofa-overlay .otp-keypad button { color: #fff; border-color: #707070; }
.light-theme #twofa-overlay .otp-keypad .btn-verify { color: #fff; }
.light-theme #twofa-overlay .otp-keypad .btn-cancel,
.light-theme #twofa-overlay .twofa-mobile-cancel { color: #fff; border-color: #707070; }
/* la fleche "retour" est claire (pensee pour fond sombre) : ne pas l'inverser en theme clair */
.light-theme #twofa-overlay .login-box button img { filter: none; }

/* Les skins v1..v10 incluent un bloc autofill-fix NON scope (input:focus / input:-webkit-autofill { -webkit-text-fill-color:#5B657E !important })
   qui fuit sur les cases du code 2FA -> chiffre saisi en GRIS TERNE au focus (les cases s'auto-focus a la frappe).
   On force le texte des cases de l'overlay en BLANC : l'ID #twofa-overlay (+ !important) l'emporte sur le input:focus du skin. */
#twofa-overlay .otp-inputs input,
#twofa-overlay .otp-inputs input:focus,
#twofa-overlay .otp-inputs input:-webkit-autofill,
#twofa-overlay .otp-inputs input:-webkit-autofill:hover,
#twofa-overlay .otp-inputs input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: none !important;
  background: transparent !important;
}