/* ==========================================================================
   jakepellerin.fr — simulateurs : bouton d'export et mise en page PDF
   ========================================================================== */

/* Bouton */
.sim-pdfbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 4px; }
.sim-pdf { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; color: var(--navy); background: #fff; border: 1.5px solid var(--navy); border-radius: 8px; padding: 9px 16px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.sim-pdf:hover { background: var(--navy); color: #fff; }
.sim-hint--tip { color: var(--navy); background: #FFF8E6; border-left: 3px solid #D4A650; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; }

/* Sous-bloc fiscalité de l'avance */
.sim-sub { display: grid; gap: 12px; padding: 14px; border: 1px dashed var(--line-3); border-radius: 10px; background: #FAFBFC; }
.sim-sub[hidden] { display: none; }
.sim-sub__t { font-size: 13px; font-weight: 600; color: var(--navy); text-transform: uppercase; letter-spacing: .06em; }

/* Gabarit d'impression : invisible à l'écran */
#sim-print { display: none; }

@media print {
  @page {
    size: A4; margin: 14mm 14mm 18mm;
    @bottom-left { content: "Jake PELLERIN · Simulation indicative · www.jakepellerin.fr"; font-family: 'Source Sans 3', Helvetica, Arial, sans-serif; font-size: 8pt; color: #8A90A0; }
    @bottom-right { content: "Page " counter(page) " / " counter(pages); font-family: 'Source Sans 3', Helvetica, Arial, sans-serif; font-size: 8pt; color: #8A90A0; }
  }
  body.is-printing { background: #fff !important; }
  body.is-printing > *:not(#sim-print) { display: none !important; }
  body.is-printing #sim-print { display: block; color: #1F2433; font-family: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 10.5pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #sim-print .sp-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid #2BB3B0; margin-bottom: 16px; }
  #sim-print .sp-head img { width: 44px; height: auto; }
  #sim-print .sp-id { flex: 1; }
  #sim-print .sp-name { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 15pt; color: #1E2761; }
  #sim-print .sp-role { margin: 0; font-size: 9pt; color: #5B6272; }
  #sim-print .sp-contact { margin: 0; font-size: 8.5pt; color: #5B6272; text-align: right; line-height: 1.5; }
  #sim-print .sp-eyebrow { margin: 0; font-size: 8.5pt; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: #2BB3B0; }
  #sim-print h1 { margin: 2px 0 2px; font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 21pt; color: #1E2761; }
  #sim-print .sp-date { margin: 0 0 14px; font-size: 9pt; color: #8A90A0; }
  #sim-print h2 { margin: 0 0 6px; font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 13pt; color: #1E2761; }
  #sim-print .sp-cols { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; margin-bottom: 14px; }
  #sim-print .sp-t { width: 100%; border-collapse: collapse; font-size: 9.5pt; font-variant-numeric: tabular-nums; }
  #sim-print .sp-t th, #sim-print .sp-t td { padding: 4px 7px; border-bottom: 1px solid #E3E6EC; text-align: left; vertical-align: top; }
  #sim-print .sp-t td { text-align: right; font-weight: 600; color: #1E2761; white-space: nowrap; }
  #sim-print .sp-t th { font-weight: 400; color: #3C4356; }
  #sim-print .sp-cols > div:first-child .sp-t td { white-space: normal; width: 45%; }
  #sim-print .sp-res tr.is-main th, #sim-print .sp-res tr.is-main td { background: #1E2761; color: #fff; font-weight: 600; }
  #sim-print .sp-tip { margin: 8px 0 0; font-size: 9pt; color: #1E2761; background: #FFF8E6; border-left: 3px solid #D4A650; padding: 6px 8px; }
  #sim-print .sp-det { margin-bottom: 12px; font-size: 8.5pt; }
  #sim-print .sp-det thead th { background: #F3F5F8; font-weight: 600; color: #5B6272; text-align: right; }
  #sim-print .sp-det thead th:first-child, #sim-print .sp-det td:first-child { text-align: left; }
  #sim-print .sp-det td { font-weight: 400; color: #1F2433; }
  #sim-print .sp-det tr { break-inside: avoid; }
  #sim-print .sp-note { margin: 8px 0 0; font-size: 8.5pt; color: #5B6272; text-align: justify; }
  #sim-print .sp-note a { color: #1E2761; font-weight: 600; }
  #sim-print .sp-foot { margin: 14px 0 0; padding-top: 8px; border-top: 1px solid #E3E6EC; font-size: 7.5pt; color: #8A90A0; text-align: justify; }
}
