/* ==========================================================================
   Sahbi — page d'inscription prestataire
   Complète styles.css (variables et boutons y sont définis).
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1ee;
  padding: 32px 20px;
}

/* Carte à deux panneaux : formulaire à gauche, panneau de marque à droite. */
.auth-card {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(24, 24, 27, 0.10);
}

/* ---------- Panneau formulaire ------------------------------------------- */

.auth-form-panel {
  padding: 26px 34px 30px;
  display: flex;
  flex-direction: column;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}
.auth-help { text-align: right; font-size: 12.5px; line-height: 1.35; }
.auth-help span { color: var(--muted); display: block; }
.auth-help a { color: var(--green); font-weight: 700; }

.auth-title {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}
.auth-sub {
  margin: 10px 0 26px;
  font-size: 13.5px;
  color: var(--muted);
}
.auth-sub a { color: var(--green); font-weight: 700; }

/* ---------- Champs à étiquette encochée ----------------------------------- */

.f {
  position: relative;
  margin-bottom: 16px;
}
.f > label {
  position: absolute;
  top: -8px;
  left: 14px;
  padding: 0 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  z-index: 1;
}
.f input,
.f select {
  width: 100%;
  border: 1.4px solid #d9dcd9;
  border-radius: 11px;
  padding: 15px 42px 15px 15px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.f input::placeholder { color: #b3b7b3; }
.f input:focus,
.f select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 98, 51, 0.10);
}
/* Icône de fin de champ, purement décorative. */
.f .f-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b3b7b3;
  pointer-events: none;
}
/* Sauf l'œil du mot de passe, qui est un vrai bouton. */
.f button.f-icon {
  pointer-events: auto;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.f button.f-icon:hover { color: var(--muted); }

.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Champ en erreur : bordure + message sous le champ. */
.f.invalid input,
.f.invalid select { border-color: #c2410c; }
.f-error {
  display: none;
  margin: 5px 2px 0;
  font-size: 11.5px;
  color: #c2410c;
}
.f.invalid .f-error { display: block; }

.auth-submit { margin-top: 8px; }
.auth-legal {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
}

/* Bandeau de retour global (échec réseau, e-mail déjà pris…). */
.auth-alert {
  display: none;
  margin-bottom: 18px;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.auth-alert.show { display: block; }

/* ---------- Écran de confirmation ----------------------------------------- */

.auth-done { display: none; text-align: center; padding: 40px 10px; }
.auth-done.show { display: block; }
.auth-done .mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-tint);
  color: var(--green);
}
.auth-done h2 {
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth-done p { margin: 0 auto; max-width: 34ch; color: var(--muted); font-size: 14px; }
.auth-done b { color: var(--ink); }

/* ---------- Panneau de marque --------------------------------------------- */

.auth-brand-panel {
  position: relative;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand-panel .scene { flex: 1; display: grid; place-items: center; }
.auth-brand-panel .scene svg { width: 100%; height: auto; max-width: 340px; }
.auth-brand-panel h2 {
  margin: 0;
  text-align: center;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.auth-brand-panel .tagline-sub {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}
.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 22px;
}
.dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}
.dots i.on { width: 22px; background: #fff; }

/* ---------- Adaptation aux petits écrans ----------------------------------- */

@media (max-width: 900px) {
  .auth-card { grid-template-columns: 1fr; max-width: 520px; }
  /* Le panneau de marque passe en tête, réduit : sur mobile c'est le
     formulaire qui doit occuper l'écran. */
  .auth-brand-panel { order: -1; padding: 26px; }
  .auth-brand-panel .scene svg { max-width: 200px; }
  .auth-brand-panel h2 { font-size: 20px; }
  .auth-form-panel { padding: 24px 18px 20px; }
  .auth-title { font-size: 32px; }
}

@media (max-width: 460px) {
  .f-row { grid-template-columns: 1fr; gap: 0; }
  .auth-page { padding: 0; }
  .auth-card { border-radius: 0; box-shadow: none; padding: 8px; }
}
