/**
 * Language switcher (inc/languages.php).
 *
 * Header: language codes side by side, the current one underlined.
 * Phones (≤600px): only the other language(s), one 44px target each.
 * Mobile menu: full language names under the menu, next to the theme toggle.
 * Colours come from the theme tokens, so both themes follow.
 */

.lang-switch {
	display: flex;
	align-items: center;
}

.lang-switch__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--c-muted);
	font-weight: 500;
	text-decoration: none;
	transition: color var(--dur) var(--ease);
}

.lang-switch__link:hover,
.lang-switch__link:focus-visible { color: var(--c-accent-text); }

.lang-switch__link.is-current { color: var(--c-text); cursor: default; }

/* Header: FR · EN */
.lang-switch--header { margin-right: 0.25rem; }

.lang-switch--header .lang-switch__link {
	min-width: 36px;
	height: 44px;
	padding-inline: 0.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
}

.lang-switch--header .lang-switch__link.is-current span[aria-hidden] {
	padding-bottom: 2px;
	border-bottom: 1px solid var(--c-accent-text);
}

.lang-switch--header .lang-switch__link + .lang-switch__link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: 12px;
	margin-top: -6px;
	background: var(--c-border);
}

/* Mobile menu: Français · English */
.lang-switch--menu {
	gap: 1.25rem;
	width: 100%;
}

.lang-switch--menu .lang-switch__link {
	min-height: 44px;
	font-size: var(--fs-sm);
	letter-spacing: 0.04em;
}

.lang-switch--menu .lang-switch__link.is-current {
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--c-accent-text);
	text-underline-offset: 0.3em;
}

@media (max-width: 600px) {
	.lang-switch--header { margin-right: 0; }
	.lang-switch--header .lang-switch__link.is-current { display: none; }
	.lang-switch--header .lang-switch__link + .lang-switch__link::before { display: none; }
	.lang-switch--header .lang-switch__link { min-width: 40px; color: var(--c-text); }
}
