body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f8f8fa !important;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-main {
  max-width: 390px;
  margin: 48px auto 0 auto;
  box-shadow: 0 0 18px #ccc8;
  background: #fff;
  border-radius: 11px;
  padding: 2.2em 2em 2em 2em;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: min-height 0.23s cubic-bezier(.42,1.5,.47,.98);
  min-height: 380px;
}

.login-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 0px;
}
.login-logo img {
  width: 78px;
  display: block;
}

#login-form { width: 100%; }
.login-msg {
  margin: 10px 0 0 0;
  color: #c53c3c;
  font-size: 1em;
  min-height: 1.3em;
  text-align: center;
}
.modern-form-group {
  position: relative;
  margin-bottom: 30px;
}
.modern-form-group input {
  font-size: 1em;
  border: none;
  background: #f0f2fa;
  padding: 14px 38px 14px 14px;
  border-radius: 6px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border .2s;
  border: 1.5px solid #ccd4e0;
}
.modern-form-group label {
  position: absolute;
  left: 14px;
  top: 12px;
  font-size: 1em;
  color: #888;
  pointer-events: none;
  background: transparent;
  transition: all .17s;
  opacity: 0.85;
}
.modern-form-group input:focus + label,
.modern-form-group input[data-hasval="1"] + label {
  top: -10px;
  left: 7px;
  background: #fff;
  color: #1a2947;
  font-size: 0.87em;
  padding: 0 5px;
  opacity: 1;
}
.toggle-pwd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.toggle-pwd svg {
  width: 22px;
  height: 22px;
  fill: #657394;
  transition: fill 0.14s;
  display: block;
}
.toggle-pwd:active svg,
.toggle-pwd:focus svg {
  fill: #13387e;
}
:focus-visible {
  outline:1.5px solid #3652e7;
}
.modern-btn {
  background: #256cf3;
  color: #fff;
  font-weight: 600;
  padding: 13px;
  width: 100%;
  border-radius: 5px;
  border: none;
  font-size: 1em;
  margin-top: 8px;
  transition: background .18s;
  cursor: pointer;
  box-shadow: 0 0 0.5px #256cf340;
}
.modern-btn:hover {
  background: #13387e;
}
/* Barre de progression de force du mot de passe */
.pwd-strength-bar {
  height: 9px;
  width: 93%;
  background: #ececf3;
  border-radius: 4px;
  margin: 8px auto 13px auto;
  position: relative;
  box-sizing: border-box;
}
.pwd-strength-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 0.28s cubic-bezier(.58,1.2,.47,.98), background 0.13s;
}

/* Bloc contraintes mot de passe */
.pwd-constraints {
  margin-top: 10px;
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}
.pwd-criteria-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 28px;
  justify-content: center;
  align-items: center;
}
.pwd-criteria-list span {
  display: block;
  font-size: 0.98em;
  color: #ba2020;
  transition: color 0.18s;
  text-align: center;
  letter-spacing: .01em;
}
.pwd-criteria-list span.valid {
  color: #059443;
}
.pwd-constraints.valid .pwd-criteria-list span.valid {
  font-weight: bold;
}
.pwd-criteria-list span.invalid {
  color: #ba2020;
  opacity: 0.85;
}