/* Recherche des produits : shortcodes [emu_recherche_filtres], [emu_recherche_resultats] (saisie + résultats),
   [emu_recherche_produits] et [emu_recherche_saisie].
   Reprend l'apparence de l'ancien formulaire Search & Filter (bloc gris #f5f4f1, listes blanches) ;
   la liste des résultats garde les styles .recherche-liste de css/custom.css. */

/* Zone de saisie avec loupe (commune).
   Le cadre est porté par le conteneur (flex) : la loupe et le champ sont côte à côte, sans chevauchement
   quels que soient les marges internes imposées aux champs par le thème parent ou Elementor. */
.emu-rp-saisie {
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	padding: 0 12px 0 14px;
	border: 1px solid #d6d6d6;
	border-radius: 4px;
	background: #fff;
}
.emu-rp-saisie:focus-within { border-color: #afbac7; }
.emu-rp-saisie .emu-rp-loupe { flex: 0 0 auto; color: #9a9a9a; pointer-events: none; }
.emu-rp-saisie input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	height: auto !important;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 12px 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	color: #333;
	font-size: 1em;
	line-height: 1.4;
}
.emu-rp-saisie input[type="search"]::placeholder { color: #8c8c8c; opacity: 1; }

/* Bloc de gauche : saisie + filtres */
.emu-rp-bloc {
	background: #f5f4f1;
	border-radius: 7px;
	padding: 20px;
	box-sizing: border-box;
}
.emu-rp-filtre { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.emu-rp-filtres > .emu-rp-filtre:first-child { margin-top: 0; }
.emu-rp-filtre > label,
.emu-rp-filtre legend {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: #333;
	font-weight: normal;
	font-size: 1.05em;
}
.emu-rp-filtre select {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 11px 40px 11px 12px;
	border: 1px solid #d6d6d6;
	border-radius: 4px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23999' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
	color: #555;
	font-size: 1em;
	line-height: 1.4;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
}
.emu-rp-filtre select:focus { border-color: #afbac7; outline: none; }
.emu-rp-case {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 3px 0;
	color: #333;
	font-weight: normal;
	cursor: pointer;
}
.emu-rp-case input { margin: 0; width: 16px; height: 16px; }
.emu-rp-nombre { color: #8c8c8c; font-size: .9em; }
.emu-rp-avance { margin: 14px 0 0; }
.emu-rp-avance summary { cursor: pointer; color: #333; }
.emu-rp-avance .emu-rp-filtre:first-of-type { margin-top: 8px; }
.emu-rp-reinitialiser { margin: 14px 0 0; font-size: .9em; }
.emu-rp-reinitialiser a { color: #2d6995; text-decoration: underline; }

/* Bouton d'envoi : utile seulement sans JavaScript */
.emu-rp-envoyer { margin-top: 14px; }
.emu-rp-js .emu-rp-envoyer { display: none; }

/* Résultats */
.emu-rp-resultats { min-width: 0; transition: opacity .15s; }
.emu-rp-resultats.emu-rp-chargement { opacity: .5; }
.emu-rp-total { margin: 0 0 8px; color: #333; }
.emu-rp-aucun { padding: 16px 0; }
.emu-rp-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; align-items: center; }
.emu-rp-page {
	display: inline-block;
	min-width: 2.2em;
	padding: 4px 8px;
	text-align: center;
	border: 1px solid #f5f4f1;
	border-radius: 3px;
	text-decoration: none;
}
.emu-rp-page.courante { background: #f5f4f1; font-weight: 600; }
a.emu-rp-page:hover { color: #f3b54a; }

/* [emu_recherche_produits] : les deux côte à côte */
.emu-rp {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) 2.5fr;
	gap: 24px;
	align-items: start;
}

/* [emu_recherche_saisie] : zone seule (page d'accueil) */
.emu-rp-saisie-seule .emu-rp-saisie input[type="search"] { padding-top: 13px !important; padding-bottom: 13px !important; }

/* [emu_recherche_resultats] : zone de saisie au-dessus des résultats */
.emu-rp-colonne { min-width: 0; }
.emu-rp-colonne > .emu-rp-saisie { margin-bottom: 20px; }

@media (max-width: 767px) {
	.emu-rp { grid-template-columns: 1fr; }
	.recherche-liste div.produit-item-type { width: auto; min-width: 70px; }
}
