/* Sections de la page d'accueil et variantes de blocs propres au thème.
   Les couleurs, polices et espacements viennent de theme.json. */

/* Titres de section */
.mayte-title {
	max-width: 14em;
	margin-inline: auto;
	text-wrap: balance;
}

/* Rayons mis en avant : cartes décalées une sur deux */
.mayte-card a {
	color: var(--wp--preset--color--brown);
	text-decoration: none;
}

.mayte-card a:hover {
	color: var(--wp--preset--color--red);
}

.mayte-card .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 5 / 7;
	object-fit: cover;
}

.mayte-card .wp-block-heading {
	margin-block: var(--wp--preset--spacing--40) 0.25rem;
}

.mayte-card p {
	margin-block-start: 0;
}

@media (min-width: 782px) {
	.mayte-card--offset {
		padding-top: 2.75rem;
	}
}

/* Bandeau anthracite derrière l'image : il part du bord de l'écran et s'arrête
   juste avant la colonne de texte, l'image dépasse du bandeau par le bas (ou le haut). */
.mayte-split {
	overflow-x: clip;
}

.mayte-split .wp-block-column:has(> .wp-block-image) {
	position: relative;
	isolation: isolate;
}

.mayte-split .wp-block-column:has(> .wp-block-image)::before {
	content: "";
	position: absolute;
	z-index: -1;
	background: var(--wp--preset--color--charcoal);
}

.mayte-split--left .wp-block-column:has(> .wp-block-image)::before {
	top: 0;
	bottom: 18%;
	left: -100vw;
	right: calc(var(--wp--preset--spacing--70) / -2);
}

.mayte-split--right .wp-block-column:has(> .wp-block-image)::before {
	top: 18%;
	right: -100vw;
	bottom: 0;
	left: calc(var(--wp--preset--spacing--70) / -2);
}

@media (max-width: 781px) {
	.mayte-split .wp-block-column:has(> .wp-block-image)::before {
		display: none;
	}
}

/* Produits : prix à gauche, panier en icône à droite */
.mayte-products .wc-block-components-product-image img {
	object-fit: cover;
}

.mayte-products .wc-block-components-product-button .wp-block-button__link {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--brown);
	font-size: 0 !important;
}

.mayte-products .wc-block-components-product-button .wp-block-button__link::before {
	content: "";
	width: 1.5rem;
	height: 1.5rem;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l1 12H5L6 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l1 12H5L6 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mayte-products .wc-block-components-product-button .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--red);
}

/* Trois valeurs, la carte centrale encadrée de carreaux de ciment */
.mayte-value {
	text-align: center;
}

.mayte-value .wp-block-heading {
	margin-block: 0.5rem 1rem;
}

.mayte-tile-frame {
	padding: 1.75rem;
	background: url("../images/carreaux-ciment.png") repeat;
}

/* Bandeau de réassurance sur fond de carreaux de ciment */
.mayte-tilebg {
	background: url("../images/carreaux-ciment.png") repeat;
}

.mayte-trust {
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--white);
}

.mayte-trust .wp-block-heading {
	margin-block: 0 0.75rem;
	font-weight: 500;
}

/* Bouton clair : fond blanc, trait vert devant le libellé */
.wp-block-button.is-style-light .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--brown);
}

.wp-block-button.is-style-light .wp-block-button__link::before {
	content: "";
	width: 1.5rem;
	height: 1px;
	background: var(--wp--preset--color--green);
}

.wp-block-button.is-style-light .wp-block-button__link:hover {
	background: var(--wp--preset--color--brown);
	color: var(--wp--preset--color--white);
}

/* Bouton « + » : le libellé reste lu par les lecteurs d'écran, seul le plus est affiché */
.wp-block-button.is-style-plus .wp-block-button__link {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	background: var(--wp--preset--color--white);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--brown);
	font-size: 0;
}

.wp-block-button.is-style-plus .wp-block-button__link::after {
	content: "+";
	font-size: 1.5rem;
	line-height: 1;
}

.wp-block-button.is-style-plus .wp-block-button__link:hover {
	background: var(--wp--preset--color--brown);
	color: var(--wp--preset--color--white);
}

/* En-tête transparent posé sur le hero de l'accueil */
.mayte-header--overlay {
	position: absolute;
	inset: 0 0 auto;
	z-index: 20;
	background: linear-gradient(rgb(0 0 0 / 0.6), transparent);
}

.mayte-header--overlay .wp-block-navigation a,
.mayte-header--overlay .wp-block-navigation__responsive-container-open,
.mayte-header--overlay .wp-block-search .wp-block-search__button,
.mayte-header--overlay .wc-block-mini-cart__button,
.mayte-header--overlay .wc-block-customer-account a {
	color: var(--wp--preset--color--white);
}

.mayte-header--overlay .wp-block-navigation a:hover,
.mayte-header--overlay .wp-block-search .wp-block-search__button:hover {
	color: var(--wp--preset--color--green);
}

.mayte-header--overlay .wp-block-navigation__submenu-container a {
	color: var(--wp--preset--color--brown);
}

.mayte-header--overlay .wp-block-navigation__responsive-container.is-menu-open a {
	color: var(--wp--preset--color--brown);
}

/* Pied de page : listes de liens sans puces */
.mayte-footer-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mayte-footer-list li {
	margin-block: 0.4rem;
}

/* Messages de confirmation WooCommerce : le vert du logo à la place du vert par défaut */
.wc-block-components-notice-banner.is-success {
	border-color: var(--wp--preset--color--green);
	background-color: color-mix(in srgb, var(--wp--preset--color--green) 8%, var(--wp--preset--color--white));
}

.wc-block-components-notice-banner.is-success > svg {
	background-color: var(--wp--preset--color--green);
}

.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--wp--preset--color--green);
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--wp--preset--color--green);
}
