/**
 * Export PDF A4 — styles publics.
 */

.a4-pdf-export-button-wrap {
	margin: 0 0 2rem;
	padding: 1rem 1.25rem 1.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	text-align: center;
}

.a4-pdf-export-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	padding: 0.85rem 1.15rem;
	border: 0;
	border-radius: 8px;
	background: #1f2937;
	color: #ffffff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.a4-pdf-export-button:hover,
.a4-pdf-export-button:focus {
	transform: translateY(-1px);
	opacity: 0.92;
}

.a4-pdf-export-button:focus-visible {
	outline: 3px solid rgba(31, 41, 55, 0.35);
	outline-offset: 3px;
}

.a4-pdf-export-button:disabled {
	cursor: wait;
	opacity: 0.7;
	transform: none;
}

.a4-pdf-export-button__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.15rem;
	height: 1.65rem;
	padding: 0 0.35rem;
	border-radius: 4px;
	background: #ffffff;
	color: #1f2937;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.a4-pdf-export-help {
	margin: 0.7rem 0 0;
	font-size: 0.9rem;
	opacity: 0.75;
}

/**
 * Règles d'impression générales.
 * La règle @page dynamique, contenant la marge choisie en administration,
 * est injectée depuis PHP afin de respecter la valeur configurée.
 */
@media print {
	html,
	body {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		overflow: visible !important;
		background: #ffffff !important;
		color: #000000 !important;
	}

	*,
	*::before,
	*::after {
		box-sizing: border-box !important;
	}

	body {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	main,
	article,
	.entry-content,
	.post-content,
	.page-content,
	.wp-site-blocks,
	.site,
	.site-content,
	.content-area {
		max-width: 100% !important;
		width: auto !important;
		overflow: visible !important;
	}

	img,
	svg,
	canvas,
	video,
	iframe,
	table,
	pre {
		max-width: 100% !important;
	}

	img,
	svg,
	canvas,
	video,
	iframe {
		height: auto !important;
	}

	p,
	li,
	dt,
	dd,
	blockquote,
	figcaption,
	td,
	th,
	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		overflow-wrap: anywhere;
		word-break: normal;
		hyphens: auto;
	}

	table {
		width: 100% !important;
		border-collapse: collapse;
		page-break-inside: auto;
	}

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

	a[href]::after {
		content: "";
	}

	.a4-pdf-export-button-wrap,
	.no-print,
	#wpadminbar {
		display: none !important;
	}
}
