/* Feuille de style d'impression : économise encre et papier */
@media print {
  @page { margin: 1.5cm; }
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.4;
  }
  *, *::before, *::after {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: #000 !important;
  }
  nav, header, footer, button, form, iframe, video, audio,
  [role="navigation"], [aria-hidden="true"], .no-print {
    display: none !important;
  }
  img, svg { max-width: 40% !important; page-break-inside: avoid; filter: grayscale(100%); }
  h1, h2, h3 { page-break-after: avoid; }
  p, li, blockquote { orphans: 3; widows: 3; }
  a { text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 90%; }
  a[href^="#"]::after, a[href^="mailto:"]::after { content: ""; }

  /* Éléments interactifs ou décoratifs inutiles sur papier */
  canvas, object, embed, dialog, [role="dialog"], [role="alert"],
  [aria-live], .sr-only, .skip-link, picture source {
    display: none !important;
  }
  /* Mise en page linéaire : pas de positionnement ni de largeur fixe */
  *, *::before, *::after {
    position: static !important;
    float: none !important;
    animation: none !important;
    transition: none !important;
  }
  main, article, section, div {
    width: auto !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Tableaux et blocs de code lisibles sans coupure */
  table { border-collapse: collapse; width: 100% !important; }
  tr, td, th, pre, blockquote, figure { page-break-inside: avoid; }
  th, td { border: 1px solid #000 !important; padding: 2pt 4pt; }
  pre, code { white-space: pre-wrap; word-wrap: break-word; }
}
