/* Sélecteur de la langue de l'interface, en-tête du site public (16/10/2026).
   Fichier commun à tous les styles de couleur (`color-style/*.css`) : il ne lit que
   leurs variables. Gabarit : resources/views/_particles/langue_interface.blade.php. */

.header-langue {
	position: relative;
	display: inline-flex;
	margin: 0 5px;
}

/* Le bouton reprend le gabarit de la loupe voisine : 36 px, couleur principale. */
.header-langue > summary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 44px;
	height: 36px;
	padding: 0 8px;
	border-radius: 5px;
	background-color: var(--primary-color);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	list-style: none;
	transition: background-color 150ms ease-out;
}

.header-langue > summary::-webkit-details-marker {
	display: none;
}

/* Survol réservé aux pointeurs fins : au doigt, la couleur resterait collée après le tap. */
@media (hover: hover) and (pointer: fine) {
	.header-langue > summary:hover {
		background-color: var(--primary-enhanced-color, var(--primary-color));
	}
}

.header-langue > summary:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.header-langue-liste {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 160px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	/* La colonne de droite de l'en-tête aligne tout à droite : la liste n'en hérite pas. */
	text-align: left;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.12);
	z-index: 9999;
}

/* Cible de 44 px de haut au doigt (une ligne de 14 px + 2 × 12 px de marge, et la hauteur minimale). */
.header-langue-liste a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 12px 16px;
	color: var(--primary-text-color, #464646);
	font-size: 14px;
	/* L'en-tête met ses liens en capitales : un nom de langue s'écrit comme dans sa langue. */
	text-transform: none;
	text-decoration: none;
}

.header-langue-liste a:focus-visible {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--primary-color);
}

@media (hover: hover) and (pointer: fine) {
	.header-langue-liste a:hover {
		background-color: rgba(0, 0, 0, 0.05);
		color: var(--primary-color);
	}
}

/* Le clavier garde un anneau visible, dessiné dans la liste pour ne pas être rogné. */
.header-langue-liste a:focus-visible {
	outline: 2px solid var(--primary-color);
	outline-offset: -2px;
}

.header-langue-liste a[aria-current="true"] {
	font-weight: 700;
	color: var(--primary-color);
}

/* Le lien est en flex : l'espace d'un `content` serait avalé, d'où la marge. */
.header-langue-liste a[aria-current="true"]::after {
	content: "✓";
	margin-left: 6px;
}

/* Même resserrement que la cloche et la loupe entre 992 et 1399 px (responsive.css,
   « FIX header right cluster ») : l'en-tête y est déjà serré. */
@media only screen and (min-width: 992px) and (max-width: 1399px) {
	.header-langue {
		margin: 0 2px;
	}
	.header-langue > summary {
		min-width: 40px;
		padding: 0 6px;
	}
}
