/* LENO Peinture — styles du thème
 * Couleurs et typographie de base : theme.json.
 * Ce fichier ajoute le mur d'accueil, le ruban de masquage, le nuancier et la mise en page des sections.
 */

:root {
	--leno-red: var(--wp--preset--color--rouge, #B3130F);
	--leno-ink: var(--wp--preset--color--encre, #161616);
	--leno-line: var(--wp--preset--color--gypse, #D9D7D2);
	--leno-tape: var(--wp--preset--color--ruban, #E6DCBF);
	--leno-split: 56%;
	/* papier crêpé du ruban */
	--leno-tape-texture: repeating-linear-gradient(
		0deg,
		rgba(255, 255, 255, 0.22) 0 1px,
		rgba(0, 0, 0, 0) 1px 3px,
		rgba(110, 90, 40, 0.06) 3px 4px,
		rgba(0, 0, 0, 0) 4px 6px
	);
	--leno-tape-texture-h: repeating-linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.22) 0 1px,
		rgba(0, 0, 0, 0) 1px 3px,
		rgba(110, 90, 40, 0.06) 3px 4px,
		rgba(0, 0, 0, 0) 4px 6px
	);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2,
.wp-block-post-title,
.wp-block-query-title {
	font-stretch: 84%;
	text-wrap: balance;
}
h3, h4 { font-stretch: 90%; }
.wp-element-button,
.wp-block-button__link { font-stretch: 94%; }
p, li { text-wrap: pretty; }

:where(a, button, .wp-element-button):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

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

/* ---------- En-tête ---------- */
.leno-header { border-bottom: 1px solid var(--leno-line); }
.leno-logo { margin: 0; flex: none; }
.leno-logo img { display: block; height: auto; }
.leno-nav a:hover { text-decoration: underline; text-decoration-color: var(--leno-red); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.leno-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	gap: 1.25rem;
	font-size: 1.5rem;
	font-weight: 800;
	font-stretch: 86%;
}
@media (max-width: 599px) {
	.leno-header .leno-nav { order: 2; }
	.leno-header .leno-header__cta .wp-block-button__link { font-size: 0.875rem; padding: 0.55rem 0.7rem !important; white-space: nowrap; }
	.leno-header .leno-logo img { width: 128px !important; }
}
@media (max-width: 359px) {
	.leno-header .leno-header__cta { display: none; }
}

/* ---------- Accueil : le mur ---------- */
.leno-wall {
	position: relative;
	display: grid;
	grid-template-columns: var(--leno-split) 1fr;
	min-height: min(84vh, 820px);
	background-color: var(--wp--preset--color--blanc);
	overflow: hidden;
	isolation: isolate;
}
.wp-block-group.leno-wall { margin-block-start: 0; }
.leno-wall > * { margin-block-start: 0 !important; }

/* mur fraîchement peint en blanc, léger grain du rouleau */
.leno-wall__paint {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1.75rem;
	padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 4.5rem);
	background-image:
		linear-gradient(110deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.035)),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.leno-wall__paint > * { margin: 0 !important; }

.leno-wall__title {
	font-size: var(--wp--preset--font-size--huge);
	line-height: 0.98;
	max-width: 13ch;
}
.leno-wall__lead {
	max-width: 34rem;
	font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
	line-height: 1.6;
}
.leno-wall .wp-block-buttons { gap: 0.75rem; }
.leno-wall .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--leno-ink);
	border: 2px solid var(--leno-ink);
	padding: calc(1rem - 2px) calc(1.5rem - 2px);
}
.leno-wall .is-style-outline .wp-block-button__link:hover {
	background: var(--leno-ink);
	color: var(--wp--preset--color--blanc);
}

.leno-wall__photo {
	height: 100%;
	margin: 0;
}
.leno-wall__photo img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

/* le ruban de masquage, posé sur la ligne entre le mur et la photo */
.leno-wall::after {
	content: "";
	position: absolute;
	z-index: 2;
	top: -4%;
	bottom: -4%;
	left: calc(var(--leno-split) - 22px);
	width: 44px;
	background-color: var(--leno-tape);
	background-image: var(--leno-tape-texture);
	box-shadow: 0 1px 3px rgba(22, 22, 22, 0.28);
	transform: rotate(1.4deg);
	transform-origin: top center;
	animation: leno-pose-ruban 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
	pointer-events: none;
}
@keyframes leno-pose-ruban {
	from { transform: rotate(1.4deg) scaleY(0); }
	to { transform: rotate(1.4deg) scaleY(1); }
}

@media (max-width: 781px) {
	.leno-wall {
		grid-template-columns: 1fr;
		grid-template-rows: auto 260px;
		min-height: 0;
	}
	.leno-wall::after {
		top: auto;
		bottom: calc(260px - 18px);
		left: -4%;
		right: -4%;
		width: auto;
		height: 36px;
		background-image: var(--leno-tape-texture-h);
		transform: rotate(-1.2deg);
		transform-origin: left center;
		animation-name: leno-pose-ruban-h;
	}
	.leno-wall__paint { padding-bottom: 3.25rem; }
}
@keyframes leno-pose-ruban-h {
	from { transform: rotate(-1.2deg) scaleX(0); }
	to { transform: rotate(-1.2deg) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
	.leno-wall::after { animation: none; }
}

/* ---------- Bande des métiers ---------- */
.leno-metiers__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: 700;
	font-stretch: 90%;
	font-size: 1.0625rem;
}
.leno-metiers__list li {
	display: flex;
	align-items: center;
	gap: 0.7rem;
}
.leno-metiers__list li::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	background: var(--leno-red);
	flex: none;
}

/* ---------- Sections ---------- */
.leno-section > * + * { margin-block-start: 0; }
.leno-intro > * { max-width: 46rem; }
.leno-intro > p,
.leno-section .wp-block-column > p {
	font-size: clamp(1.0625rem, 1.4vw, 1.2rem);
	margin-top: 1.25rem;
}
.leno-section h2 { margin-bottom: 0; }

/* ---------- Nuancier des prestations ---------- */
.leno-chip {
	--chip: #E6E3DC;
	--chip-text: var(--leno-ink);
	--chip-name: "";
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0 1.4rem 1.6rem;
	background: var(--wp--preset--color--blanc);
	border: 1px solid var(--leno-line);
	border-radius: 3px;
	overflow: hidden;
}
.leno-chip > * { margin: 0 !important; }
.leno-chip::before {
	content: "";
	display: block;
	height: clamp(5.5rem, 9vw, 7.5rem);
	margin: 0 -1.4rem 0.6rem;
	background: var(--chip);
	border-bottom: 1px dashed rgba(22, 22, 22, 0.3);
}
.leno-chip::after {
	content: var(--chip-name);
	position: absolute;
	top: 0.8rem;
	left: 1.4rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--chip-text);
	opacity: 0.85;
}
.leno-chip--blanc-platre { --chip: #E6E3DC; --chip-name: "Blanc plâtre"; }
.leno-chip--vert-salon   { --chip: #2F6A46; --chip-text: #fff; --chip-name: "Vert salon"; }
.leno-chip--terre-cuite  { --chip: #A0533A; --chip-text: #fff; --chip-name: "Terre cuite"; }
.leno-chip--gris-beton   { --chip: #BDBBB6; --chip-name: "Gris béton"; }
.leno-chip--chene        { --chip: #7B4B2D; --chip-text: #fff; --chip-name: "Chêne"; }
.leno-chip--ocre         { --chip: #C88B2E; --chip-name: "Ocre"; }
.leno-chip--anthracite   { --chip: #3E3E3C; --chip-text: #fff; --chip-name: "Anthracite"; }
.leno-chip--pierre       { --chip: #8A847A; --chip-text: #fff; --chip-name: "Pierre"; }
.leno-chip--rouge        { --chip: var(--leno-red); --chip-text: #fff; --chip-name: "Rouge LENO"; }

.leno-chip h3 { font-size: clamp(1.35rem, 1.8vw, 1.6rem); line-height: 1.1; }
.leno-chip p { font-size: 1rem; line-height: 1.55; }

/* ---------- Isolation : coupe et couches ---------- */
.leno-coupe { margin: 0; }
.leno-coupe img { width: 100%; height: auto; }
.leno-isolation .wp-block-column > * + * { margin-block-start: 1.25rem; }
.leno-couches {
	list-style: none;
	counter-reset: couche;
	padding: 0;
	margin-top: 2rem !important;
}
.leno-couches li {
	counter-increment: couche;
	position: relative;
	padding: 0.75rem 0 0.75rem 3rem;
	border-top: 1px solid var(--leno-line);
	line-height: 1.5;
}
.leno-couches li:last-child { border-bottom: 1px solid var(--leno-line); }
.leno-couches li::before {
	content: counter(couche);
	position: absolute;
	left: 0;
	top: 0.7rem;
	display: grid;
	place-items: center;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 50%;
	background: var(--leno-red);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
}

/* ---------- Style de groupe « Ruban de masquage » ---------- */
.is-style-ruban {
	position: relative;
	max-width: 38rem;
	padding: 1.15rem 1.5rem;
	background-color: var(--leno-tape);
	background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(110, 90, 40, 0.06));
	color: var(--leno-ink);
	box-shadow: 0 1px 2px rgba(22, 22, 22, 0.2);
	transform: rotate(-0.6deg);
	margin-top: 2rem !important;
}
.is-style-ruban > * { margin: 0; }
.is-style-ruban p { font-size: 1rem; line-height: 1.55; }

/* ---------- Engagements ---------- */
.leno-engagements {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 2.5rem;
	border-top: 1px solid var(--leno-line);
}
.leno-engagements li {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1.15rem 0;
	border-bottom: 1px solid var(--leno-line);
	font-size: clamp(1.125rem, 1.5vw, 1.3rem);
	font-weight: 700;
	font-stretch: 90%;
	line-height: 1.25;
}
.leno-engagements li::before {
	content: "";
	flex: none;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat,
		var(--leno-red);
}
@media (max-width: 600px) {
	.leno-engagements { grid-template-columns: 1fr; }
}

.leno-intro > .leno-manifeste__texte {
	max-width: 34ch;
	margin: 0;
	font-size: clamp(1.6rem, 3.2vw, 2.6rem);
	font-weight: 700;
	font-stretch: 86%;
	line-height: 1.2;
	text-wrap: balance;
}
.leno-manifeste__texte::before {
	content: "";
	display: block;
	width: 3.5rem;
	height: 5px;
	background: var(--leno-red);
	margin-bottom: 1.5rem;
}

/* ---------- Étapes d'un chantier (composition optionnelle) ---------- */
.leno-etapes {
	list-style: none;
	counter-reset: etape;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem;
}
.leno-etapes li {
	counter-increment: etape;
	padding-top: 1rem;
	border-top: 3px solid var(--leno-ink);
	line-height: 1.55;
}
.leno-etapes li::before {
	content: counter(etape);
	display: block;
	font-size: clamp(3.5rem, 6vw, 5.5rem);
	font-weight: 300;
	font-stretch: 70%;
	line-height: 1;
	color: var(--leno-red);
	margin-bottom: 0.75rem;
}
.leno-etapes strong {
	display: block;
	font-size: var(--wp--preset--font-size--large);
	font-stretch: 86%;
	font-weight: 800;
	margin-bottom: 0.4rem;
}
@media (max-width: 900px) { .leno-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .leno-etapes { grid-template-columns: 1fr; } }

/* ---------- Réalisations ---------- */
.wp-block-group.leno-mosaique {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(11rem, 17vw, 16rem);
	grid-auto-flow: dense;
}
.leno-mosaique .wp-block-image {
	position: relative;
	margin: 0;
	height: 100%;
	overflow: hidden;
	background: var(--leno-line);
}
.leno-mosaique .wp-block-image img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}
.leno-mosaique .wp-block-image:nth-child(1),
.leno-mosaique .wp-block-image:nth-child(4) { grid-row: span 2; }
.leno-mosaique .wp-block-image:nth-child(7),
.leno-mosaique .wp-block-image:nth-child(8) { grid-column: span 2; }
.leno-mosaique .wp-element-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 2.25rem 0.9rem 0.75rem;
	background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62));
	color: #fff;
	text-align: left;
	font-weight: 600;
}
@media (max-width: 781px) {
	.wp-block-group.leno-mosaique {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 11rem;
	}
}

/* ---------- Contact ---------- */
.leno-contact { position: relative; }
.leno-contact::before {
	content: "";
	position: absolute;
	top: -18px;
	left: clamp(1rem, 8vw, 7rem);
	width: clamp(140px, 22vw, 260px);
	height: 36px;
	background-color: var(--leno-tape);
	background-image: var(--leno-tape-texture-h);
	box-shadow: 0 1px 3px rgba(22, 22, 22, 0.3);
	transform: rotate(-2.5deg);
}
.leno-contact .wp-block-column > * + * { margin-block-start: 1.25rem; }
.leno-contact p { font-size: clamp(1.0625rem, 1.4vw, 1.2rem); max-width: 34rem; }
.leno-contact__infos { align-self: flex-end; }
.leno-contact .leno-phone {
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	font-weight: 800;
	font-stretch: 80%;
	line-height: 1;
	white-space: nowrap;
}
.leno-contact a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.leno-contact .leno-phone a { text-decoration: none; }
.leno-contact .leno-phone a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.leno-contact .wp-block-button__link:hover { background: var(--leno-ink) !important; color: #fff !important; }

/* ---------- Pied de page ---------- */
.leno-footer { border-top: 1px solid var(--leno-line); }
.leno-footer .leno-logo img { width: 200px !important; }
.leno-signature {
	margin-top: 1.25rem;
	color: var(--leno-red);
	font-style: italic;
	font-weight: 600;
	font-size: 1.125rem;
}
.leno-footer h4 {
	font-size: var(--wp--preset--font-size--small);
	font-stretch: 100%;
	font-weight: 700;
	color: var(--leno-red);
	margin-bottom: 0.5rem;
}
.leno-footer a { text-decoration: none; }
.leno-footer a:hover { text-decoration: underline; }
.leno-footer .wp-block-separator { border: 0; height: 1px; opacity: 1; }

/* ---------- Pages et articles ---------- */
.leno-entree { border-bottom: 1px solid var(--leno-line); }
.leno-entree > * + * { margin-block-start: 0.6rem; }
