/* L'impression : on imprime ce qui est affiché, sans les boutons ni le fond. */

/* ═══════════════════════ IMPRESSION ═══════════════════════
   On imprime CE QUI EST AFFICHÉ : la catégorie choisie est déjà la seule
   visible (.hors est en display:none), donc « imprimer la catégorie » ne
   demande aucune sélection séparée — juste de ne pas gâcher le papier avec
   les boutons.
   Les couleurs sont forcées en noir sur blanc : une imprimante n'a pas de
   thème sombre, et le fond #0e1420 vide une cartouche par module.
   L'impression d'une forme vit dans son module de blocks/. */
@media print{
  html,body{background:#fff!important;color:#000!important}
  #sidebar,#burger,#expand,#toTop,#toast,.toolbar,.crumbs,
  .copy,.notebtn,.code-h .done,.code-h .num{display:none!important}
  #layout{display:block}
  #content{max-width:100%;padding:0;margin:0}
  a{color:#000!important;text-decoration:none}
  /* L'URL des liens externes, sinon un lien imprimé ne mène nulle part. */
  #content a[href^="http"]::after{content:" (" attr(href) ")";font-size:.82em;color:#555}
  .module{break-before:page;page-break-before:always}
  .module:first-of-type{break-before:auto;page-break-before:auto}
  h2.mod,h3,h4,h5{break-after:avoid;page-break-after:avoid;color:#000!important}
  .code,.tw,figure{break-inside:avoid;page-break-inside:avoid}
  .code{border:1px solid #999!important;background:#fff!important}
  pre,code,kbd{background:#f4f4f4!important;color:#000!important;border-color:#bbb!important}
  .tag{border-color:#666!important;color:#000!important;background:#eee!important}
  .note-zone{display:block!important}
  .note-zone textarea{border:1px solid #bbb!important;background:#fff!important;color:#000!important}
  details{display:block}
  details>*{display:revert}
  .mod-bar,#globalbar{border:1px solid #999!important}
}
