.bilan-finma {
  margin: 0.75rem 0 1.5rem;
  max-width: 42rem;
  color: var(--gray-600);
  font-size: 0.92rem;
}

#lab {
  scroll-margin-top: var(--hero-clearance);
}

.bilan-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  scroll-margin-top: calc(var(--hero-clearance) + 0.5rem);
}

.bilan-steps li {
  list-style: none;
  display: flex;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.bilan-steps li::marker {
  content: none;
}

.bilan-steps button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid rgba(26, 111, 212, 0.35);
  background: #f7fbff;
  color: var(--blue-900);
  border-radius: 999px;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bilan-steps button:hover {
  border-color: #1a6fd4;
  background: #fff;
}

.bilan-step-num {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #e8f1fb;
  color: #1454a0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.bilan-steps button[aria-current="step"] {
  background: var(--blue-900);
  color: var(--white);
  border-color: var(--blue-900);
}

.bilan-steps button[aria-current="step"] .bilan-step-num {
  background: #d6e6f8;
  color: var(--blue-900);
}

.bilan-progress {
  height: 7px;
  margin: 0.15rem 0 0.45rem;
  border-radius: 999px;
  background: rgba(10, 37, 64, 0.08);
  overflow: hidden;
}

.bilan-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8ebcf0, #1a6fd4);
  transition: width 0.25s ease;
}

.bilan-progress-label {
  margin: 0 0 0.35rem;
  color: #1454a0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bilan-status {
  min-height: 1.25rem;
  margin: 0 0 1rem;
  color: #1454a0;
  font-size: 0.88rem;
}

.bilan h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.bilan h2::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #1a6fd4;
  box-shadow: 0 0 0 5px rgba(26, 111, 212, 0.2);
}

.bilan h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.05rem;
  color: #0a2540;
}

.bilan-question {
  margin: 0 0 1.35rem;
  max-width: 38rem;
  color: #0a2540;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.45;
}

.bilan-pair,
.bilan-stack,
.bilan-grid {
  display: grid;
  gap: 1rem;
}

.bilan-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.bilan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  width: 100%;
}

.bilan-card {
  display: block;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(26, 111, 212, 0.28);
  border-radius: 18px;
  padding: 1.05rem 1.05rem 0.35rem;
  background: #f7fbff;
  margin: 0 0 1rem;
  box-shadow: 0 10px 28px rgba(13, 58, 110, 0.08);
}

.bilan-card legend,
.choice-field legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.bilan-card > legend {
  display: table;
  margin: 0 0 0.85rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: #e8f1fb;
  color: #1454a0;
  font-size: 0.82rem;
}

.bilan label,
.bilan-period {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #3d4d62;
}

.bilan input,
.bilan textarea,
.bilan select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(26, 111, 212, 0.35);
  border-radius: 12px;
  font: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--blue-900);
  background: #fff;
}

.bilan textarea {
  resize: vertical;
}

.bilan input:focus,
.bilan textarea:focus,
.bilan select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.22);
  background: #fff;
}

.span-2 {
  grid-column: 1 / -1;
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.choice label {
  flex-direction: row;
  align-items: center;
  margin: 0;
  font-weight: 500;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  max-width: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-block;
  border: 1px solid rgba(26, 111, 212, 0.4);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: #f7fbff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.choice label:hover span {
  border-color: #1a6fd4;
  background: #fff;
}

.choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.28);
}

.choice input:checked + span {
  background: var(--blue-900);
  color: var(--white);
  border-color: #d6e6f8;
}

.choice-field {
  border: 0;
  margin: 0;
  padding: 0;
}

.bilan-total {
  margin: 0.25rem 0 1.25rem;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  border-left: 4px solid #1a6fd4;
  background: linear-gradient(90deg, #e8f1fb, #f7fbff);
  font-weight: 600;
  color: var(--blue-900);
}

.bilan-hint,
.bilan-legal p {
  color: var(--gray-600);
  font-size: 0.92rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.bilan-accept {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1rem 0;
}

.bilan-accept input {
  width: auto;
  margin-top: 0.2rem;
}

.bilan-sign canvas {
  width: 100%;
  max-width: 640px;
  height: 160px;
  border: 1px dashed rgba(26, 111, 212, 0.45);
  border-radius: 16px;
  background: #f7fbff;
  touch-action: none;
}

.bilan-sign button,
.bilan-actions button {
  font: inherit;
  cursor: pointer;
}

.bilan-sign button,
#bilan-prev,
#bilan-clear {
  margin-top: 0.6rem;
  border: 1px solid rgba(26, 111, 212, 0.4);
  background: #f7fbff;
  color: var(--blue-900);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
}

.bilan-actions .btn-primary {
  border-radius: 999px;
  background: linear-gradient(180deg, #1c4f86, #0a2540);
  box-shadow: 0 8px 18px rgba(10, 37, 64, 0.16);
}

.bilan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  margin: 0.5rem 0 2rem;
}

.bilan-summary {
  margin-top: 1.5rem;
}

.bilan-summary dl {
  display: grid;
  grid-template-columns: minmax(8rem, 16rem) 1fr;
  gap: 0.35rem 1rem;
}

.bilan-summary dt {
  color: var(--gray-600);
}

.bilan-summary h3 {
  margin-top: 1.25rem;
}

@media (max-width: 800px) {
  .bilan-pair,
  .bilan-grid,
  .bilan-summary dl {
    grid-template-columns: 1fr;
  }
}

@media print {
  .header,
  .footer,
  .lab-banner,
  .bilan-steps,
  .bilan-progress,
  .bilan-progress-label,
  .bilan-actions,
  .bilan-sign button {
    display: none !important;
  }

  .lab-canvas,
  .bilan-card,
  .bilan-total {
    background: #fff !important;
    box-shadow: none !important;
  }

  .page-lab main {
    padding-top: 0;
  }

  .bilan-step {
    display: block !important;
    break-inside: avoid;
  }
}
