/* Recherche 2026 : panneau ouvert par la loupe de l'en-tête (voir inc/recherche-2026.php) */

.pfl-recherche {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 40, 54, .45);
}

.pfl-recherche[hidden] {
	display: none;
}

html.pfl-recherche-ouverte {
	overflow: hidden;
}

.pfl-recherche__panneau {
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 0 0 14px 14px;
	box-shadow: 0 20px 40px rgba(15, 40, 54, .2);
	color: #444;
}

.pfl-recherche__interne {
	max-width: 1100px;
	margin: 0 auto;
	padding: 56px 40px 36px;
}

/* connecté : le panneau commence sous la barre d'administration WordPress */
.admin-bar .pfl-recherche__panneau {
	margin-top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .pfl-recherche__panneau {
		margin-top: 46px;
	}
}

/* ---- Champ ---- */
.pfl-recherche__ligne {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #005577;
}

.pfl-recherche__ligne svg {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	fill: #005577;
}

/* !important : les styles de champs d'Enfold (fond blanc, bordure, 13px) sont plus précis */
#top #pfl-recherche .pfl-recherche__champ {
	flex: 1;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0 !important;
	padding: 6px 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #171b1f !important;
	font-size: 28px !important;
	font-weight: 500;
	line-height: 1.3 !important;
	outline: 0;
}

#top #pfl-recherche .pfl-recherche__champ::placeholder {
	color: #9aa3a9;
	opacity: 1;
}

.pfl-recherche__champ::-webkit-search-cancel-button,
.pfl-recherche__champ::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

#top .pfl-recherche__fermer {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px !important;
	background: #f6f7f9;
	color: #005577;
	font-size: 24px;
	line-height: 40px;
	cursor: pointer;
}

#top .pfl-recherche__fermer:hover {
	background: #e3e7eb;
}

/* ---- Titres de groupe ---- */
.pfl-recherche__titre {
	margin: 26px 0 10px;
	color: #777;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* ---- Accueil : accès rapides et filières ---- */
.pfl-recherche__raccourcis,
.pfl-recherche__filieres {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

#top .pfl-recherche__raccourci {
	padding: 10px 16px;
	border-radius: 8px;
	background: #005577;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .5px;
	text-decoration: none;
	text-transform: uppercase;
}

#top .pfl-recherche__raccourci:hover {
	background: #003f57;
}

#top .pfl-recherche__raccourci--rouge {
	background: #e2222c;
}

#top .pfl-recherche__raccourci--rouge:hover {
	background: #b8141d;
}

#top .pfl-recherche__filiere {
	padding: 7px 12px;
	border-left: 4px solid var(--pfl-couleur, #005577);
	border-radius: 8px;
	background: #f6f7f9;
	color: #171b1f;
	font-size: 14px;
	text-decoration: none;
}

#top .pfl-recherche__filiere:hover {
	background: #e3e7eb;
}

/* ---- Résultats ---- */
.pfl-recherche__grille {
	display: grid;
	grid-template-columns: 3fr 2fr;
	gap: 0 40px;
}

.pfl-recherche__liste {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pfl-recherche__liste li {
	margin: 0;
	padding: 0;
}

#top .pfl-recherche__resultat {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	color: #171b1f;
	text-decoration: none;
}

#top .pfl-recherche__resultat:hover,
#top .pfl-recherche__resultat.is-actif {
	background: #f6f7f9;
}

.pfl-recherche__barre {
	flex: 0 0 4px;
	align-self: stretch;
	border-radius: 2px;
	background: var(--pfl-couleur, #005577);
}

.pfl-recherche__texte {
	flex: 1;
	min-width: 0;
}

.pfl-recherche__intitule {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.pfl-recherche__detail {
	display: block;
	margin-top: 2px;
	color: #777;
	font-size: 13px;
}

.pfl-recherche__etiquettes {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.pfl-recherche__etiquette {
	padding: 3px 8px;
	border-radius: 6px;
	background: #e3eef2;
	color: #005577;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	white-space: nowrap;
}

.pfl-recherche__etiquette--alternance {
	background: #fdecee;
	color: #b8141d;
}

.pfl-recherche__vide {
	margin: 0;
	padding: 10px 12px;
	color: #777;
	font-size: 14px;
}

#top .pfl-recherche__tout {
	display: inline-block;
	margin-top: 18px;
	color: #005577;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-decoration: none;
	text-transform: uppercase;
}

/* ---- Mobile ---- */
@media only screen and (max-width: 767px) {
	/* le panneau occupe tout l'écran (dvh : tient compte de la barre d'adresse mobile) */
	.pfl-recherche__panneau {
		height: 100vh;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
	}

	.admin-bar .pfl-recherche__panneau {
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}

	.pfl-recherche__interne {
		padding: 18px 16px 24px;
	}

	#top #pfl-recherche .pfl-recherche__champ {
		font-size: 20px !important;
	}

	.pfl-recherche__interne {
		padding-top: 32px;
	}

	.pfl-recherche__grille {
		grid-template-columns: 1fr;
	}

	.pfl-recherche__etiquettes {
		display: none;
	}
}

/* ==========================================================================
   Page de résultats (/?s=…)
   ========================================================================== */

/* bloc "Nouvelle recherche" : carte blanche, sans les barres décoratives */
#top.search .search_form_field {
	padding: 24px 30px;
	border-radius: 14px;
	background: #fff;
}

#top.search .search_form_field::before,
#top.search .search_form_field::after {
	display: none !important;
}

#top.search .search_form_field h4 {
	margin: 0 0 6px;
	color: #005577;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0;
}

#top.search .search_form_field p {
	margin: 0 0 14px;
	color: #777;
}

/* compteur "33 résultats de recherche pour …" */
#top.search #main .extra-mini-title {
	margin-top: 30px;
	color: #777;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
}

/* chaque résultat : ligne sobre séparée par un filet */
#top.search #main article.post-entry {
	margin: 0;
	padding: 18px 0;
	border-bottom: 1px solid #e1e4e8;
}

#top.search #main article.post-entry .search-result-counter {
	/* centré verticalement sur la 1re ligne du titre */
	top: 29px;
	width: 32px;
	height: 32px;
	line-height: 32px;
	border-radius: 8px;
	background: #f6f7f9;
	color: #005577;
	font-weight: 700;
}

#top.search #main article.post-entry .entry-title {
	margin-bottom: 4px;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
}

#top.search #main article.post-entry .entry-title a {
	color: #171b1f;
	text-decoration: none;
}

#top.search #main article.post-entry .entry-title a:hover {
	color: #005577;
}

#top.search #main article.post-entry .entry-content,
#top.search #main article.post-entry .entry-content p {
	margin: 0;
	color: #777;
	font-size: 14px;
}
