/* Martin — Parcours mandat (dossier) */
/* Reuses tokens from styles.css — load this AFTER styles.css */

body.dossier {
  background: var(--brume-light);
  font-family: var(--font-body);
}

.dossier-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr 360px;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 1240px) {
  .dossier-shell { grid-template-columns: 240px 1fr 320px; }
}

@media (max-width: 1080px) {
  .dossier-shell {
    grid-template-columns: 1fr;
  }
  .dossier-stepper { display: none; }
  .dossier-dashboard { display: none; }
  .dossier-mobile-progress { display: flex !important; }
  .dossier-mobile-summary { display: block !important; }
}

/* ============================================
   MOBILE — dossier (≤ 720px / ≤ 480px)
   ============================================ */
@media (max-width: 720px) {
  .dossier-topbar-inner { padding: 12px 16px; }
  .dossier-topbar .logo { height: 24px; }
  .dossier-save-indicator { font-size: 12px; }
  .dossier-exit { font-size: 12.5px; }

  .dossier-center { padding: 20px 16px 100px; }

  .dossier-mobile-progress { padding: 12px 14px; gap: 10px; margin-bottom: 14px; }
  .dossier-mobile-progress-label { font-size: 12px; white-space: nowrap; }

  .step-header { margin-bottom: 22px; }
  .step-header h1 { font-size: clamp(26px, 7vw, 34px) !important; line-height: 1.15; }
  .step-eyebrow { font-size: 10.5px; }

  /* Form field grids — collapse to 1 col earlier */
  .field-grid.cols-2, .field-grid.cols-3 { grid-template-columns: 1fr !important; gap: 14px !important; }
  .field-grid { gap: 14px !important; }

  /* Input sizing on phones */
  .field-label { font-size: 13px; }
  .field input, .field select, .field textarea {
    font-size: 16px !important; /* prevent iOS zoom */
    padding: 12px 14px !important;
  }

  /* Tile grids */
  .tile-grid.cols-3, .tile-grid.cols-4, .tile-grid.cols-5 { grid-template-columns: 1fr 1fr !important; }
  .tile { padding: 16px 14px !important; }
  .tile-label { font-size: 13px !important; }

  /* Welcome card */
  .welcome-card { padding: 32px 22px !important; }
  .welcome-bullets { grid-template-columns: 1fr !important; gap: 12px; }
  .welcome-bullet { padding: 16px !important; }

  /* Section cards */
  .section-card { padding: 22px 18px !important; }

  /* Line items */
  .line-item { grid-template-columns: 1fr !important; gap: 8px !important; padding: 14px !important; }

  /* Footer nav */
  .dossier-footer { padding: 10px 16px; }
  .dossier-footer .btn-primary { padding: 11px 18px; font-size: 14px; }
  .dossier-footer-back { font-size: 13px; padding: 8px 10px; }
  .dossier-footer-meta { display: none; }
}

@media (max-width: 480px) {
  .dossier-center { padding: 16px 14px 100px; }
  .step-header h1 { font-size: 26px !important; }
  .tile-grid.cols-3, .tile-grid.cols-4, .tile-grid.cols-5 { grid-template-columns: 1fr !important; }
  .welcome-card { padding: 28px 18px !important; }
}

/* ---------- Header bar (top) ---------- */
.dossier-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250,250,252,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(232,234,240,.7);
}
.dossier-topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
}
.dossier-topbar .logo { height: 28px; }
.dossier-save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ardoise);
  font-family: var(--font-display);
  font-weight: 500;
}
.dossier-save-indicator .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--vert);
  box-shadow: 0 0 0 4px rgba(31,166,122,.18);
}
.dossier-exit {
  font-size: 13.5px;
  color: var(--ardoise);
  font-family: var(--font-display);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dossier-exit:hover { color: var(--noir); }

/* ---------- Stepper (left) ---------- */
.dossier-stepper {
  padding: 32px 24px 32px 32px;
  position: sticky;
  top: 60px;
  align-self: start;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.dossier-stepper-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ardoise);
  margin-bottom: 18px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  margin-bottom: 2px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ardoise);
  transition: all .2s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.step-item:hover { background: rgba(74,127,214,.06); color: var(--noir); }
.step-item.active {
  background: white;
  color: var(--noir);
  box-shadow: var(--shadow-sm);
}
.step-item.done { color: var(--noir); }
.step-item.locked { opacity: .5; cursor: not-allowed; }
.step-item-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--brume-light);
  color: var(--ardoise);
  transition: all .2s ease;
}
.step-item.active .step-item-icon { background: var(--noir); color: white; }
.step-item.done .step-item-icon { background: var(--vert); color: white; }
.step-item-label { flex: 1; }
.step-item-meta {
  font-size: 11px;
  color: var(--ardoise);
  opacity: .7;
  margin-top: 1px;
}
.step-item.active .step-item-meta { color: var(--magenta); opacity: 1; font-weight: 700; }

/* ---------- Center column ---------- */
.dossier-center {
  padding: 32px 32px 120px;
  min-width: 0;
}
.dossier-mobile-progress {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.dossier-mobile-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--brume);
  border-radius: 999px;
  overflow: hidden;
}
.dossier-mobile-progress-fill {
  height: 100%;
  background: var(--magenta);
  border-radius: 999px;
  transition: width .4s cubic-bezier(.2,.8,.2,1);
}
.dossier-mobile-progress-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--noir);
}

.step-header {
  margin-bottom: 28px;
  max-width: 720px;
}
.step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 12px;
}
.step-eyebrow-time {
  color: var(--ardoise);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 12px;
}
.step-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--noir);
  margin: 0 0 10px;
}
.step-sub {
  color: var(--ardoise);
  font-size: 16.5px;
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 580px;
}

/* ---------- The card (focused question group) ---------- */
.qcard {
  background: white;
  border-radius: 20px;
  border: 1px solid var(--brume);
  padding: 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  max-width: 720px;
}
.qcard-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--noir);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.qcard-title-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--ardoise);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qcard-title-help {
  font-size: 12px;
  font-weight: 600;
  color: var(--bleu-dark);
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Form rows */
.field-grid {
  display: grid;
  gap: 16px;
}
.field-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.field-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) {
  .field-grid.cols-2, .field-grid.cols-3 { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.field-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--noir);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.field-label-help {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--bleu-dark);
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.field-input,
.field-select {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  background: var(--brume-light);
  border: 1.5px solid transparent;
  border-radius: 10px;
  color: var(--noir);
  transition: all .15s ease;
  width: 100%;
  outline: none;
}
.field-input:focus,
.field-select:focus {
  background: white;
  border-color: var(--magenta);
  box-shadow: 0 0 0 4px rgba(215,42,110,.12);
}
.field-input::placeholder { color: var(--ardoise); opacity: .65; }
.field-input.has-suffix { padding-right: 60px; }
.field-suffix {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--ardoise);
  pointer-events: none;
}
.field-hint {
  font-size: 12px;
  color: var(--ardoise);
}
.field-error {
  font-size: 12px;
  color: var(--rouge);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tile chooser */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.tile-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.tile-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.tile-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.tile-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 720px) {
  .tile-grid.cols-3, .tile-grid.cols-4, .tile-grid.cols-5 {
    grid-template-columns: 1fr 1fr;
  }
}

.tile {
  position: relative;
  padding: 18px 14px;
  background: white;
  border: 1.5px solid var(--brume);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: all .18s ease;
  text-align: left;
  font-family: var(--font-body);
  min-height: 100px;
}
.tile:hover {
  border-color: var(--bleu);
  background: var(--bleu-soft);
  transform: translateY(-1px);
}
.tile.selected {
  border-color: var(--magenta);
  background: var(--magenta-soft);
  box-shadow: 0 4px 14px rgba(215,42,110,.12);
}
.tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brume-light);
  color: var(--ardoise);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile.selected .tile-icon {
  background: var(--magenta);
  color: white;
}
.tile-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--noir);
  line-height: 1.2;
}
.tile-sub {
  font-size: 12px;
  color: var(--ardoise);
  line-height: 1.4;
}
.tile-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--magenta);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.6);
  transition: all .2s cubic-bezier(.2,.8,.2,1);
}
.tile.selected .tile-check { opacity: 1; transform: scale(1); }

/* Big yes/no buttons (quiz) */
.yn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.yn-btn {
  padding: 28px 24px;
  border: 2px solid var(--brume);
  background: white;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--noir);
  cursor: pointer;
  transition: all .18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.yn-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.yn-btn.yes:hover { border-color: var(--vert); color: var(--vert); }
.yn-btn.no:hover { border-color: var(--ardoise); color: var(--noir); }
.yn-btn.selected.yes { border-color: var(--vert); background: var(--vert-soft); color: var(--vert); }
.yn-btn.selected.no { border-color: var(--ardoise); background: var(--brume-light); color: var(--noir); }
.yn-btn-icon { font-size: 24px; }

/* Slider */
.slider-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.slider-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--noir);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.slider-value-sub {
  font-size: 13px;
  color: var(--ardoise);
  margin-left: 8px;
  font-weight: 500;
}
.qslider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--brume);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.qslider::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(to right, var(--magenta) var(--fill, 50%), var(--brume) var(--fill, 50%));
  border-radius: 999px;
}
.qslider::-moz-range-track {
  height: 8px;
  background: linear-gradient(to right, var(--magenta) var(--fill, 50%), var(--brume) var(--fill, 50%));
  border-radius: 999px;
}
.qslider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  background: white;
  border: 4px solid var(--magenta);
  border-radius: 50%;
  margin-top: -9px;
  box-shadow: 0 4px 12px rgba(215,42,110,.3);
  cursor: grab;
}
.qslider::-moz-range-thumb {
  width: 26px; height: 26px;
  background: white; border: 4px solid var(--magenta);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(215,42,110,.3);
  cursor: grab;
}
.slider-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ardoise);
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--brume-light);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.toggle-row:hover { background: rgba(74,127,214,.08); }
.toggle-row-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--noir);
  flex: 1;
}
.toggle-row-sub {
  font-size: 12.5px;
  color: var(--ardoise);
  font-weight: 400;
  margin-top: 2px;
}
.toggle {
  width: 42px;
  height: 24px;
  background: var(--brume);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background .2s ease;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle.on {
  background: var(--magenta);
}
.toggle.on::after { transform: translateX(18px); }

/* Add row (charges, crédits, etc.) */
.add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: var(--brume-light);
  border: 1.5px dashed var(--brume);
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ardoise);
  cursor: pointer;
  transition: all .15s ease;
}
.add-row:hover {
  background: var(--bleu-soft);
  border-color: var(--bleu);
  color: var(--bleu-dark);
}
.add-row-plus {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--noir);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.add-row:hover .add-row-plus { background: var(--bleu); }

.line-item {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: var(--brume-light);
  border-radius: 12px;
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  .line-item { grid-template-columns: 1fr 1fr; gap: 10px; }
}
.line-item-remove {
  background: none;
  border: none;
  color: var(--ardoise);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
}
.line-item-remove:hover { color: var(--rouge); background: rgba(209,72,72,.08); }

/* DPE selector */
.dpe-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dpe-row-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s ease;
}
.dpe-row-pick.A { background: #2E9755; width: 30%; }
.dpe-row-pick.B { background: #4FA856; width: 40%; }
.dpe-row-pick.C { background: #A6BB42; width: 50%; }
.dpe-row-pick.D { background: #E5BC2C; color: #2a2200; width: 60%; }
.dpe-row-pick.E { background: #E89A2B; width: 72%; }
.dpe-row-pick.F { background: #DD6B2E; width: 84%; }
.dpe-row-pick.G { background: #C73D34; width: 96%; }
.dpe-row-pick:hover { transform: translateX(6px); }
.dpe-row-pick.selected {
  border-color: var(--noir);
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
  transform: translateX(6px);
}
.dpe-row-pick .dpe-letter { font-size: 18px; min-width: 14px; }
.dpe-row-pick .dpe-tag {
  margin-left: auto;
  background: rgba(255,255,255,.92);
  color: var(--noir);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.dpe-prime-banner {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--bleu-soft);
  border: 1px solid rgba(74,127,214,.25);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--noir);
  line-height: 1.5;
}
.dpe-prime-banner b { color: var(--bleu-dark); font-family: var(--font-display); }

/* Document upload cards */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.doc-card {
  background: white;
  border: 1.5px dashed var(--brume);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .18s ease;
  position: relative;
  min-height: 170px;
}
.doc-card:hover { border-color: var(--bleu); background: var(--bleu-soft); }
.doc-card.uploaded {
  border-style: solid;
  border-color: var(--vert);
  background: var(--vert-soft);
}
.doc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.doc-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brume-light);
  color: var(--ardoise);
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-card.uploaded .doc-card-icon { background: var(--vert); color: white; }
.doc-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--brume-light);
  color: var(--ardoise);
  font-family: var(--font-display);
}
.doc-card-badge.required { background: var(--magenta-soft); color: var(--magenta-dark); }
.doc-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--noir);
  line-height: 1.3;
}
.doc-card-formats {
  font-size: 11.5px;
  color: var(--ardoise);
  margin-top: -4px;
}
.doc-card-action {
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--noir);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.doc-card-action:hover { background: #1c1c25; }
.doc-card.uploaded .doc-card-action {
  background: white;
  color: var(--vert);
  border: 1px solid var(--vert);
}

/* ---------- Footer nav ---------- */
.dossier-footer {
  position: fixed;
  bottom: 0;
  left: 280px;
  right: 360px;
  padding: 14px 32px;
  background: rgba(250,250,252,.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--brume);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
}
@media (max-width: 1240px) {
  .dossier-footer { left: 240px; right: 320px; }
}
@media (max-width: 1080px) {
  .dossier-footer { left: 0; right: 0; }
}
.dossier-footer-back {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ardoise);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
}
.dossier-footer-back:hover { color: var(--noir); }
.dossier-footer-back:disabled { opacity: 0; pointer-events: none; }
.dossier-footer-meta {
  font-size: 12px;
  color: var(--ardoise);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dossier-footer-meta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--vert);
}

/* ---------- Dashboard (right) ---------- */
.dossier-dashboard {
  padding: 32px 32px 32px 16px;
  position: sticky;
  top: 60px;
  align-self: start;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.dossier-mobile-summary { display: none; }

.dash-card {
  background: white;
  border: 1px solid var(--brume);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.dash-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ardoise);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--brume-light);
}
.dash-stat:last-child { border-bottom: none; padding-bottom: 0; }
.dash-stat:first-child { padding-top: 0; }
.dash-stat-label {
  font-size: 12.5px;
  color: var(--ardoise);
  font-family: var(--font-display);
  font-weight: 500;
}
.dash-stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--noir);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  transition: color .3s ease;
}
.dash-stat-value.empty { color: var(--brume); font-weight: 600; }
.dash-stat-value.flash {
  animation: flash 0.6s ease;
}
@keyframes flash {
  0% { color: var(--magenta); transform: scale(1.05); }
  100% { color: var(--noir); transform: scale(1); }
}

.dash-debt-bar {
  margin-top: 14px;
}
.dash-debt-bar-track {
  height: 8px;
  background: var(--brume-light);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.dash-debt-bar-fill {
  height: 100%;
  background: var(--vert);
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2,.8,.2,1), background .3s ease;
}
.dash-debt-bar-fill.warn { background: var(--ambre); }
.dash-debt-bar-fill.danger { background: var(--rouge); }
.dash-debt-bar-mark {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--noir);
  border-radius: 1px;
}
.dash-debt-bar-mark::after {
  content: "33%";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--noir);
  font-family: var(--font-display);
}

.dash-doc-progress {
  display: flex;
  gap: 4px;
  margin-top: 12px;
}
.dash-doc-pip {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--brume);
  transition: background .3s ease;
}
.dash-doc-pip.filled { background: var(--vert); }

.dash-encouragement {
  padding: 14px;
  background: linear-gradient(135deg, var(--noir), #1a1a26);
  color: white;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}
.dash-encouragement::after {
  content: "";
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(215,42,110,.4), transparent 70%);
}
.dash-encouragement b { color: #FF8AB4; }

/* ---------- Recap (step 9) ---------- */
.recap-hero {
  padding: 32px;
  background: linear-gradient(135deg, var(--noir), #1a1a26);
  color: white;
  border-radius: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.recap-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(215,42,110,.3), transparent 70%);
}
.recap-hero h3 {
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.recap-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  z-index: 2;
}
.recap-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-bottom: 4px;
}
.recap-stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.recap-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  font-family: var(--font-display);
}
.recap-stat-badge.ok { background: rgba(31,166,122,.25); color: #67E5B4; }
.recap-stat-badge.warn { background: rgba(232,163,60,.25); color: #FFCB80; }
.recap-stat-badge.danger { background: rgba(209,72,72,.25); color: #FFA0A0; }

.recap-section {
  background: white;
  border: 1px solid var(--brume);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 12px;
}
.recap-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.recap-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--noir);
  display: flex;
  align-items: center;
  gap: 10px;
}
.recap-section-edit {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--bleu-dark);
  background: none;
  border: none;
  cursor: pointer;
}
.recap-section-edit:hover { text-decoration: underline; }
.recap-section-body {
  font-size: 14.5px;
  color: var(--ardoise);
  line-height: 1.55;
}
.recap-section-body b { color: var(--noir); font-weight: 600; }
.recap-section-body .empty { font-style: italic; opacity: .6; }

.recap-engagement {
  background: white;
  border: 1px solid var(--brume);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}
.recap-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--noir);
}
.recap-checkbox input { margin-top: 2px; accent-color: var(--magenta); width: 18px; height: 18px; }
.recap-cta-final {
  width: 100%;
  margin-top: 18px;
  padding: 18px 24px;
  background: var(--magenta);
  color: white;
  border-radius: 14px;
  border: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(215,42,110,.3);
  transition: all .2s ease;
}
.recap-cta-final:hover { background: var(--magenta-dark); transform: translateY(-1px); }
.recap-cta-final:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.recap-cta-meta {
  text-align: center;
  font-size: 12.5px;
  color: var(--ardoise);
  margin-top: 12px;
}

/* Confirmation overlay */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,20,.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}
.success-card {
  background: white;
  border-radius: 24px;
  padding: 56px 48px;
  max-width: 520px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.success-card::before {
  content: "";
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(215,42,110,.15), transparent 70%);
}
.success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--vert);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
  z-index: 2;
  animation: pop .5s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
.success-card h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 32px; }
.success-card p { color: var(--ardoise); font-size: 16px; line-height: 1.55; }

/* ---------- Card transitions ---------- */
.qcard-enter {
  animation: slideIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.qcard-celebrate {
  animation: celebrate .5s ease;
}
@keyframes celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}

/* Welcome screen */
.welcome-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 24px;
}
.welcome-card {
  max-width: 720px;
  background: white;
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--brume);
}
@media (max-width: 720px) {
  .welcome-card { padding: 40px 28px; }
}
.welcome-card .eyebrow { margin-bottom: 18px; }
.welcome-card h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--noir);
  margin-bottom: 18px;
}
.welcome-card h1 em {
  font-style: normal;
  color: var(--magenta);
  position: relative;
}
.welcome-card h1 em::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: 4px;
  height: 14px;
  background: var(--magenta-soft);
  border-radius: 4px;
  z-index: -1;
}
.welcome-card p {
  color: var(--ardoise);
  font-size: 17px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 32px;
}
.welcome-bullets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
  text-align: left;
}
@media (max-width: 720px) { .welcome-bullets { grid-template-columns: 1fr; } }
.welcome-bullet {
  padding: 18px;
  background: var(--brume-light);
  border-radius: 12px;
}
.welcome-bullet-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--magenta);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.welcome-bullet h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--noir);
  margin: 0 0 4px;
}
.welcome-bullet p {
  font-size: 13px;
  color: var(--ardoise);
  margin: 0;
  line-height: 1.5;
  max-width: 100%;
  text-align: left;
}

/* --- Subtle modern touches on welcome screen --- */
.welcome-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 80% -10%, rgba(215,42,110,0.07), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(74,127,214,0.06), transparent 60%),
    linear-gradient(180deg, #FAFAFC 0%, #F1F3F8 100%);
}
.welcome-card {
  animation: welcomeRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.welcome-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 60px -20px rgba(15,15,20,0.18), 0 8px 24px rgba(15,15,20,0.06);
}
@keyframes welcomeRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.welcome-card .eyebrow {
  animation: welcomeFade 0.6s 0.05s both;
}
.welcome-card h1 {
  animation: welcomeFade 0.6s 0.12s both;
}
.welcome-card h1 em::after {
  animation: welcomeUnderline 0.7s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}
@keyframes welcomeUnderline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.welcome-card > p {
  animation: welcomeFade 0.6s 0.18s both;
}
.welcome-bullets {
  animation: welcomeFade 0.6s 0.25s both;
}
.welcome-bullet {
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.welcome-bullet:hover {
  transform: translateY(-2px);
  background: white;
  box-shadow: 0 8px 20px -10px rgba(15,15,20,0.12);
}
.welcome-bullet-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.welcome-bullet-num::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1.5px;
  background: var(--magenta);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.welcome-bullet:hover .welcome-bullet-num::before {
  width: 22px;
}
@keyframes welcomeFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.welcome-card .btn-primary {
  animation: welcomeFade 0.6s 0.32s both;
  position: relative;
  overflow: hidden;
}
.welcome-card .btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  animation: welcomeShine 3.6s ease-in-out 1.2s infinite;
}
@keyframes welcomeShine {
  0%, 60% { left: -120%; }
  80%, 100% { left: 140%; }
}
