/* SCOPE - Boutons de langue FR / EN (shortcode [scope_lang_switch], mu-plugin scope-langue.php).
   Couleurs : jetons --scope-* du thème actif (valeurs de repli si la feuille des jetons n'est pas chargée sur la page). */
.scope-lang-switch {
	display: inline-flex;
	margin: 0;
	padding: 0;
	border: 1px solid var(--scope-line, #8c7b87);
	border-radius: var(--scope-radius, 3px);
	overflow: hidden;
	vertical-align: middle;
}

.scope-lang-switch .scope-lang-btn {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0 .9em;
	min-width: 48px;
	min-height: 40px;
	border: 0;
	border-radius: 0;
	background: var(--scope-card, #ffffff);
	color: var(--scope-text, #2b2b2b);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1;
	cursor: pointer;
}

.scope-lang-switch .scope-lang-btn + .scope-lang-btn {
	border-left: 1px solid var(--scope-line, #8c7b87);
}

.scope-lang-switch .scope-lang-btn.is-active {
	background: var(--scope-accent, #4b163f);
	color: var(--scope-on-accent, #ffffff);
	cursor: default;
}

.scope-lang-switch .scope-lang-btn:focus-visible {
	outline: 2px solid var(--scope-focus, #4b163f);
	outline-offset: -3px;
}

/* Ligne du bouton sur la page « Tableau de bord » (<div class="scope-lang-row">[scope_lang_switch]</div>) : visible seulement dans l'application WPMobile.App,
   qui n'a pas le menu du site ; sur le site, le bouton est dans le menu principal. */
.scope-lang-row {
	display: none;
}

body.wpappninja .scope-lang-row {
	display: flex;
	justify-content: flex-end;
	padding: 6px 10px 0;
}

/* Bouton dans le menu principal du site : <li class="menu-item menu-item-scope-lang"> ajouté par scope-langue.php (Divi : #top-menu et le menu mobile). */
li.menu-item-scope-lang {
	display: flex;
	align-items: center;
}

.scope-lang-switch--menu .scope-lang-btn {
	min-width: 40px;
	min-height: 30px;
	font-size: 13px;
}

#top-menu li.menu-item-scope-lang .scope-lang-switch {
	margin-top: -8px;
}

#mobile_menu li.menu-item-scope-lang {
	padding: 8px 5%;
}

/* Liens FR | EN des pages PUBLIQUES qui ont les deux langues (adresses /en/, aucun cookie) : <span class="scope-lang-switch scope-lang-switch--links"><a class="scope-lang-btn">. */
.scope-lang-switch--links .scope-lang-btn,
.scope-lang-switch--links .scope-lang-btn:hover,
.scope-lang-switch--links .scope-lang-btn:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	text-decoration: none;
}

/* Divi colore les liens du menu avec des sélecteurs à identifiant (#top-menu li a : gris foncé 60 %, #top-menu a:hover : transparence) : sans !important, le « FR » actif (blanc sur violet)
   devenait gris foncé sur violet, illisible. Les liens FR | EN reprennent donc leurs couleurs de bouton avec !important (couleur, transparence, soulignement, affichage). */
.scope-lang-switch--links a.scope-lang-btn,
.scope-lang-switch--links a.scope-lang-btn:hover,
.scope-lang-switch--links a.scope-lang-btn:focus {
	display: inline-flex !important;
	color: var(--scope-text, #2b2b2b) !important;
	opacity: 1 !important;
	text-decoration: none !important;
}

.scope-lang-switch--links a.scope-lang-btn.is-active,
.scope-lang-switch--links a.scope-lang-btn.is-active:hover,
.scope-lang-switch--links a.scope-lang-btn.is-active:focus {
	color: var(--scope-on-accent, #ffffff) !important;
}

/* Thèmes saisonniers (Noël, Halloween, Fallout, Dexter…) : ils colorent les liens du menu avec « body.<thème> #top-menu a { color: … !important } » (spécificité 1-1-2, plus forte que les règles ci-dessus) :
   le « FR » / « EN » actif devenait vert foncé sur violet. Les mêmes règles, préfixées de #top-menu / #mobile_menu / #et-top-navigation (1-3-1 et plus) reprennent donc la main, quel que soit le thème. */
#top-menu .scope-lang-switch--links a.scope-lang-btn,
#mobile_menu .scope-lang-switch--links a.scope-lang-btn,
#et-top-navigation .scope-lang-switch--links a.scope-lang-btn {
	color: var(--scope-text, #2b2b2b) !important;
	opacity: 1 !important;
	background-image: none !important;
}

#top-menu .scope-lang-switch--links a.scope-lang-btn.is-active,
#top-menu .scope-lang-switch--links a.scope-lang-btn.is-active:hover,
#top-menu .scope-lang-switch--links a.scope-lang-btn.is-active:focus,
#mobile_menu .scope-lang-switch--links a.scope-lang-btn.is-active,
#mobile_menu .scope-lang-switch--links a.scope-lang-btn.is-active:hover,
#et-top-navigation .scope-lang-switch--links a.scope-lang-btn.is-active {
	color: var(--scope-on-accent, #ffffff) !important;
}

.scope-lang-switch--links .scope-lang-btn:not(.is-active):hover {
	background: var(--scope-hover, #f1e9ef);
}
