/* ============================================================
   WOUGGO V2 — connexion.css
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #FFF7ED;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  padding: 1.5rem 1rem;
}

.auth-page {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ── Logo ────────────────────────────────────────────────── */
.auth-logo {
  text-align: center;
}
.auth-logo__img {
  height: 36px;
  width: auto;
  margin-bottom: .5rem;
}
.auth-logo__sub {
  font-size: .875rem;
  color: #7A5C58;
}

/* ── Card ────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #EDE8E2;
  box-shadow: 0 4px 24px rgba(83,40,34,.08);
  padding: 1.75rem;
}

/* ── Onglets ─────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: #FFF7ED;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  padding: .5rem;
  border: none;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  background: transparent;
  color: #7A5C58;
}
.auth-tab.active {
  background: #fff;
  color: #532822;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ── Alerte ──────────────────────────────────────────────── */
.auth-alert {
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.auth-alert.hidden { display: none; }
.auth-alert--error   { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.auth-alert--success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }

/* ── Formulaire ──────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form.hidden { display: none; }

.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-label {
  font-size: .875rem;
  font-weight: 600;
  color: #532822;
}
.form-label .required { color: #F97316; margin-left: 2px; }

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border: 1.5px solid #E0D8D0;
  border-radius: 10px;
  font-size: .9375rem;
  font-family: inherit;
  color: #532822;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  border-color: #F97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}
.form-input::placeholder { color: #9CA3AF; }
.form-input.error { border-color: #EF4444; }

/* Input mot de passe avec bouton voir */
.input-password { position: relative; }
.input-password .form-input { padding-right: 3rem; }
.input-password__toggle {
  position: absolute; right: .875rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #9CA3AF; padding: 0; display: flex; align-items: center;
  transition: color .15s;
}
.input-password__toggle:hover { color: #F97316; }

/* Force du mot de passe */
.password-strength {
  height: 4px; background: #E0D8D0; border-radius: 2px;
  overflow: hidden; margin-top: .375rem;
}
.password-strength__bar {
  height: 100%; width: 0; border-radius: 2px;
  transition: width .3s, background .3s;
}
.form-hint { font-size: .75rem; color: #9CA3AF; margin-top: .25rem; }

/* Bouton mot de passe oublié */
.auth-forgot {
  background: none; border: none; cursor: pointer;
  font-size: .8125rem; color: #F97316; font-family: inherit;
  text-align: right; padding: 0; align-self: flex-end;
  transition: opacity .15s;
}
.auth-forgot:hover { opacity: .7; }

/* Bouton principal */
.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .75rem 1.5rem;
  border-radius: 10px; font-size: 1rem; font-weight: 600;
  font-family: inherit; cursor: pointer; border: none;
  transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: #F97316; color: #fff; }
.btn-primary:hover { background: #EA6A00; transform: translateY(-1px); }
.btn-primary:disabled { background: #DDD5CC; cursor: not-allowed; transform: none; }
.btn-full { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1rem; }

/* Conditions */
.auth-terms {
  font-size: .75rem; color: #9CA3AF; text-align: center; line-height: 1.5;
}
.auth-terms a { color: #F97316; text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

/* Intro reset */
.auth-reset-intro {
  background: #FFF7ED; border-radius: 10px; padding: .875rem 1rem;
  font-size: .875rem; color: #7A5C58; line-height: 1.5; margin-bottom: .5rem;
}

/* ── Retour accueil ──────────────────────────────────────── */
.auth-back-home {
  font-size: .875rem; color: #7A5C58; text-decoration: none;
  transition: color .15s;
}
.auth-back-home:hover { color: #F97316; }
