/* ==========================================================================
   MUSOCI — Feuille de style d'impression
   --------------------------------------------------------------------------
   Objectif : produire un document sobre et lisible sur papier ou en PDF
   (« Enregistrer au format PDF » du navigateur), sans navigation, sans
   fioritures d'écran, et sans gaspiller d'encre.
   ========================================================================== */

@media print {

  /* ---------- Mise en page ---------- */
  @page {
    size: A4;
    margin: 16mm 14mm 18mm;
  }

  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  /* Les navigateurs suppriment les aplats de couleur à l'impression pour
     économiser l'encre. On lève cette optimisation sur le document, sinon
     l'en-tête et les pastilles perdraient tout leur sens. */
  .print-doc, .print-doc * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ---------- Éléments qui n'ont pas leur place sur papier ---------- */
  .topbar,
  .header,
  .footer,
  .footer-bottom,
  .back-to-top,
  .scroll-progress,
  .mloader,
  .chatbot-btn,
  .chatbot-panel,
  .mck-banner,
  .mck-overlay,
  .cta-banner,
  .breadcrumb,
  .newsletter-form,
  .directory-filters,
  .filter-pills,
  .directory-actions,
  .directory-count,
  .directory-empty,
  .directory-grid,
  .page-hero,
  .photo-slot,
  [data-no-print] {
    display: none !important;
  }

  /* ---------- Neutralisation des animations d'apparition ---------- */
  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  main,
  .section,
  .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: auto !important;
  }

  /* ---------- Typographie ---------- */
  h1, h2, h3, h4 {
    color: #0C3B66 !important;
    page-break-after: avoid;
    break-after: avoid;
  }
  h1 { font-size: 19pt; margin: 0 0 4pt; }
  h2 { font-size: 14pt; margin: 14pt 0 5pt; }
  h3 { font-size: 11.5pt; margin: 8pt 0 3pt; }
  p  { orphans: 3; widows: 3; }

  a { color: #111 !important; text-decoration: none !important; }

  /* Dans le corps d'un article, un lien externe sans son adresse ne sert
     à rien sur papier : on l'explicite. Ailleurs (annuaire, navigation),
     les URL techniques n'apporteraient que du bruit. */
  .article-body a[href^="http"]:not([href*="musoci.ci"])::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: #5A6C80;
    word-break: break-all;
  }

  img { max-width: 100% !important; page-break-inside: avoid; }

  /* ---------- En-tête de document, visible uniquement à l'impression ---- */
  .print-doc { display: block !important; }

  .print-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12mm;
    background: #0C3B66;
    border-bottom: 2.5pt solid #F2921D;
    padding: 5mm 6mm;
    margin: 0 0 7mm;
    border-radius: 1.5mm 1.5mm 0 0;
  }
  .print-head__logo {
    width: 44mm;
    height: auto;
    background: #fff;
    padding: 1.6mm 2.4mm;
    border-radius: 1mm;
  }
  .print-head__meta {
    text-align: right;
    font-size: 8.5pt;
    color: #C4DBF4;
    line-height: 1.55;
  }
  .print-head__meta strong { color: #fff; font-size: 9.5pt; }

  .print-title {
    font-size: 18pt;
    font-weight: 800;
    color: #0C3B66;
    margin: 0 0 2mm;
  }
  .print-sub {
    font-size: 9.5pt;
    color: #5A6C80;
    margin: 0 0 7mm;
    padding-left: 3mm;
    border-left: 1.4pt solid #F2921D;
  }

  /* ---------- Tableau du réseau ---------- */
  .print-city {
    font-size: 12pt;
    font-weight: 700;
    color: #0C3B66;
    margin: 7mm 0 2mm;
    padding: 0 0 1.4mm 3.4mm;
    border-left: 2.6pt solid #F2921D;
    border-bottom: 0.9pt solid #C9D6E3;
    page-break-after: avoid;
    break-after: avoid;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5pt;
  }
  .print-table thead th {
    background: #E9F1FA !important;
    color: #0C3B66 !important;
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: left;
    padding: 2mm 2.4mm;
    border-bottom: 0.8pt solid #C9D6E3;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-table tbody td {
    padding: 2mm 2.4mm;
    border-bottom: 0.4pt solid #E7E3D8;
    vertical-align: top;
  }
  .print-table tbody tr { page-break-inside: avoid; break-inside: avoid; }
  .print-table tbody tr:nth-child(even) td { background: #F7F9FB !important; }
  .print-table thead { display: table-header-group; }

  .print-table .c-nom { font-weight: 600; color: #0C3B66; }
  .print-table .c-spe { color: #5A6C80; font-size: 8.5pt; }
  .print-table .c-tel { white-space: nowrap; }

  .print-badge {
    display: inline-block;
    font-size: 7.5pt;
    font-weight: 700;
    padding: 0.7mm 1.8mm;
    border: 0.5pt solid #C9D6E3;
    border-radius: 1mm;
    color: #0C3B66;
  }

  /* ---------- Pied de document ---------- */
  .print-foot {
    margin-top: 9mm;
    padding: 3.4mm 4mm;
    background: #F7F9FB !important;
    border-left: 2.6pt solid #0C3B66;
    font-size: 8pt;
    color: #5A6C80;
    line-height: 1.55;
  }
  .print-foot strong { color: #0C3B66; }
}

/* Le masquage à l'écran est défini dans enhancements.css : cette feuille-ci
   est chargée en media="print" et n'a aucun effet en contexte écran. */
