/* HAPLUCIA Multilingue – site public.
   Personnalisation : redéfinir ces variables dans Apparence > Personnaliser > CSS additionnel. */
:root {
	--hml-accent: #008000;
	--hml-bg: #ffffff;
	--hml-text: #1d2327;
	--hml-border: rgba(0, 0, 0, .12);
	--hml-radius: 6px;
}

.hml-flag {
	display: inline-block;
	width: 20px;
	height: 14px;
	vertical-align: -2px;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
	object-fit: cover;
	flex: none;
}

.hml-switcher .hml-name { margin-left: .4em; }
.hml-switcher a { text-decoration: none; }

/* Liste */
ul.hml-switcher.hml-style-inline {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .9rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.hml-switcher.hml-style-inline li { margin: 0; padding: 0; }
ul.hml-switcher.hml-style-inline a { display: inline-flex; align-items: center; color: inherit; opacity: .8; }
ul.hml-switcher.hml-style-inline a:hover,
ul.hml-switcher.hml-style-inline a:focus { opacity: 1; text-decoration: underline; }
ul.hml-switcher.hml-style-inline .hml-current a { opacity: 1; font-weight: 700; }

/* Menu déroulant (details/summary, fonctionne sans JavaScript) */
details.hml-switcher.hml-style-dropdown { position: relative; display: inline-block; }
details.hml-switcher > summary {
	display: inline-flex;
	align-items: center;
	gap: .1rem;
	cursor: pointer;
	list-style: none;
	padding: .35rem .65rem;
	background: var(--hml-bg);
	color: var(--hml-text);
	border: 1px solid var(--hml-border);
	border-radius: var(--hml-radius);
	line-height: 1.2;
	user-select: none;
}
details.hml-switcher > summary::-webkit-details-marker { display: none; }
details.hml-switcher > summary:focus-visible { outline: 2px solid var(--hml-accent); outline-offset: 2px; }
.hml-caret {
	width: 0; height: 0; margin-left: .45rem;
	border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor;
	transition: transform .15s;
}
details[open] > summary .hml-caret { transform: rotate(180deg); }
details.hml-switcher .hml-menu {
	position: absolute;
	z-index: 1000;
	top: calc(100% + 4px);
	left: 0;
	min-width: 100%;
	margin: 0;
	padding: .25rem 0;
	list-style: none;
	background: var(--hml-bg);
	border: 1px solid var(--hml-border);
	border-radius: var(--hml-radius);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
details.hml-switcher .hml-menu li { margin: 0; }
details.hml-switcher .hml-menu a {
	display: flex;
	align-items: center;
	white-space: nowrap;
	padding: .45rem .8rem;
	color: var(--hml-text);
}
details.hml-switcher .hml-menu a:hover,
details.hml-switcher .hml-menu a:focus { background: rgba(0, 128, 0, .08); color: var(--hml-accent); }

/* Liste de choix */
.hml-switcher.hml-style-select select { max-width: 100%; padding: .3rem .5rem; }

/* Élément ajouté au menu du thème */
.hml-menu-item .hml-flag { vertical-align: -1px; }
.hml-menu-item .hml-name { margin-left: .4em; }
.hml-menu-inline + .hml-menu-inline { margin-left: 0; }
.hml-menu-inline.hml-current > a { font-weight: 700; }

/* Bouton flottant */
.hml-floating { position: fixed; z-index: 9990; }
.hml-floating.hml-pos-bottom-right { right: 16px; bottom: 16px; }
.hml-floating.hml-pos-bottom-left { left: 16px; bottom: 16px; }
.hml-floating.hml-pos-top-right { right: 16px; top: 16px; }
.hml-floating.hml-pos-top-left { left: 16px; top: 16px; }
.admin-bar .hml-floating.hml-pos-top-right,
.admin-bar .hml-floating.hml-pos-top-left { top: 48px; }
.hml-floating details.hml-switcher > summary { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.hml-floating.hml-pos-bottom-right .hml-menu,
.hml-floating.hml-pos-bottom-left .hml-menu { top: auto; bottom: calc(100% + 4px); }
.hml-floating.hml-pos-bottom-right .hml-menu,
.hml-floating.hml-pos-top-right .hml-menu { left: auto; right: 0; }

/* Avis « contenu non traduit » */
.hml-notice {
	margin: 0 0 1.25rem;
	padding: .75rem 1rem;
	border-left: 4px solid var(--hml-accent);
	background: rgba(0, 128, 0, .06);
	font-size: .95em;
}
.hml-notice p { margin: 0; }

@media (max-width: 991px) {
	.hml-menu-item .dropdown-menu { position: static; }
}
@media print {
	.hml-switcher, .hml-floating, .hml-menu-item { display: none !important; }
}
