/* ==========================================================================
   En-tête sur mesure (remplace les en-têtes desktop et mobile de Zeen)
   ========================================================================== */

:root {
	--cb-header-h: 76px;
	--cb-header-top: 0px;
}

.admin-bar {
	--cb-header-top: 32px;
}

@media (max-width: 782px) {
	.admin-bar {
		--cb-header-top: 46px;
	}
}

@media (max-width: 900px) {
	:root {
		--cb-header-h: 64px;
	}
}

/* En-têtes, menus et barre « stuck » de Zeen masqués */
.cb-has-header #masthead,
.cb-has-header #mobhead,
.cb-has-header #header-line,
.cb-has-header #site-navigation,
.cb-has-header .mob-menu-wrap,
.cb-has-header .sticky-menu,
.cb-has-header .site-mob-header {
	display: none !important;
}

.cb-has-header #page {
	padding-top: var(--cb-header-h);
}

/* ---------- Barre ---------- */
.cb-header {
	position: fixed;
	z-index: 9990;
	top: var(--cb-header-top);
	right: 0;
	left: 0;
	font-family: var(--cb-font-sans);
	color: var(--cb-ink);
	background: rgba(250, 248, 243, 0.86);
	-webkit-backdrop-filter: saturate(1.6) blur(14px);
	backdrop-filter: saturate(1.6) blur(14px);
	border-bottom: 1px solid transparent;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s;
}

.cb-header.is-scrolled {
	border-bottom-color: var(--cb-line);
}

.cb-header.is-hidden {
	transform: translateY(-110%);
}

.cb-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
	height: var(--cb-header-h);
	padding: 0 clamp(16px, 4vw, 64px);
}

.cb-header a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Logo ---------- */
.cb-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	justify-self: start;
	font-family: var(--cb-font-sans);
	font-size: 1.22rem;
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1;
	white-space: nowrap;
	color: var(--cb-ink) !important;
	text-decoration: none !important;
}

.cb-logo__word em {
	font-family: var(--cb-font-serif);
	font-size: 1.12em;
	font-style: italic;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--cb-blue);
}

.cb-logo__star {
	flex: none;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: var(--cb-blue);
	stroke-width: 3;
	stroke-linecap: round;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.cb-logo:hover .cb-logo__star,
.cb-logo:focus-visible .cb-logo__star {
	transform: rotate(135deg);
}

/* ---------- Menu ---------- */
.cb-nav ul {
	display: flex;
	gap: 6px;
	margin: 0;
	padding: 4px;
	list-style: none;
	border: 1px solid var(--cb-line);
	border-radius: 999px;
	background: #fff;
}

.cb-nav li {
	margin: 0;
}

.cb-nav a {
	position: relative;
	display: block;
	padding: 9px 18px;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	transition: background-color 0.25s, color 0.25s;
}

.cb-nav sup {
	margin-left: 3px;
	font-size: 0.62em;
	font-weight: 700;
	color: var(--cb-blue);
	vertical-align: super;
}

.cb-nav a:hover,
.cb-nav a:focus-visible {
	background: var(--cb-tint);
}

.cb-nav a[aria-current] {
	color: #fff;
	background: var(--cb-ink);
}

.cb-nav a[aria-current] sup {
	color: #AFC0FF;
}

/* ---------- Outils ---------- */
.cb-header__tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.cb-icon-btn,
.cb-menu-btn,
.cb-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	border-radius: 999px;
	font-family: var(--cb-font-sans);
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, transform 0.25s;
}

.cb-icon-btn {
	width: 44px;
	padding: 0;
	color: var(--cb-ink);
	background: transparent;
	border: 1px solid var(--cb-line);
}

.cb-icon-btn svg,
.cb-panel__search svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
}

.cb-icon-btn:hover {
	background: var(--cb-tint);
}

.cb-pill {
	gap: 8px;
	padding: 0 20px;
	color: var(--cb-paper) !important;
	background: var(--cb-ink);
}

.cb-pill span {
	transition: transform 0.25s;
}

.cb-pill:hover {
	background: var(--cb-blue);
}

.cb-pill:hover span {
	transform: translateX(3px);
}

.cb-menu-btn {
	display: none;
	gap: 10px;
	padding: 0 18px;
	color: #fff;
	background: var(--cb-ink);
	border: 0;
}

.cb-menu-btn__bars {
	display: grid;
	gap: 5px;
	width: 18px;
}

.cb-menu-btn__bars i {
	display: block;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.35s;
}

.cb-menu-btn--close .cb-menu-btn__bars i:first-child {
	transform: translateY(3.5px) rotate(45deg);
}

.cb-menu-btn--close .cb-menu-btn__bars i:last-child {
	transform: translateY(-3.5px) rotate(-45deg);
}

.cb-icon-btn:focus-visible,
.cb-menu-btn:focus-visible,
.cb-pill:focus-visible,
.cb-nav a:focus-visible,
.cb-logo:focus-visible {
	outline: 2px solid var(--cb-blue);
	outline-offset: 3px;
}

/* Barre de lecture (articles) */
.cb-progress {
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 100%;
	height: 3px;
	background: var(--cb-blue);
	transform: scaleX(var(--p, 0));
	transform-origin: 0 50%;
}

/* ---------- Panneau plein écran (menu mobile + recherche) ---------- */
.cb-panel {
	position: fixed;
	z-index: 9995;
	inset: var(--cb-header-top) 0 0 0;
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 4vh, 40px);
	padding: 0 clamp(16px, 4vw, 64px) 32px;
	overflow-y: auto;
	font-family: var(--cb-font-sans);
	color: var(--cb-paper);
	background: var(--cb-ink);
	clip-path: circle(0 at calc(100% - 60px) 32px);
	transition: clip-path 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}

.cb-panel[hidden] {
	display: none;
}

.cb-panel.is-open {
	clip-path: circle(150% at calc(100% - 60px) 32px);
}

.cb-panel a {
	color: #fff;
	text-decoration: none;
}

.cb-panel__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--cb-header-h);
}

.cb-logo--light {
	color: var(--cb-paper) !important;
}

/* Bleu éclairci : le bleu de marque manque de contraste sur l'encre */
.cb-logo--light .cb-logo__word em {
	color: #8EA2F2;
}

.cb-logo--light .cb-logo__star {
	stroke: #8EA2F2;
}

.cb-menu-btn--close {
	display: inline-flex;
	color: var(--cb-ink);
	background: var(--cb-paper);
}

.cb-panel__search {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 14px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.cb-panel__search:focus-within {
	border-bottom-color: #fff;
}

.cb-panel__search svg {
	flex: none;
	width: 26px;
	height: 26px;
}

.cb-panel__search input {
	flex: 1;
	min-width: 0;
	padding: 6px 0;
	font-family: var(--cb-font-sans);
	font-size: clamp(1.3rem, 3vw, 2.2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fff;
	background: transparent;
	border: 0;
	outline: 0;
	box-shadow: none;
}

.cb-panel__search input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.cb-panel__links {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.cb-panel__links li {
	margin: 0;
	overflow: hidden;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.cb-panel__links a {
	display: flex;
	align-items: baseline;
	gap: 16px;
	padding: 14px 0;
	transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cb-panel__links a:hover,
.cb-panel__links a:focus-visible {
	padding-left: 14px;
}

.cb-panel__num {
	font-size: 0.85rem;
	font-weight: 700;
	opacity: 0.6;
}

.cb-panel__name {
	flex: 1;
	font-size: clamp(2.4rem, 7vw, 5.4rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.045em;
}

.cb-panel__links a[aria-current] .cb-panel__name {
	font-family: var(--cb-font-serif);
	font-style: italic;
	font-weight: 500;
}

.cb-panel__meta {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.75;
}

.cb-panel__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: auto 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.88rem;
	opacity: 0.8;
}

.cb-panel__foot li {
	margin: 0;
}

/* Apparition des liens à l'ouverture */
.cb-panel .cb-panel__links a,
.cb-panel .cb-panel__search {
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s, padding-left 0.35s;
}

.cb-panel.is-open .cb-panel__links a,
.cb-panel.is-open .cb-panel__search {
	transform: none;
	opacity: 1;
}

.cb-panel.is-open .cb-panel__search { transition-delay: 0.2s; }
.cb-panel.is-open li:nth-child(1) a { transition-delay: 0.25s, 0.25s, 0s; }
.cb-panel.is-open li:nth-child(2) a { transition-delay: 0.31s, 0.31s, 0s; }
.cb-panel.is-open li:nth-child(3) a { transition-delay: 0.37s, 0.37s, 0s; }
.cb-panel.is-open li:nth-child(4) a { transition-delay: 0.43s, 0.43s, 0s; }
.cb-panel.is-open li:nth-child(5) a { transition-delay: 0.49s, 0.49s, 0s; }
.cb-panel.is-open li:nth-child(n+6) a { transition-delay: 0.55s, 0.55s, 0s; }

html.cb-panel-open {
	overflow: hidden;
}

/* L'accueil et le sommaire latéral tiennent compte de la nouvelle hauteur */
.cb-has-header .cb-hero {
	min-height: calc(100svh - var(--cb-header-h));
}

/* ---------- Tablette / mobile ---------- */
@media (max-width: 900px) {
	.cb-header__inner {
		grid-template-columns: 1fr auto;
		gap: 12px;
	}

	.cb-nav,
	.cb-pill {
		display: none;
	}

	.cb-menu-btn {
		display: inline-flex;
	}

	.cb-logo {
		font-size: 1.08rem;
	}

	.cb-panel {
		clip-path: circle(0 at calc(100% - 52px) 32px);
	}

	.cb-panel.is-open {
		clip-path: circle(150% at calc(100% - 52px) 32px);
	}
}

@media (max-width: 380px) {
	.cb-icon-btn {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cb-header,
	.cb-panel,
	.cb-panel .cb-panel__links a,
	.cb-panel .cb-panel__search,
	.cb-logo__star {
		transition: none !important;
	}
}
