/* devis.css — Stepper 4 étapes */

/* ── Wrapper global ── */
.form-wrap { max-width: 680px; }

/* ── Stepper header ── */
.stepper {
  display: flex;
  align-items: center;
  background: var(--sand);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 24px;
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.step-item.done .step-num {
  background: var(--blue);
  color: #fff;
  border: none;
}
.step-item.active .step-num {
  background: #fff;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.step-item.idle .step-num {
  background: #fff;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.step-lbl {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s, font-weight 0.2s;
}
.step-item.active .step-lbl {
  color: var(--ink);
  font-weight: 500;
}
.step-item.done .step-lbl {
  color: var(--blue);
}
.step-line {
  flex: 1;
  height: 1.5px;
  background: var(--rule);
  margin: 0 8px;
  transition: background 0.4s;
  flex-shrink: 0;
}
.step-line.done { background: var(--blue); }

/* ── Panel (une étape) ── */
.step-panel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 32px 24px;
  display: none;
  animation: fadeUp 0.2s ease;
}
.step-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-panel-title {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 20px;
}

/* ── Champs dans les panels ── */
.fsec { margin-bottom: 18px; }
.fsec:last-child { margin-bottom: 0; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.fld:last-child { margin-bottom: 0; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-mid); }
label .req { color: var(--blue); margin-left: 2px; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font-family: 'Inter', sans-serif; font-size: 13.5px;
  color: var(--ink); background: var(--sand);
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 10px 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,168,0.1);
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); font-weight: 300; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9690' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  background-color: var(--sand);
  padding-right: 32px; cursor: pointer;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.65; }

/* ── Chips ── */
.chip-grp { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 400; color: var(--ink-mid);
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 99px; padding: 7px 15px;
  cursor: pointer; transition: all 0.12s; user-select: none;
}
.chip:hover { border-color: var(--blue-bd); color: var(--blue); }
.chip.selected {
  background: var(--blue-bg); border-color: var(--blue-bd);
  color: var(--blue-d); font-weight: 500;
}
.chip.selected::before { content: '✓ '; font-size: 10px; font-weight: 700; }

/* ── Navigation bas de panel ── */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-s);
}
.step-counter {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 300;
}
.btn-back {
  background: none;
  color: var(--ink-mid);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid var(--rule);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.15s, color 0.15s;
}
.btn-back:hover { background: var(--sand); color: var(--ink); }
.btn-back svg { width: 13px; height: 13px; }
.btn-next {
  background: var(--blue); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  padding: 10px 22px; border-radius: 9px; border: none;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background 0.15s, transform 0.15s;
}
.btn-next:hover { background: var(--blue-d); transform: translateY(-1px); }
.btn-next svg { width: 13px; height: 13px; }

/* ── Note RGPD ── */
.foot-note {
  font-size: 11.5px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px; font-weight: 300;
}
.foot-note svg { width: 13px; height: 13px; }

/* ── Récapitulatif ── */
.recap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.recap-item {
  background: var(--sand);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
}
.recap-item-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.recap-item-value {
  font-size: 13px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
}
.recap-item-value em {
  font-style: normal;
  color: var(--blue-d);
  background: var(--blue-bg);
  border: 1px solid var(--blue-bd);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-block;
  margin: 2px 3px 2px 0;
}

/* ── Zone d'upload ── */
.upload-zone {
  border: 1.5px dashed var(--rule);
  border-radius: 10px;
  background: var(--sand);
  padding: 20px 18px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--blue);
  background: var(--blue-bg);
}
.upload-zone.drag-over { border-style: solid; }
.upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.upload-ico {
  width: 28px; height: 28px;
  color: var(--ink-soft);
  margin-bottom: 2px;
  transition: color 0.15s;
}
.upload-zone:hover .upload-ico,
.upload-zone.drag-over .upload-ico { color: var(--blue); }
.upload-cta {
  font-size: 13px; color: var(--ink-mid);
}
.upload-cta em {
  font-style: normal; color: var(--blue);
  text-decoration: underline; text-underline-offset: 2px;
}
.upload-hint {
  font-size: 11.5px; color: var(--ink-soft); font-weight: 300;
}
.upload-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 12px;
}
.upload-list:empty { margin-top: 0; }
.upload-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 8px; padding: 8px 12px;
  font-size: 12.5px; color: var(--ink-mid);
}
.upload-item-ico {
  flex-shrink: 0; color: var(--blue);
}
.upload-item-ico svg { width: 14px; height: 14px; display: block; }
.upload-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-size { font-size: 11px; color: var(--ink-soft); flex-shrink: 0; }
.upload-item-del {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s; padding: 0;
}
.upload-item-del:hover { background: #fee2e2; color: #b91c1c; }
.upload-item-del svg { width: 11px; height: 11px; }
.upload-zone.has-files .upload-zone-inner { display: none; }

/* ── Succès ── */
.suc { display: none; text-align: center; padding: 60px 0; }
.suc-ico {
  width: 56px; height: 56px;
  background: var(--blue-bg); border: 1px solid var(--blue-bd);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.suc-ico svg { width: 22px; height: 22px; color: var(--blue); }
.suc h2 {
  font-family: 'Fraunces', serif; font-optical-sizing: auto;
  font-size: 28px; font-weight: 400; font-style: italic;
  margin-bottom: 12px; color: var(--ink);
}
.suc p {
  font-size: 14px; color: var(--ink-mid);
  line-height: 1.7; max-width: 400px;
  margin: 0 auto; font-weight: 300;
}
.suc-badge {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--blue-d);
  background: var(--blue-bg);
  padding: 7px 18px; border-radius: 99px;
  border: 1px solid var(--blue-bd);
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .step-panel { padding: 20px 18px 18px; }
  .step-lbl { display: none; }
  .stepper { padding: 14px 16px; gap: 0; }
  .frow { grid-template-columns: 1fr; }
  .recap-grid { grid-template-columns: 1fr; }

  /* Navigation d'étape empilée : bouton en haut, compteur dessous */
  .step-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .step-nav > div {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .step-nav .btn-next,
  .step-nav .btn-back {
    width: 100%;
    justify-content: center;
  }
  .step-nav .step-counter {
    text-align: center;
  }
  .step-nav .foot-note {
    justify-content: center;
    text-align: center;
  }
}
@media (max-width: 860px) {
  .nav-tab .nav-tab-lbl { display: none; }
  .page { padding: 32px 24px; }
}
