/*
 * Correctifs propres à la copie statique programme.1602.ch
 * Chargé en dernier dans chaque page (injecté par build.py avant </head>).
 * Ce fichier n'existe pas sur www.1602.ch : un nouveau build ne l'écrase jamais.
 */

/* ------------------------------------------------------------------
 * WP Accessibility : bouton « Changer la taille de la police »
 * Le JS (wpa-toolbar.min.js 2.4.5) ajoute seulement la classe .fontsize sur <html>.
 * Depuis la 2.4.5, WordPress n'enqueue plus a11y-fontsize.css ni les variables
 * --wpa-* -> sans ces règles, le clic ne fait rien (aussi cassé sur www.1602.ch).
 * Repris de a11y-fontsize.css + style inline de la version 2.2.6 (site 2025).
 * ------------------------------------------------------------------ */
html {
	--wpa-font-size: clamp( 24px, 1.5rem, 36px );
	--wpa-h1-size: clamp( 48px, 3rem, 72px );
	--wpa-h2-size: clamp( 40px, 2.5rem, 60px );
	--wpa-h3-size: clamp( 32px, 2rem, 48px );
	--wpa-h4-size: clamp( 28px, 1.75rem, 42px );
	--wpa-sub-list-size: 1.1em;
	--wpa-sub-sub-list-size: 1em;
}

.fontsize p,
.fontsize div:not(div:has( p, h1, h2, h3, h4, h5, h6)),
.fontsize footer:not(footer:has( p, h1, h2, h3, h4, h5, h6)),
.fontsize li:not(.a11y-toolbar-list-item),
.fontsize label,
.fontsize input,
.fontsize select,
.fontsize textarea,
.fontsize legend,
.fontsize code,
.fontsize pre,
.fontsize dd,
.fontsize dt,
.fontsize blockquote {
	font-size: var(--wpa-font-size) !important;
	line-height: 1.6;
}
.fontsize h1 { font-size: var(--wpa-h1-size) !important; }
.fontsize h2 { font-size: var(--wpa-h2-size) !important; }
.fontsize h3 { font-size: var(--wpa-h3-size) !important; }
.fontsize h6,
.fontsize h5,
.fontsize h4 { font-size: var(--wpa-h4-size) !important; }

/* Sinon la taille augmente à chaque niveau d'imbrication */
.fontsize li li { font-size: var(--wpa-sub-list-size) !important; }
.fontsize li li li { font-size: var(--wpa-sub-sub-list-size) !important; }
