/* Apply une image a background to wrapper class that fill the body */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
}

.wrapper {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Empêche le débordement */
}

/* Animate Background */
.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/bg.JPG'); 
  background-size: cover;
  background-position: center;
  z-index: -1; /* Behind the login-container */
  animation: ripple 15s infinite;
}

@keyframes ripple {
  0% {
    transform: scale(1.0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1.0);
  }
}

.login-container {
  position: relative;
  z-index: 1; /* To ensure that the container stay above the background animate */
  width: 90%; /* Ajuster la largeur pour être responsive */
  max-width: 400px; /* Largeur maximale pour les écrans plus grands */
  padding: 2rem;
  background: rgba(0, 0, 0, 0.7); /* Shadow & Translucent */
  border-radius: 15px; /* Border rounded */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: white;
  text-align: center;
  margin: 0 auto; /* Centrer le conteneur */
}

.logo {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: auto;
}

h2 {
  margin-bottom: 1rem;
}

.countdown-pill {
  background-color: #007bff;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: inline-block;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.countdown-pill span {
  background: #1f1e1e;
  padding: 5px;
  border-radius: 5px;
}

.arrow-down {
  width: 40px;
  height: auto;
  margin: 1rem 0;
}

p {
  margin-bottom: 1.5rem;
}

.code-inputs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.code-input {
  flex: 1; /* Permet aux inputs de s'étendre et de se rétrécir */
  min-width: 35px; /* Largeur minimale */
  max-width: 50px; /* Largeur maximale */
  padding: 10px;
  font-size: 24px;
  text-align: center;
  border: 0.5px solid #eee;
  border-bottom: 3px solid #007bff; /* Color primairy */
  background: transparent;
  color: white;
  margin: 0 5px; /* Espacement entre les inputs */
}

.code-input:focus {
  outline: none;
  border-bottom: 3px solid #0056b3; /* Color primairy shaded */
}

button {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: none;
  background-color: #f39c12;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #e67e22;
}


/* Separator */
.separator {
  border: 0;
  height: 1px;
  background: #ffffff;
  margin: 1.5rem 0;
}

/* forgotten */
.forgot-code-link {
  color: #f39c12;
  text-decoration: none;
}

.forgot-code-link:hover {
  text-decoration: underline;
}

/* Border red if error */
.code-input.error {
  border-bottom: 2px solid red;
}

/* Animation */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

@keyframes fall {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(50px); /* Ajustez la distance de chute */
    opacity: 0;
  }
}

/* Apply the animation over the form */
.shake {
  animation: shake 0.5s ease;
}

.fall {
  animation: fall 0.5s forwards; /* Animation de 0.5s avec un effet de fin */
}

.admin-login-container, .login-container {
  transition: opacity 0.5s; /* Ajoute une transition pour l'opacité */
}

.admin-login-container {
  position: relative;
  z-index: 1; /* Pour s'assurer que le conteneur est au-dessus de l'arrière-plan animé */
  width: 25%;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.7); /* Ombre & Translucide */
  border-radius: 15px; /* Bords arrondis */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: white;
  text-align: center;
}

.input-group {
  margin-bottom: 1.5rem;
  text-align: left; /* Alignement à gauche pour les labels */
}

.label {
  margin-bottom: 0.5rem;
}

.input-with-icon {
  position: relative;
}

.icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

input {
  width: calc(100% - 40px); /* Prendre en compte la largeur de l'icône */
  padding: 10px 10px 10px 40px; /* Padding pour l'icône */
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: transparent;
  color: white;
}

input:focus {
  outline: none;
  border-color: #007bff; /* Couleur primaire */
}

@media (max-width: 1024px ) {
     .login-container .admin-login-container {
    padding: 1rem; /* Réduit le padding pour les petits écrans */
    width: 50%; /* Ajuste la largeur pour être responsive */
    max-width: 80%; /* S'assure que le conteneur s'adapte à l'écran */
  }

  
}

@media (max-width: 768px ) {
    .login-container, .admin-login-container {
    padding: 1rem; /* Réduit le padding pour les petits écrans */
    width: 70%; /* Ajuste la largeur pour être responsive */
    max-width: 75%; /* S'assure que le conteneur s'adapte à l'écran */
  }

  .admin-login-container {
    margin-top: 1rem; /* Ajoute un espacement entre les conteneurs si nécessaire */
  }
  .login-container {
    padding: 1rem; /* Réduit le padding pour les petits écrans */
  }
}
@media (max-width: 414px ) {
    .login-container, .admin-login-container {
    padding: 1rem; /* Réduit le padding pour les petits écrans */
    width:88%; /* Ajuste la largeur pour être responsive */
    max-width: 100%; /* S'assure que le conteneur s'adapte à l'écran */
  }
  .code-input {
    font-size: 18px; /* Taille de police encore plus petite */
    padding: 6px; /* Réduction du padding */
    min-width: 25px; /* Largeur minimale */
    max-width: 35px; /* Largeur maximale */
  }
    h2 {
    font-size: 1rem; /* Réduit la taille du texte */  
    margin-top: 30px;
  }

  .countdown-pill {
    font-size: 1.2rem; /* Réduit la taille du texte du décompte */
    padding: 0.3rem 0.5rem; /* Ajuste le padding */
  }

  .logo {
    width: 80px; /* Réduit la largeur du logo pour qu'il s'intègre mieux */
    height: auto; /* Garde le ratio de l'image */
    top: -30px; /* Ajuste la position si nécessaire */
    
  }

  
}




.error {
    background-color: red;
    color: white;
    font-weight: bold;
}
