/*
 * Sélecteur de langue du pied de page.
 * Agence Audace, 05.11.2026 (révisé le même jour : liste déroulante plutôt
 * qu'une rangée de six pastilles, qui mangeait deux lignes de pied de page).
 *
 * Balisage : templates/theme25/html/mod_gtranslate/default.php
 * Le pied de page est bleu #0E4D9E, texte blanc, « Helvetica Now Display ».
 * Le bouton reprend la forme de pastille utilisée partout sur le site.
 */

.av-langues {
	margin: 18px 0 0;
}

/* Repère de positionnement du panneau déroulant. */
.av-langues__champ {
	position: relative;
	display: inline-block;
}

.av-langues__declencheur {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	/* 44px : la cible tactile minimale, y compris en pied de page. */
	min-height: 44px;
	min-width: 150px;
	padding: 8px 18px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 40px;
	background: transparent;
	color: #fff;
	font-family: "Helvetica Now Display", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.2px;
	text-align: left;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s, border-color 0.2s;
}

.av-langues__declencheur:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: #fff;
}

.av-langues__courante {
	flex: 1 1 auto;
}

/* Chevron dessiné en CSS : pas d'image à charger, pas d'emoji. Il pivote
   quand le panneau est ouvert, pour dire l'état sans recourir à la couleur. */
.av-langues__declencheur::after {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}

.av-langues__declencheur[aria-expanded="true"]::after {
	margin-top: 3px;
	transform: rotate(-135deg);
}

/* ── Le panneau ──────────────────────────────────────────────────────────── */

.av-langues__liste {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 30;
	min-width: 100%;
	margin: 0;
	padding: 6px;
	border-radius: 14px;
	background: #fff;
	/* Un filet plutôt qu'une ombre portée : le pied de page est plat. */
	border: 1px solid rgba(14, 77, 158, 0.15);
	list-style: none;
}

.av-langues__liste[hidden] {
	display: none;
}

.av-langues__btn {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 44px;
	padding: 8px 16px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #0E4D9E;
	font-family: "Helvetica Now Display", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.2px;
	text-align: left;
	white-space: nowrap;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s;
}

.av-langues__btn:hover {
	background: #F0F0F0;
}

/* La langue affichée : en gras et sur fond bleu pâle. Pas seulement une
   couleur — la graisse la distingue aussi pour qui ne perçoit pas la nuance. */
.av-langues__btn.est-actif {
	background: rgba(14, 77, 158, 0.10);
	font-weight: 700;
}

.av-langues__declencheur:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.35);
}

.av-langues__btn:focus-visible {
	outline: 3px solid #0E4D9E;
	outline-offset: -3px;
}

/* Dit franchement que la traduction est machine : une commune ne publie pas
   ces textes, elle les fait traduire à la volée. */
.av-langues__note {
	margin: 8px 0 0;
	color: #fff;
	font-family: "Helvetica Now Display", sans-serif;
	font-size: 12px;
	opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
	.av-langues__declencheur,
	.av-langues__declencheur::after,
	.av-langues__btn {
		transition: none;
	}
}

/* ── La barre de Google ──────────────────────────────────────────────────────
 * Une fois la page traduite, Google insère en haut de l'écran un bandeau
 * « Traduit en : … / Afficher l'original », dans une iframe, et décale tout le
 * site de 39 px vers le bas.
 *
 * Le module prévoyait bien de le masquer, mais vise `.goog-te-banner-frame` :
 * Google a depuis renommé ses classes (aujourd'hui `VIpgJd-ZVi9od-ORHb-OEVmcd`,
 * un nom généré qui changera encore). On vise donc la seule marque stable, la
 * classe `skiptranslate` que Google pose sur toutes ses iframes.
 *
 * Masquer ce bandeau ne piège personne : le choix « Français » de la liste
 * ramène au texte d'origine.
 */
iframe.skiptranslate {
	display: none !important;
}

body {
	top: 0 !important;
}
