/*
 * Kit d'affichage (module kit) : affiche A4 d'une sélection, carte A5 d'une
 * fiche, mode borne. Feuille des pages autonomes servies par Print\Routes :
 * aucune autre feuille n'y est chargée, d'où des couleurs locales plutôt que
 * les réglages du thème. Polices du système, aucune ressource externe.
 *
 * À l'écran, l'affiche et la carte se présentent comme une feuille, avec des
 * consignes d'impression (.bn-print__screen) masquées à l'impression.
 */

:root {
	--bn-k-ink: #111;
	--bn-k-paper: #fff;
	--bn-k-desk: #e9ecef;
	--bn-k-rubric: #a8261c;
	--bn-k-muted: #3d4552;
	--bn-k-line: #b9c2cc;
	--bn-k-link: #0a2c80;
	--bn-k-sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--bn-k-serif: Spectral, Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body.bn-print {
	margin: 0;
	background: var(--bn-k-desk);
	color: var(--bn-k-ink);
	font: 16px/1.45 var(--bn-k-sans);
}

.bn-print h1, .bn-print h2, .bn-print p, .bn-print dd { overflow-wrap: anywhere; }

.bn-print svg { display: block; max-width: 100%; height: auto; }

/* Consignes à l'écran ----------------------------------------------------- */

.bn-print__screen {
	max-width: 210mm;
	margin: 0 auto;
	padding: 16px;
	font-size: 1rem;
}
.bn-print__screen p { margin: 4px 0; }
.bn-print__screen a, .bn-print__screen strong[aria-current] { display: inline-block; min-width: 44px; min-height: 44px; padding: 10px 6px; text-align: center; }
.bn-print__screen a { color: var(--bn-k-link); text-underline-offset: 3px; }
.bn-print__screen a:focus-visible { outline: 3px solid var(--bn-k-ink); outline-offset: 2px; }
.bn-print__counts { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; }

/* Feuilles : affiche et carte ------------------------------------------- */

.bn-affiche, .bn-carte {
	width: 100%;
	margin: 0 auto 32px;
	padding: clamp(16px, 5vw, 14mm);
	background: var(--bn-k-paper);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.bn-affiche { max-width: 210mm; }
.bn-carte { max-width: 148mm; }

.bn-affiche__head, .bn-carte__kicker { border-top: 6px solid var(--bn-k-rubric); }
.bn-affiche__kicker, .bn-carte__kicker {
	margin: 0;
	padding-top: 10px;
	font-size: .9375rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--bn-k-rubric);
}
.bn-affiche__title, .bn-carte__title {
	margin: 6px 0 0;
	font-family: var(--bn-k-serif);
	font-weight: 600;
	line-height: 1.1;
}
.bn-affiche__title { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
.bn-carte__title { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); }
.bn-affiche__intro, .bn-carte__tagline { margin: 10px 0 0; font-size: 1.0625rem; }

.bn-affiche__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 78mm), 1fr));
	gap: 0 8mm;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}
.bn-affiche__item {
	min-width: 0;
	padding: 10px 0;
	border-top: 1px solid var(--bn-k-line);
	break-inside: avoid;
	page-break-inside: avoid;
}
.bn-affiche__name { margin: 0; font-size: 1.125rem; line-height: 1.25; }
.bn-affiche__host { margin: 2px 0 0; font-weight: 700; color: var(--bn-k-rubric); }
.bn-affiche__note, .bn-affiche__level { margin: 4px 0 0; font-size: .9375rem; }
.bn-affiche__level { color: var(--bn-k-muted); }
.bn-affiche__more, .bn-affiche__empty { margin: 12px 0 0; font-style: italic; }

.bn-affiche__access, .bn-carte__access {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6mm;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 2px solid var(--bn-k-ink);
	break-inside: avoid;
	page-break-inside: avoid;
}
.bn-affiche__qr { flex: 0 0 auto; width: 38mm; max-width: 100%; }
.bn-carte__qr { flex: 0 0 auto; width: 32mm; max-width: 100%; }
.bn-affiche__go, .bn-carte__go { flex: 1 1 50mm; min-width: 0; margin: 0; font-size: 1.0625rem; }
.bn-affiche__short, .bn-carte__short { font-size: 1.375rem; font-weight: 700; overflow-wrap: anywhere; }

.bn-affiche__foot, .bn-carte__foot { margin-top: 14px; font-size: .875rem; color: var(--bn-k-muted); }
.bn-affiche__foot p, .bn-carte__foot p { margin: 0; }

.bn-carte__facts { margin: 16px 0 0; }
.bn-carte__facts > div { padding: 8px 0; border-top: 1px solid var(--bn-k-line); }
.bn-carte__facts dt { font-weight: 700; }
.bn-carte__facts dd { margin: 2px 0 0; }
.bn-carte__how { display: block; font-size: .875rem; color: var(--bn-k-muted); }

/* Impression -------------------------------------------------------------- */

@page affiche { size: A4 portrait; margin: 12mm; }
@page carte { size: A5 portrait; margin: 10mm; }

@media print {
	body.bn-print { background: var(--bn-k-paper); font-size: 10pt; line-height: 1.3; }
	.bn-print__screen { display: none; }
	.bn-affiche, .bn-carte { max-width: none; margin: 0; padding: 0; box-shadow: none; }
	.bn-affiche { page: affiche; }
	.bn-carte { page: carte; }
	.bn-affiche__kicker, .bn-carte__kicker { padding-top: 2.5mm; font-size: 9pt; }
	.bn-affiche__title { margin-top: 1.5mm; font-size: 24pt; }
	.bn-carte__title { font-size: 20pt; }
	.bn-affiche__intro, .bn-carte__tagline { margin-top: 2.5mm; font-size: 11pt; line-height: 1.35; }
	.bn-affiche__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 78mm), 1fr)); gap: 0 7mm; margin-top: 4mm; }
	.bn-affiche__item { padding: 1.8mm 0 2mm; }
	.bn-affiche__name { font-size: 11.5pt; line-height: 1.2; }
	.bn-affiche__host { margin-top: .4mm; font-size: 9pt; }
	.bn-affiche__note { margin-top: .8mm; font-size: 9pt; line-height: 1.3; }
	.bn-affiche__level { margin-top: .8mm; font-size: 8.5pt; line-height: 1.3; }
	.bn-affiche__more { margin-top: 2mm; font-size: 9.5pt; }
	.bn-affiche__access, .bn-carte__access { gap: 5mm; margin-top: 4mm; padding-top: 3mm; }
	.bn-affiche__qr { width: 32mm; }
	.bn-carte__qr { width: 30mm; }
	.bn-affiche__go, .bn-carte__go { font-size: 10.5pt; }
	.bn-affiche__short, .bn-carte__short { font-size: 14pt; }
	.bn-affiche__foot, .bn-carte__foot { margin-top: 3mm; font-size: 8.5pt; }
	.bn-carte__facts > div { padding: 2mm 0; }
	.bn-carte__how { font-size: 8.5pt; }
}

/* Mode borne ---------------------------------------------------------------
 * Caractères de 24 px au moins partout, noir sur blanc, liens soulignés,
 * cibles larges. */

body.bn-print--borne {
	background: var(--bn-k-paper);
	color: #000;
	font-size: 24px;
	line-height: 1.4;
}

.bn-borne, .bn-borne__foot {
	max-width: 60rem;
	margin: 0 auto;
	padding: 24px 16px;
}
.bn-borne__title { margin: 0; font-family: var(--bn-k-serif); font-size: 2.5rem; line-height: 1.15; }
.bn-borne__intro { margin: 16px 0 0; }
.bn-borne__list { margin: 24px 0 0; padding: 0; list-style: none; }
.bn-borne__item { padding: 20px 0; border-top: 3px solid #000; }
.bn-borne__link {
	display: block;
	min-height: 48px;
	color: var(--bn-k-link);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}
.bn-borne__link:focus-visible { outline: 4px solid #000; outline-offset: 4px; background: #ffe600; color: #000; }
.bn-borne__name { display: block; font-size: 1.5em; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.bn-borne__host { display: block; margin-top: 4px; font-size: 1em; overflow-wrap: anywhere; }
.bn-borne__tagline, .bn-borne__note, .bn-borne__meta { margin: 10px 0 0; font-size: 1em; overflow-wrap: anywhere; }
.bn-borne__meta { font-weight: 700; }
.bn-borne__empty { margin-top: 24px; }
.bn-borne__foot { border-top: 3px solid #000; font-size: 24px; }
.bn-borne__foot p { margin: 8px 0; overflow-wrap: anywhere; }
