/* =========================================================
   BoClic — header « pilule » (facultatif)
   Barre arrondie centrée, translucide, qui reste en haut.
   Dernier lien du menu = bouton d'accent (ex. « Contact »).
   Pour un header Blocksy classique : retirer ce module dans functions.php.
   ========================================================= */
:root {
	--bc-header-max: 1120px;
	--bc-header-bg: rgba(255, 255, 255, .86);
	--bc-header-radius: 999px;
	--bc-logo-h: 34px;
	--bc-logo-h-mobile: 28px;
}

#header {
	position: sticky;
	top: var(--admin-bar, 0px);
	z-index: 50;
	background: transparent;
}
#header [data-row*="middle"] {
	--height: 64px;
	background: transparent !important;
	box-shadow: none;
	border: 0;
	padding: 12px 16px 0;
	backdrop-filter: none;
}
#header [data-row*="middle"] > .ct-container {
	max-width: var(--bc-header-max);
	width: 100%;
	padding-inline: 22px 10px;
	background: var(--bc-header-bg);
	-webkit-backdrop-filter: blur(14px) saturate(1.5);
	backdrop-filter: blur(14px) saturate(1.5);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-header-radius);
	box-shadow: 0 10px 30px -18px rgba(var(--bc-shadow-rgb), .35);
}
#header .site-logo-container { --logo-max-height: var(--bc-logo-h); }

/* Ordinateur : logo à gauche, liens centrés, dernier lien en bouton */
@media (min-width: 1000px) {
	#header [data-device="desktop"] [data-row*="middle"] > .ct-container {
		grid-template-columns: auto 1fr;
	}
	#header [data-device="desktop"] [data-column="end"],
	#header [data-device="desktop"] [data-column="end"] > [data-items],
	#header [data-device="desktop"] .header-menu-1 {
		flex: 1;
	}
	#header [data-device="desktop"] [data-column="end"] > [data-items] {
		width: 100%;
		justify-content: flex-end;
	}
	#header [data-device="desktop"] .header-menu-1 > ul {
		width: 100%;
		justify-content: center;
	}
	#header .header-menu-1 > ul > li:first-child { margin-inline-start: auto; }
	#header .header-menu-1 > ul > li:last-child  { margin-inline-start: auto; }
	#header .header-menu-1 .ct-menu-link {
		border-radius: 999px;
		transition: background-color .2s ease, color .2s ease;
	}
	#header .header-menu-1 > ul > li:not(:last-child) > .ct-menu-link:hover {
		background: var(--bc-alt);
	}
	#header .header-menu-1 > ul > li:last-child > .ct-menu-link {
		height: auto;
		padding: .7rem 1.35rem;
		background: var(--bc-accent);
		color: var(--bc-on-accent);
		font-weight: 700;
	}
	#header .header-menu-1 > ul > li:last-child > .ct-menu-link:hover {
		background: var(--bc-dark);
		color: #fff;
	}
	/* Pas de recherche sur un site vitrine */
	#header [data-device="desktop"] .ct-header-search { display: none; }
}

/* Mobile : pilule plus compacte */
@media (max-width: 999.98px) {
	#header [data-row*="middle"] {
		--height: 58px;
		padding: 10px 12px 0;
	}
	#header [data-row*="middle"] > .ct-container {
		padding-inline: 18px 8px;
		border-radius: min(20px, var(--bc-header-radius));
	}
	#header .site-logo-container { --logo-max-height: var(--bc-logo-h-mobile); }
}
