/*****************************************************************************
	Panneau de recherche instantanee (hook displaySearch de ph_ecommerce).

	Construit par views/js/search.js : une colonne d'onglets a gauche
	(Produits / Fabricants / Categories), les resultats de la rubrique a droite.

	Les couleurs passent par des variables : un site se met a sa charte en
	surchargeant --pss-accent une seule fois, sans toucher a cette feuille.
	Elles servent aussi au champ lui-meme (ephenyxsearch.css).

		:root { --pss-accent: #b0248f; --pss-accent-dark: #8d1c72; }

	Les anciennes regles globales (.ui-menu, .ui-menu-item, .ui-autocomplete)
	ont ete retirees : elles imposaient min-width:600px et float:right a TOUS
	les menus jQuery UI de la page, pas seulement a la recherche.
*****************************************************************************/

/* Conserve : d'autres composants front peuvent encore ouvrir un menu jQuery UI
   qui doit passer au-dessus du reste. */
.ui-autocomplete {
	z-index: 999999999 !important;
	background: #e6e4ea;
}

:root {
	--pss-accent: #2f2f35;
	--pss-accent-dark: #17171b;
	--pss-ink: #1d1d21;
	--pss-muted: #6f6f78;
	--pss-line: #e6e4ea;
	--pss-surface: #ffffff;
	--pss-surface-alt: #f7f6f9;
	--pss-hover: #f2f0f6;
	--pss-radius: 14px;
}

.pss-panel {
	position: absolute;
	z-index: 999999999;
	display: none;
	overflow: hidden;
	background: var(--pss-surface);
	color: var(--pss-ink);
	border: 1px solid var(--pss-line);
	border-radius: var(--pss-radius);
	box-shadow: 0 18px 44px rgba(20, 16, 26, 0.18);
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
}

.pss-panel * {
	box-sizing: border-box;
}

/* ---- Colonne des rubriques --------------------------------------------- */
.pss-body {
	display: flex;
	align-items: stretch;
}

.pss-tabs {
	flex: 0 0 208px;
	width: 208px;
	padding: 10px 0;
	background: var(--pss-surface-alt);
	border-right: 1px solid var(--pss-line); }

.pss-tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 11px 16px 11px 18px;
	border: 0;
	background: transparent;
	color: var(--pss-muted);
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.pss-tab:before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	bottom: 8px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: transparent;
	transition: background-color 0.15s ease;
}

.pss-tab:hover {
	color: var(--pss-ink);
}

.pss-tab.is-active {
	background: var(--pss-surface);
	color: var(--pss-ink);
}

.pss-tab.is-active:before {
	background: var(--pss-accent);
}

.pss-tab-label {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pss-tab-count {
	flex: 0 0 auto;
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--pss-muted);
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.pss-tab.is-active .pss-tab-count {
	background: var(--pss-accent);
	color: #fff;
}

/* ---- Resultats ---------------------------------------------------------- */
.pss-panes {
	flex: 1 1 auto;
	min-width: 0;
}

.pss-pane {
	display: none;
	max-height: 58vh;
	padding: 6px 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.pss-pane::-webkit-scrollbar {
	width: 0;
	height: 0;
	background: transparent;
}

.pss-pane.is-active {
	display: block;
}

.pss-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 18px;
	color: var(--pss-ink);
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: background-color 0.12s ease, border-color 0.12s ease;
}

.pss-row:hover,
.pss-row:focus,
.pss-row.is-current {
	background: var(--pss-hover);
	border-left-color: var(--pss-accent);
	color: var(--pss-ink);
	text-decoration: none;
	outline: none;
}

.pss-thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	border: 1px solid var(--pss-line);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.pss-thumb img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
}

.pss-info {
	flex: 1 1 auto;
	min-width: 0;
	display: block;
}

.pss-brand {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pss-muted);
}

.pss-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--pss-ink);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.pss-meta {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--pss-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pss-feats {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	font-style: italic;
	color: var(--pss-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pss-price {
	flex: 0 0 auto;
	padding-left: 6px;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--pss-ink);
}

/* Surlignage du terme cherche : une couleur, pas un pave noir. */
.pss-panel mark.pss-hl {
	background: transparent;
	color: var(--pss-accent);
	font-weight: 700;
	padding: 0;
}

/* ---- Pied de panneau ---------------------------------------------------- */
.pss-more {
	display: block;
	padding: 12px 18px;
	border-top: 1px solid var(--pss-line);
	background: var(--pss-surface-alt);
	color: var(--pss-ink);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pss-more:hover,
.pss-more:focus {
	background: var(--pss-accent);
	color: #fff;
	text-decoration: none;
}

.pss-empty {
	padding: 26px 20px;
	color: var(--pss-muted);
	font-size: 14px;
	text-align: center;
}

/* Indicateur d'attente pendant la requete : pose sur le formulaire, pas sur
   l'input (un champ n'a pas de pseudo-element). Pas d'image : aucune url() a
   reecrire par le minifieur, rien a deployer. */
form.pss-loading {
	position: relative;
}

form.pss-loading:after {
	content: "";
	position: absolute;
	top: 50%;
	right: 62px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid var(--pss-line, #e6e4ea);
	border-top-color: var(--pss-accent, #2f2f35);
	border-radius: 50%;
	animation: pss-spin 0.7s linear infinite;
	pointer-events: none;
}

@keyframes pss-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---- Petits ecrans ------------------------------------------------------ */
@media (max-width: 767px) {
	.pss-body {
		display: block;
	}

	.pss-tabs {
		display: flex;
		width: auto;
		padding: 8px;
		gap: 6px;
		overflow-x: auto;
		border-right: 0;
		border-bottom: 1px solid var(--pss-line);
		scrollbar-width: none;
	}

	.pss-tabs::-webkit-scrollbar {
		width: 0;
		height: 0;
	}

	.pss-tab {
		width: auto;
		flex: 0 0 auto;
		padding: 8px 12px;
		border-radius: 999px;
	}

	.pss-tab:before {
		display: none;
	}

	.pss-tab.is-active {
		background: var(--pss-accent);
		color: #fff;
	}

	.pss-tab.is-active .pss-tab-count {
		background: rgba(255, 255, 255, 0.24);
	}

	.pss-pane {
		max-height: 52vh;
	}

	.pss-row {
		padding: 10px 14px;
		gap: 10px;
	}

	.pss-thumb {
		flex-basis: 46px;
		width: 46px;
		height: 46px;
	}
}
