/* Print stylesheet — consolidated from style.css and blocks/*/style.css.
   Loaded with media="print" (functions.php): never render-blocking, fetched
   at low priority. Rules here override screen rules of equal specificity
   because this file is enqueued after all block styles — keep it last. */

/* ═══ source: style.css ═══ */
  /* The screen base (--fs-base: 18px ≈ 13.5pt) is oversized on paper: body copy
     balloons and section headings hit ~21pt. Every size is rem-based, so drop the
     root to 14px (~10.5pt body, ~16–18pt headings) to rescale the whole document
     to print-appropriate proportions in one lever. */
  html {
    font-size: 14px;
  }

  .yoast-breadcrumbs {
    display: none;
  }

  /* CTA / action buttons are interactive (registration, brochure, "Je m'inscris",
     hero button block, …) and have no purpose on paper. */
  .cta-button,
  .btn,
  .fs-brochure__trigger,
  .sb-brochure {
    display: none !important;
  }

  /* Complianz chrome: the fixed "Gérer le consentement" badge prints as a
     floating pill over the page content; the banner likewise. */
  .cmplz-manage-consent,
  #cmplz-cookiebanner-container {
    display: none !important;
  }

  /* Per-instance editor toggle « Masquer à l'impression » — class applied at
     render time by includes/print-visibility.php (#553). */
  .fs-print-hide {
    display: none !important;
  }

  .print-url {
    display: block;
    margin-top: 2cm;
    padding-top: 8pt;
    border-top: 0.5pt solid #d8dde3;
    font-size: 9pt;
    color: var(--color-text-muted);
    font-family: "Open Sans", sans-serif;
  }

  @page {
    margin: 1.5cm;
    @bottom-right {
      content: counter(page) " / " counter(pages);
      font-size: 9pt;
      color: var(--color-text-muted);
      font-family: "Open Sans", sans-serif;
    }
  }

/* ═══ source: blocks/benefits/style.css ═══ */
  .wp-block-formasuisse-benefits {
    gap: 5px 24px;
  }
  .wp-block-formasuisse-benefits li {
    padding: 2px 0;
    background: none;
  }

/* ═══ source: blocks/blog-author-bio/style.css ═══ */
  .fs-author-bio {
    break-inside: avoid;
  }
  .fs-author-bio__bio a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--color-text-muted);
    word-break: break-all;
  }

/* ═══ source: blocks/blog-body/style.css ═══ */
  .fs-blog-grid {
    display: block;
  }

/* ═══ source: blocks/blog-post-nav/style.css ═══ */
  .wp-block-formasuisse-blog-post-nav {
    display: none;
  }

/* ═══ source: blocks/blog-related-courses/style.css ═══ */
  .wp-block-formasuisse-blog-related-courses {
    display: none;
  }

/* ═══ source: blocks/blog-share-rail/style.css ═══ */
  .wp-block-formasuisse-blog-share-rail {
    display: none;
  }

/* ═══ source: blocks/blog-sidebar/style.css ═══ */
  .wp-block-formasuisse-blog-sidebar {
    display: none;
  }

/* ═══ source: blocks/breadcrumb/style.css ═══ */
  .fs-breadcrumb {
    display: none;
  }

/* ═══ source: blocks/course-hero/style.css ═══ */
  .hero {
    background: none;
  }
  .hero::before {
    display: none;
  }
  .hero,
  .hero * {
    color: var(--color-primary) !important;
    text-shadow: none !important;
  }
  /* Stack the layout so the "En bref" aside sits below the title instead of in a
     right-hand column (see hero-aside/style.css for its print box). */
  .hero .hero-grid {
    grid-template-columns: 1fr;
  }
  /* Drop the ≤1199px side gutter (paper width triggers it) so the hero runs edge
     to edge — the @page margin already frames the page. */
  .hero .wrapper {
    padding-left: 0;
    padding-right: 0;
  }

/* ═══ source: blocks/credential-badge/style.css ═══ */
  .credential-badge {
    display: none;
  }

/* ═══ source: blocks/editorial/style.css ═══ */
  /* A link is meaningless on paper without its address — print the URL after
     external links. Internal anchors (#toc targets) are skipped. */
  .wp-block-formasuisse-editorial a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--color-text-muted);
    word-break: break-all;
  }

  .wp-block-formasuisse-editorial h2,
  .wp-block-formasuisse-editorial h3 {
    break-after: avoid;
  }

/* ═══ source: blocks/faq/style.css ═══ */
  .wp-block-formasuisse-faq details {
    break-inside: avoid;
  }
  .wp-block-formasuisse-faq,
  .wp-block-formasuisse-faq[data-layout="inline"] .faq-panel {
    padding-left: 0;
    padding-right: 0;
  }
  /* Every answer is force-opened for print, turning the +/× toggle into a red
     "close" glyph on each row — pointless on paper, so drop the marker. */
  .wp-block-formasuisse-faq .faq-list summary::after {
    display: none;
  }
  /* The FAQ reads too small in print: bring the question/answer up to normal
     body size, and match the section title to the other section headings. */
  .wp-block-formasuisse-faq[data-layout="inline"] .faq-list summary,
  .wp-block-formasuisse-faq[data-layout="inline"] .faq-list p,
  .wp-block-formasuisse-faq .faq-list summary,
  .wp-block-formasuisse-faq .faq-list p {
    font-size: 1rem;
  }
  /* Same size as the standard h2 (e.g. the session-details print title). */
  .wp-block-formasuisse-faq[data-layout="inline"] .faq-inline > h2,
  .wp-block-formasuisse-faq .faq-head > h2,
  .wp-block-formasuisse-faq .wp-block-formasuisse-section-head .fs-sh__title {
    font-size: 1.3rem;
  }

/* ═══ source: blocks/hero-aside/style.css ═══ */
  .hero-aside {
    background: none;
    backdrop-filter: none;
    border: 1px solid var(--color-primary);
    break-inside: avoid;
  }

/* ═══ source: blocks/hero-editorial/style.css ═══ */
  .wp-block-formasuisse-hero-editorial {
    padding-top: 24px;
  }

/* ═══ source: blocks/included-excluded/style.css ═══ */
  .wp-block-formasuisse-included-excluded li {
    margin-bottom: 3px;
  }

/* ═══ source: blocks/methodology/style.css ═══ */
  .wp-block-formasuisse-methodology .method-card {
    break-inside: avoid;
  }

/* ═══ source: blocks/pillars/style.css ═══ */
  .wp-block-formasuisse-pillar.pillar {
    break-inside: avoid;
  }
  .pillar ul {
    gap: 3px;
  }

/* ═══ source: blocks/registration/style.css ═══ */
  .fs-registration {
    display: none;
  }

/* ═══ source: blocks/section-head/style.css ═══ */
  .fs-sh__link {
    display: none;
  }

/* ═══ source: blocks/session-details/style.css ═══ */
  .fs-session-details .sd-title-screen,
  .fs-session-details .sd-intro-screen {
    display: none;
  }
  .fs-session-details .sd-title-print {
    display: block;
    /* Keep the section title with the first session box (don't strand it alone
       on the previous page when the box moves to the next). */
    break-after: avoid;
  }
  .fs-session-details article.session-details {
    display: block !important;
    break-before: page;
    /* Keep a session's whole box on one page where it fits. */
    break-inside: avoid;
  }
  .fs-session-details article.session-details:first-of-type {
    break-before: avoid;
  }
  .fs-session-details .sd-cal-toggle {
    display: none;
  }
  .fs-session-details .sd-cal-body {
    /* Keep the grid so its row gap separates the months; forcing block here
       dropped that gap to 0. Tighten it a third (18px → 12px) for print. */
    display: grid !important;
    gap: 6px;
    padding: 0;
  }
  /* Tighten the month-label → days spacing in print (also drop the label's line
     leading, which adds apparent space under it). */
  .fs-session-details .sd-cal-mlabel {
    margin-bottom: 1px;
    line-height: 1;
  }
  .fs-session-details .ics-button,
  .fs-session-details .ics-hint {
    display: none;
  }
  /* The header's navy background is dropped by the browser, leaving the white
     title/mode as near-invisible grey. Recolour them to navy on white, and tighten
     the (now background-less) padding so the title/mode sit closer to the box. */
  .fs-session-details .session-details .sd-header {
    background: none;
    /* Title keeps a slight left indent; the mode sits in the box's top-right
       corner with a small top gap from the border. */
    padding: 4px 0 6px 16px;
    align-items: flex-start;
  }
  .fs-session-details .session-details .sd-body {
    padding: 8px 16px 16px;
  }
  .fs-session-details .session-details .sd-header h3,
  .fs-session-details .session-details .sd-header .sd-mode {
    color: var(--color-primary);
  }
  /* Flush the mode badge into the top-right corner: no badge border/background
     (would double up against the box border) and no top padding. */
  .fs-session-details .session-details .sd-header .sd-mode {
    background: none;
    border: none;
    padding-top: 0;
  }

/* ═══ source: blocks/session-rail/style.css ═══ */
  .fs-session-rail {
    display: none;
  }

/* ═══ source: blocks/sidebar-layout/style.css ═══ */
  .wp-block-formasuisse-course-body {
    grid-template-columns: 1fr;
    gap: 0;
    /* Drop the ≤1199px side gutter (paper width triggers it) so the main column
       runs edge to edge — the @page margin already provides the paper margin. */
    padding-inline: 0;
  }
  .wp-block-formasuisse-course-sidebar {
    display: none;
  }
  /* The editorial bullet is a 1px background dash, which browsers strip when
     printing; swap it for a border (borders do print) so bullets show on paper. */
  .wp-block-formasuisse-sidebar-layout-main ul.wp-block-list li::before {
    background: none;
    height: 0;
    border-top: 1px solid var(--color-primary);
  }
  /* Tighten the inter-item spacing — the on-screen 8px gap is too airy on paper. */
  .wp-block-formasuisse-sidebar-layout-main ul.wp-block-list {
    gap: 3px;
  }

/* ═══ source: blocks/site-footer/style.css ═══ */
  .wp-block-formasuisse-site-footer {
    display: none;
  }

/* ═══ source: blocks/site-header/style.css ═══ */
  .wp-block-formasuisse-site-header {
    display: none;
  }

/* ═══ source: blocks/testimonials-slider/style.css ═══ */
  /* Browsers strip the navy band background when printing, leaving white text on
     white. Recolour to the dark-on-white "light" variant so the quotes are
     readable. Uses [data-variant] to outrank the per-variant colour rules. */
  .wp-block-formasuisse-testimonials-slider[data-variant] {
    --ts-bg: #ffffff;
    --ts-ink: var(--color-primary);
    --ts-sub: var(--color-text-sub);
    --ts-faint: var(--color-text-muted);
    --ts-rule: var(--color-rule, #d8dde3);
    --ts-eyebrow: var(--color-primary);
    --ts-portrait-bg: var(--color-surface-pill);
    --ts-monogram: var(--color-primary);
    --ts-note-bg: var(--color-surface);
    --ts-note-border: var(--color-rule, #e3e6ea);
    --ts-note-shadow: none;
  }
  /* Drop the ≤1199px side gutter (paper width triggers it) so the band isn't
     inset — the @page margin already frames the page. */
  .wp-block-formasuisse-testimonials-slider .wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  .wp-block-formasuisse-testimonials-slider .fs-testi__viewport {
    display: block;
  }
  .wp-block-formasuisse-testimonials-slider .fs-testi__slide {
    grid-area: auto;
    visibility: visible;
    opacity: 1;
    animation: none;
    break-inside: avoid;
    /* Rule between stacked testimonials so it's clear which author belongs to
       which quote (each slide already has an internal quote/author divider). */
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-rule, #d8dde3);
  }
  /* The active slide keeps its fade-in (higher specificity than the rule above);
     its `from` keyframe is opacity:0, which print captures — making that one
     testimonial vanish on paper. Cancel the animation here so it stays visible. */
  .wp-block-formasuisse-testimonials-slider .fs-testi__slide.is-active {
    animation: none;
  }
  .wp-block-formasuisse-testimonials-slider .fs-testi__slide:last-of-type {
    border-bottom: none;
  }
  .wp-block-formasuisse-testimonials-slider .fs-testi__arrow,
  .wp-block-formasuisse-testimonials-slider .fs-testi__dots {
    display: none;
  }

/* ═══ source: blocks/tile-grid/style.css ═══ */
  /* A grid of link cells with no body copy is pure navigation
     ("← Parent", "Nous trouver →") — meaningless on paper. */
  .wp-block-formasuisse-tile-grid:has(a.tg-cell):not(:has(.tg-cell p)) {
    display: none;
  }

/* ═══ source: blocks/venue-card/style.css ═══ */
  /* Each venue stays whole on one page. */
  .wp-block-formasuisse-venue-card .vc-card {
    break-inside: avoid;
  }

  /* Paper reads top-down: venue text first, then photo, then map
     (.vc-card is already a column flexbox). */
  .wp-block-formasuisse-venue-card .vc-body {
    order: -1;
  }
  .wp-block-formasuisse-venue-card .vc-media {
    border-bottom: 0;
  }

  /* The hatch placeholder is just an empty box on paper. */
  .wp-block-formasuisse-venue-card .vc-slot.is-empty {
    display: none;
  }
