@import url('./variables.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

.signup-back {
  width: 100%;
  max-width: 1200px;
  margin: 24px;
}




.back-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}


.back-link {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-primary);
  font-family: var(--font-family);
  font-size: 16px;
  transition: color 0.2s ease;
}

.back-link i {
  font-size: 20px;
}

.back-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.signup-content {
  display: flex;
  align-items: stretch;   /* ✅ étire chaque colonne sur la même hauteur */
  justify-content: center;
  flex-wrap: wrap;        /* reste wrap pour mobile */
  gap: 48px;
  width: 100%;
  max-width: 1200px;
}


.signup-page {
  display: flex;
  flex-direction: column;  /* ⬅️ on empile verticalement */
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  width: 100%;
  background-color: var(--color-light);
  padding: 24px;
  box-sizing: border-box;
}



.signup-image {
  flex: 1;
  max-width: 50%;
  overflow: hidden;      /* ✅ masque les débordements */
}

.signup-image img {
  width: 100%;
  height: 100%;          /* ✅ remplit le parent */
  object-fit: cover;     /* ✅ zoom dynamique */
  object-position: center;
  border-radius: 8px;
  display: block;
}


@media (max-width: 768px) {
  .signup-image {
    display: none;
  }
}

.signup-wrapper {
  flex: 1;
  max-width: 480px;
  width: 100%;
  background-color: var(--color-background);
  padding: 32px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;           /* ✅ pour gérer la hauteur */
  flex-direction: column;
}

.signup-title {
  text-align: center;
  font-size: 24px; /* adapte selon ton design */
  font-weight: bold;
  color: var(--color-secondary-dark);
  margin-bottom: 32px;
  font-family: var(--font-family);
}

.form-floating-custom {
  position: relative;
  margin-bottom: 12px;
}

.form-floating-custom input {
  width: 100%;
  padding: 24px 40px 12px 12px; /* laisse la place pour l'œil */
  font-size: 16px;
  border: 1px solid var(--color-secondary-light);
  border-radius: 8px;
  font-family: var(--font-family);
  background-color: #fff;
}

.form-floating-custom label {
  position: absolute;
  left: 12px;
  top: 70%;
  transform: translateY(-100%);
  background-color: #fff;
  color: var(--color-secondary);
  font-size: 16px;
  transition: 0.2s ease all;
  pointer-events: none;
}

.form-floating-custom input:focus + label,
.form-floating-custom input:not(:placeholder-shown) + label {
  top: 24px;
  font-size: 12px;
  color: var(--color-secondary);
}


/* Style du bouton œil */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-secondary-dark);
  font-size: 18px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password i {
  pointer-events: none;
}

.toggle-password:hover {
  color: var(--color-primary);
}

.password-match-valid,
.password-match-invalid {
  display: none;
  font-size: 13px;
  margin-bottom: 12px;
}

.password-match-valid {
  color: var(--success);
}

.password-match-invalid {
  color: var(--danger);
}

.password-criteria {
  margin-bottom :24px;
  font-size: 14px;
}

.password-criteria .valid {
  display: block; /* TOUJOURS affiché */
  color: var(--success);
}

.password-criteria .invalid {
  display: block; /* TOUJOURS affiché */
  color: var(--danger);
}

.checkbox-custom {
  display: inline-flex;
  align-items: flex-start;
  cursor: pointer; /* le curseur sur la checkmark */
}

.checkbox-custom input {
  display: none; /* le input est masqué, plus besoin de position absolute */
}

.checkmark {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  background: var(--color-background);
  position: relative;
}

input[type="checkbox"]:checked + label .checkmark {
  background: var(--color-primary);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

input[type="checkbox"]:checked + label .checkmark::after {
  display: block;
}

.checkmark::after {
  left: 5px;
  top: 1px;
  width: 4px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  display: inline-block;       /* force le texte à être traité comme un bloc */
  vertical-align: top;         /* aligne bien avec la case */
  max-width: 90%;              /* si tu veux limiter la largeur */
  padding-left: 0.5em;         /* décale toutes les lignes suivantes */
}


.checkbox-text a {
  color: var(--color-primary);
  text-decoration: none;
}

.checkbox-text a:hover {
  text-decoration: underline;
}
input[type="checkbox"] {
  display: none;
}


.error-message {
  display: none;          
  color: var(--danger); 
  font-size: 13px;       
  margin-top: 8px;    
  line-height: 1.4;     
  text-align: center;   
}

input:-webkit-autofill {
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--color-secondary-dark); /* 👈 couleur du texte forcée */
  transition: background-color 5000s ease-in-out 0s;
}


.modal-submit {
  width: 100%;
  padding: 11px;
  background-color: var(--color-primary);
  color: white;
  margin-top: 24px;
  border: none;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 15px;
}


.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}


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

.d-none {
  display: none;
}


.signup-login-link {
  text-align: center;
  font-size: 14px; /* petite police, cohérente */
  color: var(--color-secondary-dark);
  margin-top: 24px;
  font-family: var(--font-family);
  
}

.signup-login-link a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  text-decoration: underline;
}

.signup-login-link a:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none; /* masquée par défaut */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.show {
  display: flex;
}

.modal-dialog {
  background: var(--color-background);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh; /* limite la hauteur */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* important pour le scroll interne */
  position: relative;
}

.modal-header {
  position: sticky; /* rend le bloc fixe en haut */
  top: 0;
  background: var(--color-background);
  padding: 24px 32px 16px 32px;
  border-bottom: 1px solid var(--color-secondary-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2; /* au-dessus du contenu */
}

.modal-title {
  margin: 0;
  font-size: 20px;
  color: var(--color-primary);
}

.modal-close {
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-secondary-dark);
}

.modal-close:hover {
  color: var(--color-primary);
}

.modal-body {
  overflow-y: auto; /* active le scroll interne */
  padding: 0 32px 32px 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-secondary-dark);
}
