/**
 * VidoRev Language Switch - bandeau flottant.
 *
 * Parti pris : le bandeau doit se faire oublier. Il emprunte la police du
 * theme, reste compact, et ne depense sa couleur que sur le bouton d'action.
 * Toutes les declarations de couleur portent !important car le CSS du theme
 * VidoRev cible tres largement a, button et p.
 */

.vls-bar {
	position: fixed;
	max-width: 340px;
	box-sizing: border-box;
	padding: 16px 40px 16px 18px;
	border-radius: 10px;
	background: #14161a !important;
	color: #f2f3f5 !important;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
	box-shadow: 0 10px 34px rgba(0, 0, 0, .38);
	border: 1px solid rgba(255, 255, 255, .09);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .28s ease, transform .28s ease;
	pointer-events: none;
}

.vls-bar.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.vls-bar[dir="rtl"] {
	text-align: right;
	padding: 16px 18px 16px 40px;
}

/* Positions ------------------------------------------------------------- */

.vls-bar--bottom-right {
	right: var(--vls-offset, 20px);
	bottom: var(--vls-offset, 20px);
}

.vls-bar--bottom-left {
	left: var(--vls-offset, 20px);
	bottom: var(--vls-offset, 20px);
}

.vls-bar--bottom-center {
	left: 50%;
	bottom: var(--vls-offset, 20px);
	transform: translate(-50%, 12px);
}

.vls-bar--bottom-center.is-visible {
	transform: translate(-50%, 0);
}

.vls-bar--top-right {
	right: var(--vls-offset, 20px);
	top: var(--vls-offset, 20px);
	transform: translateY(-12px);
}

.vls-bar--top-left {
	left: var(--vls-offset, 20px);
	top: var(--vls-offset, 20px);
	transform: translateY(-12px);
}

.vls-bar--top-center {
	left: 50%;
	top: var(--vls-offset, 20px);
	transform: translate(-50%, -12px);
}

.vls-bar--top-center.is-visible {
	transform: translate(-50%, 0);
}

/* Decalage sur les interfaces denses : compte WooCommerce et tableau de bord
   membre, ou des boutons d'action occupent souvent le coin bas droit. */
.vls-bar--dense.vls-bar--bottom-right,
.vls-bar--dense.vls-bar--bottom-left,
.vls-bar--dense.vls-bar--bottom-center {
	bottom: calc(var(--vls-offset, 20px) + 56px);
}

/* Contenu --------------------------------------------------------------- */

.vls-bar__text {
	margin: 0 0 12px !important;
	padding: 0 !important;
	color: #f2f3f5 !important;
	font-size: 14px;
	font-weight: 400;
}

.vls-bar__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.vls-bar__btn {
	display: inline-block;
	margin: 0;
	padding: 8px 14px;
	border: 0;
	border-radius: 6px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity .2s ease, background-color .2s ease;
}

.vls-bar__btn--accept {
	background: var(--vls-accent, #e8341c) !important;
	color: #fff !important;
}

.vls-bar__btn--accept:hover,
.vls-bar__btn--accept:focus {
	opacity: .88;
	color: #fff !important;
}

.vls-bar__btn--dismiss {
	background: transparent !important;
	color: #a8adb5 !important;
	font-weight: 500;
	text-decoration: underline !important;
	text-underline-offset: 3px;
	padding-left: 6px;
	padding-right: 6px;
}

.vls-bar__btn--dismiss:hover,
.vls-bar__btn--dismiss:focus {
	color: #f2f3f5 !important;
}

.vls-bar__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent !important;
	color: #8b9099 !important;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.vls-bar[dir="rtl"] .vls-bar__close {
	right: auto;
	left: 10px;
}

.vls-bar__close:hover,
.vls-bar__close:focus {
	color: #f2f3f5 !important;
	background: rgba(255, 255, 255, .08) !important;
}

/* Accessibilite : le focus clavier doit rester visible malgre les resets du
   theme. */
.vls-bar__btn:focus-visible,
.vls-bar__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Mobile ---------------------------------------------------------------- */

@media (max-width: 600px) {
	.vls-bar,
	.vls-bar--bottom-center,
	.vls-bar--top-center {
		left: 12px;
		right: 12px;
		max-width: none;
		transform: translateY(12px);
	}

	.vls-bar--bottom-center.is-visible,
	.vls-bar--top-center.is-visible,
	.vls-bar.is-visible {
		transform: translateY(0);
	}
}

/* Preference systeme : pas d'animation. */
@media (prefers-reduced-motion: reduce) {
	.vls-bar {
		transition: none;
	}
}
