/* ============================================================================
   password-toggle.css — Styles pour le bouton œil/œil-barré
   ============================================================================
   Utilisé par password-toggle.js pour afficher/masquer un mot de passe.
   Le wrapper et le bouton sont créés dynamiquement par le JS.
   ============================================================================ */

.password-field-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-field-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;   /* place pour l'œil en LTR */
}

/* En RTL : œil à gauche → padding-left au lieu de padding-right */
html[dir="rtl"] .password-field-wrap input {
  padding-right: 14px;
  padding-left: 44px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 0;       /* évite l'espace vertical autour du SVG */
  color: #6b7280;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[dir="rtl"] .password-toggle-btn {
  right: auto;
  left: 8px;
}

.password-toggle-btn svg {
  display: block;
}

.password-toggle-btn:hover {
  background: #f3f4f6;
  color: #374151;       /* SVG plus foncé au survol */
}

.password-toggle-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
