/*
 * JMB — structure commune : en-tête, barre des univers, bandeau promo, pied de page.
 * Mesures relevées dans la maquette (écran de référence 1680px).
 *
 * Espacements (marges, écarts) et arrondis : réglés dans les blocs (éditeur de site), pas ici.
 * Ce fichier ne garde que ce que l'éditeur ne sait pas faire (survols, pictos, responsive, intérieur des blocs
 * WordPress / WooCommerce) et ne doit jamais écraser un réglage visible dans l'éditeur.
 */

/* ─── Barre du haut (ordinateur) ────────────────────────────────────────────── */
.jmb-topbar {
	font-size: 0.9375rem;
}

.jmb-topbar__inner {
	width: 100%;
}

.jmb-topbar__menu {
	font-size: inherit;
	font-weight: 500;
}

.jmb-topbar__menu a:hover,
.jmb-topbar__menu a:focus {
	text-decoration: underline;
}

.jmb-topbar__phone {
	margin: 0;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.jmb-topbar__phone a {
	color: inherit;
	text-decoration: none;
}

/* ─── En-tête principal ─────────────────────────────────────────────────────── */
.jmb-header__inner {
	width: 100%;
}

.jmb-header__logo {
	flex-shrink: 0;
}

/* Largeur du logo : réglage du bloc Logo (ordinateur). */
.jmb-header__logo img {
	display: block;
	height: auto;
}

/* Recherche (ordinateur) : champ blanc + bouton vert, comme la maquette. */
.jmb-header__search {
	flex: 1 1 auto;
	max-width: 620px;
}

.jmb-header__search .wp-block-search__inside-wrapper {
	border: 0;
	padding: 0;
	border-radius: var(--wp--custom--radius--large);
	overflow: hidden;
	background: var(--wp--preset--color--white);
}

.jmb-header__search .wp-block-search__input {
	border: 0;
	height: 2.875rem;
	padding-inline: 1.25rem;
	font-size: 1rem;
	font-weight: 500;
	color: var(--wp--preset--color--primary);
	background: transparent;
}

.jmb-header__search .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

/* Bouton de recherche : picto Font Awesome light à la place du picto WordPress. */
.wp-block-search .wp-block-search__button.has-icon {
	margin: 0;
	padding: 0;
	width: 3.5rem;
	min-height: 2.875rem;
	border-radius: 0;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

.wp-block-search .wp-block-search__button.has-icon:hover {
	background: var(--wp--preset--color--accent-dark);
}

.wp-block-search__button.has-icon svg {
	display: none;
}

.wp-block-search__button.has-icon::before {
	content: "";
	display: block;
	width: 1.4rem;
	height: 1.4rem;
	margin: auto;
	background-color: currentColor;
	-webkit-mask: url(../icons/light/magnifying-glass.svg) center / contain no-repeat;
	mask: url(../icons/light/magnifying-glass.svg) center / contain no-repeat;
}

/* Pictos compte / panier / téléphone. */
.jmb-header__actions {
	--jmb-action-size: 1.625rem;
}

.jmb-header__actions > p {
	margin: 0;
}

.jmb-icon-only > a {
	color: inherit;
	text-decoration: none;
}

.jmb-icon-only > a::before,
.jmb-header__account svg,
.jmb-header__cart .wc-block-mini-cart__icon {
	width: var(--jmb-action-size);
	height: var(--jmb-action-size);
}

.jmb-header__account a {
	color: var(--wp--preset--color--white);
	display: inline-flex;
}

.jmb-header__account svg {
	display: none;
}

.jmb-header__account a::before,
.jmb-header__cart .wc-block-mini-cart__button::before {
	content: "";
	display: inline-block;
	width: var(--jmb-action-size);
	height: var(--jmb-action-size);
	background-color: currentColor;
	-webkit-mask: var(--jmb-ico) center / contain no-repeat;
	mask: var(--jmb-ico) center / contain no-repeat;
}

.jmb-header__account a::before {
	--jmb-ico: url(../icons/light/user.svg);
}

.jmb-header__cart .wc-block-mini-cart__button {
	color: var(--wp--preset--color--white);
	padding: 0;
}

.jmb-header__cart .wc-block-mini-cart__button::before {
	--jmb-ico: url(../icons/light/cart-circle-check.svg);
}

.jmb-header__cart .wc-block-mini-cart__icon {
	display: none;
}

.jmb-header__cart .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	border: 0;
	font-weight: 700;
}

/* Menu burger (mobile) : bloc « Menu », voir blocks/menu/style.css. */

@media (max-width: 1023.98px) {
	/* Logo réduit sur mobile (l'éditeur ne règle qu'une largeur, celle de l'ordinateur). */
	.jmb-header__logo img {
		width: 56px;
	}

	.jmb-header__actions {
		--jmb-action-size: 1.4rem;
	}

	/* Logo centré entre le burger et les pictos, comme la maquette mobile. */
	.jmb-header__inner > .jmb-header__burger,
	.jmb-header__inner > .jmb-header__actions {
		flex: 1 1 0;
	}

	.jmb-header__inner > .jmb-header__actions {
		justify-content: flex-end;
	}

	.jmb-header__search-mobile .wp-block-search__button.has-icon {
		width: var(--jmb-action-size);
		min-height: var(--jmb-action-size);
		background: transparent;
	}

	.jmb-header__search-mobile .wp-block-search__button.has-icon::before {
		width: var(--jmb-action-size);
		height: var(--jmb-action-size);
	}
}

/* ─── Barre des univers (ordinateur) ─────────────────────────────────────────── */
.jmb-univers-bar__menu {
	width: 100%;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1rem, 1.15vw, 1.125rem);
	letter-spacing: 0.02em;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1;
}

.jmb-univers-bar__menu .jmb-menu__list {
	justify-content: space-between;
	flex-wrap: nowrap;
}

.jmb-univers-bar__menu .jmb-univers > a {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0.55em;
	white-space: nowrap;
}

.jmb-univers-bar__menu .jmb-univers > a::before {
	width: 1.75em;
	height: 1.75em;
}

.jmb-univers-bar__menu a:hover,
.jmb-univers-bar__menu a:focus {
	color: var(--wp--preset--color--primary);
}

/* ─── Bandeau promo ─────────────────────────────────────────────────────────── */
.jmb-promo {
	text-align: center;
}

.jmb-promo__text {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.jmb-promo__text > strong:first-child {
	display: inline-block;
	margin-right: 1.5em;
	padding: 0.15em 0.6em;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary-dark);
	text-transform: uppercase;
	font-size: 0.9em;
}

.jmb-promo__text a {
	margin-left: 1.5em;
	color: inherit;
	text-decoration: none;
}

.jmb-promo__text a:hover {
	text-decoration: underline;
}

@media (max-width: 1023.98px) {
	.jmb-promo__text > strong:first-child {
		display: table;
		margin: 0 auto 0.3em;
	}

	.jmb-promo__text a {
		display: block;
		margin: 0;
	}
}

/* ─── Contenu ───────────────────────────────────────────────────────────────── */
/* Espace sous l'en-tête et avant le pied de page : identique sur toutes les pages (accueil exclu). */
.jmb-main {
	padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

/* ─── Fil d'Ariane (pages, catalogue, produit) ─────────────────────────────── */
.jmb-breadcrumbs {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--slate);
}

.jmb-breadcrumbs a {
	color: inherit;
}

/* Le bloc WooCommerce est « large » par défaut (1680 px) : on l'aligne sur le titre et le contenu. */
.jmb-main > .jmb-breadcrumbs.alignwide {
	max-width: var(--wp--style--global--content-size);
}

/* ─── Pied de page ──────────────────────────────────────────────────────────── */
.jmb-site-footer {
	margin-top: var(--wp--preset--spacing--60);
}

/* Bandeau parrainage posé à cheval sur le pied de page : ce chevauchement (-2.5rem) et la marge du haut du pied
   de page qui le compense (.jmb-footer) vont ensemble, ils restent donc ici. */
.jmb-parrainage-wrap {
	position: relative;
	z-index: 1;
	margin-bottom: -2.5rem;
}

.jmb-parrainage__text {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

.jmb-parrainage__button .wp-block-button__link {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

.jmb-parrainage__button .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary-dark) !important;
}

.jmb-footer {
	padding-top: calc(2.5rem + var(--wp--preset--spacing--50));
}

.jmb-footer__title {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.03em;
	font-weight: 700;
	text-transform: uppercase;
}

.jmb-footer__menu {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	line-height: 1.7;
}

.jmb-footer__menu a:hover,
.jmb-footer__menu a:focus {
	text-decoration: underline;
}
/* Liens de référencement : colonne étroite à droite (largeur réglable dans l'éditeur), cadre défilant
   d'environ 8 lignes, comme sur l'ancien site. */
.jmb-footer__seo.is-style-hauteur-fixe {
	max-height: 11rem;
	padding-right: 0.5rem;
	line-height: 1.7;
}

/* Tablette : la colonne passe sous les quatre autres, sur toute la largeur. */
@media (min-width: 782px) and (max-width: 1099.98px) {
	.wp-block-columns.jmb-footer__columns {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.jmb-footer__columns > .jmb-footer__seo-col {
		flex-basis: 100% !important;
	}
}

.jmb-footer__credits {
	text-align: center;
	opacity: 0.8;
}

.jmb-footer__credits a {
	color: inherit;
}

/* Mobile : 3 colonnes, « Conseils » sous « L'entreprise » (maquette mobile). */
@media (max-width: 781.98px) {
	.wp-block-columns.jmb-footer__columns {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem 1rem;
	}

	.wp-block-columns.jmb-footer__columns > .wp-block-column:nth-child(1) {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.wp-block-columns.jmb-footer__columns > .wp-block-column:nth-child(2) {
		grid-column: 2;
		grid-row: 1;
	}

	.wp-block-columns.jmb-footer__columns > .wp-block-column:nth-child(3) {
		grid-column: 2;
		grid-row: 2;
	}

	.wp-block-columns.jmb-footer__columns > .wp-block-column:nth-child(4) {
		grid-column: 3;
		grid-row: 1 / span 2;
	}

	.wp-block-columns.jmb-footer__columns > .jmb-footer__seo-col {
		grid-column: 1 / -1;
		grid-row: 3;
	}

	.jmb-footer__title {
		font-size: var(--wp--preset--font-size--x-small);
	}

	.jmb-footer__menu {
		font-size: var(--wp--preset--font-size--x-small);
	}

	.jmb-parrainage {
		justify-content: center;
		text-align: center;
	}
}
