/* ------------------------------------------------------------ *\
	Home announcement bar — Figma "HP - BANDEAU A" (node 2468:7130).
	Maroon bar fixed above the (already fixed) v3 header, front page only.
	The header + main are pushed down by the bar's height, exposed as
	--v3-topbar-h (set by v3.js, falls back to 56px). Everything is scoped
	to body.has-topbar so dismissing the bar (v3.js removes the class)
	restores the default header/main layout with no leftover gap.
\* ------------------------------------------------------------ */

.v3-topbar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 71; /* just above the resting header (z-index:70), below overlays (drawer/megamenu:80, search:90, modals) */
	width: 100%;
	background: var(--bva-canelle-400);
	color: var(--bva-white);
}

.v3-topbar[hidden] {
	display: none;
}

/* Horizontal gutters come from .shell--fluid (40px desktop / 13px mobile),
   matching the header so the bar's edges line up with it. */
.v3-topbar__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	min-height: 56px;
	padding-top: 16px;
	padding-bottom: 16px;
	box-sizing: border-box;
}

.v3-topbar__text {
	display: flex;
	align-items: flex-end;
	gap: 24px;
	min-width: 0;
}

.v3-topbar__title {
	margin: 0;
	font: var(--bva-t-paragraphe); /* Geist 400 18px/1.32 */
	color: var(--bva-white);
}

.v3-topbar__link {
	flex-shrink: 0;
	font: 500 14px/1.1 var(--bva-font-sans);
	color: var(--bva-white);
	text-transform: uppercase;
	text-decoration: none;
	padding-bottom: 3px;
	border-bottom: 1px solid var(--bva-white);
}

.v3-topbar__close {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.v3-topbar__close svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* Offset the fixed header + page content below the bar (front page only).
   var is updated by v3.js to the bar's real height; 56px is the desktop fallback. */
body.has-topbar .header-main {
	top: var(--v3-topbar-h, 56px);
}

body.has-topbar .main {
	margin-top: var(--v3-topbar-h, 56px);
}

/* Admin bar: push the fixed bar down like the theme does for the fixed header
   (base.css), so the two stay stacked under the WP admin bar in logged-in views. */
body.admin-bar .v3-topbar {
	margin-top: 32px;
}
@media (max-width: 782px) {
	body.admin-bar .v3-topbar {
		margin-top: 46px;
	}
}

/* Mobile: no dedicated mockup for the bar yet — best-effort. Smaller type, the
   title may wrap; the real height is measured by v3.js so the offsets stay exact. */
@media (max-width: 835px) {
	.v3-topbar__inner {
		align-items: center;
		gap: 12px;
		min-height: 44px;
		padding-top: 8px;
		padding-bottom: 8px;
	}

	.v3-topbar__text {
		align-items: center;
		gap: 12px;
	}

	.v3-topbar__title {
		font-size: 13px;
		line-height: 1.25;
	}

	.v3-topbar__link {
		font-size: 11px;
	}

	body.has-topbar .header-mobile {
		top: var(--v3-topbar-h, 44px);
	}

	/* Existing mobile header offset (43px) + the bar height. */
	body.has-topbar .main {
		margin-top: calc(43px + var(--v3-topbar-h, 44px));
	}

	/* Home v3: transparent overlay header — offset by the bar height only so the
	   hero slides under the header (matches base.css home override). Higher
	   specificity than the rule above, so it wins on the front page. */
	body.has-topbar.page-template-home-v3 .main {
		margin-top: var(--v3-topbar-h, 44px);
	}
}
