/* Recherche instantanée : champ et panneau en desktop (≥ 1280 px), icône et écran plein en dessous. */

html.savonnerie-sans-defilement {
	overflow: hidden;
}

.recherche,
.recherche * {
	box-sizing: border-box;
}

.recherche--champ {
	display: none;
	width: 100%;
	max-width: 320px;
}

.recherche--icone {
	display: flex;
}

@media (min-width: 1280px) {
	.recherche--champ {
		display: block;
	}

	.recherche--icone {
		display: none;
	}
}

.recherche__formulaire {
	margin: 0;
}

.recherche__champ {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 46px;
	padding: 0 14px 0 18px;
	border: 1px solid transparent;
	border-radius: var(--wp--preset--border-radius--pilule);
	background: var(--wp--custom--couleur--fond-recherche);
	cursor: text;
	transition: background var(--wp--custom--transition--rapide), border-color var(--wp--custom--transition--rapide);
}

.recherche--champ.est-ouvert .recherche__champ {
	border-color: var(--wp--preset--color--bleu);
	background: var(--wp--preset--color--blanc);
}

.recherche__loupe {
	flex: none;
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--bleu);
	-webkit-mask: url(../../assets/images/icones/recherche.svg) center / contain no-repeat;
	mask: url(../../assets/images/icones/recherche.svg) center / contain no-repeat;
}

.recherche__indication {
	color: var(--wp--preset--color--texte-secondaire);
	font-size: 14.5px;
}

.recherche__saisie {
	flex: 1;
	min-width: 0;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--wp--preset--color--texte);
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 14.5px;
}

.recherche__effacer {
	display: grid;
	flex: none;
	place-items: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--beton);
	cursor: pointer;
}

.recherche__effacer[hidden] {
	display: none;
}

.recherche__effacer span {
	width: 12px;
	height: 12px;
	background: var(--wp--preset--color--texte);
	-webkit-mask: url(../../assets/images/icones/effacer.svg) center / contain no-repeat;
	mask: url(../../assets/images/icones/effacer.svg) center / contain no-repeat;
}

/* Panneau desktop : sous le header, sur toute la largeur. */
.recherche__panneau {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 6;
	border-bottom: 1px solid var(--wp--preset--color--beton);
	background: var(--wp--preset--color--blanc);
	box-shadow: var(--wp--preset--shadow--panneau-recherche);
}

.recherche__panneau[hidden],
.recherche__ecran[hidden] {
	display: none;
}

.recherche__panneau .recherche__resultats {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 56px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 32px 80px 40px;
}

.recherche__gauche {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.recherche__groupe {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.recherche__groupe:has(.recherche__pastilles) {
	gap: 14px;
}

.recherche__titre {
	color: var(--wp--preset--color--bleu);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: normal;
	text-transform: uppercase;
}

.recherche__pastilles {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.recherche__pastille {
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--wp--preset--color--beton);
	border-radius: var(--wp--preset--border-radius--pilule);
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--texte);
	font-family: inherit;
	font-size: 13.5px;
	cursor: pointer;
}

.recherche__pastille:hover {
	border-color: var(--wp--preset--color--bleu);
	color: var(--wp--preset--color--bleu);
}

.recherche__suggestion {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--texte);
	font-family: inherit;
	font-size: 16px;
	text-align: left;
	cursor: pointer;
}

.recherche__suggestion::before {
	content: "";
	flex: none;
	width: 15px;
	height: 15px;
	background: var(--wp--preset--color--gris);
	-webkit-mask: url(../../assets/images/icones/recherche.svg) center / contain no-repeat;
	mask: url(../../assets/images/icones/recherche.svg) center / contain no-repeat;
}

.recherche__suggestion:hover {
	color: var(--wp--preset--color--bleu);
}

.recherche__suggestion strong {
	font-weight: 700;
}

.recherche__categorie {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	color: var(--wp--preset--color--texte);
	font-size: 15px;
	text-decoration: none;
}

.recherche__categorie span + span {
	color: var(--wp--preset--color--texte-secondaire);
	font-size: 13px;
}

.recherche__droite {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.recherche__entete {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.recherche__entete .recherche__tout {
	padding-bottom: 2px;
	border-bottom: 1.5px solid currentColor;
	color: var(--wp--preset--color--bleu);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.recherche__grille {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.recherche__produit {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.recherche__image {
	position: relative;
	display: block;
	overflow: hidden;
	border: 1px solid var(--wp--custom--couleur--separateur);
	border-radius: var(--wp--preset--border-radius--10);
	background: var(--wp--preset--color--blanc);
}

.recherche__produit .recherche__image {
	aspect-ratio: 1 / 1;
}

.recherche__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.16);
	transform-origin: 50% 46%;
}

.recherche__sans-image {
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg, var(--wp--custom--couleur--rayure-claire) 0 12px, var(--wp--custom--couleur--rayure-foncee) 12px 24px);
}

.recherche__ligne-nom {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.recherche__ligne-nom > div:first-child {
	min-width: 0;
}

.recherche__nom {
	color: var(--wp--preset--color--texte);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 17px;
	font-variation-settings: "SOFT" 50;
	line-height: 1.25;
	text-decoration: none;
}

.recherche__nom mark {
	border-radius: 3px;
	background: var(--wp--preset--color--pastel-bleu);
	box-shadow: 0 0 0 2px var(--wp--preset--color--pastel-bleu);
	color: inherit;
}

.recherche__produit .recherche__sous {
	margin-top: 3px;
	color: var(--wp--preset--color--texte-secondaire);
	font-size: 12.5px;
}

.recherche__produit .recherche__prix {
	font-size: 14.5px;
	font-weight: 600;
	white-space: nowrap;
}

.recherche__ajouter {
	display: grid;
	place-items: center;
	height: 38px;
	border: 1.5px solid var(--wp--preset--color--bleu);
	border-radius: var(--wp--preset--border-radius--pilule);
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--bleu);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.recherche__ajouter:hover {
	background: var(--wp--preset--color--bleu);
	color: var(--wp--preset--color--blanc);
}

.recherche__aucun {
	padding: 28px 32px;
	border-radius: var(--wp--preset--border-radius--12);
	background: var(--wp--preset--color--fond-clair);
	font-size: 15px;
	line-height: 1.6;
}

/* Icône et écran plein (mobile et tablette). */
.recherche__ouvrir {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.recherche__ouvrir::before {
	content: "";
	width: 24px;
	height: 24px;
	background: var(--wp--preset--color--texte);
	-webkit-mask: url(../../assets/images/icones/recherche-fine.svg) center / contain no-repeat;
	mask: url(../../assets/images/icones/recherche-fine.svg) center / contain no-repeat;
}

.recherche__ecran {
	position: fixed;
	inset: 0;
	z-index: 91;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--blanc);
}

.recherche__haut {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
	padding: 8px 6px 8px 16px;
	border-bottom: 1px solid var(--wp--preset--color--beton);
}

.recherche__haut .recherche__formulaire {
	flex: 1;
	min-width: 0;
}

.recherche__ecran .recherche__champ {
	height: 48px;
	padding: 0 4px 0 16px;
	border: 1.5px solid var(--wp--preset--color--bleu);
	background: var(--wp--preset--color--blanc);
}

.recherche__ecran .recherche__saisie {
	height: 100%;
	font-size: 16px;
}

.recherche__ecran .recherche__effacer {
	width: 40px;
	height: 40px;
	background: transparent;
}

.recherche__ecran .recherche__effacer span {
	display: grid;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--wp--preset--color--beton);
	-webkit-mask: none;
	mask: none;
	place-items: center;
}

.recherche__ecran .recherche__effacer span::before {
	content: "";
	width: 12px;
	height: 12px;
	background: var(--wp--preset--color--texte);
	-webkit-mask: url(../../assets/images/icones/effacer.svg) center / contain no-repeat;
	mask: url(../../assets/images/icones/effacer.svg) center / contain no-repeat;
}

.recherche__fermer {
	flex: none;
	height: 44px;
	padding: 0 10px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--bleu);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.recherche__ecran .recherche__resultats {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 28px;
	padding: 20px 16px 40px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.recherche__ecran .recherche__groupe {
	gap: 0;
}

.recherche__ecran .recherche__groupe:has(.recherche__pastilles) {
	gap: 12px;
}

.recherche__ecran .recherche__groupe > .recherche__titre {
	margin-bottom: 4px;
}

.recherche__ecran .recherche__groupe:has(.recherche__pastilles) > .recherche__titre {
	margin-bottom: 0;
}

.recherche__ecran .recherche__groupe:has(.recherche__ligne) > .recherche__titre {
	margin-bottom: 6px;
}

.recherche__ecran .recherche__pastille {
	height: 44px;
	padding: 0 16px;
	font-size: 15px;
}

.recherche__ecran .recherche__suggestion {
	min-height: 44px;
	padding: 0;
}

.recherche__ecran .recherche__categorie {
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0;
	font-size: 16px;
}

.recherche__ecran .recherche__categorie span + span {
	font-size: 14px;
}

.recherche__ligne {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid var(--wp--custom--couleur--separateur);
}

.recherche__ligne .recherche__image {
	width: 64px;
	height: 64px;
}

.recherche__infos {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	color: var(--wp--preset--color--texte);
	text-decoration: none;
}

.recherche__ligne .recherche__sous {
	overflow: hidden;
	color: var(--wp--preset--color--texte-secondaire);
	font-size: 13.5px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.recherche__ligne .recherche__prix {
	margin-top: 2px;
	font-size: 15px;
	font-weight: 700;
}

.recherche__plus,
.recherche__voir {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	cursor: pointer;
}

.recherche__plus {
	border: 1.5px solid var(--wp--preset--color--bleu);
	background: var(--wp--preset--color--blanc);
}

.recherche__voir {
	border: 0;
}

.recherche__plus::before,
.recherche__voir::before {
	content: "";
	width: 16px;
	height: 16px;
	background: var(--wp--preset--color--bleu);
	-webkit-mask: url(../../assets/images/icones/plus.svg) center / contain no-repeat;
	mask: url(../../assets/images/icones/plus.svg) center / contain no-repeat;
}

.recherche__voir::before {
	background: var(--wp--preset--color--gris);
	-webkit-mask-image: url(../../assets/images/icones/fleche-lien.svg);
	mask-image: url(../../assets/images/icones/fleche-lien.svg);
}

.recherche__ecran .recherche__tout {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	margin-top: 18px;
	border-radius: var(--wp--preset--border-radius--pilule);
	background: var(--wp--preset--color--bleu);
	color: var(--wp--preset--color--blanc);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
