/* ============================================================
   40. PROFIL EMPRUNTEUR — WIZARD
   ============================================================ */

/* Barre de progression (hors wizard, dans la card profil) */
.borrower-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.borrower-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}

.borrower-progress-fill {
  height: 100%;
  background: var(--primary-gold);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.borrower-progress-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Badge statut */
.borrower-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.borrower-status-green { background: var(--green-100);          color: var(--green-500); }
.borrower-status-gold  { background: var(--primary-gold-light); color: var(--primary-gold-dark); }
.borrower-status-gray  { background: var(--gray-100);           color: var(--gray-500); }

/* ── Modale wizard (plus large + flex column) ── */
.modal-box-wizard {
  max-width: 640px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* En-tête fixe */
.wizard-header {
  padding: 28px 32px 18px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.wizard-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Segments de progression */
.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.wizard-progress-step {
  flex: 1;
  height: 4px;
  background: var(--gray-100);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.wizard-progress-step.active    { background: var(--primary-gold); }
.wizard-progress-step.completed { background: var(--gray-800); }

/* Labels sous la barre */
.wizard-steps-labels {
  display: flex;
  font-size: 0.6875rem;
  color: var(--gray-400);
  font-weight: 500;
}

.wizard-steps-labels span {
  flex: 1;
  text-align: center;
}

/* Corps scrollable */
.wizard-body {
  padding: 28px 32px;
  overflow-y: auto;
  flex: 1;
}

/* Titres et sous-titres */
.wizard-step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.wizard-step-hint {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 20px;
  margin-top: 2px;
}

/* Grilles de choix (boutons radio visuels) */
.wizard-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wizard-choice-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.wizard-choice {
  padding: 14px 10px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1.4;
}

.wizard-choice:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.wizard-choice.wizard-choice-active {
  border-color: var(--gray-800);
  background: var(--gray-800);
  color: white;
}

/* Input monétaire avec € */
.wizard-currency-input {
  position: relative;
}

.wizard-currency-input .form-input {
  padding-right: 36px;
}

.wizard-currency-symbol {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-400);
  pointer-events: none;
}

/* Ajusteur numérique (enfants) */
.wizard-number-input {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-number-input button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: white;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: var(--font-family);
}

.wizard-number-input button:hover { background: var(--gray-50); }

/* Total temps réel */
.wizard-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--primary-gold-light);
  border-radius: var(--radius-md);
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--primary-gold-dark);
}

.wizard-total-preview strong {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Erreurs inline */
.wizard-errors {
  background: var(--red-100);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--red-500);
  line-height: 1.5;
}

.wizard-errors p { margin-bottom: 2px; }
.wizard-errors p:last-child { margin-bottom: 0; }

/* Footer */
.wizard-footer {
  display: flex;
  align-items: center;
  padding: 18px 32px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}

/* ── Récapitulatif emprunteur ── */
.borrower-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.borrower-kpi {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
}

.borrower-kpi-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 4px;
}

.borrower-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.borrower-kpi-ok     { color: var(--green-500); }
.borrower-kpi-danger { color: var(--red-500); }

.borrower-results { display: flex; flex-direction: column; gap: 8px; }

.borrower-result-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-gold-light);
  border: 1px solid var(--primary-gold);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  gap: 12px;
}

.borrower-result-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-gold-dark);
}

.borrower-result-hint {
  font-size: 0.75rem;
  color: var(--primary-gold-dark);
  opacity: 0.75;
  margin-top: 2px;
}

.borrower-result-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-gold-dark);
  white-space: nowrap;
}

.borrower-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9375rem;
  color: var(--gray-600);
}

.borrower-result-row:last-child { border-bottom: none; }
.borrower-result-row strong { color: var(--gray-900); }

.borrower-disclaimer {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-style: italic;
  line-height: 1.5;
  margin-top: 12px;
  text-align: center;
}

/* ── Section 41 : Prix du marché (DVF) ──────────────────────── */


/* Formulaire recherche */
.pm-search-card { padding: 24px; }

.pm-address-wrap { position: relative; }

.pm-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
}

.pm-autocomplete-item {
  padding: 10px 14px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.1s;
}
.pm-autocomplete-item:hover { background: var(--gray-50); }

.pm-address-badge {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.pm-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .pm-filters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .pm-filters-grid { grid-template-columns: 1fr; } }

.pm-choice-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.pm-choice {
  padding: 6px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: var(--gray-200);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--gray-600);
}
.pm-choice:hover         { background: var(--gray-600); border-color: var(--gray-600); color: var(--white); }
.pm-choice.pm-choice-active {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: var(--white);
}

/* Résultats */
.pm-kpis-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .pm-kpis-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .pm-kpis-grid { grid-template-columns: repeat(2, 1fr); } }

.pm-kpi {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 16px;
}
.pm-kpi-main {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #e09420 100%);
  border-color: transparent;
  color: white;
}
.pm-kpi-label { font-size: 0.75rem; color: var(--gray-600); margin-bottom: 4px; }
.pm-kpi-main .pm-kpi-label { color: rgba(255,255,255,0.9); }
.pm-kpi-value { font-size: 1rem; font-weight: 700; color: var(--gray-800); }
.pm-kpi-main .pm-kpi-value { color: white; }

.pm-reliability-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.pm-results-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .pm-results-layout { grid-template-columns: 1fr; } }

.pm-count-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-left: 8px;
}

.pm-table-wrap { overflow-x: auto; }
.pm-table { font-size: 0.8125rem; }

/* Spinner */
.pm-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 42. Auth pages ─────────────────────────────────────────── */

.auth-body { margin: 0; background: var(--gray-50); font-family: var(--font-base, "Poppins", sans-serif); }

.auth-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* Panneau gauche */
.auth-brand {
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}
.auth-brand-inner { max-width: 320px; }

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-gold);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 56px;
  text-decoration: none;
}

.auth-brand-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 14px;
}
.auth-brand-subtitle {
  color: var(--gray-400);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 40px;
}

.auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-400);
  font-size: 0.875rem;
}
.auth-features li svg { color: var(--primary-gold); flex-shrink: 0; }

/* Panneau droit */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-form-wrap { width: 100%; max-width: 400px; }

/* Titre et sous-titre du formulaire */
.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gray-800);
  margin: 0 0 6px;
}
.auth-subtitle {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin: 0 0 28px;
}

/* Champs */
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(255,187,99,0.15);
}
.auth-field input::placeholder { color: var(--gray-400); }

/* Champs en grille (prénom / nom) */
.auth-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Checkbox remember */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 20px;
}
.auth-remember input[type="checkbox"] { accent-color: var(--primary-gold); width: 15px; height: 15px; }

/* Bouton submit */
.auth-btn {
  width: 100%;
  padding: 11px;
  background: var(--primary-gold);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.auth-btn:hover { background: var(--primary-gold-dark); }

/* Séparateur */
.auth-divider {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin: 20px 0;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--gray-200);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* Bouton Google */
.auth-btn-google {
  width: 100%;
  padding: 11px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s;
  font-family: var(--font-family);
}
.auth-btn-google:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* Liens de navigation */
.auth-links { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--gray-400); }
.auth-links a { color: var(--primary-gold); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--gray-400);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s;
}
.auth-back-home:hover { color: var(--gray-600); }

.auth-forgot { text-align: right; margin-bottom: 16px; margin-top: -8px; }
.auth-forgot a { font-size: 0.8125rem; color: var(--primary-gold); text-decoration: none; font-weight: 500; }
.auth-forgot a:hover { text-decoration: underline; }

/* Erreurs */
.auth-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  color: #b91c1c;
}
.auth-errors ul { margin: 4px 0 0; padding-left: 18px; }
.auth-errors li { margin-bottom: 2px; }

/* Flash */
.auth-flash {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.auth-flash-notice { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.auth-flash-alert  { background: #fef2f2; border: 1px solid #fecaca;  color: #b91c1c; }

/* Responsive */
@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand  { display: none; }
  .auth-form-panel { padding: 40px 20px; align-items: flex-start; padding-top: 60px; }
}

/* ── 43. Photos / Upload ──────────────────────────────────────── */

/* Grille photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--gray-100);
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.photo-item:hover .photo-thumb { transform: scale(1.05); }

.photo-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
}
.photo-item:hover .photo-overlay { background: rgba(0,0,0,0.12); }

.photo-delete-btn {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px;
  background: rgba(0,0,0,0.6); color: white;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
.photo-item:hover .photo-delete-btn { opacity: 1; }
.photo-delete-btn:hover { background: #dc2626; }

.photo-more-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.25rem; font-weight: 700;
}

/* Zone drag & drop */
.photo-drop-zone {
  border: 2px dashed var(--gray-200);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.photo-drop-zone:hover,
.photo-drop-zone.dragover {
  border-color: var(--primary-gold);
  background: var(--gold-light, #FFF8E1);
}
.photo-drop-label { font-weight: 600; color: var(--gray-800); margin-bottom: 6px; }
.photo-drop-sub   { font-size: 0.875rem; color: var(--gray-400); margin-bottom: 12px; }
.photo-drop-hint  { font-size: 0.8125rem; color: var(--gray-400); margin-top: 10px; }

/* Lightbox */
#photo-lightbox,
#show-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
#photo-lightbox img,
#show-lightbox img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}

