/* ============================================================
   Annuaire Entreprises — Styles frontend
   ============================================================ */

/* Variables */
:root {
	--ae-primary:      #2c6fad;
	--ae-primary-dark: #1a4f80;
	--ae-accent:       #e8f0fb;
	--ae-text:         #333;
	--ae-muted:        #666;
	--ae-border:       #dde3ea;
	--ae-radius:       8px;
	--ae-shadow:       0 2px 10px rgba(0,0,0,.08);
	--ae-shadow-hover: 0 6px 20px rgba(0,0,0,.14);
}

/* -------------------------------------------------------
   Barre de recherche
   ------------------------------------------------------- */
.ae-annuaire-wrapper {
	font-family: inherit;
	color: var(--ae-text);
}

.ae-search-form {
	background: var(--ae-accent);
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 20px 24px;
	margin-bottom: 28px;
}

.ae-search-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
}

.ae-search-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ae-search-field label {
	font-size: .82em;
	font-weight: 600;
	color: var(--ae-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.ae-search-text  { flex: 2 1 220px; }
.ae-search-cat   { flex: 1 1 180px; }
.ae-search-cp    { flex: 0 1 120px; }
.ae-search-submit,
.ae-search-reset { flex: 0 0 auto; }

.ae-search-form input[type="text"],
.ae-search-form input[type="search"],
.ae-search-form select {
	width: 100%;
	padding: 9px 13px;
	border: 1px solid var(--ae-border);
	border-radius: 5px;
	font-size: 1em;
	background: #fff;
	color: var(--ae-text);
	box-shadow: none;
	transition: border-color .2s;
}

.ae-search-form input:focus,
.ae-search-form select:focus {
	outline: none;
	border-color: var(--ae-primary);
}

/* -------------------------------------------------------
   Boutons
   ------------------------------------------------------- */
.ae-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: 5px;
	font-size: .93em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s, color .2s;
	border: none;
}

.ae-btn-search {
	background: var(--ae-primary);
	color: #fff;
}
.ae-btn-search:hover {
	background: var(--ae-primary-dark);
	color: #fff;
}

.ae-btn-reset {
	background: #fff;
	color: var(--ae-muted);
	border: 1px solid var(--ae-border);
	padding: 8px 14px;
}
.ae-btn-reset:hover {
	background: #f5f5f5;
	color: var(--ae-text);
}

.ae-btn-order {
	background: #fff;
	color: var(--ae-primary);
	border: 1px solid var(--ae-primary);
	padding: 8px 14px;
	font-size: .88em;
	white-space: nowrap;
}
.ae-btn-order:hover {
	background: var(--ae-accent);
}

.ae-btn-voir {
	background: transparent;
	color: var(--ae-primary);
	border: 1px solid var(--ae-primary);
	padding: 7px 14px;
	font-size: .87em;
	margin-top: 12px;
}
.ae-btn-voir:hover {
	background: var(--ae-primary);
	color: #fff;
}

/* -------------------------------------------------------
   Grille de fiches
   ------------------------------------------------------- */
.ae-grid {
	display: grid;
	gap: 22px;
}

.ae-col-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ae-col-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ae-col-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* -------------------------------------------------------
   Carte entreprise
   ------------------------------------------------------- */
.ae-card {
	background: #fff;
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	box-shadow: var(--ae-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}
.ae-card:hover {
	box-shadow: var(--ae-shadow-hover);
	transform: translateY(-2px);
}

.ae-card-logo {
	text-align: center;
	background: #f7f8fa;
	padding: 16px;
	border-bottom: 1px solid var(--ae-border);
}
.ae-card-logo img {
	max-height: 90px;
	width: auto;
	object-fit: contain;
}

.ae-card-body {
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ae-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 8px;
}

.ae-badges + .ae-card-title,
.ae-badges + h1 {
	margin-top: 0;
}

.ae-badge {
	display: inline-block;
	background: var(--ae-accent);
	color: var(--ae-primary);
	font-size: .75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 3px 9px;
	border-radius: 20px;
}

.ae-card-title {
	font-size: 1.1em;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}
.ae-card-title a {
	color: var(--ae-text);
	text-decoration: none;
}
.ae-card-title a:hover {
	color: var(--ae-primary);
}

.ae-card-excerpt {
	font-size: .9em;
	color: var(--ae-muted);
	margin: 0 0 12px;
	line-height: 1.5;
}

/* -------------------------------------------------------
   Liste d'infos
   ------------------------------------------------------- */
.ae-card-infos {
	list-style: none;
	margin: 0 0 4px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
	font-size: .88em;
}

.ae-card-infos li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--ae-muted);
}

.ae-card-infos .dashicons {
	font-size: 16px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--ae-primary);
	margin-top: 1px;
}

.ae-card-infos em {
	display: block;
	font-size: .9em;
	color: var(--ae-muted);
	font-style: italic;
}

.ae-card-infos a {
	color: var(--ae-primary);
	text-decoration: none;
}
.ae-card-infos a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------
   Aucun résultat
   ------------------------------------------------------- */
.ae-no-result {
	text-align: center;
	color: var(--ae-muted);
	padding: 48px 20px;
	font-size: 1.05em;
	background: #f9f9f9;
	border-radius: var(--ae-radius);
	border: 1px dashed var(--ae-border);
}

/* -------------------------------------------------------
   Pagination
   ------------------------------------------------------- */
.ae-pagination {
	margin-top: 32px;
	text-align: center;
}
.ae-pagination .page-numbers {
	display: inline-block;
	padding: 7px 13px;
	margin: 2px;
	border: 1px solid var(--ae-border);
	border-radius: 5px;
	text-decoration: none;
	color: var(--ae-primary);
	font-size: .92em;
}
.ae-pagination .page-numbers.current {
	background: var(--ae-primary);
	color: #fff;
	border-color: var(--ae-primary);
}
.ae-pagination .page-numbers:hover:not(.current) {
	background: var(--ae-accent);
}

/* -------------------------------------------------------
   Loading overlay
   ------------------------------------------------------- */
.ae-loading {
	text-align: center;
	padding: 40px;
	color: var(--ae-muted);
	font-style: italic;
}

/* -------------------------------------------------------
   Page single entreprise
   ------------------------------------------------------- */
.ae-single-wrapper {
	max-width: 1100px;
	margin: 0 auto;
}

/* -------------------------------------------------------
   Barre membre (accès privé)
   ------------------------------------------------------- */
.ae-member-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--ae-accent);
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 9px 16px;
	margin-bottom: 14px;
	font-size: .87em;
	color: var(--ae-muted);
}

.ae-member-bar strong {
	color: var(--ae-text);
}

.ae-member-logout {
	color: var(--ae-primary);
	text-decoration: none;
	font-weight: 600;
}
.ae-member-logout:hover {
	text-decoration: underline;
}

.ae-single-search {
	margin-bottom: 32px;
}

.ae-single-header {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 2px solid var(--ae-border);
}

.ae-single-logo img {
	max-width: 140px;
	height: auto;
	border-radius: 6px;
	border: 1px solid var(--ae-border);
}

.ae-single-title {
	font-size: 2em;
	font-weight: 800;
	margin: 0 0 6px;
}

.ae-single-infos {
	background: #f9fafc;
	border: 1px solid var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 22px 26px;
	margin-bottom: 28px;
}

.ae-single-infos h3 {
	margin: 0 0 16px;
	font-size: 1em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ae-primary);
}

.ae-single-infos ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ae-single-infos li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: .95em;
}

.ae-single-infos .dashicons {
	color: var(--ae-primary);
	flex-shrink: 0;
	margin-top: 2px;
}

.ae-single-infos a {
	color: var(--ae-primary);
	text-decoration: none;
}
.ae-single-infos a:hover { text-decoration: underline; }

/* -------------------------------------------------------
   Carte Leaflet (fiche single)
   ------------------------------------------------------- */
.ae-single-map-wrapper {
	margin-bottom: 28px;
}

.ae-single-map-wrapper h3 {
	margin: 0 0 12px;
	font-size: 1em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ae-primary);
}

#ae-map {
	height: 320px;
	border-radius: var(--ae-radius);
	border: 1px solid var(--ae-border);
	z-index: 0;
}

/* -------------------------------------------------------
   Responsive
   ------------------------------------------------------- */
@media (max-width: 640px) {
	.ae-search-fields {
		flex-direction: column;
	}
	.ae-search-text,
	.ae-search-cat,
	.ae-search-cp,
	.ae-search-submit,
	.ae-search-reset {
		flex: 1 1 100%;
	}

	.ae-col-2,
	.ae-col-3,
	.ae-col-4 {
		grid-template-columns: 1fr;
	}

	.ae-single-header {
		flex-direction: column;
	}
}
