:root {
  --bg-page: #FBFFFE;
  --bg-soft: #F1F7F6;
  --surface: #FFFFFF;

  --main: #001514;
  --action: #00c594;
  --action-hover: #00ab80;
  --action-soft: rgba(0, 197, 148, 0.12);

  --text-primary: #001514;
  --text-secondary: #4A6361;
  --text-muted: #7C9492;

  --border: #DFECEA;
  --border-strong: #C5DAD7;

  --danger: #EF4444;
  --danger-soft: #FEF2F2;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* === FOND MESH GRADIENT PREMIUM === */
.bg-mesh-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 197, 148, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 197, 148, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(197, 218, 215, 0.15) 0px, transparent 60%);
  filter: blur(50px);
}

/* === TOPBAR MINIMALISTE === */
.auth-topbar {
  width: 100%;
  padding: 20px 36px;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 9px 16px;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.btn-back svg {
  width: 15px;
  height: 15px;
}

.btn-back:hover {
  color: var(--text-primary);
  border-color: var(--action);
  background-color: var(--action-soft);
}

/* === CONTENEUR CENTRAL ÉLARGI === */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px 40px;
}

.auth-card {
  width: 100%;
  max-width: 640px; /* <-- On passe de 540px à 640px ici */
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 36px 44px; /* On rééquilibre légèrement les marges internes */
  box-shadow: 0 24px 60px rgba(0, 21, 20, 0.05);
}

/* === COMMUTATEUR D'ONGLETS === */
.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 6px;
  background-color: var(--bg-soft);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 22px; /* Marge réduite */
}

.switch-btn {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  padding: 10px; /* Padding réduit */
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.switch-btn:hover {
  color: var(--text-primary);
}

.switch-btn.active {
  background-color: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(0, 21, 20, 0.06);
}

.switch-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background-color: var(--action-soft);
  color: #007A5B;
  padding: 3px 8px;
  border-radius: 100px;
}

.switch-btn.active .switch-badge {
  background-color: var(--action);
  color: var(--main);
}

/* === EN-TÊTE === */
.auth-header {
  text-align: center;
  margin-bottom: 22px; /* Marge réduite */
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* === MISE EN AVANT 14 JOURS D'ESSAI === */
.trial-hero-box {
  background-color: var(--main);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 14px 18px; /* Tassé */
  margin-bottom: 20px;
  border: 1px solid rgba(0, 197, 148, 0.35);
}

.trial-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.trial-days-badge {
  background-color: var(--action);
  color: var(--main);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
}

.trial-zero {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
}

.trial-perks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #CBD8D6;
}

.trial-perks span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trial-perks svg {
  width: 14px;
  height: 14px;
  color: var(--action);
}

/* === CARTES DE SÉLECTION DE FORFAIT === */
.plan-selector-group {
  margin-bottom: 20px; /* Tassé */
}

.group-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.plan-choice-card {
  position: relative;
  appearance: none;
  background-color: var(--bg-page);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 8px 10px; /* Tassé */
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.plan-choice-card:hover {
  border-color: var(--action);
}

.plan-choice-card.active {
  background-color: var(--action-soft);
  border-color: var(--action);
  box-shadow: 0 0 0 2px rgba(0, 197, 148, 0.18);
}

.p-tag {
  position: absolute;
  top: -9px;
  background-color: var(--main);
  color: var(--action);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}

.p-name {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
}

.plan-choice-card.active .p-name {
  color: var(--text-primary);
}

.p-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.p-price small {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}

.p-meta {
  font-size: 10.5px;
  font-weight: 700;
  color: #007A5B;
  margin-top: 1px;
}

/* === BANNIÈRE D'ERREUR === */
.error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--danger-soft);
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.error-banner svg {
  width: 17px;
  height: 17px;
  color: var(--danger);
  flex-shrink: 0;
}

/* Variante information (e-mail envoyé, compte à confirmer…) */
.error-banner.info {
  background-color: var(--action-soft);
  border-color: rgba(0, 197, 148, 0.35);
  color: #00573F;
}

.error-banner.info svg {
  color: var(--action);
}

/* === CHAMPS DE FORMULAIRE TASSÉS === */
.form-group {
  margin-bottom: 14px; /* Tassé */
}

/* NOUVEAU : 2 Champs sur la même ligne */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.label-row label {
  margin-bottom: 0;
}

.forgot-link {
  font-size: 12px;
  font-weight: 700;
  color: #007A5B;
  text-decoration: none;
}

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

.input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-box input {
  width: 100%;
  height: 44px; /* Hauteur réduite pour tasser */
  padding: 0 40px 0 42px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background-color: var(--bg-page);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.input-box input:focus {
  background-color: var(--surface);
  border-color: var(--action);
  box-shadow: 0 0 0 3px var(--action-soft);
}

.btn-eye {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.btn-eye:hover {
  color: var(--text-primary);
  background-color: var(--bg-soft);
}

.btn-eye svg {
  width: 16px;
  height: 16px;
}

/* === CHECKBOX === */
.remember-row {
  margin: 4px 0 18px; /* Tassé */
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background-color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.custom-checkbox input:checked + .checkmark {
  background-color: var(--action);
  border-color: var(--action);
}

.custom-checkbox input:checked + .checkmark::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid var(--main);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* === BOUTON PRINCIPAL === */
.btn-submit {
  width: 100%;
  height: 48px; /* Hauteur réduite */
  background-color: var(--action);
  color: var(--main);
  border: none;
  border-radius: 11px;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 197, 148, 0.25);
  transition: all 0.18s ease;
}

.btn-submit svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

.btn-submit:hover {
  background-color: var(--action-hover);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* === RESPONSIVE === */
/* Lien vers la politique de confidentialité, sous le bouton d'inscription */
.mention-donnees {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #8FA3A0);
  line-height: 1.5;
}

.mention-donnees a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.libelle-court {
  display: none;
}

@media (max-width: 580px) {
  .auth-topbar {
    padding: 16px 20px;
  }

  /* La carte en haut de l'écran plutôt qu'au milieu */
  .auth-wrapper {
    align-items: flex-start;
    padding-top: 8px;
  }

  .auth-header h1 {
    font-size: 21px;
  }

  .libelle-long {
    display: none;
  }

  .libelle-court {
    display: inline;
  }

  .btn-back {
    padding: 8px 12px;
  }

  /* « Essai gratuit » et sa pastille sur une ligne */
  .switch-btn {
    white-space: nowrap;
    gap: 6px;
  }

  .switch-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .p-price small {
    display: block;
    margin-top: 2px;
  }
  .auth-card {
    padding: 24px 20px;
    border-radius: 20px;
  }
  /* On annule les colonnes sur mobile car l'écran est trop petit */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}