* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  /* background: linear-gradient(45deg, #6c63ff, #f7797d); */
  background-image: url("../img/Background.png");
  background-position: center bottom;
  background-size: cover;
  overflow: hidden;
  animation: backgroundChange 5s infinite alternate;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 10px; /* Padding pour les petits écrans */
}

.titreContainer {
  position: absolute;
  top: 2em;
  z-index: 1;
  width: 100%;
  height: 25%;
  text-align: center;
  /* background: linear-gradient(to left, transparent, #fcc425 25%, #fcc425 75%, transparent 100%); */
  background: linear-gradient(to left, transparent, #ffcf01 25%, #ffcf01 75%, transparent 100%);
  background-size: 100% 100%;
  background-position: center;
  animation: gradientFade 3s infinite;
}

.titre {
  text-align: center;
  height: 100%;
}

.login-container {
  background-color: #fff;
  padding: 40px; /* Padding pour le formulaire */
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  animation: slideIn 1s ease-out;
  width: 90%; /* Largeur en pourcentage pour la responsivité */
  max-width: 400px; /* Largeur maximale */
  margin: 0 auto; /* Centre le conteneur */
  z-index: 5;
}

h3 {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeInDown 1.5s ease;
  font-size: 1.5rem; /* Ajuste la taille de police */
}

.input-container {
  margin-bottom: 20px; /* Espacement entre les inputs */
}

label {
  display: block;
  margin-bottom: 5px;
}

input {
  width: 100%;
  padding: 15px; /* Padding pour les inputs */
  border: 1px solid #ccc;
  border-radius: 5px;
  transition: border-color 0.3s, box-shadow 0.3s;
  animation: pulse 1s infinite;
}

input:focus {
  border-color: #4caf50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

button {
  width: 100%;
  padding: 15px; /* Padding pour le bouton */
  background-color: #4caf50;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  border: 0 solid;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0);
  outline: 1px solid;
  outline-color: #4caf50;
  outline-offset: 0px;
  text-shadow: none;
  transition: all 1250ms cubic-bezier(0.19, 1, 0.22, 1);
}

button:hover {
  border: 1px solid;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(17, 17, 17, 0.2);
  outline-color: #4caf4f00;
  outline-offset: 15px;
}

#loginButton:disabled {
  background-color: #ccc; /* Couleur grise pour le bouton désactivé */
  cursor: not-allowed; /* Curseur pour indiquer que le bouton est désactivé */
}

#error-message {
  color: red;
  margin-bottom: 10px;
  text-align: center;
  opacity: 1; /* Assure que le message d'erreur est visible */
  transition: opacity 0.5s;
  display: none; /* Masquer par défaut jusqu'à ce qu'il soit affiché */
}

/* Animations */
@keyframes bounceInDown {
  0%,
  60%,
  75%,
  90%,
  100% {
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  0% {
    opacity: 0;
    transform: translateY(-2000px);
  }

  60% {
    opacity: 1;
    transform: translateY(25px);
  }

  75% {
    transform: translateY(-10px);
  }

  90% {
    transform: translateY(5px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes jello {
  0%,
  100% {
    transform: scale(1, 1);
  }
  30% {
    transform: scale(1.25, 0.75);
  }
  40% {
    transform: scale(0.75, 1.25);
  }
  50% {
    transform: scale(1.15, 0.85);
  }
  65% {
    transform: scale(0.95, 1.05);
  }
  75% {
    transform: scale(1.05, 0.95);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* @keyframes backgroundChange {
  0% {
    background: linear-gradient(45deg, #6c63ff, #f7797d);
  }
  100% {
    background: linear-gradient(45deg, #f7797d, #6c63ff);
  }
} */

.logo {
  display: block;
  margin: 0 auto 20px; /* Centre le logo et ajoute un espacement en bas */
  width: 100px; /* Ajuste la largeur selon tes besoins */
  height: auto; /* Garde le ratio d'aspect */
}

/* Styles pour le message d'erreur */
.error-message {
  color: red; /* Couleur rouge pour le message d'erreur */
  display: none; /* Masquer par défaut */
  margin-top: 10px;
  text-align: center;
}

/* Styles Responsive */
@media (max-width: 1260px) or (max-height: 1150px) {
  .titreContainer {
    height: 20%;
    /* background: linear-gradient(to left, transparent, #fcc425 25%, #fcc425 75%, transparent 100%); */
    background: linear-gradient(to left, transparent, #ffcf01 15%, #ffcf01 85%, transparent 100%);
  }
}
@media (max-width: 700px) or (max-height: 930px) {
  .titreContainer {
    height: 15%;
    /* background: linear-gradient(to left, transparent, #fcc425 25%, #fcc425 75%, transparent 100%); */
    background: linear-gradient(to left, transparent, #ffcf01 10%, #ffcf01 90%, transparent 100%);
  }
}

@media (max-width: 600px) or (max-height: 800px) {
  h3 {
    font-size: 1rem; /* Réduit la taille de police pour les petits écrans */
    margin-left: 3em;
  }

  .logo {
    width: 40px; /* Ajuste la largeur selon tes besoins */
    position: relative;
  }

  .login-container {
    padding: 30px; /* Réduit le padding pour les petits écrans */
    height: 63%;
  }

  input,
  button {
    font-size: 14px; /* Ajuste la taille de police des inputs et boutons */
    padding: 12px; /* Ajuste le padding */
  }
}
