/* ═══════════════════════════════════════════════════════════
   INTAKE — Audit Complet · composants spécifiques
   S'appuie sur les tokens & composants de base de style.css
   (variables, polices, .screen, .btn-cta, .option-btn, .field-*).
   Ne redéfinit QUE ce que l'intake ajoute.
   ═══════════════════════════════════════════════════════════ */

/* ─── En-tête de parcours (Étape X / 5) ─────────────────── */
#intake-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 24px 0;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
#intake-progress.visible { opacity: 1; }
.intake-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.intake-progress-step {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.intake-progress-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#intake-progress .progress-track {
  height: 2px;
  background: var(--border-strong);
  border-radius: 2px;
  overflow: hidden;
}
#intake-progress .progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ─── Titres d'étape ────────────────────────────────────── */
.step-head { margin-bottom: 26px; }
.step-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.step-head h2 { margin-bottom: 8px; }
.step-intro {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Récap « d'après votre Audit Flash » (lecture seule) ── */
.recap {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 26px;
}
.recap-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.recap-title::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.recap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.recap-item { min-width: 0; }
.recap-key {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.recap-val {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}
.recap-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Champs texte / date / numériques ──────────────────── */
.in-field { margin-bottom: 18px; }
.in-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.in-label .opt {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.in-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -4px 0 8px;
  line-height: 1.45;
}
.in-input,
.in-select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.in-input::placeholder { color: var(--text-muted); }
.in-input:focus,
.in-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}
.in-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' stroke='%23918B81' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.in-select option { background: var(--surface-2); color: var(--text); }

/* Champ avec suffixe (€ / % / /mois) */
.in-suffix { position: relative; }
.in-suffix .in-input { padding-right: 52px; }
.in-suffix::after {
  content: attr(data-suffix);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* Deux champs côte à côte */
.in-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Erreur inline sous un champ */
.in-error {
  font-size: 12.5px;
  color: #E05A4A;
  margin-top: 6px;
  min-height: 0;
  display: none;
}
.in-field.has-error .in-input,
.in-field.has-error .in-select { border-color: #E05A4A; }
.in-field.has-error .in-error { display: block; }

/* ─── Bloc conditionnel (révélé selon le contexte) ──────── */
.in-conditional {
  border-left: 2px solid var(--accent-border);
  padding-left: 16px;
  margin: 4px 0 18px;
  animation: fadeIn 0.25s ease;
}
.in-conditional.hidden { display: none; }
.in-sectiontitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

/* ─── Séparateur de sous-section dans une étape ─────────── */
.in-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 18px;
}
.in-divider::before,
.in-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.in-divider span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─── Cartes de biens (Étape 3, dynamique) ──────────────── */
.bien-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px 18px 6px;
  margin-bottom: 14px;
  animation: fadeIn 0.25s ease;
}
.bien-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.bien-card-num {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.bien-card-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.bien-card-remove:hover { color: var(--danger); background: var(--danger-soft); }
.bien-prefill {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 2px 10px;
  margin-bottom: 12px;
}
.btn-add-bien {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  margin-bottom: 8px;
}
.btn-add-bien:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-add-bien:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Multi-choix (projets, étape 4) ────────────────────── */
.in-multi {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.in-multi .option-btn { font-size: 15px; padding: 14px 18px; }

/* ─── Compteur de caractères (textarea) ─────────────────── */
.in-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.in-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.in-counter {
  text-align: right;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.in-counter.near { color: var(--accent); }

/* ─── Uploads (Étape 5) ─────────────────────────────────── */
.upload-note {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 22px;
}
.upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.upload-row.filled { border-color: var(--accent-border); }
.upload-meta { flex: 1; min-width: 0; }
.upload-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2px;
}
.upload-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-btn {
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.upload-row input[type="file"] { display: none; }
.upload-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--positive);
  display: none;
}
.upload-row.filled .upload-check { display: block; }

/* ─── Navigation bas d'étape ────────────────────────────── */
.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.step-nav .btn-cta { margin: 0; }
.btn-step-back {
  flex-shrink: 0;
  width: auto;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 17px 24px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-step-back:hover { border-color: var(--text-muted); color: var(--text); }

/* ─── Confirmation finale (sans Stripe) ─────────────────── */
.intake-done {
  text-align: center;
  max-width: 460px;
}
.intake-done-badge {
  width: 56px; height: 56px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.intake-done-badge svg { width: 26px; height: 26px; color: var(--accent); }
.intake-done h2 { margin-bottom: 14px; }
.intake-done p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }

/* ─── Bandeau « repli » si arrivée sans Flash ───────────── */
.no-flash {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}
.no-flash a { color: var(--accent); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  .recap-grid { grid-template-columns: 1fr; gap: 12px; }
  .in-row { grid-template-columns: 1fr; }
  #intake-progress { padding: 12px 18px 0; }
}
