:root {
	--red: #EC3833;
	--navy: #002f5f;
	--bg-light: #f6f6f7;
	--info-bg: #b4dff5;
	--border: #e0e0e2;
	--gray-btn: #e8e8ea;
}

/* Toolbar and toggles styling */
.toolbar {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}
.toggle-group {
	display: inline-flex;
	border: 1px solid var(--border);
	border-radius: 999px;
	overflow: hidden;
	flex-shrink: 0;
	height: 44px;
}
.toggle-group button {
	padding: 0 25px;
	height: 100%;
	background: var(--bg-light);
	border: none;
	font-family: 'Roboto', sans-serif;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	color: #555;
	transition: background .15s, color .15s;
	text-transform: none;
}
.toggle-group button.active {
	background: var(--red);
	color: #fff;
}
.filters {
	display: flex;
	gap: 12px;
	flex: 1;
	flex-wrap: wrap;
}
.filter-select {
	height: 44px;
	padding: 0 40px 0 20px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: #fff;
	font-family: 'Roboto', sans-serif;
	font-size: 16px;
	color: #555;
	min-width: 250px;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230000008c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 12px;
}
.filter-select.disabled {
	opacity: .4;
	cursor: not-allowed;
	pointer-events: none;
}
.view-switch {
	display: inline-flex;
	border: 1px solid var(--border);
	border-radius: 999px;
	overflow: hidden;
	margin-left: auto;
	flex-shrink: 0;
	height: 44px;
}
.view-switch button {
	padding: 0 20px;
	height: 100%;
	background: var(--bg-light);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 16px;
	font-family: 'Roboto', sans-serif;
	color: #555;
	transition: background .15s, color .15s;
}
.view-switch button.active {
	background: var(--navy);
	color: #fff;
}
.view-switch button svg { width: 18px; height: 18px; }

/* Responsive styling for toolbar */
@media (max-width: 1510px) {
	.toggle-group {
		order: 1;
	}
	.view-switch {
		order: 2;
		margin-left: auto;
	}
	.filters {
		order: 3;
		flex-basis: 100%;
		margin-top: 15px;
	}
}

@media (max-width: 576px) {
	.toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.toggle-group, .view-switch, .filters {
		order: unset;
		margin-left: 0;
		flex-basis: auto;
		width: 100%;
	}
	.toggle-group, .view-switch {
		height: 44px;
		display: flex;
		justify-content: stretch;
	}
	.toggle-group button, .view-switch button {
		flex: 1;
		justify-content: center;
		padding: 0 10px;
		font-size: 14px;
	}
	.filters {
		flex-direction: column;
		align-items: stretch;
		height: auto;
	}
	.filter-select {
		width: 100%;
		min-width: 0;
		height: 44px;
	}
	.btn-reset-filters {
		justify-content: center;
		height: 44px;
	}
}

/* Directory Grid */
.directory-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
	width: 100%;
}
.directory-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 22px 24px;
	cursor: pointer;
	transition: box-shadow .15s, border-color .15s;
	position: relative;
	width: 100%;
	text-align: left;
	font-family: inherit;
	display: block;
}
.directory-card:hover {
	box-shadow: 0 4px 16px rgba(0,47,95,.12);
	border-color: #c0ccd8;
}
.directory-card.active {
	border-color: var(--red);
	box-shadow: 0 4px 20px rgba(236,56,51,.15);
	z-index: 10;
}
.card-name {
	font-size: 18.5px;
	font-weight: 700;
	color: var(--navy);
	margin-bottom: 5px;
}
.card-city {
	font-size: 16px;
	color: #666;
	margin-bottom: 12px;
}
.card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.tag { display: inline-block; background: var(--bg-light); border-radius: 4px; padding: 3px 10px; font-size: 13.5px; color: var(--navy); font-weight: 500; }

.directory-card.card-partner .card-logo {
	height: 48px;
	display: flex;
	align-items: center;
	margin-bottom: 12px;
}
.directory-card.card-partner .card-logo img {
	max-height: 48px;
	max-width: 160px;
	object-fit: contain;
}
.directory-card.card-partner .card-logo-placeholder {
	width: 48px;
	height: 48px;
	background: var(--bg-light);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ccc;
	font-size: 20px;
}
.directory-card.card-partner .card-contact {
	font-size: 15px;
	color: #666;
	margin-top: 8px;
}
.directory-card.card-partner .card-contact a {
	color: var(--navy);
	text-decoration: none;
	font-size: 15px;
}
.directory-card.card-partner .card-contact a:hover { text-decoration: underline; }
.card-chevron {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #ccc;
	font-size: 20px;
}

/* Overlays & Panels */
.directory-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.35);
	z-index: 2000;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s, visibility .3s;
}
.directory-overlay.open {
	opacity: 1;
	visibility: visible;
}
.detail-panel {
	background: #fff;
	width: 480px;
	max-width: 100vw;
	height: 100vh;
	overflow-y: auto;
	padding: 32px 32px 48px;
	box-shadow: -4px 0 24px rgba(0,0,0,.12);
	position: relative;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.directory-overlay.open .detail-panel {
	transform: translateX(0);
}
.panel-close {
	position: absolute;
	top: 18px;
	right: 18px;
	background: none;
	border: none;
	cursor: pointer;
	color: #888;
	font-size: 26px;
	line-height: 1;
}
.panel-close:hover { color: var(--red); }
.panel-section-title {
	font-size: 13.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--red);
	margin: 24px 0 12px;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 6px;
}
.panel-row {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 16px;
	line-height: 1.5;
}
.panel-label {
	color: #888;
	min-width: 160px;
	flex-shrink: 0;
}
.panel-value {
	color: var(--text);
	font-weight: 500;
}
.panel-value a {
	color: var(--navy);
	text-decoration: none;
}
.panel-value a:hover { text-decoration: underline; }
.panel-name {
	font-size: 25px;
	font-weight: 700;
	color: var(--navy);
	margin-bottom: 4px;
	margin-top: 8px;
	padding-right: 32px;
}
.panel-logo {
	max-height: 64px;
	max-width: 200px;
	object-fit: contain;
	margin-bottom: 14px;
}
.contact-box {
	background: var(--info-bg);
	border-radius: 8px;
	padding: 16px 20px;
	margin-top: 6px;
}
.contact-box .cname {
	font-size: 17.5px;
	font-weight: 700;
	color: var(--navy);
	margin-bottom: 5px;
}
.contact-box a {
	font-size: 16px;
	color: #003a60;
	text-decoration: none;
}
.contact-box a:hover { text-decoration: underline; }
.panel-address-block {
	background: var(--bg-light);
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 4px;
}
.panel-address-line {
	font-size: 15px;
	line-height: 1.7;
	color: var(--text);
}
.panel-address-line strong {
	color: var(--navy);
	font-weight: 600;
}
.contact-linkedin {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}
.contact-linkedin svg {
	color: #0a66c2;
	flex-shrink: 0;
}
.contact-linkedin a {
	font-size: 15px;
	color: #0a66c2;
	text-decoration: none;
}
.contact-linkedin a:hover { text-decoration: underline; }
.criteria-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 4px;
}
.criteria-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	background: var(--bg-light);
	border: 1px solid var(--border);
	border-radius: 8px;
	text-decoration: none;
	color: var(--navy);
	font-size: 14.5px;
	font-weight: 500;
	transition: background .15s, border-color .15s;
}
.criteria-link:hover {
	background: var(--info-bg);
	border-color: #8ac8e8;
	color: var(--navy) !important;
}
.criteria-link svg {
	flex-shrink: 0;
	color: #888;
	transition: color .15s;
}
.criteria-link:hover svg { color: #333; }

.btn-reset-filters {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: #888;
	font-size: 14.5px;
	font-weight: 500;
	cursor: pointer;
	padding: 0 10px;
	height: 44px;
	transition: color .15s;
	white-space: nowrap;
}
.btn-reset-filters:hover { color: var(--red); }
.btn-reset-filters.hidden { display: none !important; }

/* Map styling */
#map-view {
	display: none;
	width: 100%;
	height: 580px;
	border-radius: 12px;
	border: 1px solid var(--border);
	overflow: hidden;
}
#map-view.visible { display: block; }
#leaflet-map { width: 100%; height: 100%; }
.hidden { display: none !important; }

/* Map Markers Styling */
.custom-pin {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 34px;
	cursor: pointer;
}
.pin-svg {
	width: 26px;
	height: 34px;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Prevent background scroll when sidebar is open */
body.directory-open {
	overflow: hidden;
	/* Avoid layout shift if scrollbar is hidden */
	scrollbar-gutter: stable;
}
.sidebar-menu-arrow {
	color: #ccc;
	transition: color 0.15s ease-in-out;
}
.nav-link.active .sidebar-menu-arrow {
	color: var(--red);
}

/* Extracted styles to replace inline styles */
.sidebar-toggle-btn {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	text-transform: inherit;
	box-shadow: none;
}
.sidebar-annuaire-caret {
	transition: transform 0.2s ease-in-out;
}
#annuaire-submenu-list {
	display: block;
}
.annuaire-title {
	color: #000;
	font-weight: 500;
	font-family: 'Roboto', sans-serif;
	font-size: 1.75rem;
}
.no-results-box {
	background: var(--bg-light);
	border-radius: 12px;
	margin-top: 20px;
}
.no-results-box p {
	font-size: 15px;
}
.no-results-box button {
	font-size: 14px;
}
.panel-address-block + .panel-address-block {
	margin-top: 10px;
}
.contact-box + .contact-box {
	margin-top: 10px;
}
.panel-section-title:first-of-type {
	margin-top: 0;
}
.external-link-icon {
	margin-left: 8px;
	vertical-align: middle;
	position: relative;
	top: -1px;
}

/* Map Popup Styling */
.map-popup-content {
	font-family: 'Roboto', sans-serif;
}
.map-popup-content .popup-title {
	font-size: 14px;
	color: var(--navy);
}
.map-popup-content .popup-type {
	color: #666;
	font-size: 13px;
}
.map-popup-content .popup-btn {
	color: var(--red) !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.map-popup-content .popup-btn:hover {
	text-decoration: underline;
}

