/* Style global du corps de la page */
body {
  background-image: url("../../assets/bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
  min-height: 100vh;
  background-color: #f4f4f4;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: "cairo", sans-serif;
  direction: rtl;
}

/* Container de connexion */
.login-container {
  width: 90%;
  max-width: 400px;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #ddd;
  border-radius: 10px;
  margin: 20px;
  direction: rtl;
}

/* Titre */
h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #222;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* Groupe de formulaire */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  color: #222;
  font-size: 1rem;
  margin-bottom: 5px;
}

.form-group input {
  width: 90%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: "cairo", sans-serif;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-color: #FFD700;
  outline: none;
}

/* Toggle pour le mot de passe */
.password-toggle {
  position: relative;
}

#togglePassword {
  position: absolute;
  left: 40px;
  top: 68%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #222;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

#togglePassword:hover {
  color: #FFD700;
}

/* Conteneur de boutons */
.button-container {
  text-align: center;
  margin-top: 20px;
}

/* Bouton */
button {
  background-color: #222;
  color: #FFD700;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 5px;
  font-family: "cairo", sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}

button:hover {
  background-image: linear-gradient(90deg, rgba(255, 215, 0, 1) 0%, rgba(255, 193, 7, 1) 30%, rgba(218, 165, 32, 1) 60%, rgba(242, 207, 119, 1) 100%);
  animation: slidernbw 5s linear infinite;
  color: #222;
}

/* Animation pour le bouton */
@keyframes slidernbw {
  to {
    background-position: 20vw;
  }
}

/* Messages d'erreur et de succès */
.error-message {
  color: #ff0000;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  margin: 10px 0;
}

.success-message {
  color: #28a745;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  margin: 10px 0;
}

/* Champ de formulaire */
.form-control {
  padding: 10px;
  border: 1px solid #ddd;
  width: 10%;
  border-radius: 4px;
  font-size: 1rem;
  font-family: "cairo", sans-serif;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: #FFD700;
  outline: none;
}

/* Notification pour la connexion */
.login-notification {
  position: fixed;
  bottom: 10%;
  right: 20px;
  background-color: #ffc107; /* Couleur warning de Bootstrap */
  color: #222;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #e0a800;
  z-index: 1051;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: "cairo", sans-serif;
  font-size: 1rem;
  max-width: 300px;
  display: flex;
  align-items: center;
  direction: rtl;
}

.login-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.login-notification i {
  margin-left: 5px; /* Espacement pour RTL */
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    width: 95%;
    padding: 15px;
  }

  h2 {
    font-size: 1.6rem;
  }

  button {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .form-group input,
  .form-control {
    font-size: 0.9rem;
    padding: 8px;
  }

  #togglePassword {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .login-container {
    width: 100%;
    margin: 10px;
  }

  h2 {
    font-size: 1.5rem;
  }

  button {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .form-group input,
  .form-control {
    font-size: 0.8rem;
    padding: 6px;
  }
}