/* ============================================================
   SOUHEL IMMO — Dossier hypothécaire (page + wizard)
   Reprend styles.css ; ajoute le processus + le formulaire.
   ============================================================ */

:root { --err: #b3472f; }

.nav-links a.active { color: var(--or); }
.nav-links a.active::after { width: 100%; }

/* ---------- En-tête de page ---------- */
.page-header {
  background: var(--noir);
  position: relative;
  text-align: center;
  padding: clamp(132px, 19vh, 210px) 0 clamp(56px, 9vh, 104px);
  overflow: hidden;
}
.page-header .eyebrow { margin-bottom: 22px; }
.page-header h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 26px;
  color: var(--creme);
}
.page-header p.lead {
  max-width: 640px; margin: 0 auto;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.85;
  color: var(--on-dark-soft);
  font-weight: 300;
}
.page-header .spine { margin-top: 38px; }

/* ---------- Processus : étapes numérotées ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(16px, 2vw, 30px);
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 27px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold) 12%, var(--line-gold) 88%, transparent);
  z-index: 0;
}
.pstep { position: relative; z-index: 1; text-align: center; padding: 0 6px; }
.pstep .num {
  width: 54px; height: 54px; margin: 0 auto 24px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  background: var(--creme);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--or-deep);
}
.section.light-2 .pstep .num { background: var(--creme-2); }
.pstep h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink);
}
.pstep p {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Documents & délais ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.doc-block h3, .delay-block h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin: 0 0 28px;
  color: var(--ink);
}
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-list li {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.96rem;
  color: var(--ink);
}
.doc-list li:last-child { border-bottom: none; }
.doc-list .dico {
  width: 24px; height: 24px; flex: none;
  color: var(--or-deep);
}
.doc-list .dico svg { width: 100%; height: 100%; }

.delay-block { background: var(--creme); border: 1px solid var(--line-light); padding: clamp(26px, 3vw, 40px); }
.section.light .delay-block { background: var(--creme-2); }
.delay-item { padding: 22px 0; border-bottom: 1px solid var(--line-light); }
.delay-item:first-child { padding-top: 0; }
.delay-item:last-child { padding-bottom: 0; border-bottom: none; }
.delay-item .val {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--or-deep);
  line-height: 1;
  margin-bottom: 8px;
}
.delay-item .lbl { font-size: 0.84rem; color: var(--ink-soft); letter-spacing: 0.02em; }

/* ============================================================
   WIZARD
   ============================================================ */
.wizard {
  max-width: 840px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line-light);
  box-shadow: 0 40px 80px -50px rgba(35,33,28,0.4);
}

/* Barre de progression dorée */
.wz-progress { height: 3px; background: var(--creme-2); position: relative; overflow: hidden; }
.wz-progress .bar {
  position: absolute; inset: 0 auto 0 0;
  width: 16.66%;
  background: linear-gradient(90deg, var(--or-deep), var(--or-soft));
  transition: width 0.6s var(--ease);
}

.wz-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: clamp(26px, 3.4vw, 40px) clamp(26px, 4vw, 56px) 0;
}
.wz-head .step-count {
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--or-deep);
}
.wz-head .step-pct { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.1em; }
.wz-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  letter-spacing: 0.02em;
  margin: 6px clamp(26px, 4vw, 56px) 0;
  padding-bottom: clamp(22px, 3vw, 32px);
  border-bottom: 1px solid var(--line-light);
  color: var(--ink);
}

.wz-body { padding: clamp(28px, 3.6vw, 44px) clamp(26px, 4vw, 56px); }
.wz-step { display: none; }
.wz-step.active { display: block; animation: stepIn 0.5s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.wz-intro { font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 28px; max-width: 60ch; }

/* Champs */
.fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 400;
}
.field label .req { color: var(--or-deep); }
.field input, .field select {
  font-family: var(--sans); font-weight: 300; font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-light);
  padding: 13px 15px;
  border-radius: 0;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  width: 100%;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23b3923a' stroke-width='1.4'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px; cursor: pointer;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.field input::placeholder { color: rgba(35,33,28,0.32); }
.field .with-unit { position: relative; }
.field .with-unit .unit {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.08em; pointer-events: none;
}
.field .with-unit input { padding-right: 52px; }
.field.invalid input, .field.invalid select { border-color: var(--err); }
.field .err-msg {
  font-size: 0.72rem; color: var(--err); letter-spacing: 0.02em;
  display: none;
}
.field.invalid .err-msg { display: block; }

/* Segmented (radio) */
.segmented { display: flex; gap: 0; border: 1px solid var(--line-light); }
.segmented label {
  flex: 1; text-align: center; cursor: pointer;
  padding: 13px 10px;
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: all 0.3s var(--ease);
  border-right: 1px solid var(--line-light);
}
.segmented label:last-child { border-right: none; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { color: #fff; }
.segmented label:has(input:checked) { background: var(--ink); color: #fff; }
.field.invalid .segmented { border-color: var(--err); }

/* Dropzones */
.dropzone {
  border: 1px dashed var(--line-gold);
  background: var(--creme);
  padding: 22px 24px;
  display: flex; align-items: center; gap: 18px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.dropzone:hover, .dropzone.drag { background: var(--creme-2); border-color: var(--or); }
.dropzone .dz-icon { width: 30px; height: 30px; color: var(--or-deep); flex: none; }
.dropzone .dz-icon svg { width: 100%; height: 100%; }
.dropzone .dz-text { flex: 1; }
.dropzone .dz-title { font-size: 0.95rem; color: var(--ink); margin-bottom: 3px; }
.dropzone .dz-sub { font-size: 0.78rem; color: var(--ink-soft); }
.dropzone .dz-sub u { color: var(--or-deep); cursor: pointer; }
.dropzone.filled { border-style: solid; border-color: var(--or); background: #fff; }
.dropzone.filled .dz-icon { color: #1b7d52; }
.dz-files { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dz-file {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.84rem; color: var(--ink);
  background: var(--creme); padding: 9px 14px;
}
.dz-file .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-file .size { color: var(--ink-soft); font-size: 0.76rem; }
.dz-file .rm { background: none; border: none; color: var(--err); font-size: 1.1rem; line-height: 1; padding: 0 4px; }
.doc-stack { display: flex; flex-direction: column; gap: 18px; }
.doc-field label.dz-label {
  display: block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 9px;
}

/* Navigation du wizard */
.wz-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-top: clamp(30px, 4vw, 44px);
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line-light);
}
.wz-back {
  background: none; border: none;
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.3s var(--ease); padding: 8px 0;
}
.wz-back:hover { color: var(--ink); }
.wz-back .arrow { transition: transform 0.3s var(--ease); }
.wz-back:hover .arrow { transform: translateX(-5px); }
.wz-back[hidden] { visibility: hidden; }

/* Résumé */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; margin-bottom: 30px; }
.sum-group { }
.sum-group h4 {
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--or-deep); margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-light);
  display: flex; justify-content: space-between; align-items: center;
}
.sum-group h4 button {
  background: none; border: none; color: var(--ink-soft);
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: color 0.3s var(--ease);
}
.sum-group h4 button:hover { color: var(--or-deep); }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 0.9rem; }
.sum-row .k { color: var(--ink-soft); }
.sum-row .v { color: var(--ink); text-align: right; font-weight: 400; }
.sum-note {
  grid-column: 1 / -1;
  background: var(--creme); border-left: 2px solid var(--or);
  padding: 16px 20px; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.6;
}
.sum-note b { color: var(--ink); font-weight: 500; }

.consent { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 28px; }
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--or-deep); flex: none; }
.consent label { font-size: 0.84rem; line-height: 1.6; color: var(--ink-soft); }
.consent.invalid label { color: var(--err); }
.consent a { color: var(--or-deep); text-decoration: underline; text-underline-offset: 2px; }

/* Écran de succès */
.wz-success { text-align: center; padding: clamp(30px, 5vw, 60px) 0; display: none; }
.wz-success.active { display: block; animation: stepIn 0.6s var(--ease); }
.wz-success .check {
  width: 78px; height: 78px; margin: 0 auto 30px;
  border-radius: 50%; border: 1px solid var(--line-gold);
  display: grid; place-items: center; color: var(--or-deep);
}
.wz-success .check svg { width: 34px; height: 34px; }
.wz-success h2 {
  font-family: var(--serif); font-weight: 400; letter-spacing: 0.04em;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 18px; color: var(--ink);
}
.wz-success p { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); max-width: 46ch; margin: 0 auto 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process::before { top: 0; bottom: 0; left: 27px; right: auto; width: 1px; height: auto;
    background: linear-gradient(to bottom, transparent, var(--line-gold) 8%, var(--line-gold) 92%, transparent); }
  .pstep { display: grid; grid-template-columns: 54px 1fr; gap: 22px; text-align: left; padding: 18px 0; align-items: start; }
  .pstep .num { margin: 0; }
  .info-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fieldset { grid-template-columns: 1fr; }
  .wz-head { flex-direction: column; gap: 4px; }
}
