/* =========================================================
   MLT OFFRES — mosaïque asymétrique des 3 offres. Dépend de mlt-tokens.
   Mobile : blocs empilés. Tablette (768-1279) : grand bloc + 2 blocs côte à côte. Desktop (≥ 1280) : grand bloc photo (7/12) + 2 blocs empilés.
   ========================================================= */

.mlt-offres {
	background: var(--mlt-color-blanc);
}

.mlt-offres__entete {
	max-width: 760px;
	margin-bottom: var(--mlt-space-48);
}

.mlt-offres__grille {
	display: grid;
	gap: var(--mlt-space-16);
}

/* isolation : la photo de fond passe en z-index -1 sans sortir de la carte ;
   le texte reste non positionné pour que le lien cliquable couvre toute la carte. */
.mlt-offre {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--mlt-radius-panel);
	min-height: 420px;
}

.mlt-offre__media {
	position: relative;
}

.mlt-offres .mlt-offre__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 600ms var(--mlt-ease);
}

/* Carte entière cliquable : la zone du lien « Demander un devis » s'étend à toute la carte */
.mlt-offre .mlt-lien::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
}

.mlt-offre:hover .mlt-offre__img {
	transform: scale(1.04);
}

.mlt-offre:hover .mlt-lien::after {
	transform: translateX(4px);
}

/* Focus clavier : anneau sur toute la carte (le lien couvre la carte) */
.mlt-offre:focus-within {
	box-shadow: var(--mlt-focus-ring);
}

.mlt-offre .mlt-lien:focus-visible {
	box-shadow: none;
}

.mlt-offre__texte {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--mlt-space-16);
	padding: var(--mlt-space-32);
}

.mlt-page .mlt-offre__titre {
	margin: 0;
	font-size: clamp(1.75rem, 2.6vw, 2.5rem);
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.035em;
}

.mlt-offre__desc {
	max-width: 44ch;
	margin: 0;
	font-size: var(--mlt-fs-body);
	line-height: var(--mlt-lh-body);
}

.mlt-offre__points {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mlt-space-8);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mlt-offre__points li {
	padding: var(--mlt-space-4) var(--mlt-space-16);
	border: 1px solid currentColor;
	border-radius: var(--mlt-radius-pill);
	font-size: var(--mlt-fs-small);
	font-weight: 500;
	line-height: 1.5;
}

/* Sur fond sombre : puces légèrement remplies pour se détacher de la photo */
.mlt-offre--photo .mlt-offre__points li,
.mlt-offre--olive .mlt-offre__points li {
	border-color: var(--mlt-color-blanc-80);
	background: var(--mlt-color-ligne-inverse);
}

/* Sur crème : puces sur fond blanc */
.mlt-offre--produit .mlt-offre__points li {
	border-color: var(--mlt-color-ligne);
	background: var(--mlt-color-blanc);
	color: var(--mlt-color-olive);
}

/* --- Traitement « photo » : image pleine, texte blanc sur fondu olive --- */
.mlt-offre--photo {
	justify-content: flex-end;
	color: var(--mlt-color-blanc);
	background: var(--mlt-color-olive);
}

.mlt-offre--photo .mlt-offre__media {
	position: absolute;
	z-index: -1;
	inset: 0;
}

.mlt-offre--photo {
	min-height: 560px;
}

/* Mobile : fondu plus haut pour garantir le contraste du texte blanc */
.mlt-offre--photo .mlt-offre__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 5%, var(--mlt-color-olive) 62%);
}

@media (min-width: 768px) {
	.mlt-offre--photo .mlt-offre__media::after {
		background: linear-gradient(to bottom, transparent 30%, var(--mlt-color-olive) 92%);
	}
}

.mlt-offre--photo .mlt-offre__titre,
.mlt-offre--olive .mlt-offre__titre {
	color: var(--mlt-color-blanc);
}

.mlt-offre--photo .mlt-offre__desc,
.mlt-offre--olive .mlt-offre__desc {
	color: var(--mlt-color-blanc-80);
}

/* --- Traitement « produit » : visuel détouré sur crème --- */
.mlt-offre--produit {
	background: var(--mlt-color-fond);
	color: var(--mlt-color-texte);
}

.mlt-offre--produit .mlt-offre__titre {
	color: var(--mlt-color-olive);
}

.mlt-offre--produit .mlt-offre__desc {
	color: var(--mlt-color-texte-doux);
}

.mlt-offre--produit .mlt-offre__media {
	order: 2;
	height: 240px;
	margin: 0 var(--mlt-space-32) var(--mlt-space-32);
}

.mlt-offres .mlt-offre--produit .mlt-offre__img {
	position: relative;
	z-index: 1;
	object-fit: contain;
	object-position: center bottom;
}

/* Ombre au sol sous le produit détouré (même principe que le hero) */
.mlt-offre--produit .mlt-offre__media::after {
	content: "";
	position: absolute;
	left: 12%;
	right: 12%;
	bottom: -4%;
	height: 12%;
	background: radial-gradient(50% 50% at 50% 50%, var(--mlt-color-ombre) 0%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
	.mlt-offres .mlt-offre__img {
		transition: none;
	}

	.mlt-offre:hover .mlt-offre__img {
		transform: none;
	}
}

/* --- Traitement « olive » : panneau texturé + photo en bandeau --- */
.mlt-offre--olive {
	color: var(--mlt-color-blanc);
}

/* La photo occupe toute la hauteur restante (cartes de même hauteur côte à côte en tablette) */
.mlt-offre--olive .mlt-offre__media {
	order: 2;
	flex: 1 1 220px;
	min-height: 220px;
}

.mlt-offres .mlt-offre--olive .mlt-offre__img {
	position: absolute;
	inset: 0;
}

@media (min-width: 768px) {
	.mlt-offres__grille {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mlt-offre--grand {
		grid-column: 1 / -1;
		min-height: 560px;
	}
}

/* Mosaïque (grand bloc 7/12 + 2 blocs empilés) dès 1280 px : en dessous, les petits blocs
   sont trop étroits pour un texte et un visuel côte à côte → disposition tablette. */
@media (min-width: 1280px) {
	.mlt-offres__entete {
		margin-bottom: var(--mlt-space-64);
	}

	.mlt-offres__grille {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		grid-template-rows: repeat(2, minmax(360px, auto));
		gap: var(--mlt-space-24);
	}

	.mlt-offre--grand {
		grid-column: 1 / span 7;
		grid-row: 1 / span 2;
		min-height: 760px;
	}

	.mlt-offre--petit {
		grid-column: 8 / -1;
		min-height: 0;
	}

	.mlt-offre__texte {
		padding: var(--mlt-space-48);
	}

	/* Blocs empilés : texte à gauche, visuel à droite */
	.mlt-offre--petit {
		flex-direction: row;
		align-items: stretch;
	}

	.mlt-offre--petit .mlt-offre__texte {
		flex: 1 1 58%;
		justify-content: center;
		padding: var(--mlt-space-32) var(--mlt-space-24) var(--mlt-space-32) var(--mlt-space-32);
	}

	.mlt-offre--petit .mlt-offre__media {
		order: 2;
		flex: 0 0 42%;
		height: auto;
		margin: 0;
	}

	/* Visuel produit plus grand : moitié de la carte, posé en bas sur son ombre */
	.mlt-offre--produit.mlt-offre--petit .mlt-offre__media {
		flex-basis: 40%;
		margin: var(--mlt-space-24) var(--mlt-space-24) var(--mlt-space-32) 0;
	}


	.mlt-page .mlt-offre--petit .mlt-offre__titre {
		font-size: clamp(1.5rem, 2vw, 2rem);
	}

	.mlt-offre--petit .mlt-offre__desc {
		font-size: var(--mlt-fs-small);
	}
}

/* Dès 1280 px les petites cartes ont la place d'un texte au corps normal (plus lisible) */
@media (min-width: 1280px) {
	.mlt-offre--petit .mlt-offre__desc {
		font-size: var(--mlt-fs-body);
	}

	/* « Demander un devis » sur une ligne (en dessous, la carte est trop étroite) */
	.mlt-offre--petit .mlt-lien {
		white-space: nowrap;
	}
}
