/**
 * Chrome site — aligné maquette richard-design (topbar, header, search, panier, footer).
 * Tokens via presets theme.json.
 */

/*
 * Root padding FSE (= gutters minimum).
 * Container contenu site = wide-size via --tc-container-pad-inline-*
 * (même formule que Colonnes constrainInner).
 */
body {
	--wp--style--root--padding-left: 1.25rem;
	--wp--style--root--padding-right: 1.25rem;
	--tc-container-pad-inline-start: max(
		var(--wp--style--root--padding-left, 1.25rem),
		calc((100vw - var(--wp--style--global--wide-size, 90rem)) / 2)
	);
	--tc-container-pad-inline-end: max(
		var(--wp--style--root--padding-right, 1.25rem),
		calc((100vw - var(--wp--style--global--wide-size, 90rem)) / 2)
	);
}

@media (min-width: 768px) {
	body {
		--wp--style--root--padding-left: 1.5rem;
		--wp--style--root--padding-right: 1.5rem;
	}
}

@media (min-width: 1280px) {
	body {
		--wp--style--root--padding-left: 2rem;
		--wp--style--root--padding-right: 2rem;
	}
}

/*
 * Shell commun header / footer / main — contenu = wide-size.
 * Parent pleine largeur ; pas de max-width interne (évite double inset).
 */
.techniconcept-site-shell {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: var(--tc-container-pad-inline-start)
		var(--tc-container-pad-inline-end);
	box-sizing: border-box;
}

/* Annule le gap FSE (1.5rem) entre topbar / header / nav — enveloppe collée comme maquette. */
.techniconcept-site-header.is-layout-flow > *,
.techniconcept-site-header.wp-block-group > * {
	margin-block-start: 0 !important;
}

.techniconcept-site-header.is-layout-flow > * + *,
.techniconcept-site-header.wp-block-group > * + * {
	margin-block-start: 0 !important;
}

/* Accueil : hero collé sous la nav (blockGap FSE = 1.5rem sinon). */
.home .wp-site-blocks > main,
.home main.wp-block-group {
	margin-block-start: 0 !important;
}

/* Accueil : pas de padding/fil d'Ariane au-dessus du hero. */
.home .techniconcept-site-main__content {
	padding-block-start: 0;
}

.home .techniconcept-site-main__content > .woocommerce-breadcrumb,
.home .techniconcept-site-main__content > .wc-block-breadcrumbs,
.home .techniconcept-site-main__content > .techniconcept-site-breadcrumb,
.home .techniconcept-site-main__content .wp-block-post-content > .woocommerce-breadcrumb,
.home .techniconcept-site-main__content .wp-block-post-content > .wc-block-breadcrumbs {
	display: none;
}

/* Pages standards : même shell que le header/footer, sans titre auto injecté. */
.techniconcept-site-main {
	background: var(--wp--preset--color--background);
}

.techniconcept-site-main__content {
	padding-block-start: var(--wp--preset--spacing--50, 1.5rem);
	padding-block-end: 0;
}

.techniconcept-site-main__content > :last-child {
	margin-bottom: 0 !important;
}

/* Fil d'Ariane global — même alignement shell que header/footer. */
.techniconcept-site-main .woocommerce-breadcrumb,
.techniconcept-site-main .wc-block-breadcrumbs,
.techniconcept-site-breadcrumb {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--body, 1rem);
	color: var(--wp--preset--color--on-surface-muted, #6b7378);
}

.techniconcept-site-main .woocommerce-breadcrumb a,
.techniconcept-site-main .wc-block-breadcrumbs a,
.techniconcept-site-breadcrumb a {
	color: var(--wp--preset--color--on-background, #082b4e);
	text-decoration: none;
}

.techniconcept-site-main .woocommerce-breadcrumb a:hover,
.techniconcept-site-main .wc-block-breadcrumbs a:hover,
.techniconcept-site-breadcrumb a:hover {
	text-decoration: underline;
}

/* Page active (dernier crumb hors lien) — vert promo, comme les listings. */
.techniconcept-site-main .woocommerce-breadcrumb .techniconcept-breadcrumb__crumb:last-child,
.techniconcept-site-main .wc-block-breadcrumbs .techniconcept-breadcrumb__crumb:last-child,
.techniconcept-site-breadcrumb .techniconcept-breadcrumb__crumb:last-child {
	color: var(--wp--preset--color--promo, #287d63);
}

/*
 * Page avec `.hero-special-image` : coller le hero sous la nav
 * (comme l’accueil) ; fil d’Ariane superposé sur la colonne texte.
 */
body:has(.hero-special-image) .wp-site-blocks > main,
body:has(.hero-special-image) main.techniconcept-site-main,
body:has(.hero-special-image) .techniconcept-site-main {
	margin-block-start: 0 !important;
}

.techniconcept-site-main__content:has(.hero-special-image) {
	padding-block-start: 0;
	position: relative;
}

.techniconcept-site-main__content:has(.hero-special-image)
	> .woocommerce-breadcrumb,
.techniconcept-site-main__content:has(.hero-special-image)
	> .wc-block-breadcrumbs,
.techniconcept-site-main__content:has(.hero-special-image)
	> .techniconcept-site-breadcrumb,
.techniconcept-site-main__content:has(.hero-special-image)
	> .wp-block-woocommerce-breadcrumbs {
	position: absolute;
	z-index: 2;
	top: 1.25rem;
	left: var(--tc-container-pad-inline-start, 1.5rem);
	width: min(34rem, calc(50vw - 3rem));
	max-width: calc(100% - 2rem);
	margin: 0 !important;
	box-sizing: border-box;
}

.techniconcept-site-main__content:has(.hero-special-image)
	> .wp-block-post-content,
.techniconcept-site-main__content:has(.hero-special-image)
	> .entry-content {
	margin-block-start: 0 !important;
}

@media (max-width: 767px) {
	.techniconcept-site-main__content:has(.hero-special-image)
		> .woocommerce-breadcrumb,
	.techniconcept-site-main__content:has(.hero-special-image)
		> .wc-block-breadcrumbs,
	.techniconcept-site-main__content:has(.hero-special-image)
		> .techniconcept-site-breadcrumb,
	.techniconcept-site-main__content:has(.hero-special-image)
		> .wp-block-woocommerce-breadcrumbs {
		position: static;
		width: auto;
		max-width: none;
		margin: 0 0 1rem !important;
		padding-inline: var(--tc-container-pad-inline-start, 1.5rem)
			var(--tc-container-pad-inline-end, 1.5rem);
	}

	.techniconcept-site-main__content:has(.hero-special-image) {
		padding-block-start: var(--wp--preset--spacing--50, 1.5rem);
	}
}

/*
 * Standard site : aucun coin arrondi sur boutons et champs de formulaire
 * (Gutenberg + WooCommerce + Fluent + natifs). Hors scope : décoratif.
 */
.wp-element-button,
.wp-block-button__link,
button,
input[type='button'],
input[type='submit'],
input[type='reset'],
.button,
.wc-block-components-button,
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']),
textarea,
select,
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce .input-text,
.ff-el-form-control,
.ff-el-form-control.ff-el-form-control,
.fluentform .ff-el-form-control,
.ff-btn-submit,
.techniconcept-site-product-search__input,
/* Woo Blocks cart/checkout : coques qty + selects pays/état. */
.wc-block-components-quantity-selector,
.wc-block-components-quantity-selector__button,
.wc-block-components-quantity-selector__input,
.wc-blocks-components-select__container,
.wc-blocks-components-select__select,
.wc-block-components-textarea,
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
/* Classic Woo Select2 (compte / anciens formulaires). */
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple,
.select2-dropdown {
	border-radius: 0 !important;
}

/*
 * Exception : le bloc Bouton TechniConcept gère son rayon via --tc-button-radius
 * (presets 0/sm/md/full). Doit primer sur le reset ci-dessus (face cliquable seulement).
 */
.wp-block-techniconcept-button .tc-button__link,
.wp-block-techniconcept-button > .tc-button__label,
.wp-block-techniconcept-button .wp-element-button {
	border-radius: var(--tc-button-radius, 0) !important;
}

/* --- Topbar --- */
.techniconcept-site-topbar {
	background: linear-gradient(
		90deg,
		var(--wp--preset--color--topbar-start) 0%,
		var(--wp--preset--color--topbar-end) 100%
	);
	color: var(--wp--preset--color--on-primary);
}

.techniconcept-site-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 2rem;
	padding-block: 0.4rem;
	font-size: var(--wp--preset--font-size--label-caps, 0.75rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.techniconcept-site-topbar__message {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

.techniconcept-site-topbar__text {
	/* Mobile : texte entier visible, wrap autorisé (plus d’ellipsis). */
	overflow: visible;
	text-overflow: unset;
	white-space: normal;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

@media (min-width: 768px) {
	.techniconcept-site-topbar__text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

.techniconcept-site-topbar__flag {
	display: inline-flex;
	flex-shrink: 0;
}

.techniconcept-site-topbar__flag-icon {
	display: block;
}

.techniconcept-site-topbar__links {
	display: none;
	align-items: center;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

.techniconcept-site-topbar__link {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.techniconcept-site-topbar__link:hover {
	color: var(--wp--preset--color--accent, #91d6ac);
	text-decoration: none;
}

@media (min-width: 768px) {
	.techniconcept-site-topbar__links {
		display: flex;
	}
}

/* --- Header main --- */
.techniconcept-site-header__main {
	background: var(--wp--preset--color--background);
	border-bottom: 1px solid var(--wp--preset--color--outline-subtle, #eadfce);
}

.techniconcept-site-header__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 5.75rem;
	padding-block: 0.75rem;
}

.techniconcept-site-brand {
	order: 1;
	flex: 0 0 auto;
	min-width: 0;
}

.techniconcept-site-brand__link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.techniconcept-site-brand__img {
	display: block;
	height: 3.25rem;
	width: auto;
	max-width: min(100%, 12rem);
	max-height: 3.25rem;
	object-fit: contain;
}

/*
 * WooCommerce force `height: auto` sur les img — verrouiller logos header/footer
 * (sinon le PNG source s’affiche en taille native sur fiche produit / catégorie).
 */
.woocommerce .techniconcept-site-header .techniconcept-site-brand__img,
.woocommerce-page .techniconcept-site-header .techniconcept-site-brand__img,
.woocommerce .techniconcept-site-footer-contact__logo,
.woocommerce-page .techniconcept-site-footer-contact__logo {
	height: 3.25rem;
	width: auto;
	max-width: min(100%, 12rem);
	max-height: 3.25rem;
	object-fit: contain;
}

.techniconcept-site-cart-link {
	order: 3;
	flex: 0 0 auto;
	margin-left: auto;
}

.techniconcept-site-cart-link__anchor {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	color: var(--wp--preset--color--on-background);
	text-decoration: none;
}

.techniconcept-site-cart-link__icon {
	color: var(--wp--preset--color--primary-dark);
	display: inline-flex;
}

.techniconcept-site-cart-link__label {
	display: none;
	font-size: var(--wp--preset--font-size--caption, 0.75rem);
	color: var(--wp--preset--color--on-surface-muted);
}

.techniconcept-site-cart-link__count {
	position: absolute;
	top: -0.25rem;
	right: -0.35rem;
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	background: var(--wp--preset--color--promo);
	color: var(--wp--preset--color--on-primary);
	font-size: var(--wp--preset--font-size--label-caps, 0.75rem);
	font-weight: 700;
	line-height: 1.125rem;
	text-align: center;
}

/* Search : display:contents pour placer desktop dans la rangée / mobile sous le logo */
.techniconcept-site-product-search {
	display: contents;
}

.techniconcept-site-product-search__form--desktop {
	display: none;
}

.techniconcept-site-product-search__form--mobile {
	order: 4;
	flex: 1 0 100%;
	width: 100%;
}

.techniconcept-site-product-search__field {
	position: relative;
	width: 100%;
}

.techniconcept-site-product-search__input {
	width: 100%;
	height: 2.75rem;
	padding: 0 3rem 0 1rem;
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: 0;
	background: var(--wp--preset--color--surface-raised, #fff);
	color: var(--wp--preset--color--on-surface);
	font-size: var(--wp--preset--font-size--body-sm, 0.875rem);
}

.techniconcept-site-product-search__input::placeholder {
	color: var(--wp--preset--color--on-surface-muted);
}

.techniconcept-site-product-search__input:focus {
	outline: 2px solid var(--wp--preset--color--focus-ring);
	outline-offset: 2px;
}

.techniconcept-site-product-search__field:focus-within {
	box-shadow: none;
	border-radius: 0;
}

.techniconcept-site-product-search__submit {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--primary-dark);
	cursor: pointer;
}

.techniconcept-site-header__nav-bar {
	width: 100%;
}

/* Footer — fond maquette #F2EEE9 (.footer-global) */
.techniconcept-site-footer {
	background: var(--wp--preset--color--footer-surface, #F2EEE9) !important;
	color: var(--wp--preset--color--on-background);
	box-shadow: 0 -2px 8px rgba(8, 43, 78, 0.04);
	margin-block-start: 0 !important;
}

/* Annule le blockGap FSE (1.5rem) au-dessus du footer. */
.wp-site-blocks > footer,
.wp-site-blocks > .techniconcept-site-footer,
.wp-site-blocks > main {
	margin-block-end: 0 !important;
}

.wp-site-blocks > footer,
.wp-site-blocks > .techniconcept-site-footer {
	margin-block-start: 0 !important;
}

.techniconcept-site-footer__inner {
	padding-block: 2rem;
}

.techniconcept-site-footer.is-layout-flow > *,
.techniconcept-site-footer.wp-block-group > * {
	margin-block-start: 0 !important;
}

.techniconcept-site-footer__grid {
	display: grid;
	gap: 1.25rem 1.5rem;
	width: 100%;
}

.techniconcept-site-footer__grid > .techniconcept-site-footer-contact,
.techniconcept-site-footer__grid > .techniconcept-site-footer-nav-block,
.techniconcept-site-footer__grid > .wp-block-techniconcept-site-footer-contact,
.techniconcept-site-footer__grid > .wp-block-techniconcept-site-footer-nav {
	min-width: 0;
	width: 100%;
}

.techniconcept-site-footer-nav-block {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	padding-inline: 0;
}

/* Titres de colonnes — maquette .footer-global__title + trait vert */
.techniconcept-site-footer__title {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--suisse-intl);
	/* Mobile : lisible (18px) ; desktop reste à 1rem dès 768. */
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	line-height: 1.3;
	color: inherit;
}

.techniconcept-site-footer__title::after {
	content: '';
	display: block;
	width: 1.75rem;
	height: 2px;
	margin-top: 0.625rem;
	background-color: var(--wp--preset--color--accent-strong, #287d63);
}

.techniconcept-site-footer__accent {
	display: block;
	width: 1.75rem;
	height: 2px;
	/* Aligné sur `.techniconcept-site-footer__title::after` (0.625rem) + marge titre (1rem). */
	margin-top: 0.625rem;
	margin-bottom: 1rem;
	background-color: var(--wp--preset--color--accent-strong, #287d63);
}

.techniconcept-site-footer-contact {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.techniconcept-site-footer-contact__brand {
	display: flex;
	flex-direction: column;
	/* Même rythme que les titres colonnes (titre → filet → contenu). */
	gap: 0;
}

.techniconcept-site-footer-contact__logo-link {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	text-decoration: none;
	background: transparent;
	margin-block-end: 0;
}

.techniconcept-site-footer-contact__logo {
	display: block;
	height: 4.25rem;
	width: auto;
	max-width: min(100%, 13rem);
	max-height: 4.25rem;
	background: transparent;
	object-fit: contain;
}

/* Fallback PNG fond blanc : fusion sur footer beige (#F2EEE9). */
.techniconcept-site-footer .techniconcept-site-brand__img--blend {
	background: transparent;
	mix-blend-mode: multiply;
}

.techniconcept-site-footer__tagline {
	margin: 0;
	/* Mobile : même corps de lecture que le contenu (18px) ; desktop 16px dès 768. */
	font-size: 1.125rem;
	line-height: 1.6;
	color: inherit;
}

.techniconcept-site-footer-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.techniconcept-site-footer-nav__list a {
	color: inherit;
	text-decoration: none;
	font-size: 1.125rem;
	line-height: 1.6;
	min-height: auto;
	display: inline-flex;
	align-items: center;
	padding: 0;
}

.techniconcept-site-footer-nav__list a:hover {
	color: var(--wp--preset--color--accent-strong);
	text-decoration: none;
}

.techniconcept-site-footer-nav__list ul {
	list-style: none;
	margin: 0.25rem 0 0.5rem 0.75rem;
	padding: 0;
}

.techniconcept-site-footer__copyright {
	margin: 2rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(8, 43, 78, 0.12);
	font-size: var(--wp--preset--font-size--caption, 0.75rem);
	line-height: 1.5;
	color: var(--wp--preset--color--on-background);
}

.techniconcept-site-header .screen-reader-text,
.techniconcept-site-footer .screen-reader-text,
.techniconcept-site-topbar .screen-reader-text,
.techniconcept-site-primary-nav-block .screen-reader-text,
.techniconcept-site-product-search .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;
}

@media (min-width: 768px) {
	.techniconcept-site-header__row {
		min-height: 6rem;
		gap: 1.5rem;
		flex-wrap: nowrap;
	}

	.techniconcept-site-brand__img {
		height: 4rem;
		max-width: none;
		max-height: 4rem;
	}

	.woocommerce .techniconcept-site-header .techniconcept-site-brand__img,
	.woocommerce-page .techniconcept-site-header .techniconcept-site-brand__img {
		height: 4rem;
		max-width: none;
		max-height: 4rem;
	}

	.woocommerce .techniconcept-site-footer-contact__logo,
	.woocommerce-page .techniconcept-site-footer-contact__logo {
		height: 4.75rem;
		max-width: min(100%, 14.5rem);
		max-height: 4.75rem;
	}

	.techniconcept-site-product-search__form--desktop {
		display: block;
		order: 2;
		flex: 1 1 auto;
		max-width: 32rem;
		min-width: 0;
	}

	.techniconcept-site-product-search__form--mobile {
		display: none;
	}

	.techniconcept-site-cart-link {
		margin-left: 0;
	}

	.techniconcept-site-cart-link__label {
		display: block;
	}

	.techniconcept-site-footer__inner {
		padding-block: 2.5rem;
	}

	/* Titres colonnes footer — 1rem desktop (maquette --font-size-footer-title) */
	.techniconcept-site-footer__title {
		font-size: var(--wp--preset--font-size--body, 1rem);
		font-weight: 700;
		line-height: 1.3;
	}

	.techniconcept-site-footer-contact__logo {
		height: 4.75rem;
		max-width: min(100%, 14.5rem);
		max-height: 4.75rem;
	}

	.techniconcept-site-footer__tagline,
	.techniconcept-site-footer-nav__list a {
		font-size: var(--wp--preset--font-size--body, 1rem);
	}
}

@media (min-width: 1024px) {
	.techniconcept-site-footer__grid {
		--footer-nav-column-gap: 2rem;
		grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
		align-items: start;
		column-gap: var(--footer-nav-column-gap);
		row-gap: 1.25rem;
	}

	/* Espace brand → Navigation (hors trio nav, espacé uniformément entre eux par column-gap). */
	.techniconcept-site-footer-contact {
		padding-inline-end: clamp(3rem, 5vw, 5.5rem);
	}

	.techniconcept-site-footer__grid > .techniconcept-site-footer-contact + .techniconcept-site-footer-nav-block,
	.techniconcept-site-footer__grid > .wp-block-techniconcept-site-footer-contact + .wp-block-techniconcept-site-footer-nav {
		padding-inline-start: clamp(2rem, 3vw, 3.5rem);
	}

	.techniconcept-site-footer__grid > .wp-block-techniconcept-site-footer-nav {
		padding-inline-end: 0;
	}
}

@media (min-width: 768px) and (max-width: 1023.98px) {
	.techniconcept-site-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
		gap: 1.5rem 1.25rem;
	}
}
