/*
 * Print: the page's own content, black on white, without the site's chrome. A separate sheet, not built by Vite
 * (layouts/layout: media="print"), so plain CSS: no --space(), custom media or tokens.
 */

@page {
  margin: 14mm 16mm;
}

/* Black on white, whatever the scheme: the jeunes pages print their light text on paper otherwise. The scheme
 * tokens are set again (this sheet is unlayered, it beats the schemes' @layer base) with the clay values. */
html,
body,
[data-scheme] {
  --color-fg: #000;
  --color-fg-muted: #555;
  --color-border: rgb(0 0 0 / 0.15);
  --color-border-strong: rgb(0 0 0 / 0.3);
  --color-card-border: rgb(0 0 0 / 0.2);
  --color-accent: #f25622;
  --color-accent-tint: rgb(242 86 34 / 0.12);
  --color-highlight: #157a7e;
  --color-highlight-tint: rgb(21 122 126 / 0.09);
  --color-figure-1: #f25622;
  --color-figure-2: #157a7e;
  --color-figure-3: #302f6a;

  background: #fff !important;
  color: #000 !important;
}

/* The chrome: the skip link, the header and its menu, the overlays, the debug labels, the rail lines */
.layout__skip,
.layout__debug,
#site-header,
#main-nav,
.c-search,
.c-map,
.c-scroll-top,
body::before,
/* Navigation and actions that do nothing on paper */
.c-breadcrumb,
.c-share,
.filters,
.c-slider__actions,
.c-testimonies__controls,
.btn,
button,
/* Embedded players print as an empty box */
.block-type-video,
iframe,
/* What follows the page's own content: the article's side column (contents, "À lire aussi"), its ressources,
 * the siblings slider, the questionnaire band (the prefooter) and the footer */
.article__aside,
.c-ressources,
.article__siblings,
#content > :not(.layout__content),
.footer {
  display: none !important;
}

/* The header is fixed on screen: no room to keep for it */
.layout__content {
  padding-top: 0 !important;
}

/* An article: one column, the full width of the page */
.article__layout {
  display: block !important;
}

/* Links in the text keep their address */
.blocks a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 0.85em;
  word-break: break-all;
}

/* Headings stay with their text, figures in one piece */
h1,
h2,
h3,
h4 {
  break-after: avoid;
}

img,
figure,
blockquote {
  break-inside: avoid;
}

img {
  max-width: 100% !important;
}
