/* Variables de focus */
:root {
	--upc-focus-inner: #ffffff;
	--upc-focus-outer: #000000;
}

/* Base commune */
li.upc-fake-parent > .upc-menu-toggle {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	margin: 0;
	padding: 0;
	text-align: left;
	text-transform: inherit;
	vertical-align: baseline;
	white-space: nowrap;
}

/* Reset Firefox */
li.upc-fake-parent > .upc-menu-toggle::-moz-focus-inner {
	border: 0;
	padding: 0;
}

/* Le faux bouton doit suivre la typo/couleur du thème */
#top-menu > li.upc-fake-parent > .upc-menu-toggle,
#top-menu > li.upc-fake-parent > .upc-menu-toggle:hover,
#top-menu > li.upc-fake-parent > .upc-menu-toggle:focus,
#top-menu > li.upc-fake-parent.current-menu-item > .upc-menu-toggle,
#top-menu > li.upc-fake-parent.current_page_item > .upc-menu-toggle,
.et_mobile_menu li.upc-fake-parent > .upc-menu-toggle,
.et_mobile_menu li.upc-fake-parent > .upc-menu-toggle:hover,
.et_mobile_menu li.upc-fake-parent > .upc-menu-toggle:focus {
	color: inherit;
	font: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-transform: inherit;
}

/* Focus visible sans imposer une couleur de texte */
li.upc-fake-parent > .upc-menu-toggle:focus,
li.upc-fake-parent > .upc-menu-toggle:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

/* Navigation desktop */
#top-menu > li.upc-fake-parent > .upc-menu-toggle {
	display: block;
	position: relative;
	padding: 0 18px 18px 0;
}

/* Fleche desktop */
#top-menu > li.upc-fake-parent > .upc-menu-toggle::after {
	font-family: "ETmodules" !important;
	content: "3";
	font-size: 16px;
	font-weight: 800;
	speak: none;
	font-style: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	position: absolute;
	right: 0;
	top: 0;
	margin: 0;
	border: 0;
	width: auto;
	height: auto;
	transform: none;
}

/* Navigation mobile */
.et_mobile_menu li.upc-fake-parent > .upc-menu-toggle {
	display: block;
	width: 100%;
	padding: 10px 5%;
	font-weight: 700 !important;
}

/* Fleche mobile */
.et_mobile_menu li.upc-fake-parent > .upc-menu-toggle::after {
	font-family: "ETmodules" !important;
	content: "3";
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
	float: right;
	margin-top: 0;
	border: 0;
	width: auto;
	height: auto;
	transform: none;
}

/* Sous-menu ouvert */
li.upc-fake-parent.upc-submenu-open > .sub-menu {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* Pas de contour visible au clic ou au tactile */
li.upc-fake-parent > .upc-menu-toggle:focus,
li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle:focus,
#et-top-navigation a:focus,
.et_search_form_container input:focus,
.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:focus,
.et_mobile_menu a:focus,
.et_close_search_field:focus,
#et_top_search:focus,
.logo_container > a:focus,
.logo_container > a:focus #logo {
	outline: none !important;
	box-shadow: none !important;
}

/* Focus visible au clavier uniquement */
html.upc-using-keyboard li.upc-fake-parent > .upc-menu-toggle:focus,
html.upc-using-keyboard #et-top-navigation a:focus,
html.upc-using-keyboard .et_search_form_container input:focus,
html.upc-using-keyboard .et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:focus,
html.upc-using-keyboard .et_mobile_menu a:focus {
	outline: none !important;
	box-shadow:
		0 0 0 2px var(--upc-focus-inner),
		0 0 0 4px var(--upc-focus-outer) !important;
}

html.upc-using-keyboard #et_top_search:focus #et_search_icon::before,
html.upc-using-keyboard #main-header span.et_close_search_field:focus::before,
html.upc-using-keyboard #main-header span.et_close_search_field:focus::after {
	box-shadow:
		0 0 0 2px var(--upc-focus-inner),
		0 0 0 4px var(--upc-focus-outer) !important;
	border-radius: 999px;
}

/* Variante plus compacte pour le switcher de langue */
html.upc-using-keyboard li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle:focus {
	outline: none !important;
	box-shadow:
		0 0 0 2px var(--upc-focus-inner),
		0 0 0 4px var(--upc-focus-outer) !important;
}

/* Dessine le focus sur l'image du logo uniquement */
html.upc-using-keyboard .logo_container > a:focus #logo {
	outline: none !important;
	box-shadow:
		0 0 0 2px var(--upc-focus-inner),
		0 0 0 4px var(--upc-focus-outer) !important;
	transition: none !important;
}

/* Switcher de langue Polylang */
li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	position: relative;
	height: 22px !important;
	min-width: 34px;
	padding: 0 14px 0 8px !important;
	line-height: 1 !important;
	font-size: 0;
	vertical-align: middle;
	white-space: nowrap;
	bottom: 6px;
	right: 10px;
}

/* Fleche du switcher */
li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle::after {
	content: "";
	position: absolute;
	right: 5px;
	top: 50%;
	width: 4px;
	height: 4px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateY(-60%) rotate(45deg);
	font-family: initial !important;
	font-size: 0 !important;
	line-height: 1 !important;
}

/* Drapeau */
li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle img {
	display: block;
	width: 16px;
	height: 11px;
	margin: 0;
	flex: 0 0 auto;
	vertical-align: middle;
}

/* Preserve le gabarit du switcher dans la navigation secondaire. */
#et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent,
#et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent > .sub-menu {
	overflow: visible;
}

#et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle {
	box-sizing: border-box;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap;
	line-height: 1 !important;
	white-space: nowrap;
	overflow: visible;
	border-radius: 11px;
}

#et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle:focus {
	outline: none !important;
	box-shadow: none !important;
}

html.upc-using-keyboard #et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent > .upc-menu-toggle:focus {
	outline: 2px solid var(--upc-focus-outer) !important;
	outline-offset: 2px;
	box-shadow: none !important;
}

#et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent.upc-submenu-open {
	height: inherit;
}

html.upc-using-keyboard #et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent > .sub-menu > li.lang-item > a:focus {
	outline: none !important;
	box-shadow: none !important;
}

html.upc-using-keyboard #et-secondary-nav > li.pll-parent-menu-item.upc-fake-parent > .sub-menu > li.lang-item > a:focus img {
	box-shadow:
		0 0 0 2px var(--upc-focus-inner),
		0 0 0 4px var(--upc-focus-outer) !important;
}
