/* Impression : le contenu sans l'habillage d'écran. Chargée avec media="print" (index.php), donc sans coût à l'affichage.
   Trois règles : tout le contenu est visible (rien n'attend le défilement), rien d'interactif n'est imprimé, et le texte reste
   lisible même quand le navigateur n'imprime pas les fonds (réglage par défaut). */
@page { margin: 14mm 13mm; }

html, body.ape-site { background: #fff !important; }
/* Dans le contenu, pictogrammes, pastilles et aplats pastel portent de l'information : ils sont imprimés tels quels. */
main, .ape-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body.ape-site { display: block; min-height: 0; padding: 0 !important; color: #10292a; }
*, *::before, *::after { animation: none !important; transition: none !important; }
html { scroll-behavior: auto; }

/* Apparitions au défilement (app.js, projects.js, sapins.js) : tout est posé. */
.ape-reveal-ready .ape-reveal,
.pv4-js [data-pv4-reveal] :is(h2, .pv4-section-heading), .pv4-js .pv4-path :is(.pv4-trail, .pv4-icon, .pv4-step-copy), .pv4-js .pv4-current .pv4-card, .pv4-js .pv4-idea { opacity: 1 !important; transform: none !important; clip-path: none !important; }

/* Habillage et commandes : inutiles sur papier. */
.ape-skip-link, .ape-menu-toggle, .ape-nav, .ape-breadcrumb, .ape-news-more, .ape-news-pagination, .ape-page-links, .ape-help-panel,
.ape-footer-actions, .ape-footer-group, .ape-footer-links, .ape-mascot-peek, .ape-mascot-replay, .ape-not-found-replay,
.ape-home-actions, .ape-home-companions, .ape-home-halo, .ape-home-shape, .ape-news-action, .ape-resource-action, .ape-event-practical-link,
.ape-team-jump, .pv4-idea, dialog, iframe { display: none !important; }

/* En-tête : une simple signature, plus de bandeau collant. */
.ape-header { position: static !important; padding: 0 0 6mm; background: none !important; backdrop-filter: none; }
.ape-header-inner { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none !important; }
.ape-brand-logo { width: 40px; height: 47px; }

/* Pied de page : une ligne claire (le fond sombre ne s'imprime pas, le texte blanc disparaîtrait). */
.ape-footer { margin-top: 8mm; padding: 4mm 0 0; border-top: 1px solid #b8d7d1; border-radius: 0 !important; background: none !important; color: #10292a !important; }
.ape-footer::before, .ape-footer::after { display: none !important; }
.ape-footer-inner, .ape-footer-bottom { padding-block: 0 !important; border: 0 !important; }
.ape-footer-logo { display: none; }
.ape-footer strong, .ape-footer p, .ape-footer small { color: #10292a !important; }
.ape-footer-bottom small::after { content: " · apecandillargues.fr"; }

/* Blocs : pleine largeur utile, pas d'ombre, jamais coupés entre deux pages quand ils tiennent sur une. */
.ape-shell { width: 100% !important; max-width: none; }
.ape-section { padding-block: 5mm !important; background: none !important; }
.ape-news-card, .ape-resource-card, .ape-event-card, .ape-home-frame, .ape-page-header, .ape-page-cover img, .ape-sapins-card, .ape-sapins-prices li,
.ape-sapins-order, .ape-sapins-pickup, .pv4-card, .ape-team-person, .ape-document-card, .ape-representatives-group, figure, table, blockquote { box-shadow: none !important; break-inside: avoid; }
/* Le contenu d'article est une grille à l'écran ; en flux simple, les encarts ne sont plus coupés entre deux pages. */
.ape-article-editorial .ape-page-content { display: block !important; }
.ape-article-editorial .ape-page-content > * { margin-bottom: var(--ape-space-4); }
h1, h2, h3, h4 { break-after: avoid; }
p, li { orphans: 3; widows: 3; }
img { max-width: 100% !important; }
.ape-page-cover img { max-height: 70mm; width: auto; margin-inline: auto; }

/* Rendez-vous repliés (« passés et annulés ») : ils restent repliés, l'intitulé suffit. */
details.ape-agenda-more:not([open]) { display: none; }

/* Liens du contenu : l'adresse est écrite, puisqu'on ne peut pas cliquer sur du papier. */
.ape-page-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; font-weight: 400; overflow-wrap: anywhere; }
.ape-page-content a[href^="mailto:"]::after, .ape-page-content a[href^="tel:"]::after { content: none; }
a { color: inherit !important; }

/* Aplats foncés du contenu : repassés en clair pour rester lisibles sans les fonds. */
.ape-sapins-pickup { display: block !important; background: none !important; border: 1.5px solid #0a6f70 !important; color: #10292a !important; }
.ape-sapins-pickup * { color: #10292a !important; }

/* Boutons d'action du contenu : un lien ordinaire, suivi de son adresse (les règles d'écran sont plus précises, d'où !important). */
.ape-article .ape-page-content a.ape-editorial-action { display: inline !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; font-size: inherit !important; text-decoration: underline !important; white-space: normal !important; }
.ape-article .ape-page-content a.ape-editorial-action::after { display: inline !important; width: auto !important; height: auto !important; background: none !important; -webkit-mask: none !important; mask: none !important; transform: none !important; }
.ape-article .ape-page-content a.ape-editorial-action[href^="http"]::after { content: " (" attr(href) ")" !important; font-size: .85em; font-weight: 400; overflow-wrap: anywhere; }
.ape-article .ape-page-content a.ape-editorial-action:not([href^="http"])::after { content: none !important; }
.ape-editorial-actions, .ape-sapins-cta { display: block !important; }

/* Thème de Noël : même feuille blanche que le reste de l'année (les décors sont déjà masqués par noel.css). */
html.ape-noel:not(.ape-noel-home) main { max-width: none; margin: 0 !important; padding: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; }
html.ape-noel-home main { padding-bottom: 0 !important; }
