/* ═══════════════════════════════════════════════════════════════════════════
   Zoomer.Immo — feuille d'impression
   Le PDF est le seul objet que le client emporte : il doit être un document,
   pas une photocopie de la page web. Pas de navigation, pas de tarifs, pas
   de bandeau commercial. Un en-tête qui identifie l'étude, les chiffres, et
   c'est tout. Lisible en noir et blanc, deux pages maximum.
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {

  @page {
    margin: 10mm 11mm;
    size: A4;
  }

  /* ── ce qui ne s'imprime jamais ── */
  nav,
  .hero,
  .pricing,
  .marchand,
  .steps,
  #zi-modale,
  #zi-bandeau-compte,
  .zi-beta,
  .mur-voile,
  .qe-offer,
  .qe-hyp,
  #zi-generer,
  #zi-compteur,
  #zi-compte-zone,
  .zi-lien-nav,
  .trust,
  .legal,
  .disclaimer,
  .skip,
  button:not(#btnPdf),
  .hero-note {
    display: none !important;
  }

  /* ── le document ── */
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 9pt;
    line-height: 1.32;
  }

  /* Regle de base : sur papier, tout est noir sur blanc. Les aplats sombres
     de l'ecran ne doivent jamais devenir des rectangles d'encre. */
  * , *::before, *::after {
    color: #000 !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-text-fill-color: #000 !important;
    border-color: #333 !important;
  }
  body, .calc-section, .panel, .kpi-hero, .kpi {
    background-color: #fff !important;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* le détail verrouillé à l'écran s'imprime en entier : c'est le livrable */
  [data-mur].est-verrouille > *:not(.mur-voile) {
    filter: none !important;
    pointer-events: auto !important;
  }

  /* ── en-tête du document ── */
  .print-header {
    display: block !important;
    border-bottom: 2px solid #000;
    padding-bottom: 8mm;
    margin-bottom: 7mm;
  }
  .print-header .ph-marque {
    font-size: 15pt;
    font-weight: 800;
    letter-spacing: -0.4pt;
    color: #000;
  }
  .print-header .ph-marque span {
    font-weight: 400;
    color: #555;
  }
  .print-header .ph-meta {
    margin-top: 3mm;
    font-size: 8.5pt;
    color: #333;
    line-height: 1.6;
  }
  .print-header .ph-meta b { color: #000; }

  /* ── mise en page du calculateur ── */
  .calc-section {
    padding: 0 !important;
    background: #fff !important;
  }
  .calc-grid {
    display: block !important;
  }
  .form-panel {
    display: none !important;   /* les champs de saisie n'ont pas leur place sur un PDF */
  }
  .results,
  #results {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    display: block !important;
  }

  /* les cartes de résultat : bordures franches, pas d'aplat sombre */
  .kpi-hero,
  .panel,
  .kpi,
  .card {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
    padding: 3mm !important;
    margin: 0 0 2.5mm !important;
  }
  /* les six indicateurs tiennent sur une ligne de trois : le document reste court */
  .kpi-grid, .kpis, .kpi-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2.5mm !important;
  }
  .kpi-amount, .kpi .num { font-size: 13pt !important; }
  .kpi-hero .kpi-amount, .kpi-hero .num { font-size: 20pt !important; letter-spacing: -0.6pt !important; }
  .kpi-hero { padding: 2.5mm !important; }
  .k-label { font-size: 7pt !important; }
  h2 { font-size: 11.5pt !important; margin: 4mm 0 2mm !important; }
  h3 { font-size: 9.5pt !important; margin: 3mm 0 1.5mm !important; }
  .print-header { padding-bottom: 3mm !important; margin-bottom: 4mm !important; }
  .print-footer { margin-top: 3mm !important; padding-top: 2mm !important; font-size: 6.5pt !important; }
  .kpi-hero *,
  .panel * {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    background-image: none !important;
  }
  .kpi-amount, .num, .k-value, .kpi-amount span {
    color: #000 !important;
    font-weight: 800 !important;
  }
  .k-label, .k-note, .kpi-year, .hint, .tag {
    color: #444 !important;
    font-size: 8pt !important;
  }

  /* seuls les graphiques decoratifs disparaissent ; .bars est la decomposition
     elle-meme (des lignes de texte) et doit rester. */
  .spark, .gauge, svg, .pc-chart, .chart, .tags {
    display: none !important;
  }
  .bars, .bar-row {
    display: block !important;
  }
  .bar-row {
    display: flex !important;
    justify-content: space-between !important;
    border-bottom: 1px dotted #999 !important;
    padding: 1.4mm 0 !important;
    font-size: 9.5pt !important;
  }

  h1, h2, h3, h4 {
    color: #000 !important;
    page-break-after: avoid;
  }
  h2 { font-size: 14pt !important; margin: 6mm 0 3mm !important; }
  h3 { font-size: 11pt !important; margin: 5mm 0 2mm !important; }

  /* le pied de page du document */
  .print-footer {
    display: block !important;
    margin-top: 8mm;
    padding-top: 4mm;
    border-top: 1px solid #999;
    font-size: 7.5pt;
    color: #444;
    line-height: 1.5;
  }

  /* éviter les coupures malheureuses */
  .panel, .kpi-hero, .kpi, table, tr {
    page-break-inside: avoid;
  }

  a { color: #000 !important; text-decoration: none; }
  a[href^="http"]::after { content: ""; }
}

/* à l'écran, l'en-tête et le pied de page d'impression restent invisibles */
.print-header, .print-footer { display: none; }
