/* Printable A4 pages: fonts, print bar, sheets */
/* Last update : 14.10.26 */

/* === FONTS === */
@font-face { font-family: 'Poppins'; font-weight: 300; font-style: normal; font-display: swap; src: url('../fonts/Poppins-Light.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/Poppins-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/Poppins-Italic.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/Poppins-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/Poppins-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/Poppins-Bold.woff2') format('woff2'); }

/* === BASE === */
:root { --encre: #2b2b2b; --terre: #c46a5d; --sauge: #6e7f6a; --jaune: #e9b44c; --gris: #efefef; --br: 8px; --shadow-button: 0 2px 6px rgba(0, 0, 0, 0.25); }
@page { size: A4; margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.a4 { background: #e6e3de; font-family: 'Poppins', sans-serif; font-weight: 400; color: var(--encre); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
:where(.a4) img { display: block; max-width: 100%; }
:where(.a4) p { margin: 0; }
:where(.a4) a { color: inherit; text-decoration: none; }

/* === BAR === */
.a4-bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12); font-size: 14px; }
.admin-bar .a4-bar { top: 32px; }
.a4-back { font-weight: 600; color: var(--terre); }
.a4-back:hover { color: var(--sauge); }
.a4-print { padding: 0.7em 1.1em; border: 0; border-radius: var(--br); background: var(--jaune); color: var(--encre); font: 600 14px/1.2 'Poppins', sans-serif; box-shadow: var(--shadow-button); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.a4-print:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); }
.a4-alert { max-width: 794px; margin: 0 auto 12px; padding: 12px 16px; border-radius: var(--br); background: var(--terre); color: #fff; font-size: 14px; font-weight: 500; }

/* === SHEETS === */
.a4-sheets { padding: 48px 0; }
.a4-page { position: relative; width: 794px; height: 1123px; margin: 0 auto 48px; background: #fff; overflow: hidden; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12); }
.a4-page.is-too-long { outline: 4px solid var(--terre); }

/* === MOBILE === */
@media screen and (max-width: 782px) {
	.admin-bar .a4-bar { top: 46px; }
}
@media screen and (max-width: 839px) {
	.a4-bar { font-size: 13px; }
	.a4-sheets { padding: 16px 0; }
	.a4-page.a4-fit { zoom: var(--a4-fit, 1); margin-bottom: 16px; }
}

/* === PRINT === */
@media print {
	body.a4 { background: #fff; }
	.a4-bar, .a4-alert, #wpadminbar { display: none !important; }
	html { margin-top: 0 !important; }
	.a4-sheets { padding: 0; }
	.a4-page, .a4-page.a4-fit { width: 210mm; height: 297mm; margin: 0; box-shadow: none; zoom: 1; break-after: page; }
	.a4-page:last-child { break-after: auto; }
	.a4-page.is-too-long { outline: 0; }
	.a4-page *, .a4-page *::before, .a4-page *::after { box-shadow: none !important; text-shadow: none !important; }
}
