/* ===========================
   A4 PRINT (Web → PDF)
   =========================== */
@media print {

  /* 1) Force A4 + sane margins */
  @page {
    size: A4;
    margin: 12mm;
  }

  html, body {
    background: #fff !important;
    height: auto !important;
  }

  /* 2) Remove site chrome + interactive UI */
  #global-header-container,
  #footer-container,
  .back-to-top,
  #role-detail-drawer,
  .role-drawer,
  .role-drawer-backdrop,
  .role-drawer-panel,
  .resume-view-toggle,
  .resume-download-btn,
  .section-tab {
    display: none !important;
  }

  /* 3) Neutralize layout offsets that break print flow */
  .main {
    position: static !important;
    top: 0 !important;
  }

  /* Your resume lives inside .pageResume (.pageResume resume-compact/full) */
  .page,
  .pageResume {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
  }

  /* If you want a little internal whitespace on the printed resume card */
  .pageResume {
    padding: 8mm 10mm !important;
  }

  /* 4) Keep your two-column top section stable in print */
  .resume-two-col {
    grid-template-columns: 1fr 1.2fr !important;
    gap: 8mm !important;
  }

  /* 5) Make page breaks predictable (avoid “cut off” blocks) */
  h2, h3 {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .resume-role,
  .resume-col,
  section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Let long sections break normally, but avoid breaking right after headings */
  .resume-timeline {
    break-inside: auto;
    page-break-inside: auto;
  }

  /* 6) Print-friendly colors and backgrounds (Chrome needs this) */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 7) Links: optionally show URLs in print */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
}


@media print {
  /* Hide site header/footer (EN + FR) */
  #global-header-container,
  #global-header-container-fr,
  #footer-container,
  #footer-container-fr {
    display: none !important;
  }
}

