Old rule `li input[type="checkbox"] + *` absolutely-positioned the first
element sibling after the checkbox (typically <a>, <code>, <strong>),
yanking links and code spans out of flow and overlapping adjacent
content in the rendered PDF.
Replace with a targeted rule that styles the native disabled checkbox
inline (small green box) and leaves siblings untouched. Pandoc GFM emits
`<li><input disabled type="checkbox"> text…</li>` with no wrapper class,
so we target `li > input[type="checkbox"]` directly.
Co-Authored-By: Claude <noreply@anthropic.com>
Two distinct render bugs producing overlapping text on multi-page PDFs:
1. Bare-URL duplication. The print stylesheet injects `(href)` after every
external link via `a[href^="http"]::after`. When pandoc/marked
auto-links a bare URL or renders `[X](X)`, the visible text already
equals the href, so the pseudo-element produces "URL (URL)" and the
trailing duplicate wraps onto the next line, colliding with the
following block (e.g. "https://pagespeed.web.dev/ (https://...)" then
"• Ouvrir, taper l'URL...").
Fix: post-process the body HTML in handover-to-pdf.sh; tag every
`<a href="X">X</a>` (text == href, ignoring trailing slash + case)
with `class="bare-url"`, and exclude `a.bare-url::after` from the
URL-injection rule. Named links still get `(URL)` for print legibility.
Belt-and-braces: add `white-space: nowrap` and `break-inside: avoid`
on the remaining `::after` so future long URLs cannot wrap across
page boundaries either.
2. List item splitting across page boundary. `li` had only
`orphans/widows: 3` and no `break-inside`, so a long item could put
its bullet on page N and its text on page N+1, overlapping unrelated
content. Heading-to-first-block adjacency was also unprotected, so
"heading at bottom of page A / intro paragraph or first bullet at top
of page B" could produce visual overlap during reflow.
Fix: add `li { page-break-inside: avoid; break-inside: avoid; }` and
`h{1..4} + p|ul|ol { break-before: avoid; }` so list items stay
intact and intros stay glued to their heading.
Verified end-to-end: rendered sample md with bare URL + named link +
heading-followed-by-list straddling a page break; pdftotext shows each
URL once, no orphaned bullets, no `::after` warning from weasyprint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three bugs surfaced on the LIVRAISON.pdf test render:
1. **MD→HTML conversion** — host had no pandoc, no python-markdown, fell
back to `npx marked < "$src"`. marked CLI 16.x ignores stdin and
dumps its own cli.js source. Resulting PDF body = marked's binary
source (`#!/usr/bin/env node`, `Marked CLI`, copyright). Fix:
`npx --yes marked --gfm -i "$src"` (file path via -i, not stdin).
2. **Cover background** — original cream `#F5F0EB` + 8mm green stripe
was washed out. Iterated to white-pure bg with subtle radial
sage/forest tints, black-deep title, green-forest accents
(eyebrow, meta labels, footer, border). Solid green-dark tried
first then rejected (too heavy for long client-facing doc).
3. **Default logo** — SVG `logo-horizontal.svg` rendered cream-toned,
blended into bg. Switched LOGO_URL default to
`https://zenquality.fr/assets/logo-horizontal-1024.png`.
Also added test-artifact gitignore rules for LIVRAISON.* / HANDOVER.*
project-local renders.
Verified: regenerated LIVRAISON.pdf → 164 KB, 19 pages, full content
rendered, white cover with black title + green-forest accents +
visible PNG logo.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>