@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,600;1,400&display=swap");

html,
body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: "Poppins", sans-serif;
  font-style: normal;
  background-color: #f8f8f8;
  margin: 0;
  padding: 0;
  overflow: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 40px;
  margin-bottom: -4px;
  box-shadow: 9px 9px 16px rgba(0, 0, 0, 0.1);
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-icon {
  width: 30px; /* Ajustez la taille de l'icône */
  height: auto;
}
.orange-icon {
  fill: orange;
}

.logo {
  width: 100px; /* ou une valeur en % si tu préfères */
  height: auto; /* garde les proportions */
  max-width: 11.3%;
}

.secure-purchase {
  color: #2a5db0; /* Couleur du texte du lien sécurisé */
  text-decoration: none;
  font-size: 16px; /* Ajustez la taille du texte */
}

.container {
  max-width: 900px;
  margin: auto;

  padding: 20px;
}

.secure-purchase {
  color: #051227;
  text-decoration: none;
}

.actions {
  display: flex;
  justify-content: space-between;
}

.cancel,
.confirm {
  padding: 10px 20px;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

main {
  flex: 1; /* pousse le footer en bas */
}

/* Styles communs */
.download-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 40px 0;
}

.download-btn {
  background-color: #f16522;
  color: white;
  border: none;
  border-radius: 15px;
  padding: 9px 150px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: -90px;
  z-index: 999;
}

.download-btn:hover {
  background-color: #e6591f;
  transform: translateY(-2px);
}

.download-btn:active {
  transform: scale(0.98);
}

.background-illustration {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 570px;
  background-image: url("img/login-illustration.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}

.login-form,
.confirmation-message {
  position: fixed;
  margin-top: -5.5rem;
  max-width: 720px;

  padding: 0.1rem 1.9rem;
  transform: translate(-50%, -50%);
  width: 500px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  z-index: 999;
}

.login-form h2,
.confirmation-message h2 {
  color: #222;
  font-size: 24px;
  margin-bottom: 0.5rem;
}

.login-form p,
.confirmation-message p {
  color: #333;
  font-size: 16px;
  margin-bottom: 2.3rem;
}

.login-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 16px;
  font-weight: 100;
  margin-bottom: 0.25rem;
}

.login-form input:not(.password-input):not(.code-inputs input) {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 15px;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.login-form input:focus {
  border: 2px solid #1f2937;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 10px;
}

.login-input,
.password-input {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: none;
  outline: none;
  border-radius: 10px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 35%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

.password-container {
  display: flex;
  width: 100%;
}

.password-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  height: auto; /* laisse l'input s'adapter comme ton login-form input */
  box-sizing: border-box;
  border-right: 1px solid #d1d5db; /* colle l'input à l'œil */
  border-radius: 15px 0 0 15px; /* arrondi seulement à gauche */
  outline: none;
}

.eye-button {
  width: 44px;
  height: 45px;
  background: white;
  border: 1px solid #d1d5db;
  border-left: none; /* colle l'input à l'œil */
  border-radius: 0 15px 15px 0; /* arrondi seulement à droite */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.eye-icon {
  width: 24px;
  height: 24px;
  color: #6b7280;
  /* S'assurer que l'icône est bien centrée et que l'espace vide est réduit */
  margin: 0;
  padding: 0;
}

.forgot-password {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: gray;
  text-decoration: underline;
  font-weight: bold;
}

.login-btn,
.confirmation-message button {
  margin-top: 40px;
  width: 100%;
  padding: 12px;
  background-color: #f16522;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-btn:hover,
.confirmation-message button:hover {
  background-color: #e95b1f;
}

.signup {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 13px;
}

.signup a {
  font-weight: bold;
  text-decoration: underline;
  color: #000;
}

.code-form {
  position: fixed;
  margin-top: -10rem;
  max-width: 720px;

  padding: 1.6rem 1.3rem;

  transform: translate(-50%, -50%);
  width: 500px;
  height: 305px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1); /* Ombre douce */
  font-family: Arial, sans-serif;
  z-index: 999;
}

.code-form h2 {
  color: #222;
  font-size: 24px;
  margin-top: 0.5rem;
}

.code-form p {
  color: #333;
  font-size: 16px;
  margin-top: 2rem;
}

.code-form button {
  margin-top: 15px;
  width: 100%;
  padding: 13px;
  background-color: #f16522;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.code-form button:hover {
  background-color: #e95b1f;
}

.code-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 16px;
  font-weight: 100;
  margin-bottom: 0.25rem;
}

.code-form input {
  width: 95%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
  outline: none;
  margin-top: 1rem;
}

.code-inputs {
  display: flex;
  justify-content: center;
  gap: 37px;
  flex-wrap: wrap;
  position: relative;
}

.code-inputs input:nth-child(3) {
  margin-right: 40px; /* Espace entre le 3e et le 4e input */
}

.code-inputs input {
  width: 21px;
  height: 44px;
  font-size: 30px;
  font-weight: bold; /* Met en gras */
  text-align: center;
  border: 2px solid #ccc;
  border-radius: 5px;
}

/* Responsive pour tablettes et téléphones */
@media (max-width: 600px) {
  .code-form {
    padding: 1.5rem 1rem;
    width: 95%;
  }

  .code-form h2 {
    font-size: 20px;
  }

  .code-form p {
    font-size: 14px;
  }

  .code-inputs {
    gap: 15px;
  }

  .code-inputs input {
    width: 18px;
    height: 40px;
    font-size: 24px;
  }

  .code-inputs input:nth-child(3) {
    margin-right: 10px; /* Espace entre le 3e et le 4e input */
  }
}

.code-inputs input:focus {
  border-color: #f16522;
  outline: none;
}

input[type="email"],
input[type="password"],
textarea,
select {
  font-size: 16px !important;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid #6b7280;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.error-message {
  color: red !important;
  font-size: 0.85rem;
  margin-top: 3px !important;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-btn:disabled {
  background-color: #e95b1f;
  cursor: not-allowed;
  opacity: 0.7;
}

.confirmation-icon img {
  width: 50px;
  height: 50px;
  margin: 10px auto 0 auto;
  display: block;
}
/* Media Queries pour la réactivité */

/* Tablettes et écrans plus petits */
@media (max-width: 768px) {
  .download-btn {
    padding: 10px 80px;
    font-size: 15px;
  }

  .login-form,
  .confirmation-message {
    width: 90%;
    padding: 20px;
    margin-top: -1rem;
  }

  .login-form h2 {
    font-size: 20px;
  }

  .login-form input,
  .code-form input {
    font-size: 14px;
    padding: 8px;
    gap: 3px;
  }

  .toggle-password {
    width: 18px;
  }
}

/* Smartphones */
@media (max-width: 480px) {
  .download-btn {
    padding: 10px 80px;
    font-size: 15px;
  }

  .login-form,
  .code-form,
  .confirmation-message {
    width: 85%;
    padding: 15px;
    margin-top: -1rem;
  }

  .login-form h2,
  .code-form h2 {
    font-size: 18px;
  }

  .login-form input,
  .code-form input {
    font-size: 14px;
    padding: 6px;
  }

  .code-inputs input {
    width: 25px;
    height: 35px;
    font-size: 16px;
  }

  .toggle-password {
    width: 16px;
  }
}

.toggle-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

/* Styles pour les petits écrans (mobiles) */
@media (max-width: 600px) {
  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  main {
    h1 {
      font-size: 17px;
    }
    h2 {
      font-size: 16px;
    }
    span {
      font-size: 16px;
    }

    p {
      font-size: 16px;
    }
  }

  .logo {
    width: 800px; /* Réduit la taille du logo pour les petits écrans */
  }

  .container {
    padding: 10px;
    max-width: 100%;
  }

  .actions {
    flex-direction: column;
    align-items: center;
  }

  .confirm {
    margin-right: 0;
    margin-top: 10px;
  }
}

/* Styles pour les écrans moyens (tablettes) */
@media (min-width: 601px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }
}

/* Styles pour les grands écrans (ordinateurs de bureau) */
@media (min-width: 1025px) {
  .container {
    max-width: 80%;
  }

  .logo {
    width: 300px; /* Taille du logo pour les grands écrans */
  }
}

.logo {
  width: 190px;
  height: auto;
  max-width: 40vw;
}

/* Tablettes */
@media (max-width: 1024px) {
  .logo {
    width: 120px;
    max-width: 45vw;
  }
}

/* Mobiles */
@media (max-width: 600px) {
  .logo {
    width: 140px;
    max-width: 60vw;
  }
}

@media (max-width: 768px) {
  /* Cacher l'image de fond */
  .background-illustration {
    display: none !important;
  }

  /* Supprimer les bordures, fonds, coins arrondis et ombres */
  .login-form,
  .confirmation-message {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    position: relative !important;
    margin-top: -5rem !important;
  }

  .code-form {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    position: relative !important;
    margin-top: -13rem !important;
  }

  .login-form h2,
  .code-form h2 {
    font-size: 23px !important;
  }

  .login-form input {
    font-size: 18px !important;
    padding: 10px !important;
  }
}
