/*
 * Couche d'accessibilité RGAA 4.1.2 — Ville de Lagny-sur-Marne
 * Alexis Catanas, novembre 2026.
 *
 * Chargée après library/built/style.css (feuille compilée, sans sources SCSS).
 * Chaque bloc indique le critère RGAA concerné.
 */

/* ------------------------------------------------------------------
 * Texte réservé aux lecteurs d'écran
 * ---------------------------------------------------------------- */
.sr-only,
.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ------------------------------------------------------------------
 * 10.7 — Prise de focus visible (la feuille d'origine contient « :focus { outline: 0 } »)
 * Double anneau noir et blanc : visible sur fond clair comme sur fond foncé ou coloré.
 * ---------------------------------------------------------------- */
:focus-visible {
	outline: 3px solid #0f0e0a !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #fff !important;
}
.footer :focus-visible,
.cookie-infos :focus-visible,
.header__nav__content :focus-visible,
.homepage__diary :focus-visible,
.homepage__acces :focus-visible,
.header__searchform :focus-visible,
.header__nav__search :focus-visible {
	outline-color: #fff !important;
	box-shadow: 0 0 0 5px #0f0e0a !important;
}
/* Cibles de liens d'évitement : pas d'anneau sur la zone entière */
[tabindex="-1"]:focus {
	outline: none !important;
	box-shadow: none !important;
}
/* Les menus à hauteur animée masquent les débordements : anneau dessiné à l'intérieur */
.header__nav__menu a:focus-visible,
.header__profile__list a:focus-visible {
	outline-offset: -3px !important;
	box-shadow: inset 0 0 0 5px #fff !important;
}

/* ------------------------------------------------------------------
 * 12.7 — Liens d'évitement, visibles à la prise de focus
 * ---------------------------------------------------------------- */
.cua-skiplinks ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cua-skiplinks a {
	position: absolute;
	left: 10px;
	top: -200px;
	z-index: 100000;
	padding: 12px 18px;
	background: #0f0e0a;
	color: #fff;
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 16rem;
	font-weight: 600;
	text-decoration: underline;
	transition: none;
}
.cua-skiplinks a:focus {
	top: 10px;
}
/* En-tête fixe : les ancres ne passent pas sous l'en-tête */
#main,
#header-nav,
[id^="post-"],
:target {
	scroll-margin-top: 110px;
}

/* ------------------------------------------------------------------
 * Éléments devenus des titres ou des paragraphes : apparence d'origine conservée
 * (:where = spécificité nulle, les règles de la feuille d'origine restent prioritaires)
 * ---------------------------------------------------------------- */
:where(.cua-heading-like) {
	line-height: 1.3em;
	margin: 0 0 .8em;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-weight: bold;
}
/* Anciens <h4> des pages « Parent » et « Profil », devenus <h2> (RGAA 9.1) */
.content__wysiwyg h2.cua-h4 {
	font-family: 'Montserrat Alternates', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 22rem;
	font-weight: 700;
	text-transform: none;
	color: #000;
	margin: 0 0 10px;
}
/* Le sous-titre vide d'origine créait 15 px d'espace sous le titre */
.single__bloc-title .single__title:last-child {
	margin-bottom: 15px;
}
.asso__contact__title {
	font-size: 22rem;
}

/* ------------------------------------------------------------------
 * Éléments devenus des <button> : apparence d'origine
 * ---------------------------------------------------------------- */
button.header__nav__burger,
button.header__profile__toggle,
button.content__slider__arrow,
button.header__search {
	margin: 0;
	border-radius: 0;
	color: inherit;
	font: inherit;
	text-transform: inherit;
	line-height: inherit;
}
button.header__nav__burger,
button.header__profile__toggle,
button.content__slider__arrow {
	padding: 0;
}
button.header__search {
	border-top: 0;
	border-right: 0;
	border-bottom: 0;
}
button.header__profile__toggle {
	background: transparent;
	height: 100%;
	cursor: pointer;
}
button.header__nav__parent {
	margin: 0;
	border-radius: 0;
	background: transparent;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-align: left;
	cursor: pointer;
}
@media (max-width: 1029px) {
	button.header__nav__parent {
		width: 100%;
		border-left: 0;
		border-right: 0;
		border-top: 0;
	}
	button.header__nav__parent:last-of-type {
		border-bottom: 0;
	}
}

/* ------------------------------------------------------------------
 * 7.1, 10.13, 12.9 — Menu principal
 * ---------------------------------------------------------------- */
@media (max-width: 1029px) {
	/* Menu mobile fermé : hors écran ET hors de la tabulation */
	.header__nav__content {
		visibility: hidden;
		transition: left 0.3s ease-in-out, visibility 0s 0.3s;
	}
	.header__nav__burger.active + .header__nav__content {
		visibility: visible;
		transition: left 0.3s ease-in-out, visibility 0s;
	}
	/* Sous-menu replié (hauteur 0) : liens retirés de la tabulation */
	.header__nav__menu {
		visibility: hidden;
	}
	.header__nav__parent.active + .header__nav__menu {
		visibility: visible;
	}
}
@media (min-width: 1030px) {
	/* Ouverture au clavier : bouton activé (rubrique sans lien), focus sur une rubrique
	   qui est un lien, ou focus dans le panneau */
	.header__nav__parent.active + .header__nav__menu,
	a.header__nav__parent:focus + .header__nav__menu,
	.header__nav__menu:focus-within {
		visibility: visible;
		opacity: 1;
		transition: opacity 0.3s;
	}
	.header__nav__parent.active,
	.header__nav__parent[aria-expanded="true"] {
		color: #037f95;
	}
}

/* « Votre profil » : ouverture au clavier */
.header__profile.is-open .header__profile__list,
.header__profile:focus-within .header__profile__list {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.3s;
}

/* Formulaire de recherche de l'en-tête : fermé = hors de la tabulation */
.header__searchform {
	visibility: hidden;
	transition: top 0.2s ease-in, visibility 0s 0.2s;
}
.header__searchform.open {
	visibility: visible;
	transition: top 0.3s ease-in-out, visibility 0s;
}

/* Sélecteur du type de recherche (largeur 0 tant que l'icône n'est pas cliquée) */
.searchform__filter:focus,
.searchform__filter.active {
	width: 150px;
}
.searchform__filter__container:focus-within .searchform__filter__img {
	width: 0;
	opacity: 0;
}
.searchform__filter option {
	color: #0f0e0a;
}

/* Publications : icônes « lire » et « télécharger » visibles au clavier */
.publications__links:focus-within .publications__hover {
	opacity: 1;
}

/* Cartes d'agenda : l'extrait se déplie aussi au focus (voir a11y.js) */

/* ------------------------------------------------------------------
 * 13.8 — Diaporama de l'accueil : bouton pause / lecture
 * ---------------------------------------------------------------- */
.homepage__slider__wrap {
	position: relative;
}
.homepage__slider__toggle {
	position: absolute;
	right: 20px;
	bottom: 20px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 2px solid #fff;
	border-radius: 3px;
	background: rgba(15, 14, 10, 0.85);
	color: #fff;
	font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
.homepage__slider__toggle[hidden] {
	display: none;
}
.homepage__slider__toggle:hover {
	background: #0f0e0a;
}
.homepage__slider__toggle__icon {
	display: inline-block;
	width: 10px;
	height: 12px;
	border-left: 3px solid #fff;
	border-right: 3px solid #fff;
	box-sizing: border-box;
}
.homepage__slider__toggle[aria-pressed="true"] .homepage__slider__toggle__icon {
	width: 0;
	height: 0;
	border-left: 10px solid #fff;
	border-right: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
}

/* ------------------------------------------------------------------
 * Pied de page : mention d'accessibilité et crédit
 * ---------------------------------------------------------------- */
.footer__a11y {
	margin: 12px 0 0;
	font-size: 14rem;
	line-height: 1.4;
}
.footer__a11y a {
	color: #fff;
	text-decoration: underline;
}
.footer__credit {
	margin: 12px 0 0;
	font-size: 11px;
	line-height: 1.4;
	opacity: .7;
}
.footer__credit a {
	color: inherit;
	text-decoration: underline;
}

/* Bandeau cookies : texte en paragraphe, fond opaque (la transparence faisait
   descendre le contraste à 4,3:1 au-dessus des zones claires) */
p.cookie-infos__texte {
	margin: 0;
}
.cookie-infos__wrap.wrap {
	background: #037f95;
}

/* Citations « Grand angle » sur fond rouge : auteur en blanc (le noir sur le rouge
   assombri tombe à 4,3:1) */
.angle__archive__author,
.angle__quote__author {
	color: #fff;
}

/* v1.0.1 — Date des articles « Grand angle » sur fond gris bleuté : 4,1:1 -> 5,1:1 (RGAA 3.2) */
.angle__header .angle__date,
.angle__header time {
	color: #c8052f;
}

/* v1.0.1 — Champs Ninja Forms : bordure visible (champ blanc sur fond #e6eef1 = 1,2:1, RGAA 3.3) */
.nf-form-cont input.nf-element:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.nf-form-cont textarea.nf-element,
.nf-form-cont select.nf-element {
	border: 1px solid #767676 !important;
}

/* v1.0.1 — Bouton « OK » du bandeau Cookie Notice : 2,9:1 -> 4,7:1 (RGAA 3.2) */
#cookie-notice .cn-button,
#cn-accept-cookie {
	background: #037f95 !important;
	color: #fff !important;
}

/* v1.0.1 — Formulaire newsletter Sarbacane de l'accueil (déplacé depuis page-accueil.php) */
#sb_form { background: #ffffff; padding: 10px 20px 20px 20px; border-radius: 0px; }
#sb_form .sb-form-title { color: #393939; font-family: Arial, Verdana, sans-serif; font-size: 25px; display: block; text-align: center; margin-bottom: 30px; }
#sb_form #label-email { display: block; color: #393939; font-family: Arial, Verdana, sans-serif; font-size: 14px; margin-bottom: 4px; }
#sb_form .sb-form-help { color: #595959; font-family: Arial, Verdana, sans-serif; font-size: 13px; margin: 0 0 4px; }
#sb_form #input-email { border: 1px solid #767676; background-color: #ffffff; color: #1c1c1c; height: 40px; margin: 5px 0 18px 0; font-size: 16px; padding-left: 5px; border-radius: 0px; box-sizing: border-box; text-indent: 5px; width: 100%; }
#sb_form #div-submitInput { display: flex; flex-direction: row; justify-content: center; }
#sb_form #submitInput { border: 1px solid #ffffff; text-align: center; color: #ffffff; border-radius: 5px; padding: 10px 25px; display: block; font-family: Arial, Verdana, sans-serif; font-size: 15px; background-color: #0a7bb8; cursor: pointer; }
#sb_form #submitInput:hover { background-color: #08608f; }
#sb_form #form-footer-mandatory { color: #393939; font-family: Arial, Verdana, sans-serif; font-size: 12px; display: block; margin-top: 20px; }
#sb_form .loader, #sb_form .loader:after { border-radius: 50%; width: 1.8em; height: 1.8em; }
#sb_form .loader { margin-top: 5px; margin-left: 10px; font-size: 10px; position: relative; border: 0.5em solid #919798; border-left-color: #3c9f51; transform: translateZ(0); animation: sbload 1s infinite linear; }
@keyframes sbload { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* v1.0.1 — Textes blancs sur photo de l'accueil (encarts citoyens, citation) : voile sombre à 60 %,
   contraste ≥ 4,5:1 même sur un ciel blanc (RGAA 3.2). Ombre intérieure plutôt que couleur de fond :
   sur iOS / Android, parallax.js pose la photo en image de fond de la section, qui recouvrirait la couleur. */
.homepage__citizen,
.homepage__quote {
	box-shadow: inset 0 0 0 100vmax rgba(9, 22, 33, 0.6);
}

/* v1.0.1 — Affichage à 320 px de large sans défilement horizontal (RGAA 10.11) */
ul.page-numbers {
	flex-wrap: wrap;
}
main a {
	overflow-wrap: break-word;
}

/* Iframes (vidéos, cartes) : anneau de focus aussi sur le cadre */
iframe:focus {
	outline: 3px solid #0f0e0a !important;
	outline-offset: 2px !important;
}

/* ------------------------------------------------------------------
 * Carte interactive : liste alternative des lieux
 * ---------------------------------------------------------------- */
.lagny-map__list {
	margin: 20px 0;
	font-size: 16rem;
}
.lagny-map__list summary {
	cursor: pointer;
	font-weight: 600;
	color: #037f95;
	text-decoration: underline;
}
.lagny-map__list ul {
	margin-top: 10px;
}

/* ------------------------------------------------------------------
 * 13.8 — Préférence « réduire les animations » du système
 * ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Impression : pas de liens d'évitement ni de bouton pause */
@media print {
	.cua-skiplinks,
	.homepage__slider__toggle {
		display: none !important;
	}
}
