/*
 * Immo by Femik — Print stylesheet
 * Activated via @media print (enqueued with media="print")
 */

@media print {

  /* --- Reset --- */
  * { box-shadow: none !important; text-shadow: none !important; }

  /* --- Hide non-essential elements --- */
  nav, header .site-navigation, footer, .site-footer,
  .imf-card__cta, .imf-filtres, .imf-pagination,
  .imf-partage, .imf-lightbox, .imf-dpe-detail__toggle,
  .imf-contact-bloc__actions, .widget-area, aside,
  .admin-bar { display: none !important; }

  /* --- Page setup --- */
  body { font-family: Georgia, serif; font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }

  /* --- Logo agence (print header) --- */
  .imf-print-header { display: flex !important; align-items: center; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 2pt solid #000; padding-bottom: .75rem; }
  .imf-print-header__logo img { max-height: 50px; }

  /* --- Title & Price --- */
  .imf-single__title { font-size: 18pt; }
  .imf-single__price { font-size: 14pt; font-weight: bold; }

  /* --- Gallery: main + 3 first images --- */
  .imf-galerie__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4pt; }
  .imf-galerie__item:nth-child(n+5) { display: none; }
  .imf-galerie__item:first-child { grid-column: 1 / -1; }

  /* --- Characteristics table --- */
  .imf-carac__table th,
  .imf-carac__table td { border: 1pt solid #ccc; padding: 3pt 6pt; }

  /* --- DPE/GES pastilles (large in print) --- */
  .imf-dpe-compact { border: 1pt solid #ccc; padding: 8pt; }
  .imf-pastille { min-width: 36px; min-height: 36px; width: 36px; height: 36px; font-size: 13pt; }

  /* --- Legal mentions: always visible --- */
  .imf-dpe-detail__body { display: block !important; }
  .imf-single__legal { border-top: 1pt solid #ccc; padding-top: 6pt; margin-top: 1rem; }

  /* --- Contact bloc (simplified) --- */
  .imf-contact-bloc { position: static; border: 1pt solid #ccc; padding: 8pt; }

  /* --- Footer: URL in print --- */
  @page { margin: 1.5cm; }
  .imf-print-footer {
    display: block !important;
    position: fixed; bottom: 0; left: 0; right: 0;
    text-align: center; font-size: 8pt; color: #555;
    border-top: 1pt solid #ccc; padding-top: 4pt;
  }
  .imf-print-footer::after { content: attr(data-url); }

  /* --- Single column layout --- */
  .imf-single__body { display: block; }
  .imf-single__aside { display: block; margin-top: 1rem; }

}
