/* Entreprise Membre — affichage public
   Charte : bleu #162585 sur fond blanc */

.em-annuaire {
	--em-primary: #162585;
	--em-primary-dark: #0f1a5e;
	--em-ink: #1a1a1a;
	--em-muted: #6b7280;
	--em-border: #e6e8f0;
	--em-bg-soft: #f6f7fb;
	--em-radius: 14px;
	--em-cols: 4;
	color: var(--em-ink);
	max-width: 1200px;
	margin: 0 auto;
}

/* ---------- Barre d'outils ---------- */
.em-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
}
.em-search-form {
	flex: 1 1 280px;
	max-width: 420px;
	margin: 0;
}
.em-search {
	display: flex;
	border: 1px solid var(--em-border);
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
}
.em-search input[type="search"] {
	flex: 1;
	border: 0;
	padding: 12px 18px;
	font-size: 15px;
	outline: none;
	background: transparent;
}
.em-search-btn {
	border: 0;
	background: var(--em-primary);
	color: #fff;
	padding: 0 22px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}
.em-search-btn:hover { background: var(--em-primary-dark); }

.em-filtres {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.em-filtre {
	display: inline-block;
	border: 1px solid var(--em-border);
	background: #fff;
	color: var(--em-ink);
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: all .15s ease;
}
.em-filtre:hover { border-color: var(--em-primary); color: var(--em-primary); }
.em-filtre.is-active {
	background: var(--em-primary);
	border-color: var(--em-primary);
	color: #fff;
}

/* ---------- Grille ---------- */
.em-grid {
	display: grid;
	grid-template-columns: repeat(var(--em-cols), 1fr);
	gap: 24px;
}

.em-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--em-border);
	border-radius: var(--em-radius);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.em-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(22, 37, 133, .14);
	border-color: var(--em-primary);
}
.em-card-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 26px 20px 18px;
	text-decoration: none;
	color: inherit;
	flex: 1;
}
.em-card-logo {
	width: 110px;
	height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}
.em-card-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.em-card-logo-placeholder {
	font-size: 56px;
	color: #c7cbe0;
	width: auto;
	height: auto;
}
.em-card-title {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
	color: var(--em-primary);
	line-height: 1.25;
}
.em-card-activite {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--em-muted);
}
.em-card-extrait {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #444;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.em-card-contact {
	border-top: 1px solid var(--em-border);
	padding: 14px 20px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	background: var(--em-bg-soft);
}
.em-card-contact .em-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #333;
	text-decoration: none;
}
.em-card-contact .em-meta:hover { color: var(--em-primary); }
.em-card-contact .dashicons {
	color: var(--em-primary);
	font-size: 17px;
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
}
.em-meta-txt {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.em-empty {
	text-align: center;
	padding: 40px;
	color: var(--em-muted);
}

/* ---------- Fiche (single) ---------- */
.em-single {
	--em-primary: #162585;
	--em-primary-dark: #0f1a5e;
	--em-muted: #6b7280;
	--em-border: #e6e8f0;
	--em-bg-soft: #f6f7fb;
	color: #1a1a1a;
	padding: 40px 20px;
}
.em-single-inner {
	max-width: 1080px;
	margin: 0 auto;
}
.em-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--em-primary);
	text-decoration: none;
	font-weight: 600;
	margin-bottom: 24px;
}
.em-back:hover { text-decoration: underline; }

.em-single-header {
	padding-bottom: 22px;
	border-bottom: 3px solid var(--em-primary);
	margin-bottom: 32px;
}
.em-single-title { margin: 0 0 6px; font-size: 32px; color: var(--em-primary); line-height: 1.15; }
.em-single-activite {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--em-muted);
}

.em-single-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 32px;
	align-items: start;
}

.em-block { margin-bottom: 28px; }
.em-block-title {
	font-size: 19px;
	color: var(--em-primary);
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--em-border);
}
.em-description { font-size: 15px; line-height: 1.7; color: #333; }
.em-description p { margin: 0 0 1em; }

.em-defs { margin: 0; }
.em-defs > div {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px dashed var(--em-border);
}
.em-defs dt { margin: 0; font-weight: 600; color: var(--em-muted); }
.em-defs dd { margin: 0; word-break: break-word; }
.em-defs a { color: var(--em-primary); }
.em-muted { color: #b3b7c7; }

.em-single-aside .em-card-aside {
	background: var(--em-bg-soft);
	border: 1px solid var(--em-border);
	border-radius: var(--em-radius, 14px);
	padding: 18px 20px;
}
.em-single-aside .em-card-aside .em-defs > div { grid-template-columns: 110px 1fr; }

/* Logo à droite de la fiche */
.em-logo-box {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--em-border);
	border-radius: var(--em-radius, 14px);
	background: #fff;
	padding: 24px;
	margin-bottom: 20px;
	min-height: 160px;
}
.em-logo-box img { max-width: 100%; max-height: 200px; object-fit: contain; }

/* Réseaux sociaux */
.em-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 24px;
}
.em-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--em-primary);
	color: #fff;
	text-decoration: none;
	transition: background .15s ease, transform .15s ease;
}
.em-social-link:hover { background: var(--em-primary-dark); transform: translateY(-2px); color: #fff; }
.em-social-link .dashicons { font-size: 20px; width: 20px; height: 20px; }

.em-responsable {
	text-align: center;
	margin-bottom: 26px;
}
.em-responsable img {
	width: 150px;
	height: 150px;
	object-fit: cover;
	border-radius: 50%;
	border: 4px solid #fff;
	box-shadow: 0 6px 20px rgba(22, 37, 133, .18);
}
.em-responsable-nom {
	margin: 12px 0 0;
	font-weight: 700;
	color: var(--em-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.em-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 782px) {
	.em-grid { grid-template-columns: repeat(2, 1fr); }
	.em-single-grid { grid-template-columns: 1fr; }
	.em-single-header { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
	.em-grid { grid-template-columns: 1fr; }
	.em-defs > div { grid-template-columns: 1fr; gap: 2px; }
}
