/* ============================= */
/*   WPT Supermodal - Styles    */
/* ============================= */

/* -------------------------------------------------- */
/*   Reset minimal pour un meilleur rendu visuel       */
/* -------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: sans-serif; /* vous pouvez mettre 'Inter', 'Roboto', etc. */
}

/* ---------------------------------------------- */
/* Overlay - fond semi-transparent               */
/* ---------------------------------------------- */
.wpt-supermodal-overlay {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* ---------------------------------------------- */
/* Container principal                            */
/* ---------------------------------------------- */
.wpt-supermodal-container {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 520px;
  margin: 5% auto;
  border-radius: 10px;
  padding: 20px 25px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  animation: scaleIn 0.4s forwards ease;
  color: #333;
}

/* Animation d’apparition */
@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ---------------------------------------------- */
/* Bouton de fermeture                            */
/* ---------------------------------------------- */
.wpt-supermodal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #615eff;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  z-index: 100000;
  transition: background 0.2s, transform 0.2s;
}
.wpt-supermodal-close:hover {
  background: #FF746B;
  transform: scale(1.05);
}


/* ---------------------------------------------- */
/* Bouton Déconnexion (intégré en top-bar)        */
/* ---------------------------------------------- */
.wpt-logout-btn {
  position: absolute;
  top: 10px;
  right: 60px;
  background: #ecf5ff;
  border: none;
  color: #615eff;
  font-size: 0.95rem;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, transform 0.2s;
}
.wpt-logout-btn:hover {
  color: #FF746B;
  transform: scale(1.02);
}

/* ---------------------------------------------- */
/* Étapes (par défaut cachées)                   */
/* ---------------------------------------------- */
.wpt-modal-step {
  display: none;
}
.wpt-modal-step.active {
  display: block;
}

/* ---------------------------------------------- */
/* Progress bar (3 bulles)                        */
/* ---------------------------------------------- */
.wpt-progress-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.wpt-progress-step {
  width: 40px; 
  height: 40px;
  background: #dce5ff;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  color: #615eff;
  margin: 0 10px;
  transition: background 0.3s, color 0.3s;
  font-weight: bold;
}
.wpt-progress-step.active {
  background: #615eff;
  color: #fff;
}
.wpt-progress-step span {
  font-weight: bold;
}

/* ---------------------------------------------- */
/* Sous-texte                                     */
/* ---------------------------------------------- */
.wpt-subtext {
  font-size: 0.95em;
  color: #777;
  margin-bottom: 15px;
  line-height: 1.4em;
}

/* ============================================== */
/* Étape 1 : Choix du rôle                        */
/* ============================================== */
.wpt-role-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.wpt-role-btn {
  background: #f8faff;
  border: 2px solid #ecf5ff;
  border-radius: 8px;
  padding: 14px;
  flex: 1 1 140px;
  max-width: 180px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.wpt-role-btn i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #615eff;
}
.wpt-role-btn span {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}
.wpt-role-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* ============================================== */
/* Étapes 2 & 3 : Forms & onglets                */
/* ============================================== */
.wpt-back-btn {
  background: none;
  border: none;
  color: #615eff;
  font-size: 0.9rem;
  margin-bottom: 10px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}
.wpt-back-btn:hover {
  color: #FF746B;
}

.wpt-form-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.wpt-tab-btn {
  flex: 1;
  padding: 12px;
  margin-top: 10px;
  text-align: center;
  background: #dce5ff;
  color: #615eff;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.2s, transform 0.2s;
}
.wpt-tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.wpt-tab-btn.active {
  background: #615eff;
  color: #fff;
  transform: none; /* évite le “saut” */
  box-shadow: none; 
}

.wpt-form-panel {
  display: none;
}
.wpt-form-panel.active {
  display: block;
}

/* Champs de formulaire */
label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
  color: #333;
}
input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  border-color: #615eff;
  outline: none;
}

/* Case CGU ou souvenir de moi */
.wpt-remember-row,
.wpt-cgu-checkbox {
  margin-top: 10px;
  display: flex;
  align-items: center;
}
.wpt-remember-row input[type="checkbox"],
.wpt-cgu-checkbox input[type="checkbox"] {
  margin-right: 8px;
}

/* Lien Mot de passe oublié */
.wpt-form-panel a {
  color: #615eff;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.wpt-form-panel a:hover {
  color: #FF746B;
}

/* Messages d’erreur */
.wpt-form-error {
  margin-top: 10px;
  color: #FF3B30; /* rouge plus vif */
  font-size: 0.9em;
}

/* Boutons d’action (submit) */
.wpt-submit-btn {
  margin-top: 35px;
  padding: 12px;
  background: #dce5ff;
  color: #615eff;
  border: 1px solid #615eff;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.2s;
}
.wpt-submit-btn:hover {
  background: #615eff;
  color: #fff;
  transform: translateY(-2px);
}

/* ============================= */
/*      Responsive / Mobile      */
/* ============================= */
@media (max-width: 600px) {

  /* Container full width */
  .wpt-supermodal-container {
    width: 95%;
    margin: 5% auto;
    padding: 20px;
  }

  /* Étape 1 : boutons pleine largeur */
  .wpt-role-choices {
    flex-direction: column;
    gap: 0.8rem;
  }
  .wpt-role-btn {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  /* Repositionnement du bouton Déconnexion */
  .wpt-logout-btn {
    top: 8px;
    right: 50px;
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  /* Ajustement du close pour laisser de l’espace */
  .wpt-supermodal-close {
    top: 8px;
    right: 8px;
  }

  /* Progress bar plus espacée en haut sur mobile */
  .wpt-progress-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 60px;
  }

  .wpt-modal-step.active {
    display: block;
    margin-bottom: 30px;
  }
}
