/* ==========================================================================
   MeloNote AI — Écran d'authentification
   ========================================================================== */

body.auth-page { background: var(--bg); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
@media (max-width: 940px) { .auth-shell { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- Panneau marque -- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(28px, 4vw, 56px);
  background: linear-gradient(155deg, var(--forest-500), var(--forest) 55%, #0F2A11);
  color: #fff;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  right: -140px; top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 224, 81, .42), transparent 66%);
}
.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .3;
  mask-image: linear-gradient(150deg, #000 10%, transparent 70%);
  -webkit-mask-image: linear-gradient(150deg, #000 10%, transparent 70%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .logo__word { color: #fff; }
.auth-brand .logo__mark { background: rgba(255, 255, 255, .12); box-shadow: none; }

.auth-brand h1 {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -.032em;
  max-width: 20ch;
  margin-top: auto;
}
.auth-brand p { color: rgba(255, 255, 255, .76); font-size: 14px; line-height: 1.7; max-width: 44ch; }

.auth-points { display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .86); }
.auth-points i { color: var(--lime); font-size: 17px; margin-top: 1px; }

.auth-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
}
.auth-proof strong { color: #fff; }

/* ---------------------------------------------------------- Formulaire --- */
.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: clamp(22px, 4vw, 48px);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-soft);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 1px solid var(--line);
}
.auth-tabs button {
  padding: 10px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-3);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.auth-tabs button.is-active { background: var(--forest); color: #fff; }

.auth-head { display: grid; gap: 6px; }
.auth-head h2 { font-size: 1.35rem; letter-spacing: -.028em; }
.auth-head p { font-size: 12px; color: var(--ink-3); line-height: 1.55; }

.auth-form { display: grid; gap: 14px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .auth-row { grid-template-columns: 1fr; } }

.auth-field { display: grid; gap: 6px; }
.auth-field label { font-size: 11.5px; font-weight: 800; color: var(--ink-2); }
.auth-field .input { padding-block: 12px; font-size: 13.5px; }
.auth-field small { font-size: 10.5px; color: var(--ink-4); }

.auth-password { position: relative; }
.auth-password .input { padding-right: 44px; }
.auth-password button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 16px;
}
.auth-password button:hover { background: var(--pastel); color: var(--forest); }

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
}
.auth-alert i { font-size: 16px; flex: 0 0 auto; margin-top: 1px; }
.auth-alert--error { background: var(--danger-bg); color: #8E2C1B; border-color: #F3D3CD; }
.auth-alert--info { background: var(--warn-bg); color: #7A4E05; border-color: #F4DFB8; }
.auth-alert--ok { background: var(--success-bg); color: #14603A; border-color: #C6E9D4; }
.auth-alert[hidden] { display: none; }

.auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 20px;
  border-radius: var(--r-pill);
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.auth-submit:hover { background: var(--forest-700); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.auth-submit .orb {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--dark);
  font-size: 15px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-demo {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.auth-demo:hover { background: var(--pastel-2); border-color: var(--pastel-border); color: var(--forest); }

.auth-foot { text-align: center; font-size: 11.5px; color: var(--ink-4); line-height: 1.6; max-width: 420px; }
.auth-foot a { color: var(--forest); font-weight: 700; }


/* ============================================================
   RESPONSIVE AUTH (mobile) - ajoute en fin de fichier
   ============================================================ */
.auth-shell { min-height: 100dvh; }

@media (max-width: 560px) {
  .auth-shell { padding-inline: 12px; }
  .auth-card, .auth-panel { padding: 18px; border-radius: 22px; }
  .auth-aside { display: none; }
  .auth-actions .btn { width: 100%; justify-content: center; }
}