/*
 * « Projetez votre déco » — #468. Les couleurs et les formes du site (jetons),
 * pas la palette de la maquette. Deux colonnes sur ordinateur ; à 991 et
 * moins, la colonne latérale (le panier déco à l'étape 2) passe dessous.
 */

.pel-projection {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-l);
	scroll-margin-top: calc(var(--header-h, var(--pel-entete-h)) + var(--pel-space-s));
}

/* --- Le fil d'étapes ------------------------------------------------------- */
.pel-projection__etapes {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pel-space-s) var(--pel-space-m);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pel-projection__etape {
	display: flex;
	align-items: center;
	gap: var(--pel-space-2xs);
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
}

.pel-projection__etape.is-current {
	color: var(--pel-encre);
	font-weight: 600;
}

.pel-projection__etape-numero {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--pel-case) + var(--pel-space-3xs));
	height: calc(var(--pel-case) + var(--pel-space-3xs));
	border-radius: var(--pel-radius-pill);
	background: var(--pel-champagne-pale);
	color: var(--pel-encre-douce);
}

.pel-projection__etape.is-current .pel-projection__etape-numero {
	background: var(--pel-terre-cuite);
	color: var(--pel-blanc);
}

/* --- Titres et cartes ------------------------------------------------------ */
.pel-projection__entete {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-2xs);
	margin-bottom: var(--pel-space-m);
}

.pel-projection__titre {
	margin: 0;
	font-family: var(--pel-font-titre);
	font-size: var(--pel-fs-h1);
	line-height: var(--pel-lh-titre);
}

.pel-projection__chapo {
	max-width: var(--pel-container);
	margin: 0;
	color: var(--pel-encre-douce);
	line-height: var(--pel-lh-texte);
}

.pel-projection__colonnes {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: var(--pel-space-l);
	align-items: start;
}

.pel-projection__principale {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-l);
}

.pel-projection__carte {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-m);
	padding: var(--pel-space-l);
	border: var(--pel-filet) solid var(--pel-lin);
	border-radius: var(--pel-radius-l);
	background: var(--pel-blanc);
}

.pel-projection__carte-entete {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--pel-space-s);
}

.pel-projection__carte-titre {
	margin: 0;
	font-family: var(--pel-font-titre);
	font-size: var(--pel-fs-h3);
	line-height: var(--pel-lh-titre);
}

/* --- Étape 1 : les champs -------------------------------------------------- */
.pel-projection__groupe {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-xs);
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.pel-projection__legende {
	margin-bottom: var(--pel-space-2xs);
	padding: 0;
	color: var(--pel-encre);
	font-size: var(--pel-fs-small);
	font-weight: 600;
}

.pel-projection__facultatif {
	color: var(--pel-gris-chaud);
	font-weight: 400;
}

.pel-projection__aide {
	margin: 0;
}

.pel-projection__champ {
	min-width: 0;
}

.pel-projection__texte {
	min-height: calc(var(--pel-champ-h) * 3);
	padding-block: var(--pel-space-s);
	line-height: var(--pel-lh-texte);
	resize: vertical;
}

.pel-projection__ligne {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: var(--pel-space-s);
}

/* Pastilles : un bouton radio caché, son libellé en pilule. */
.pel-projection__pastilles {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pel-space-2xs);
}

.pel-projection__pastille {
	position: relative;
	display: inline-flex;
}

.pel-projection__radio {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.pel-projection__pastille-texte {
	display: inline-flex;
	align-items: center;
	min-height: var(--pel-cible);
	padding-inline: var(--pel-space-s);
	border: var(--pel-filet) solid var(--pel-bord-champ);
	border-radius: var(--pel-radius-pill);
	background: var(--pel-blanc);
	color: var(--pel-encre);
	font-size: var(--pel-fs-small);
}

.pel-projection__radio:checked + .pel-projection__pastille-texte {
	border-color: var(--pel-terre-cuite);
	background: var(--pel-terre-cuite);
	color: var(--pel-blanc);
}

.pel-projection__radio:focus-visible + .pel-projection__pastille-texte {
	outline: var(--pel-focus-epaisseur) solid var(--pel-focus-couleur);
	outline-offset: var(--pel-focus-decalage);
}

/* Type de lieu : trois grandes cartes. */
.pel-projection__lieux {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--pel-space-s);
}

.pel-projection__lieu {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-3xs);
	padding: var(--pel-space-s) var(--pel-space-m);
	border: var(--pel-trait) solid var(--pel-bord-champ);
	border-radius: var(--pel-radius-m);
	background: var(--pel-blanc);
	cursor: pointer;
}

.pel-projection__lieu:has(.pel-projection__radio:checked) {
	border-color: var(--pel-terre-cuite);
	background: var(--pel-sable);
}

.pel-projection__lieu:has(.pel-projection__radio:focus-visible) {
	outline: var(--pel-focus-epaisseur) solid var(--pel-focus-couleur);
	outline-offset: var(--pel-focus-decalage);
}

.pel-projection__lieu-titre {
	font-weight: 600;
}

.pel-projection__lieu-aide {
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
}

.pel-projection__dimensions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--pel-space-s);
}

/* Coups de cœur : des cases en pastilles, filtrées par la recherche. */
.pel-projection__coeurs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pel-space-2xs);
}

.pel-projection__coeur {
	display: inline-flex;
	align-items: center;
	gap: var(--pel-space-2xs);
	min-height: var(--pel-cible);
	padding-inline: var(--pel-space-s);
	border: var(--pel-filet) dashed var(--pel-bord-champ);
	border-radius: var(--pel-radius-pill);
	background: var(--pel-blanc);
	font-size: var(--pel-fs-small);
	cursor: pointer;
}

.pel-projection__coeur:has(.pel-projection__case:checked) {
	border-style: solid;
	border-color: var(--pel-terre-cuite);
	background: var(--pel-sable);
}

.pel-projection__case {
	width: var(--pel-case);
	height: var(--pel-case);
	margin: 0;
	accent-color: var(--pel-terre-cuite);
}

/* Table d'honneur. */
.pel-projection__honneur {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-xs);
}

.pel-projection__honneur-ligne {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--pel-space-s);
}

.pel-projection__honneur-titre {
	font-size: var(--pel-fs-small);
	font-weight: 600;
}

.pel-projection__erreur {
	margin: 0;
	padding: var(--pel-space-xs) var(--pel-space-s);
	border-radius: var(--pel-radius-m);
	background: var(--pel-sable);
	color: var(--pel-terre-foncee);
	font-weight: 600;
}

.pel-projection__envoyer {
	width: 100%;
}

/* --- Étape 2 : la proposition ---------------------------------------------- */
.pel-projection__demo {
	margin: 0;
	padding: var(--pel-space-xs) var(--pel-space-s);
	border: var(--pel-filet) solid var(--pel-lin);
	border-radius: var(--pel-radius-m);
	background: var(--pel-champagne-pale);
	color: var(--pel-encre-douce);
	font-size: var(--pel-fs-small);
}

.pel-projection__proposition {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-l);
}

.pel-projection__resultat-entete {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--pel-space-s);
}

.pel-projection__resume {
	margin: var(--pel-space-2xs) 0 0;
	color: var(--pel-gris-chaud);
}

/* Le visuel d'ambiance et ses repères (position : --pel-x, --pel-y). */
.pel-projection__visuel {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--pel-radius-m);
	background: var(--pel-sable);
}

.pel-projection__visuel-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pel-projection__visuel-attente {
	position: absolute;
	inset: var(--pel-space-s) var(--pel-space-s) auto;
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
}

/* La mention, en bas de la photo (Will, 26/11). */
.pel-projection__mention-visuel {
	position: absolute;
	inset: auto 0 0;
	padding: var(--pel-space-3xs) var(--pel-space-s);
	background: var(--pel-ivoire);
	color: var(--pel-encre-douce);
	font-size: var(--pel-fs-small);
	text-align: center;
}

.pel-projection__reperes {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pel-projection__repere {
	--pel-x: 50%;   /* remplacés par le style du repère, donné par la réponse */
	--pel-y: 50%;
	position: absolute;
	top: var(--pel-y);
	left: var(--pel-x);
	display: flex;
	align-items: center;
	gap: var(--pel-space-2xs);
	padding: var(--pel-space-3xs) var(--pel-space-xs) var(--pel-space-3xs) var(--pel-space-3xs);
	border-radius: var(--pel-radius-pill);
	background: var(--pel-blanc);
	box-shadow: var(--pel-shadow-s);
	font-size: var(--pel-fs-small);
	white-space: nowrap;
	transform: translate(-50%, -50%);
}

.pel-projection__visuel.is-sans-mobilier .pel-projection__repere--mobilier {
	display: none;
}

.pel-projection__repere-numero {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: calc(var(--pel-case) + var(--pel-space-3xs));
	height: calc(var(--pel-case) + var(--pel-space-3xs));
	border-radius: var(--pel-radius-pill);
	background: var(--pel-terre-cuite);
	color: var(--pel-blanc);
	font-weight: 600;
}

.pel-projection__legende-visuel {
	margin: 0;
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
	line-height: var(--pel-lh-texte);
}

.pel-projection__coherence {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-2xs);
	padding: var(--pel-space-s);
	border-radius: var(--pel-radius-m);
	background: var(--pel-ivoire);
}

.pel-projection__coherence-titre {
	margin: 0;
	font-size: var(--pel-fs-small);
	font-weight: 600;
}

.pel-projection__coherence-liste {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-2xs);
	margin: 0;
	padding-left: var(--pel-space-m);
}

.pel-projection__coherence-ligne {
	line-height: var(--pel-lh-texte);
}

/* Les vignettes : les vraies photos du catalogue. */
.pel-projection__vignettes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--pel-vignette-m) * 1.6), 1fr));
	gap: var(--pel-space-s);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pel-projection__vignette {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-2xs);
}

.pel-projection__vignette-image {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	border-radius: var(--pel-radius-m);
	background: var(--pel-sable);
	object-fit: cover;
}

.pel-projection__vignette-nom {
	color: var(--pel-encre);
	font-size: var(--pel-fs-small);
	line-height: var(--pel-lh-titre);
	text-decoration: none;
}

.pel-projection__vignette-nom:hover {
	text-decoration: underline;
}

.pel-projection__showroom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--pel-space-m);
	padding: var(--pel-space-l);
	border-radius: var(--pel-radius-l);
	background: var(--pel-sable);
}

.pel-projection__showroom-texte {
	display: flex;
	flex: 1 1 60%;
	flex-direction: column;
	gap: var(--pel-space-2xs);
}

.pel-projection__showroom-phrase {
	margin: 0;
	color: var(--pel-encre-douce);
	line-height: var(--pel-lh-texte);
}

/* --- Le panier déco -------------------------------------------------------- */
.pel-projection__panier {
	position: sticky;
	top: calc(var(--header-h, var(--pel-entete-h)) + var(--pel-space-s));
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-m);
	padding: var(--pel-space-l);
	border: var(--pel-filet) solid var(--pel-lin);
	border-radius: var(--pel-radius-l);
	background: var(--pel-blanc);
}

.pel-projection__panier-entete {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--pel-space-2xs);
}

.pel-projection__panier-titre {
	margin: 0;
	font-family: var(--pel-font-titre);
	font-size: var(--pel-fs-h3);
}

.pel-projection__rubrique {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-xs);
	padding-top: var(--pel-space-s);
	border-top: var(--pel-filet) solid var(--pel-lin);
}

.pel-projection__rubrique-entete {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--pel-space-2xs);
}

.pel-projection__rubrique-titre {
	margin: 0;
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
	font-weight: 600;
	letter-spacing: var(--pel-capitales-legende);
	text-transform: uppercase;
}

.pel-projection__rubrique-aide {
	margin: 0;
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
	line-height: var(--pel-lh-texte);
}

.pel-projection__option {
	display: inline-flex;
	align-items: center;
	gap: var(--pel-space-2xs);
	min-height: var(--pel-cible);
	color: var(--pel-terre-foncee);
	font-size: var(--pel-fs-small);
	font-weight: 600;
	cursor: pointer;
}

.pel-projection__articles {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-s);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pel-projection__article {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--pel-space-s);
}

.pel-projection__article.is-hors-total {
	opacity: 0.55;
}

.pel-projection__article-texte {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--pel-space-3xs);
	min-width: 0;
}

.pel-projection__article-nom {
	color: var(--pel-encre);
	font-weight: 600;
	text-decoration: none;
}

.pel-projection__article-nom:hover {
	text-decoration: underline;
}

.pel-projection__article-precision,
.pel-projection__article-unite {
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
}

.pel-projection__article-chiffres {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--pel-space-2xs);
}

.pel-projection__article-total {
	font-weight: 600;
}

.pel-projection__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pel-space-2xs);
}

.pel-projection__badge {
	display: inline-flex;
	align-items: center;
	padding: var(--pel-space-3xs) var(--pel-space-2xs);
	border-radius: var(--pel-radius-s);
	font-size: var(--pel-fs-small);
}

.pel-projection__badge--ok {
	background: var(--pel-champagne-pale);
	color: var(--pel-disponible);
}

.pel-projection__badge--limite {
	background: var(--pel-sable);
	color: var(--pel-terre-foncee);
}

.pel-projection__badge--coeur {
	background: var(--pel-terre-cuite);
	color: var(--pel-blanc);
}

.pel-projection__totaux {
	display: flex;
	flex-direction: column;
	gap: var(--pel-space-2xs);
	padding-top: var(--pel-space-s);
	border-top: var(--pel-filet) solid var(--pel-lin);
}

.pel-projection__total-ligne,
.pel-projection__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--pel-space-s);
	margin: 0;
}

.pel-projection__total-ligne {
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
}

.pel-projection__total {
	font-weight: 600;
}

.pel-projection__total-montant {
	color: var(--pel-terre-foncee);
	font-family: var(--pel-font-titre);
	font-size: var(--pel-fs-h2);
}

.pel-projection__total-detail,
.pel-projection__mention {
	margin: 0;
	color: var(--pel-gris-chaud);
	font-size: var(--pel-fs-small);
}

.pel-projection__ajouter {
	width: 100%;
}

/* --- Étape 3 ---------------------------------------------------------------- */
.pel-projection__confirmation {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--pel-space-s);
	padding: var(--pel-space-l);
	border: var(--pel-filet) solid var(--pel-lin);
	border-radius: var(--pel-radius-l);
	background: var(--pel-blanc);
}

.pel-projection__confirmation-titre {
	margin: 0;
	font-family: var(--pel-font-titre);
	font-size: var(--pel-fs-h2);
}

.pel-projection__confirmation-texte {
	margin: 0;
	color: var(--pel-encre-douce);
}

/* --- Points de rupture ------------------------------------------------------ */
@media (max-width: 991px) {
	.pel-projection__colonnes {
		grid-template-columns: minmax(0, 1fr);
	}

	.pel-projection__panier {
		position: static;
	}
}

@media (max-width: 767px) {
	.pel-projection__carte,
	.pel-projection__panier,
	.pel-projection__showroom {
		padding: var(--pel-space-m);
	}

	.pel-projection__lieux,
	.pel-projection__dimensions {
		grid-template-columns: minmax(0, 1fr);
	}

	.pel-projection__repere {
		font-size: 0;
		gap: 0;
		padding: var(--pel-space-3xs);
	}

	.pel-projection__repere-numero {
		font-size: var(--pel-fs-small);
	}

	.pel-projection__visuel-attente {
		display: none;
	}
}

@media (max-width: 478px) {
	.pel-projection__ligne {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Une ligne du panier : le nom en entier, la quantité et le montant dessous. */
	.pel-projection__article {
		flex-wrap: wrap;
	}

	.pel-projection__article-chiffres {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		width: 100%;
	}
}

/* Un élément caché (attribut hidden) le reste, malgré son display. */
.pel-projection__groupe[hidden],
.pel-projection__dimension[hidden],
.pel-projection__honneur[hidden],
.pel-projection__aide[hidden],
.pel-projection__coeur[hidden],
.pel-projection__vignette[hidden],
.pel-projection__proposition[hidden],
.pel-projection__erreur[hidden] {
	display: none;
}
