/**
 * Header sticky type HUG — desktop démo Daler.
 * Source thème (pas de pipeline @wordpress/scripts).
 */

:root {
	/* Rail contenu partagé header / hero (alignement type HUG). */
	--techniconcept-content-max: var(--wp--style--global--wide-size, 90rem);
	--techniconcept-content-pad: var(--wp--preset--spacing--40, 1rem);
	/* Hauteur header approx. — hero = reste du viewport. */
	--techniconcept-header-height: 6.75rem;
}

/* -------------------------------------------------------------------------
 * Espacement site — pas de marge au-dessus du header ; sections collées
 * (le rythme vertical = padding interne des sections, pas le blockGap).
 * ---------------------------------------------------------------------- */

html {
	margin: 0;
	padding: 0;
}

body {
	margin: 0;
}

.wp-site-blocks {
	margin: 0;
	padding-top: 0;
	padding-bottom: 0;
	gap: 0;
	row-gap: 0;
}

.wp-site-blocks > * {
	margin-block: 0;
}

.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > .wp-block-template-part:first-child {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
}

/* Annule le blockGap entre blocs frères du contenu (sections gèrent leur padding). */
.wp-block-post-content {
	--wp--style--block-gap: 0px;
}

.wp-block-post-content > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/*
 * Sticky sur le template-part FSE (pas seulement le <header> interne) :
 * sinon le parent ne fait que la hauteur du header et scroll hors viewport.
 */
.wp-site-blocks .wp-block-template-part:has(.techniconcept-site-header),
.wp-site-blocks header.wp-block-template-part:has(.techniconcept-site-header) {
	position: sticky;
	top: 0;
	z-index: 1000;
	overflow: visible;
	background: var(--wp--preset--color--surface, #fff);
}

/* Repli si :has() indisponible — sticky sur le header interne. */
@supports not selector(:has(*)) {
	.techniconcept-site-header {
		position: sticky;
		top: 0;
		z-index: 1000;
	}
}

.techniconcept-site-header {
	position: relative;
	top: auto;
	z-index: auto;
	margin: 0;
	background: var(--wp--preset--color--surface, #fff);
	font-family: var(--wp--preset--font-family--barlow, "Barlow", sans-serif);
	box-sizing: border-box;
	/* Séparation visuelle sur fond de page blanc. */
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1);
}

/* Conteneur borné — proportions type HUG (largeur contenu, pas full-bleed) */
.techniconcept-site-header__container {
	width: 100%;
	max-width: var(--techniconcept-content-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--techniconcept-content-pad);
	padding-right: var(--techniconcept-content-pad);
	box-sizing: border-box;
}

/* Top bar : cluster compact à droite (proportions HUG), pas pleine largeur */
.techniconcept-site-header__utility {
	background: transparent;
}

.techniconcept-site-header__utility-inner {
	display: flex;
	justify-content: flex-end;
	align-items: stretch;
	width: 100%;
	margin: 0;
	padding: 0.15rem 0 0;
	box-sizing: border-box;
}

.techniconcept-site-header__utility-cluster {
	display: inline-flex;
	align-items: stretch;
	max-width: 100%;
}

.techniconcept-site-header__utility-list {
	display: flex;
	flex: 0 0 auto;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
	width: auto;
}

.techniconcept-site-header__utility-item {
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
	margin: 0;
}

.techniconcept-site-header__utility-link {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem 0.75rem;
	font-size: 0.9375rem;
	font-weight: 500;
	/* Même couleur que le menu principal */
	color: var(--wp--preset--color--on-surface, #1a1a1a);
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
}

.techniconcept-site-header__utility-link:hover,
.techniconcept-site-header__utility-link:focus-visible {
	color: var(--wp--preset--color--primary, #00a3a0);
	text-decoration: underline;
}

/* Dropdown langues */
.techniconcept-site-header__lang {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
	min-width: 3.75rem;
}

.techniconcept-site-header__lang-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	width: 100%;
	min-height: 100%;
	margin: 0;
	padding: 0.25rem 0.75rem;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--on-surface, #1a1a1a);
	cursor: pointer;
}

.techniconcept-site-header__lang-toggle:hover,
.techniconcept-site-header__lang-toggle:focus-visible,
.techniconcept-site-header__lang-toggle[aria-expanded="true"] {
	color: var(--wp--preset--color--primary, #00a3a0);
}

.techniconcept-site-header__lang-caret {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}

.techniconcept-site-header__lang-menu {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 30;
	min-width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--outline-variant, #d6d6d6);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.techniconcept-site-header__lang-menu[hidden] {
	display: none !important;
}

.techniconcept-site-header__lang-option {
	display: block;
	padding: 0.55rem 1rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--on-surface, #1a1a1a);
	text-decoration: none;
	white-space: nowrap;
}

.techniconcept-site-header__lang-menu .is-current .techniconcept-site-header__lang-option,
.techniconcept-site-header__lang-option:hover,
.techniconcept-site-header__lang-option:focus-visible {
	color: var(--wp--preset--color--primary, #00a3a0);
	background: var(--wp--preset--color--surface-muted, #eef7f7);
}

.techniconcept-site-header__main {
	background: var(--wp--preset--color--surface, #fff);
}

.techniconcept-site-header__inner {
	display: flex;
	/* Stretch : les <li> méga ont la hauteur de la rangée logo → top:100% sous le header. */
	align-items: stretch;
	gap: 1.25rem 2rem;
	width: 100%;
	margin: 0;
	padding-top: 0.35rem;
	padding-bottom: 0.35rem;
	box-sizing: border-box;
}

.techniconcept-site-header__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	line-height: 0;
	text-decoration: none;
}

.techniconcept-site-header__logo img {
	display: block;
	height: 72px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
}

.techniconcept-site-header__logo--text {
	font-weight: 700;
	font-size: 1.35rem;
	color: var(--wp--preset--color--primary, #00a3a0);
	line-height: 1.2;
}

.techniconcept-site-primary-nav {
	flex: 1 1 auto;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	min-width: 0;
}

.techniconcept-nav__list {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: nowrap;
	gap: 0.75rem 2.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: stretch;
	width: auto;
	max-width: 100%;
	justify-content: flex-end;
	height: 100%;
}

.techniconcept-nav__list > li {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
	list-style: none;
	min-width: 0;
	height: 100%;
}

.techniconcept-nav__link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.5rem 0.85rem;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--on-surface, #1a1a1a);
	text-decoration: none;
	border-bottom: 3px solid transparent;
	text-align: center;
	white-space: nowrap;
}

.techniconcept-nav__link:hover,
.techniconcept-nav__link:focus-visible,
.techniconcept-nav__item--has-mega:focus-within > .techniconcept-nav__link,
.techniconcept-nav__item--has-mega:hover > .techniconcept-nav__link {
	color: var(--wp--preset--color--primary, #00a3a0);
	border-bottom-color: var(--wp--preset--color--primary, #00a3a0);
}

/* Méga-panneau centré sous l’item — top:100% = bas de la rangée main (li stretch) */
.techniconcept-mega {
	display: none;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 100%;
	/* Petit écart visuel ; ::before maintient le hover à travers le gap. */
	margin-top: 0.25rem;
	min-width: min(720px, 80vw);
	padding: 1.5rem 1.75rem;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--outline-variant, #d6d6d6);
	border-radius: 0 0 4px 4px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
	z-index: 20;
}

.techniconcept-mega::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -0.25rem;
	height: 0.25rem;
}

.techniconcept-nav__item--has-mega:hover > .techniconcept-mega,
.techniconcept-nav__item--has-mega:focus-within > .techniconcept-mega {
	display: block;
}

.techniconcept-mega__cols {
	display: flex;
	gap: 1.5rem 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.techniconcept-mega__col {
	flex: 1 1 0;
	min-width: 10rem;
	list-style: none;
}

.techniconcept-mega__col-title {
	display: block;
	margin-bottom: 0.65rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #00a3a0);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.techniconcept-mega__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.techniconcept-mega__list li {
	margin: 0 0 0.35rem;
}

.techniconcept-mega__link {
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--wp--preset--color--on-surface, #1a1a1a);
	text-decoration: none;
}

.techniconcept-mega__link:hover,
.techniconcept-mega__link:focus-visible {
	color: var(--wp--preset--color--primary, #00a3a0);
	text-decoration: underline;
}

.techniconcept-site-header__search-toggle {
	flex: 0 0 auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--wp--preset--color--on-surface, #1a1a1a);
	cursor: pointer;
}

.techniconcept-site-header__search-toggle:hover,
.techniconcept-site-header__search-toggle:focus-visible,
.techniconcept-site-header__search-toggle[aria-expanded="true"] {
	color: var(--wp--preset--color--primary, #00a3a0);
	background: var(--wp--preset--color--surface-muted, #eef7f7);
}

.techniconcept-site-header__search {
	background: var(--wp--preset--color--surface, #fff);
}

.techniconcept-site-header__search[hidden] {
	display: none !important;
}

.techniconcept-site-header__search-form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	margin: 0;
	padding-top: 1rem;
	padding-bottom: 1rem;
	box-sizing: border-box;
}

.techniconcept-site-header__search-input {
	flex: 1 1 auto;
	min-height: 2.75rem;
	padding: 0.5rem 0.85rem;
	border: 1px solid var(--wp--preset--color--outline, #b0b0b0);
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
}

.techniconcept-site-header__search-input:focus {
	outline: 2px solid var(--wp--preset--color--primary, #00a3a0);
	outline-offset: 1px;
}

.techniconcept-site-header__search-submit,
.techniconcept-site-header__search-close {
	min-height: 2.75rem;
	padding: 0 1rem;
	border-radius: 4px;
	font-family: inherit;
	font-weight: 500;
	cursor: pointer;
}

.techniconcept-site-header__search-submit {
	border: 0;
	background: var(--wp--preset--color--primary, #00a3a0);
	color: var(--wp--preset--color--on-primary, #fff);
}

.techniconcept-site-header__search-close {
	border: 1px solid var(--wp--preset--color--outline, #b0b0b0);
	background: transparent;
	color: var(--wp--preset--color--on-surface, #1a1a1a);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
