/**
 * Champs mot de passe (connexion / inscription) : toggle visibilité, exigences, états OK/erreur.
 */
.oms-pw-input-wrap {
  position: relative;
  display: block;
}

.oms-pw-input-wrap > input[type="password"],
.oms-pw-input-wrap > input[type="text"] {
  padding-right: 3rem;
}

.oms-pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  line-height: 1;
  color: #64748b;
  border-radius: 0.375rem;
}

.oms-pw-toggle:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}

.oms-pw-toggle:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
}

.oms-pw-requirements {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475569;
}

.oms-pw-requirements li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.25rem;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.oms-pw-requirements li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 9999px;
  background: #94a3b8;
}

.oms-pw-requirements li.is-met {
  color: #94a3b8;
  opacity: 0.72;
}

.oms-pw-requirements li.is-met::before {
  background: #22c55e;
}

.oms-pw-requirements li.is-met .oms-pw-req-text {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Contour confirmation : erreur / succès */
.oms-pw-confirm-wrap.has-mismatch > input {
  border-color: #f87171;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45);
}

.oms-pw-confirm-wrap.is-match > input {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

/* Champ mot de passe principal : pulsation légère rouge si saisi mais non conforme */
@keyframes oms-auth-pw-warn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.22);
  }
}

.oms-pw-input-wrap.oms-pw--warn {
  animation: oms-auth-pw-warn-pulse 1.1s ease-in-out 2;
  border-radius: 0.75rem;
  outline: 1px solid rgba(248, 113, 113, 0.55);
  outline-offset: 2px;
}

.oms-pw-input-wrap.oms-pw--warn > input {
  border-color: #fca5a5;
}

/* Secousse sur le champ confirmation uniquement si différent du maître */
@keyframes oms-auth-shake-soft {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}

.oms-pw-input-wrap.oms-pw--shake {
  animation: oms-auth-shake-soft 0.45s ease;
}
