/* 9. Outil d'accessibilité (bouton rond en bas à droite)
   ------------------------------------------------------------------
   HTML et script : pied de page, bloc « Accessibilité ».
   Bas à droite depuis le 22/11/2026 : à gauche, le bouton recouvrait les
   boutons « Inscrire mon enfant » de l'accueil et le début des textes, alignés
   à gauche. Il reste au-dessus de l'onglet « Gérer le consentement » (Complianz). */

#esm-a11y-btn {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9995;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	color: #fff;
	background: var(--wp--preset--color--accent-1);
	border: 3px solid var(--wp--preset--color--base);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(43, 36, 32, 0.35);
	cursor: pointer;
}
#esm-a11y-btn svg {
	width: 32px;
	height: 32px;
}

/* Pastille verte quand un réglage est actif */
#esm-a11y-btn.on::after {
	content: '';
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	background: var(--wp--preset--color--accent-5);
	border: 2px solid #fff;
	border-radius: 50%;
}

#esm-a11y-panel {
	position: fixed;
	right: 16px;
	bottom: 84px;
	z-index: 9996;
	width: 310px;
	max-width: calc(100vw - 32px);
	max-height: 72vh;
	overflow: auto;
	padding: 16px;
	font: 16px/1.4 var(--wp--preset--font-family--manrope);
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-3);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(43, 36, 32, 0.25);
}
#esm-a11y-panel[hidden] {
	display: none;
}

#esm-a11y-panel .esm-a11y-titre {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1);
}
#esm-a11y-panel .esm-a11y-ligne {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
#esm-a11y-panel .esm-a11y-ligne span {
	flex: 1;
	font-weight: 600;
}

#esm-a11y-panel button {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	padding: 10px 12px;
	font: inherit;
	font-size: 15px;
	text-align: left;
	color: var(--wp--preset--color--contrast);
	background: #fff;
	border: 1px solid #cfc3b2;
	border-radius: 10px;
	cursor: pointer;
}
#esm-a11y-panel .esm-a11y-ligne button {
	width: auto;
	margin: 0;
	padding: 8px 14px;
	font-size: 17px;
	font-weight: 700;
}
#esm-a11y-panel button:hover {
	border-color: var(--wp--preset--color--accent-1);
}
#esm-a11y-panel button[aria-pressed='true'] {
	color: #fff;
	background: var(--wp--preset--color--accent-1);
	border-color: var(--wp--preset--color--accent-1);
}

#esm-a11y-panel .esm-a11y-statut {
	min-height: 1em;
	margin: 4px 0 0;
	font-size: 14px;
	color: var(--wp--preset--color--accent-4);
}

#esm-a11y-btn:focus-visible,
#esm-a11y-panel button:focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast);
	outline-offset: 3px;
}

/* Loupe : bandeau en haut de l'écran avec le texte en grand */
#esm-a11y-lens {
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 99997;
	width: min(920px, calc(100vw - 32px));
	max-height: 45vh;
	overflow: auto;
	padding: 20px 24px;
	font: 600 30px/1.4 var(--wp--preset--font-family--manrope);
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
#esm-a11y-lens[hidden] {
	display: none;
}

/* Texte survolé (loupe) ou en cours de lecture */
.esm-a11y-hover {
	outline: 3px dashed var(--wp--preset--color--accent-1) !important;
	outline-offset: 3px;
	cursor: zoom-in;
}
.esm-a11y-reading {
	outline: 3px solid var(--wp--preset--color--accent-1) !important;
	outline-offset: 4px;
	background: rgba(164, 85, 58, 0.1) !important;
}
html.esm-a11y-mode-read .wp-site-blocks {
	cursor: pointer;
}

/* Contraste renforcé : noir sur blanc partout, sauf les images */
html.esm-a11y-contrast body,
html.esm-a11y-contrast .wp-site-blocks,
html.esm-a11y-contrast .wp-site-blocks *:not(img):not(svg):not(path):not(video):not(iframe) {
	color: #000 !important;
	background-color: #fff !important;
	border-color: #000 !important;
	text-shadow: none !important;
}
html.esm-a11y-contrast .wp-site-blocks a {
	text-decoration: underline !important;
}
html.esm-a11y-contrast .wp-site-blocks .wp-element-button {
	border: 2px solid #000 !important;
}

/* Texte plus espacé (aide à la lecture, dyslexie) */
html.esm-a11y-spacing .wp-site-blocks :is(p, li, dd, dt, label, td, th, blockquote) {
	line-height: 1.9 !important;
	letter-spacing: 0.06em !important;
	word-spacing: 0.16em !important;
}
html.esm-a11y-spacing .wp-site-blocks p {
	margin-bottom: 1.5em !important;
}
