
:root {
  --page-bg: #f7f8f5;
  --surface: #ffffff;
  --ink: #0b1220;
  --muted: #334155;
  --soft: #64748b;
  --line: #cbd5e1;
  --brand: #0f5132;
  --brand-2: #2eb087;
  --brand-light: #e8f3ef;
  --gold: #d97706;
  --gold-bg: #fef3c7;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(16,24,40,.10);
  --shadow-lg: 0 24px 64px rgba(16,24,40,.16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--page-bg);
  color: var(--ink);
  font: 16px/1.7 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Layout 2 colonnes ── */
.page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ══════════════════════════════
   PANNEAU GAUCHE
══════════════════════════════ */
.panel-left {
  background: linear-gradient(160deg, #0a3d24 0%, #0f5132 45%, #11724d 100%);
  padding: 3rem;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
}
.panel-left::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(46,176,135,.25) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(15,81,50,.4) 0%, transparent 50%);
  pointer-events: none;
}
.pl-logo {
  font-family: ui-serif, Georgia, 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 800;
  color: #fff; text-decoration: none;
  letter-spacing: -.02em; position: relative; z-index: 1;
}
.pl-logo span { color: #5de8b0; }

.pl-content {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; position: relative; z-index: 1;
}
.pl-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); padding: .35rem .9rem; border-radius: 20px;
  font: 600 .74rem/1 'DM Sans', sans-serif; letter-spacing: .05em;
  text-transform: uppercase; margin-bottom: 1.5rem; width: fit-content;
}
.pl-title {
  font-family: ui-serif, Georgia, 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800; color: #fff; line-height: 1.15;
  margin-bottom: 1.25rem; letter-spacing: -.02em;
}
.pl-title em { color: #5de8b0; font-style: italic; }
.pl-desc {
  color: rgba(255,255,255,.65); font-size: .95rem;
  line-height: 1.7; margin-bottom: 2rem; max-width: 38ch;
}

/* Testimonial */
.pl-testimonial {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.pl-t-text {
  color: rgba(255,255,255,.8); font-size: .88rem;
  line-height: 1.6; font-style: italic; margin-bottom: .75rem;
}
.pl-t-author {
  display: flex; align-items: center; gap: .65rem;
}
.pl-t-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), #5de8b0);
  display: flex; align-items: center; justify-content: center;
  font: 700 .75rem/1 'DM Sans', sans-serif; color: var(--brand);
  flex-shrink: 0;
}
.pl-t-name { font: 600 .8rem/1 'DM Sans', sans-serif; color: #fff; }
.pl-t-role { font-size: .72rem; color: rgba(255,255,255,.5); margin-top: .15rem; }

/* Stats rapides */
.pl-stats {
  display: flex; gap: 1.5rem;
  position: relative; z-index: 1;
}
.pl-stat-num {
  font: 800 1.4rem/1 'Playfair Display', serif;
  color: #5de8b0; margin-bottom: .2rem;
}
.pl-stat-label {
  font-size: .72rem; color: rgba(255,255,255,.5);
  font-weight: 500;
}

/* ══════════════════════════════
   PANNEAU DROIT — FORMULAIRE
══════════════════════════════ */
.panel-right {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2.5rem;
}
.pr-inner {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column;
}

/* Header form */
.form-logo-mobile {
  display: none;
  font-family: ui-serif, Georgia, serif;
  font-size: 1.2rem; font-weight: 800;
  color: var(--brand); margin-bottom: 2rem;
  text-align: center;
}
.form-logo-mobile span { color: var(--brand-2); }

.form-title {
  font-family: ui-serif, Georgia, 'Playfair Display', serif;
  font-size: 1.75rem; font-weight: 800;
  color: var(--ink); line-height: 1.15;
  margin-bottom: .5rem; letter-spacing: -.02em;
}
.form-sub {
  color: var(--soft); font-size: .9rem;
  margin-bottom: 2rem; line-height: 1.5;
}

/* Tabs magic / password */
.auth-tabs {
  display: flex; gap: .25rem;
  background: var(--page-bg); border-radius: 14px;
  padding: .3rem; margin-bottom: 1.75rem;
}
.auth-tab {
  flex: 1; padding: 10px; border-radius: 10px;
  font: 600 .84rem/1 'DM Sans', sans-serif;
  cursor: pointer; transition: all .2s;
  border: none; background: none; color: var(--soft);
  display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.auth-tab.active {
  background: var(--surface); color: var(--brand);
  box-shadow: 0 2px 8px rgba(16,24,40,.08);
}

/* Champs */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block; font: 600 .82rem/1 'DM Sans', sans-serif;
  color: var(--ink); margin-bottom: .45rem;
}
.field input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--line); border-radius: 13px;
  font: normal .9rem/1 'DM Sans', sans-serif;
  color: var(--ink); background: var(--page-bg);
  transition: all .2s; font-size: 16px;
}
.field input:focus {
  outline: none; border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15,81,50,.08);
}
.field input.error { border-color: #ef4444; background: #fef2f2; }

/* Champ password avec toggle */
.field-password { position: relative; }
.field-password input { padding-right: 48px; }
.pwd-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--soft); font-size: 1.1rem; padding: 2px;
  transition: color .18s;
}
.pwd-toggle:hover { color: var(--brand); }

/* Mot de passe oublié */
.forgot-link {
  display: block; text-align: right;
  font: 500 .78rem/1 'DM Sans', sans-serif;
  color: var(--brand); text-decoration: none;
  margin-top: -.6rem; margin-bottom: 1.1rem;
  transition: opacity .18s;
}
.forgot-link:hover { opacity: .7; }

/* Message d'erreur */
.field-error {
  font-size: .75rem; color: #ef4444;
  margin-top: .3rem; display: none;
}
.field-error.show { display: block; }

/* Alerte globale */
.alert {
  padding: .85rem 1rem; border-radius: 12px;
  font-size: .82rem; line-height: 1.5;
  margin-bottom: 1.25rem; display: none;
}
.alert.show { display: block; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-success { background: var(--brand-light); border: 1px solid rgba(15,81,50,.2); color: var(--brand); }
.alert-info { background: var(--gold-bg); border: 1px solid #fcd34d; color: #92400e; }

/* Bouton principal */
.btn-submit {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--brand), #11724d);
  color: #fff; border: none; border-radius: 13px;
  font: 700 .95rem/1 'DM Sans', sans-serif;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: .25rem;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15,81,50,.3); }
.btn-submit:active { transform: none; }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-submit .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Séparateur */
.separator {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.5rem 0;
}
.separator::before, .separator::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.separator span { font-size: .75rem; color: var(--soft); white-space: nowrap; }

/* Lien inscription */
.signup-link {
  text-align: center; font-size: .84rem; color: var(--soft);
  margin-top: 1.5rem;
}
.signup-link a {
  color: var(--brand); font-weight: 600; text-decoration: none;
  transition: opacity .18s;
}
.signup-link a:hover { opacity: .7; }

/* ── Écran Magic Link envoyé ── */
.magic-sent {
  display: none; text-align: center; padding: 1rem 0;
}
.magic-sent-ico {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1.5rem;
  box-shadow: 0 8px 28px rgba(15,81,50,.25);
  animation: pop .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.magic-sent h2 {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.5rem; font-weight: 800;
  color: var(--ink); margin-bottom: .5rem;
}
.magic-sent p {
  color: var(--soft); font-size: .9rem; line-height: 1.65;
  max-width: 34ch; margin: 0 auto;
}
.magic-email-display {
  background: var(--brand-light); border: 1px solid rgba(15,81,50,.2);
  border-radius: 12px; padding: .65rem 1rem;
  font: 600 .88rem/1 'DM Sans', sans-serif; color: var(--brand);
  margin: 1rem auto; display: inline-block;
}
.magic-resend {
  margin-top: 1.5rem; font-size: .82rem; color: var(--soft);
}
.magic-resend button {
  background: none; border: none; cursor: pointer;
  color: var(--brand); font: 600 .82rem/1 'DM Sans', sans-serif;
  text-decoration: underline; transition: opacity .18s;
}
.magic-resend button:hover { opacity: .7; }
.magic-back {
  margin-top: 1rem; display: block;
  font: 500 .82rem/1 'DM Sans', sans-serif;
  color: var(--soft); cursor: pointer; text-decoration: none;
  transition: color .18s;
}
.magic-back:hover { color: var(--brand); }

/* ── Écran Reset password ── */
.reset-form { display: none; }

/* ── RGPD ── */
.rgpd-note {
  font-size: .72rem; color: var(--soft);
  text-align: center; margin-top: 1.25rem;
  line-height: 1.5;
}
.rgpd-note a { color: var(--brand); text-decoration: none; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
  .page { grid-template-columns: 1fr; }
  .panel-left {
    position: relative; height: auto;
    padding: 1.5rem 1.25rem 2rem;
  }
  .pl-content { justify-content: flex-start; }
  .pl-title { font-size: 1.5rem; margin-bottom: .75rem; }
  .pl-desc { font-size: .85rem; margin-bottom: 1.25rem; }
  .pl-testimonial { display: none; }
  .pl-stats { gap: 1.25rem; }
  .pl-stat-num { font-size: 1.1rem; }
  .panel-right {
    padding: 2rem 1.25rem 3rem;
    align-items: flex-start;
  }
  .form-logo-mobile { display: block; }
  .form-title { font-size: 1.4rem; }
}

@media (max-width: 380px) {
  .panel-right { padding: 1.5rem 1rem 2.5rem; }
  .form-title { font-size: 1.25rem; }
  .auth-tab { font-size: .76rem; padding: 9px 6px; }
}
