/*
 * Header fidelity layer — validated SENEGAL24NEWS header bundle (16 October 2026).
 * Loaded after the shared layout and ticker styles; keeps the ticker behaviour intact.
 */
.s24-header {
	--s24-header-red: #d60912;
	--s24-header-red-dark: #a40008;
	--s24-header-dark: #111923;
	--s24-header-border: #e5e7eb;
	--s24-header-ink: #19212b;
	width: 100%;
	margin-bottom: 0;
	background: #fff;
	color: var(--s24-header-ink);
	font-family: Arial, "Helvetica Neue", sans-serif;
}

.s24-header *,
.s24-header *::before,
.s24-header *::after {
	box-sizing: border-box;
}

/* The validated header is deliberately wider than the editorial body. */
.s24-header .s24-container {
	width: min(calc(100% - 36px), 1780px);
	max-width: none;
}

.s24-topbar {
	border: 0;
	background: var(--s24-header-dark);
	color: #fff;
}

.s24-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 48px;
	flex-wrap: nowrap;
}

.s24-top-left,
.s24-top-links,
.s24-top-unit,
.s24-top-socials {
	display: flex;
	align-items: center;
}

.s24-top-left,
.s24-top-links {
	gap: 12px;
	min-width: 0;
}

.s24-top-links {
	justify-content: flex-end;
	flex-wrap: nowrap;
}

.s24-top-unit {
	gap: 8px;
	white-space: nowrap;
	font-size: 13px;
	line-height: 1;
}

.s24-top-unit + .s24-top-unit {
	padding-left: 14px;
	border-left: 1px solid #5d6570;
}

.s24-top-weather .s24-ui-icon {
	color: #f7b900;
}

.s24-topbar .s24-ui-icon {
	width: 18px;
	height: 18px;
	flex: none;
}

.s24-top-socials {
	gap: 12px;
	padding-right: 14px;
	border-right: 1px solid #69717b;
}

.s24-top-socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-width: 22px;
	min-height: 22px;
	padding: 0;
}

.s24-top-socials img {
	width: 20px;
	height: 20px;
	object-fit: contain;
}

.s24-top-socials img[src*="x-blanc"] {
	width: 17px;
	height: 17px;
}

.s24-live-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 8px 11px;
	border-radius: 6px;
	background: var(--s24-header-red);
	color: #fff !important;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.s24-live-link:hover {
	background: #ee111d;
}

.s24-live-link small {
	padding: 2px 4px;
	border-radius: 2px;
	background: #8f0007;
	font-size: 9px;
}

.s24-topbar .s24-theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: auto;
	min-height: 36px;
	padding: 6px;
	border: 0;
	background: transparent;
	color: #fff !important;
}

.s24-topbar .s24-theme-toggle:hover {
	background: rgba(255, 255, 255, .1);
}

.s24-topbar .s24-theme-toggle .s24-switch {
	width: 38px;
	height: 21px;
	background: var(--s24-header-red);
}

.s24-topbar .s24-theme-toggle .s24-switch::before {
	left: 19px;
}

html[data-theme="dark"] .s24-topbar .s24-theme-toggle .s24-switch::before {
	transform: translateX(-17px);
}

/* Logo and Dakar panorama. */
.s24-masthead-band {
	position: relative;
	overflow: hidden;
	min-height: 250px;
	background: #fff;
}

.s24-masthead-scene {
	position: absolute;
	inset: 0 0 0 20%;
	background-color: #d9edf8;
	background-image: url(../images/header/fond-dakar-hd-v3-star.webp);
	background-position: center 48%;
	background-size: cover;
	background-repeat: no-repeat;
}

.s24-masthead-scene::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .2) 25%, rgba(255, 255, 255, .06) 58%, rgba(9, 45, 69, .08) 100%);
}

.s24-masthead {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(270px, 23%) minmax(0, 1fr);
	align-items: stretch;
	gap: 0;
	min-height: 250px;
	padding: 0;
}

.s24-brand-block {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-width: 0;
	padding: 22px 12px 16px 6px;
	background: linear-gradient(112deg, #fff 76%, rgba(255, 255, 255, .93) 90%, rgba(255, 255, 255, 0));
}

.s24-brand-block .s24-brand,
.s24-brand-block .custom-logo-link {
	display: block;
	width: min(100%, 385px);
	line-height: 0;
}

.s24-brand-block .s24-official-logo,
.s24-brand-block .custom-logo {
	display: block;
	width: 100%;
	max-width: 385px;
	max-height: 150px;
	height: auto;
	object-fit: contain;
	object-position: left center;
}

.s24-brand-block .s24-brand-tagline {
	margin-top: -1px;
	padding-left: 20px;
	color: var(--s24-header-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1.35;
	text-transform: uppercase;
}

.s24-header-ad {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 250px;
	padding: 14px 22px;
}

.s24-header-ad .s24-widget,
.s24-header-ad .widget {
	width: min(970px, 100%);
	max-height: 222px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	overflow: hidden;
}

.s24-header-ad .s24-ad,
.s24-header-ad img,
.s24-header-ad iframe {
	width: 100%;
	max-height: 222px;
	border: 0;
	object-fit: contain;
}

.s24-brand-promise {
	position: relative;
	width: min(970px, 100%);
	margin: 0;
	padding: 8px 14px;
	text-align: center;
	text-shadow: 0 1px 4px rgba(255, 255, 255, .5);
}

.s24-brand-promise > span {
	color: #263443;
	font-size: clamp(11px, 1.25vw, 18px);
	font-weight: 600;
	letter-spacing: 3px;
}

.s24-brand-promise p {
	margin: 12px auto 13px;
	color: #14212e;
	font-size: clamp(22px, 2.25vw, 36px);
	font-weight: 800;
	letter-spacing: -.7px;
	line-height: 1.18;
}

/* Primary navigation. */
.s24-nav-wrap {
	position: relative;
	top: auto;
	z-index: 30;
	border: 0;
	background: var(--s24-header-red);
	color: #fff;
}

.admin-bar .s24-header .s24-nav-wrap {
	top: auto;
}

.s24-nav-inner {
	display: flex;
	align-items: stretch;
	gap: 0;
	min-height: 58px;
}

.s24-nav-home {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	min-width: 58px;
	min-height: 58px;
	background: var(--s24-header-red-dark);
	color: #fff;
}

.s24-nav-home:hover {
	background: #8f0007;
	color: #fff;
}

.s24-nav-home .s24-ui-icon {
	width: 20px;
	height: 20px;
}

.s24-navigation {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
}

.s24-primary-menu {
	display: flex;
	align-items: stretch;
	flex-wrap: nowrap;
	min-width: 0;
}

/* The dedicated home icon replaces the equivalent editor-created menu item. */
.s24-nav-home + .s24-navigation .s24-primary-menu > .menu-item-home {
	display: none;
}

.s24-primary-menu > li > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 58px;
	min-height: 58px;
	padding: 0 clamp(6px, .76vw, 15px);
	color: #fff !important;
	font-size: clamp(11px, .84vw, 14px);
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.s24-primary-menu > li > a:hover,
.s24-primary-menu > li.current-menu-item > a,
.s24-primary-menu > li.current-menu-ancestor > a {
	background: var(--s24-header-red-dark);
	color: #fff !important;
}

.s24-nav-search {
	display: flex;
	align-self: center;
	align-items: center;
	gap: 3px;
	flex: 0 0 250px;
	width: 250px;
	max-width: 23%;
	margin-left: auto;
	padding: 3px 6px 3px 15px;
	border-radius: 30px;
	background: rgba(255, 255, 255, .17);
}

.s24-nav-search input {
	width: 100%;
	min-width: 0;
	padding: 8px 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 13px;
	outline: 0;
}

.s24-nav-search input::placeholder {
	color: #fff;
	opacity: .9;
}

.s24-nav-search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	min-width: 36px;
	height: 36px;
	min-height: 36px;
	padding: 6px;
	border: 0;
	background: transparent;
	color: #fff;
}

.s24-nav-search button:hover {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

.s24-nav-wrap .s24-menu-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 9px;
	border: 0;
	background: transparent;
	color: #fff !important;
}

.s24-nav-wrap :focus-visible,
.s24-topbar :focus-visible {
	outline-color: #f6b911;
}

/* The ticker implementation lives in ticker.css. This layer only aligns its shell. */
.s24-ticker-bar {
	margin-bottom: 24px;
}

.s24-ticker-bar .s24-container {
	width: min(calc(100% - 36px), 1780px);
}

html[data-theme="dark"] .s24-header {
	background: #111923;
	color: #f3f6fa;
}

html[data-theme="dark"] .s24-masthead-band {
	background: #17212b;
}

html[data-theme="dark"] .s24-masthead-scene::before {
	background: rgba(6, 14, 22, .44);
}

html[data-theme="dark"] .s24-brand-block {
	background: linear-gradient(112deg, #17212b 74%, rgba(23, 33, 43, .9) 90%, transparent);
}

html[data-theme="dark"] .s24-brand-block .s24-brand-tagline,
html[data-theme="dark"] .s24-brand-promise > span,
html[data-theme="dark"] .s24-brand-promise p {
	color: #fff;
	text-shadow: 0 1px 9px #142231;
}

@media (max-width: 1280px) {
	.s24-top-unit {
		font-size: 12px;
	}

	.s24-top-left,
	.s24-top-links {
		gap: 8px;
	}

	.s24-primary-menu > li > a {
		padding-inline: 7px;
		font-size: 11px;
	}

	.s24-nav-search {
		flex-basis: 210px;
		width: 210px;
	}

	.s24-masthead {
		grid-template-columns: minmax(260px, 24%) minmax(0, 1fr);
	}
}

@media (max-width: 1040px) {
	.s24-top-left.has-weather .s24-topbar-date,
	.s24-top-socials {
		display: none;
	}

	.s24-masthead {
		grid-template-columns: minmax(240px, 29%) minmax(0, 1fr);
	}

	.s24-brand-block .s24-brand-tagline {
		font-size: 9px;
	}

	.s24-brand-promise p {
		font-size: 26px;
	}

	.s24-nav-inner {
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.s24-nav-home {
		display: none;
	}

	.js .s24-nav-wrap .s24-menu-toggle {
		display: inline-flex;
	}

	.s24-navigation {
		order: 4;
		flex-basis: 100%;
	}

	.js .s24-navigation:not(.is-open) {
		display: none;
	}

	.s24-navigation.is-open,
	.no-js .s24-navigation {
		display: block;
	}

	.s24-primary-menu {
		display: block;
		padding: 0;
		background: #b30913;
	}

	.s24-nav-home + .s24-navigation .s24-primary-menu > .menu-item-home {
		display: list-item;
	}

	.s24-primary-menu > li > a {
		display: flex;
		justify-content: flex-start;
		height: auto;
		min-height: 44px;
		padding: 12px 24px;
		border-bottom: 1px solid rgba(255, 255, 255, .15);
	}

	.s24-nav-search {
		flex: 0 1 300px;
		width: 300px;
		max-width: none;
	}
}

@media (max-width: 700px) {
	.s24-header .s24-container {
		width: min(calc(100% - 22px), 1780px);
	}

	.s24-topbar-inner {
		min-height: 35px;
		gap: 6px;
	}

	.s24-top-left {
		min-width: 0;
		gap: 4px;
	}

	.s24-top-unit {
		gap: 4px;
		min-width: 0;
		font-size: 10px;
	}

	.s24-top-unit + .s24-top-unit {
		padding-left: 7px;
	}

	.s24-top-unit .s24-ui-icon {
		width: 13px;
		height: 13px;
	}

	.s24-top-clock {
		display: none;
	}

	.s24-topbar-date {
		overflow: hidden;
		max-width: 46vw;
		text-overflow: ellipsis;
	}

	.s24-live-link {
		min-height: 28px;
		gap: 3px;
		padding: 5px 7px;
		font-size: 10px;
	}

	.s24-live-link .s24-ui-icon {
		width: 13px;
		height: 13px;
	}

	.s24-topbar .s24-theme-toggle {
		gap: 4px;
		min-height: 30px;
		padding: 4px;
	}

	.s24-topbar .s24-theme-toggle > .s24-ui-icon {
		display: none;
	}

	.s24-topbar .s24-theme-toggle .s24-switch {
		width: 30px;
		height: 18px;
	}

	.s24-topbar .s24-theme-toggle .s24-switch::before {
		left: 14px;
		width: 14px;
		height: 14px;
	}

	html[data-theme="dark"] .s24-topbar .s24-theme-toggle .s24-switch::before {
		transform: translateX(-12px);
	}

	.s24-masthead-band,
	.s24-masthead {
		min-height: 88px;
		height: 88px;
	}

	.s24-masthead-scene,
	.s24-header-ad {
		display: none;
	}

	.s24-masthead {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 9px 12px;
	}

	.s24-brand-block {
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		padding: 0;
		background: transparent !important;
	}

	.s24-brand-block .s24-brand,
	.s24-brand-block .custom-logo-link {
		width: 226px;
		max-width: 68vw;
	}

	.s24-brand-block .s24-official-logo,
	.s24-brand-block .custom-logo {
		width: 226px;
		max-width: 68vw;
		max-height: 62px;
		object-position: center;
	}

	.s24-brand-block .s24-brand-tagline {
		padding-left: 0;
		font-size: 7px;
		letter-spacing: .8px;
		text-align: center;
	}

	.s24-nav-inner {
		min-height: 44px;
	}

	.s24-nav-search {
		flex: 1 1 auto;
		width: min(66vw, 320px);
		padding: 2px 5px 2px 10px;
	}

	.s24-nav-search input {
		font-size: 12px;
	}

	.s24-nav-search button {
		width: 32px;
		min-width: 32px;
		height: 32px;
		min-height: 32px;
		padding: 4px;
	}

	.s24-ticker-bar {
		margin-bottom: 20px;
	}
}

@media (max-width: 390px) {
	.s24-top-unit .s24-ui-icon {
		display: none;
	}

	.s24-top-unit + .s24-top-unit {
		border-left: 0;
	}

	.s24-live-link {
		font-size: 9px;
	}

	.s24-brand-block .s24-brand,
	.s24-brand-block .custom-logo-link,
	.s24-brand-block .s24-official-logo,
	.s24-brand-block .custom-logo {
		max-width: 70vw;
	}
}

@media (prefers-reduced-motion: reduce) {
	.s24-topbar .s24-theme-toggle .s24-switch::before {
		transition: none;
	}
}
