@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Fraunces:ital,wght@0,700;0,800;1,700&display=swap');

:root {
  --green:       #0a5c47;
  --green-mid:   #14886a;
  --green-light: #d4f0e7;
  --green-xlight:#edfaf5;
  --green-dark:  #063829;
  --accent:      #f59e0b;
  --accent-light:#fef3c7;
  --text:        #0f1c18;
  --muted:       #5a7169;
  --bg:          #f4f7f5;
  --white:       #ffffff;
  --border:      #dde8e3;
  --radius:      14px;
  --radius-lg:   22px;
  --shadow-sm:   0 2px 8px rgba(10,92,71,0.07);
  --shadow-md:   0 8px 30px rgba(10,92,71,0.12);
  --shadow-lg:   0 20px 60px rgba(10,92,71,0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; margin: 0; }

/* ══════════════════════════════════════
   LAYOUT
══════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
}

/* ══════════════════════════════════════
   PANEL GAUCHE
══════════════════════════════════════ */
.auth-left {
  width: 420px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #042f22 0%, var(--green) 55%, #1aaa82 100%);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.auth-left-content { position: relative; z-index: 1; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-left h2 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.auth-left h2 em {
  font-style: italic;
  color: #7ee8c7;
}

.auth-left > div > p,
.auth-left-content > p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}

/* Features list (inscription) */
.auth-features {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-feat-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-feat-icon svg {
  width: 16px;
  height: 16px;
  stroke: #7ee8c7;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-feat span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

/* Testimonial card (connexion) */
.testi-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 2.5rem;
  position: relative;
  z-index: 1;
}

.testi-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 1rem;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testi-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.testi-name { font-size: 0.82rem; font-weight: 700; color: #fff; }
.testi-role { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

/* Footer gauche */
.auth-left-footer { position: relative; z-index: 1; }
.auth-left-footer p { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin: 0; }

/* ══════════════════════════════════════
   PANEL DROIT
══════════════════════════════════════ */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 560px;
}

.auth-form-wrap h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.auth-subtitle a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.auth-subtitle a:hover { text-decoration: underline; }

/* Logo mobile */
.auth-logo-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 2rem;
}

.auth-logo-mobile .logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  box-shadow: 0 3px 10px rgba(10,92,71,0.3);
}

/* ══════════════════════════════════════
   TYPE SELECTOR (inscription)
══════════════════════════════════════ */
.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.75rem;
}

.type-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: var(--white);
}

.type-card:hover {
  border-color: var(--green-light);
  background: var(--green-xlight);
}

.type-card.selected {
  border-color: var(--green);
  background: var(--green-xlight);
}

.type-card input[type="radio"] { display: none; }
.type-card-icon { font-size: 1.6rem; margin-bottom: 6px; }
.type-card h5 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.type-card p { font-size: 0.78rem; color: var(--muted); margin: 0; }

/* ══════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════ */
.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

.form-control,
.form-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  padding: 10px 14px;
  background: var(--white);
  color: var(--text);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10,92,71,0.1);
  outline: none;
}

.form-control::placeholder { color: #aab8b4; }
.form-control.is-invalid { border-color: #dc3545; }

.input-icon-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-icon-wrap .form-control {
  padding-left: 38px;
}

.input-icon-wrap .form-control.has-toggle {
  padding-right: 42px;
}

.pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
}

.pass-toggle svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}

.pass-toggle:hover svg { stroke: var(--green); }

/* Checkbox */
.form-check-input {
  border: 1.5px solid var(--border);
  border-radius: 5px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--green);
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.alert-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.85rem;
  color: #991b1b;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-err svg {
  width: 16px;
  height: 16px;
  stroke: #991b1b;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-err ul { margin: 0; padding-left: 1.1rem; }
.alert-err ul li { margin-bottom: 2px; }

.alert-suc {
  background: var(--green-xlight);
  border: 1px solid var(--green-light);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.85rem;
  color: var(--green-dark);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-suc svg {
  width: 16px;
  height: 16px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   BOUTON SUBMIT
══════════════════════════════════════ */
.btn-submit {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10,92,71,0.3);
  transition: all 0.22s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10,92,71,0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit svg {
  width: 18px;
  height: 18px;
}

/* ══════════════════════════════════════
   DIVERS
══════════════════════════════════════ */
.forgot-link {
  font-size: 0.82rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover { text-decoration: underline; }

.plan-badge {
  background: var(--green-xlight);
  border: 1px solid var(--green-light);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.85rem;
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.demo-box {
  background: var(--accent-light);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.82rem;
  color: #78350f;
  margin-top: 1.25rem;
}

.demo-box strong { display: block; margin-bottom: 4px; font-weight: 700; }

.terms {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.6;
}

.terms a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.terms a:hover { text-decoration: underline; }

code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 991px) {
  .auth-left { display: none !important; }
  .auth-right { padding: 2rem 1.25rem; }
  .auth-form-wrap { max-width: 100%; }
}

@media (max-width: 576px) {
  .type-selector { grid-template-columns: 1fr; }
  .auth-form-wrap h1 { font-size: 1.6rem; }
}
