/**
 * BoisVision — chrome du site : en-tête, navigation, pied de page.
 *
 * Importe l'ensemble des couches communes ; c'est la seule feuille mise en
 * file d'attente sur toutes les pages.
 */

/*
 * Aucune règle @import ici : l'ordre de la cascade est assuré par les
 * dépendances déclarées dans inc/enqueue.php (tokens → base → layout →
 * components → chrome). Un @import sérialise les téléchargements — le
 * navigateur doit analyser la première feuille avant de découvrir la
 * suivante — là où des <link> déclarés en dépendances partent en parallèle.
 */

/* ===============================================================
 * Bandeau d'annonce
 * ============================================================ */

.bv-announce {
	background-color: var(--bv-char);
	color: var(--bv-paper);
	font-size: var(--bv-text-xs);
}

.bv-announce__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--bv-space-sm);
	min-block-size: 2.4rem;
	position: relative;
}

.bv-announce__text {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	text-align: center;
}

.bv-announce__text a {
	color: inherit;
	text-underline-offset: 0.25em;
}

.bv-announce svg {
	color: var(--bv-ember);
}

.bv-announce__close {
	position: absolute;
	inset-inline-end: 0;
	display: grid;
	place-items: center;
	inline-size: 2rem;
	block-size: 2rem;
	color: inherit;
	opacity: 0.6;
	transition: opacity var(--bv-dur-fast) var(--bv-ease);
}

.bv-announce__close:hover {
	opacity: 1;
}

/* ===============================================================
 * Barre utilitaire
 * ============================================================ */

.bv-utility {
	display: none;
	border-block-end: var(--bv-line);
	background-color: var(--bv-linen);
	font-size: var(--bv-text-xs);
}

@media (width >= 900px) {

	.bv-utility {
		display: block;
	}
}

.bv-utility__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bv-space-md);
	min-block-size: 2.6rem;
}

.bv-utility__right {
	display: flex;
	align-items: center;
	gap: var(--bv-space-md);
}

.bv-utility__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: var(--bv-muted);
	text-decoration: none;
}

.bv-utility__link:hover {
	color: var(--bv-ember);
}

/* ===============================================================
 * Vérificateur de code postal
 * ============================================================ */

.bv-postcode {
	display: flex;
	align-items: center;
	gap: var(--bv-space-xs);
	flex-wrap: wrap;
}

.bv-postcode__label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: var(--bv-muted);
	white-space: nowrap;
}

.bv-postcode__control {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--bv-shade-14);
	border-radius: var(--bv-r);
	background-color: var(--bv-paper);
	overflow: hidden;
}

.bv-postcode__control:focus-within {
	border-color: var(--bv-ember);
	box-shadow: 0 0 0 3px var(--bv-ember-050);
}

.bv-postcode__input {
	inline-size: 6.5rem;
	padding: 0.35rem 0.6rem;
	border: 0;
	background: none;
	font-size: var(--bv-text-xs);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.05em;
}

.bv-postcode__input:focus {
	outline: none;
}

.bv-postcode__submit {
	display: grid;
	place-items: center;
	inline-size: 2rem;
	color: var(--bv-muted);
	border-inline-start: var(--bv-line);
	transition: background-color var(--bv-dur-fast) var(--bv-ease), color var(--bv-dur-fast) var(--bv-ease);
}

.bv-postcode__submit:hover {
	background-color: var(--bv-ember);
	color: var(--bv-paper);
}

.bv-postcode__result:empty {
	display: none;
}

.bv-postcode__result {
	font-size: var(--bv-text-xs);
	color: var(--bv-muted);
}

.bv-postcode__result[data-state="ok"] {
	color: var(--bv-success);
}

.bv-postcode__result[data-state="ko"] {
	color: var(--bv-danger);
}

.bv-postcode--drawer {
	flex-direction: column;
	align-items: stretch;
	padding: var(--bv-space-sm);
	border: var(--bv-line);
	border-radius: var(--bv-r);
}

.bv-postcode--drawer .bv-postcode__input {
	inline-size: 100%;
	padding-block: 0.6rem;
	font-size: var(--bv-text-sm);
}

.bv-postcode--product {
	flex-direction: column;
	align-items: stretch;
}

/* ===============================================================
 * En-tête
 * ============================================================ */

.bv-header {
	position: sticky;
	inset-block-start: 0;
	z-index: var(--bv-z-header);
	background-color: color-mix(in srgb, var(--bv-paper) 88%, transparent);
	backdrop-filter: blur(14px) saturate(1.4);
	border-block-end: 1px solid transparent;
	transition: border-color var(--bv-dur-mid) var(--bv-ease), background-color var(--bv-dur-mid) var(--bv-ease);
}

.bv-header.is-stuck {
	border-block-end-color: var(--bv-rule);
	background-color: color-mix(in srgb, var(--bv-paper) 96%, transparent);
}

.bv-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bv-space-md);
	min-block-size: 4.25rem;
}

.bv-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--bv-bark);
	text-decoration: none;
	font-family: var(--bv-font-display);
	font-size: var(--bv-text-lg);
	font-weight: 600;
	letter-spacing: -0.02em;
	font-variation-settings: "SOFT" var(--bv-display-soft), "WONK" var(--bv-display-wonk);
}

.bv-brand__mark {
	display: grid;
	place-items: center;
	inline-size: 2.1rem;
	block-size: 2.1rem;
	border-radius: var(--bv-r);
	background-color: var(--bv-ember-050);
	color: var(--bv-ember);
	flex: none;
}

.custom-logo-link img {
	max-block-size: 2.6rem;
	inline-size: auto;
}

/* ---------------------------------------------------------------
 * Navigation
 *
 * Le trait sous l'item ne « glisse » pas : il se déploie depuis
 * l'arête inférieure, à l'image du remplissage par le bas.
 * ------------------------------------------------------------ */

.bv-nav {
	display: none;
}

@media (width >= 1200px) {

	.bv-nav {
		display: block;
	}
}

.bv-nav__list {
	display: flex;
	align-items: center;
	gap: var(--bv-space-md);
	list-style: none;
	margin: 0;
	padding: 0;
}

.bv-nav__item {
	position: relative;
}

.bv-nav__list a {
	position: relative;
	display: inline-block;
	padding-block: 0.35rem;
	font-size: var(--bv-text-sm);
	font-weight: 500;
	color: var(--bv-bark);
	text-decoration: none;
}

.bv-nav__list > .bv-nav__item > a::after,
.bv-nav__list > .menu-item > a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	block-size: 1.5px;
	background-color: var(--bv-ember);
	transform: scaleX(0);
	transform-origin: inline-start;
	transition: transform var(--bv-dur-mid) var(--bv-ease-out);
}

.bv-nav__list > .bv-nav__item > a:hover::after,
.bv-nav__list > .menu-item > a:hover::after,
.bv-nav__list > .current-menu-item > a::after,
.bv-nav__list > .current-menu-parent > a::after {
	transform: scaleX(1);
}

/* Sous-menu. */
.bv-nav .sub-menu {
	position: absolute;
	inset-block-start: calc(100% + 0.75rem);
	inset-inline-start: -1rem;
	z-index: var(--bv-z-raised);
	min-inline-size: 14rem;
	padding: 0.5rem;
	list-style: none;
	background-color: var(--bv-paper);
	border: var(--bv-line);
	border-radius: var(--bv-r-lg);
	box-shadow: var(--bv-sh-lifted);
	opacity: 0;
	visibility: hidden;
	transform: translate3d(0, 6px, 0);
	transition:
		opacity var(--bv-dur-fast) var(--bv-ease),
		transform var(--bv-dur-fast) var(--bv-ease),
		visibility var(--bv-dur-fast);
}

.bv-nav .menu-item:hover > .sub-menu,
.bv-nav .menu-item:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translate3d(0, 0, 0);
}

.bv-nav .sub-menu a {
	display: block;
	padding: 0.5rem 0.7rem;
	border-radius: var(--bv-r);
}

.bv-nav .sub-menu a:hover {
	background-color: var(--bv-linen);
	color: var(--bv-ember);
}

/* ---------------------------------------------------------------
 * Actions
 * ------------------------------------------------------------ */

.bv-header__actions {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.bv-icon-btn {
	position: relative;
	display: grid;
	place-items: center;
	inline-size: 2.6rem;
	block-size: 2.6rem;
	border-radius: var(--bv-r);
	color: var(--bv-bark);
	text-decoration: none;
	transition: background-color var(--bv-dur-fast) var(--bv-ease), color var(--bv-dur-fast) var(--bv-ease);
}

.bv-icon-btn:hover {
	background-color: var(--bv-linen);
	color: var(--bv-ember);
}

.bv-icon-btn--desktop {
	display: none;
}

@media (width >= 640px) {

	.bv-icon-btn--desktop {
		display: grid;
	}
}

.bv-count {
	position: absolute;
	inset-block-start: 0.25rem;
	inset-inline-end: 0.15rem;
	min-inline-size: 1.15rem;
	padding: 0 0.25rem;
	border-radius: var(--bv-r-pill);
	background-color: var(--bv-ember);
	color: var(--bv-paper);
	font-size: 0.65rem;
	font-weight: 600;
	line-height: 1.15rem;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
 * Bouton menu : morphose en croix
 *
 * Deux traits qui pivotent en +45° et −45° autour du même centre.
 * Aucun trait ne disparaît : ils se recombinent.
 * ------------------------------------------------------------ */

.bv-burger {
	display: grid;
}

@media (width >= 1200px) {

	.bv-burger {
		display: none;
	}
}

.bv-burger__box {
	position: relative;
	inline-size: 1.1rem;
	block-size: 0.7rem;
}

.bv-burger__line {
	position: absolute;
	inset-inline: 0;
	block-size: 1.5px;
	background-color: currentcolor;
	border-radius: 1px;
	transition: transform var(--bv-dur-mid) var(--bv-ease-mass);
}

.bv-burger__line:nth-child(1) {
	inset-block-start: 0;
}

.bv-burger__line:nth-child(2) {
	inset-block-end: 0;
}

.bv-burger[aria-expanded="true"] .bv-burger__line:nth-child(1) {
	transform: translateY(0.35rem) rotate(45deg);
}

.bv-burger[aria-expanded="true"] .bv-burger__line:nth-child(2) {
	transform: translateY(-0.35rem) rotate(-45deg);
}

/* ===============================================================
 * Panneau de recherche
 * ============================================================ */

.bv-search-panel {
	border-block-start: var(--bv-line);
	background-color: var(--bv-paper);
	padding-block: var(--bv-space-md);
}

.bv-search-form {
	display: flex;
	gap: var(--bv-space-xs);
	max-inline-size: 44rem;
	margin-inline: auto;
}

.bv-search-form .bv-input {
	flex: 1;
}

/* ===============================================================
 * Tiroir mobile
 * ============================================================ */

.bv-scrim {
	position: fixed;
	inset: 0;
	z-index: var(--bv-z-scrim);
	background-color: color-mix(in srgb, var(--bv-char) 55%, transparent);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity var(--bv-dur-mid) var(--bv-ease);
}

.bv-scrim.is-open {
	opacity: 1;
}

.bv-drawer {
	position: fixed;
	inset-block: 0;
	inset-inline-end: 0;
	z-index: var(--bv-z-drawer);
	display: flex;
	flex-direction: column;
	inline-size: min(92vw, 24rem);
	background-color: var(--bv-paper);
	box-shadow: var(--bv-sh-deep);
	transform: translate3d(100%, 0, 0);
	transition: transform var(--bv-dur-mid) var(--bv-ease-mass);
	overscroll-behavior: contain;
}

.bv-drawer.is-open {
	transform: translate3d(0, 0, 0);
}

.bv-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bv-space-sm);
	padding: var(--bv-space-sm) var(--bv-space-md);
	border-block-end: var(--bv-line);
}

.bv-drawer__body {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: var(--bv-space-md);
	padding: var(--bv-space-md);
}

.bv-drawer__foot {
	padding: var(--bv-space-md);
	border-block-start: var(--bv-line);
}

.bv-drawer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.bv-drawer__list a {
	display: block;
	padding-block: 0.7rem;
	border-block-end: var(--bv-line);
	font-family: var(--bv-font-display);
	font-size: var(--bv-text-lg);
	font-weight: 600;
	color: var(--bv-bark);
	text-decoration: none;
}

.bv-drawer__list a:hover {
	color: var(--bv-ember);
}

.bv-drawer__list .sub-menu {
	list-style: none;
	margin: 0;
	padding-inline-start: var(--bv-space-sm);
}

.bv-drawer__list .sub-menu a {
	font-family: var(--bv-font-body);
	font-size: var(--bv-text-sm);
	font-weight: 400;
	color: var(--bv-muted);
}

/* ===============================================================
 * Réassurance
 * ============================================================ */

.bv-reassure {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--bv-space-md);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.bv-reassure__item {
	display: flex;
	align-items: flex-start;
	gap: var(--bv-space-xs);
}

.bv-reassure__icon {
	display: grid;
	place-items: center;
	inline-size: 2.4rem;
	block-size: 2.4rem;
	flex: none;
	border-radius: var(--bv-r);
	background-color: var(--bv-linen);
	color: var(--bv-ember);
}

.bv-reassure__body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.bv-reassure__title {
	font-weight: 600;
	font-size: var(--bv-text-sm);
}

.bv-reassure__text {
	font-size: var(--bv-text-xs);
	color: var(--bv-muted);
}

.bv-reassure--strip {
	grid-auto-flow: column;
	grid-auto-columns: max-content;
	grid-template-columns: none;
	overflow-x: auto;
	scrollbar-width: none;
	padding-block: var(--bv-space-sm);
}

.bv-reassure--strip::-webkit-scrollbar {
	display: none;
}

/* ===============================================================
 * Pied de page
 * ============================================================ */

.bv-footer {
	margin-block-start: var(--bv-space-2xl);
	background-color: var(--bv-char);
	color: color-mix(in srgb, var(--bv-paper) 78%, transparent);
}

.bv-footer .bv-rings {
	color: color-mix(in srgb, var(--bv-paper) 12%, transparent);
}

.bv-footer__grid {
	display: grid;
	gap: var(--bv-space-lg);
	padding-block: var(--bv-space-xl);
	grid-template-columns: 1fr;
}

@media (width >= 640px) {

	.bv-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (width >= 900px) {

	.bv-footer__grid {
		grid-template-columns: 1.6fr repeat(3, 1fr);
		gap: var(--bv-space-xl);
	}
}

.bv-footer .bv-brand,
.bv-footer__heading {
	color: var(--bv-paper);
}

.bv-footer .bv-brand__mark {
	background-color: var(--bv-glow-12);
}

.bv-footer__brand {
	display: flex;
	flex-direction: column;
	gap: var(--bv-space-sm);
}

.bv-footer__tagline {
	font-size: var(--bv-text-sm);
	max-width: 34ch;
}

.bv-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	font-size: var(--bv-text-sm);
}

.bv-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
}

.bv-footer__contact svg {
	margin-block-start: 0.25em;
	flex: none;
	opacity: 0.65;
}

.bv-footer a {
	color: inherit;
	text-decoration: none;
}

.bv-footer a:hover {
	color: var(--bv-paper);
	text-decoration: underline;
}

.bv-footer__heading {
	font-family: var(--bv-font-body);
	font-size: var(--bv-text-xs);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-block-end: var(--bv-space-xs);
}

.bv-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: var(--bv-text-sm);
}

/* ===============================================================
 * Bas de page légal
 * ============================================================ */

.bv-legal {
	background-color: var(--bv-char);
	border-block-start: 1px solid var(--bv-glow-12);
	color: color-mix(in srgb, var(--bv-paper) 62%, transparent);
	font-size: var(--bv-text-xs);
}

.bv-legal__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--bv-space-sm);
	padding-block: var(--bv-space-sm);
}

.bv-pay {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bv-space-xs);
}

.bv-pay__label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.bv-pay__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bv-pay__item {
	padding: 0.2em 0.55em;
	border: 1px solid var(--bv-glow-12);
	border-radius: var(--bv-r-xs);
}

/* ===============================================================
 * Retour en haut
 * ============================================================ */

.bv-to-top {
	position: fixed;
	inset-block-end: var(--bv-space-md);
	inset-inline-end: var(--bv-space-md);
	z-index: var(--bv-z-sticky);
	display: grid;
	place-items: center;
	inline-size: 2.9rem;
	block-size: 2.9rem;
	border-radius: var(--bv-r-pill);
	background-color: var(--bv-char);
	color: var(--bv-paper);
	box-shadow: var(--bv-sh-lifted);
	opacity: 0;
	transform: translate3d(0, 0.75rem, 0);
	transition: opacity var(--bv-dur-mid) var(--bv-ease), transform var(--bv-dur-mid) var(--bv-ease);
}

.bv-to-top svg {
	transform: rotate(-45deg);
}

.bv-to-top.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

/* ===============================================================
 * Contenu principal
 * ============================================================ */

.bv-main {
	display: block;
	min-block-size: 40svh;
}

.bv-entry-meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: var(--bv-text-xs);
	color: var(--bv-muted);
}

.bv-entry-meta a {
	color: inherit;
	text-decoration: none;
}

.bv-card__excerpt {
	font-size: var(--bv-text-sm);
	color: var(--bv-muted);
}
