/* background moderne */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

/* centrer */
.login-container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* carte */
.login-form {
  background: white;
  padding: 40px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

  animation: fadeIn 0.8s ease;
}

/* animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* input */
.login-form input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* bouton */
.login-form button {
  width: 100%;
  padding: 10px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.login-form button:hover {
  background: #5a67d8;
}

/* message erreur */
.error-msg {
  color: red;
  margin-bottom: 10px;
}
.login-form input:focus {
  border-color: #667eea;
  outline: none;
}
/* bouton toggle */
#darkToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  border: none;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* DARK MODE */
body.dark {
  background: linear-gradient(135deg, #1e1e2f, #121212);
}

/* carte */
body.dark .login-form {
  background: #1e1e2f;
  color: white;
}

/* inputs */
body.dark input {
  background: #2c2c3c;
  color: white;
  border: 1px solid #555;
}

/* bouton */
body.dark button {
  background: #333;
  color: white;
}
#darkToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  border: none;
  background: white;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;

  transition: all 0.4s ease;
}

/* animation hover */
#darkToggle:hover {
  transform: scale(1.2) rotate(15deg);
}

/* animation quand actif */
#darkToggle.active {
  transform: rotate(180deg) scale(1.2);
  background: #333;
  color: yellow;
}
body {
  transition: background 0.5s ease;
}

.login-form {
  transition: all 0.5s ease;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 40px;
}
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  user-select: none;
}
.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 38px;
}

.password-field .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  user-select: none;
  line-height: 1;
}
