/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.3
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/

/* -------------------------------------------------------------------------
 * Region photo gallery — scoped to a `.region-gallery` ancestor only.
 *
 * Add the CSS class `region-gallery` on the Elementor container/section
 * that wraps the Image Carousel (Advanced → CSS Classes). Inside that
 * wrapper:
 *   - Nav arrows lift higher above the slide strip.
 *   - Slides get the asymmetric corner radius (bottom-right tripled).
 *   - The carousel allows right-side bleed past its container.
 *
 * Buttons inherit the site's native .elementor-swiper-button styling — no
 * overrides — so other carousels are untouched.
 * ----------------------------------------------------------------------- */

.region-gallery .elementor-image-carousel-wrapper {
	--arrow-prev-top-position: -160px !important;
	--arrow-next-top-position: -160px !important;
}

/* Mirror what Elementor's widget panel applies per-instance (border / radius
 * / padding) — needed because the [region_gallery] shortcode emits the nav
 * buttons outside any Elementor widget, so the per-instance CSS doesn't reach
 * them. Scoped to .region-gallery, so other carousels are untouched. */
.region-gallery .elementor-swiper-button {
	width: 60px !important;
	height: 60px !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 1px solid #0D3183B3 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #0D3183 !important;
	transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease !important;
}

.region-gallery .elementor-swiper-button i {
	font-size: 14px !important;
	line-height: 1 !important;
}

.region-gallery .elementor-swiper-button:hover {
	background: #0D3183 !important;
	color: #fff !important;
	border-color: #0D3183 !important;
}

.region-gallery .elementor-swiper-button.swiper-button-disabled {
	opacity: .4 !important;
	pointer-events: none !important;
}

.region-gallery .elementor-image-carousel-wrapper .swiper,
.region-gallery .swiper {
	overflow: visible !important;
}

.region-gallery .elementor-image-carousel-wrapper .swiper-slide,
.region-gallery .elementor-image-carousel-wrapper .swiper-slide img,
.region-gallery .elementor-image-carousel-wrapper .swiper-slide a,
.region-gallery .swiper-slide,
.region-gallery .swiper-slide img {
	border-radius: 12px 12px 36px 12px !important;
}

/* -------------------------------------------------------------------------
 * Algolia autocomplete dropdown
 *
 * The plugin's bundled CSS (algolia-autocomplete.css) is dequeued in
 * functions.php — it floats headers/thumbnails and breaks every layout.
 * Markup lives in algolia/autocomplete.php and uses `tbc-ac-*` classes.
 *
 * Tokens (kept local so the rest of the theme isn't touched):
 *   Brand blue : #0D3183
 *   Action grn : #1FA659  (the round search button)
 *   Hairline   : rgba(13, 49, 131, 0.10)
 *
 * Visual goals:
 *   - Cap height + internal scroll → never steals the page's scroll.
 *   - Each Algolia source is a clearly-separated card section with a
 *     small pill label, so post types don't blur together.
 *   - Missing feature image → branded "pin" placeholder, never a flat
 *     gray box.
 *   - Matched text → green underline, never a colored block.
 * ----------------------------------------------------------------------- */

.algolia-autocomplete {
	width: 100%;
	font-family: inherit;
	color: #1a1a1a;
	/* The plugin's bundled autocomplete.js (v0.x) does NOT support `appendTo`,
	 * so the dropdown stays inside this wrapper. When the wrapper sits inside
	 * an Elementor popup, its own stacking context buries it under the popup
	 * backdrop unless we lift it. The plugin's dequeued CSS used to do this
	 * with z-index: 999999 !important — keep that behavior. */
	z-index: 999999;
}

/* ---- panel --------------------------------------------------------------- */

.algolia-autocomplete .aa-dropdown-menu {
	margin-top: 12px;
	width: 100%;
	min-width: 380px;
	max-height: min(56vh, 448px);
	overflow-y: auto;
	overscroll-behavior: contain; /* keeps page scroll locked while inside */
	background: #fff;
	border: 1px solid rgba(13, 49, 131, 0.10);
	border-radius: 30px;
	box-shadow:
		0 24px 60px -12px rgba(13, 49, 131, 0.22),
		0 6px 18px -8px rgba(0, 0, 0, 0.10);
	padding: 6px 0 0;
}

/* Custom scrollbar (WebKit + Firefox). Stays out of the way until you hover. */
.algolia-autocomplete .aa-dropdown-menu {
	scrollbar-width: thin;
	scrollbar-color: rgba(13, 49, 131, 0.18) transparent;
}
.algolia-autocomplete .aa-dropdown-menu::-webkit-scrollbar { width: 8px; }
.algolia-autocomplete .aa-dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.algolia-autocomplete .aa-dropdown-menu::-webkit-scrollbar-thumb {
	background: rgba(13, 49, 131, 0.15);
	border-radius: 8px;
	border: 2px solid #fff;
}
.algolia-autocomplete .aa-dropdown-menu::-webkit-scrollbar-thumb:hover {
	background: rgba(13, 49, 131, 0.30);
}

/* ---- section divider between Algolia sources ----------------------------- */
/* Two-part rule:
 *  - `:has(*)` ensures we only consider datasets that have real children
 *    (sources with zero hits leave an empty div — they're hidden below).
 *  - `~` general-sibling means a dataset is "non-first" only if at least one
 *    *visible* dataset precedes it. `+` (adjacent) was wrong here because
 *    sibling selectors ignore `display: none` and still matched a hidden
 *    empty dataset → drawing a stray hairline above the first real section.
 */

.algolia-autocomplete [class^="aa-dataset-"]:has(*) ~ [class^="aa-dataset-"]:has(*) {
	margin-top: 4px;
	padding-top: 6px;
	border-top: 1px solid rgba(13, 49, 131, 0.10);
}

.algolia-autocomplete [class^="aa-dataset-"]:empty,
.algolia-autocomplete [class^="aa-dataset-"]:not(:has(*)),
.algolia-autocomplete .aa-suggestions:empty {
	display: none;
}

/* ---- section header ------------------------------------------------------ */

.algolia-autocomplete .tbc-ac-section-head {
	padding: 14px 20px 6px;
}

.algolia-autocomplete .tbc-ac-section-label {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #0D3183;
	background: rgba(13, 49, 131, 0.07);
	padding: 4px 9px;
	border-radius: 999px;
	line-height: 1;
}

/* Reset any leftover plugin float rules that target .autocomplete-header* */
.algolia-autocomplete .autocomplete-header,
.algolia-autocomplete .autocomplete-header-title,
.algolia-autocomplete .autocomplete-header-more,
.algolia-autocomplete .clear {
	float: none;
	clear: both;
}

/* ---- hit rows ------------------------------------------------------------ */

.algolia-autocomplete .aa-suggestion {
	padding: 0 !important;        /* plugin default adds 5px we don't want */
}

.algolia-autocomplete .tbc-ac-hit {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 20px;
	color: inherit;
	text-decoration: none;
	position: relative;
	transition: background-color .15s ease, transform .2s ease;
	border-left: 3px solid transparent;
	min-height: 64px;
}

.algolia-autocomplete .tbc-ac-hit::before {
	/* Slim accent bar — slides in from the left on hover. */
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	bottom: 8px;
	width: 3px;
	background: #1FA659;
	border-radius: 0 3px 3px 0;
	transform: scaleY(0);
	transform-origin: center;
	transition: transform .2s ease;
}

.algolia-autocomplete .tbc-ac-hit:hover,
.algolia-autocomplete .aa-cursor .tbc-ac-hit {
	background: rgba(31, 166, 89, 0.06);
	text-decoration: none;
}

.algolia-autocomplete .tbc-ac-hit:hover::before,
.algolia-autocomplete .aa-cursor .tbc-ac-hit::before {
	transform: scaleY(1);
}

.algolia-autocomplete .tbc-ac-hit:hover .tbc-ac-chevron,
.algolia-autocomplete .aa-cursor .tbc-ac-hit .tbc-ac-chevron {
	opacity: 1;
	transform: translateX(2px);
}

/* ---- thumbnail (real image) --------------------------------------------- */

.algolia-autocomplete .tbc-ac-thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f5fa;
	box-shadow: inset 0 0 0 1px rgba(13, 49, 131, 0.06);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.algolia-autocomplete .tbc-ac-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---- thumbnail fallback (missing feature image) ------------------------- */

.algolia-autocomplete .tbc-ac-thumb--placeholder {
	background:
		radial-gradient(circle at 30% 30%, rgba(31, 166, 89, 0.18), transparent 60%),
		linear-gradient(135deg, #EAF2FF 0%, #F4F7FC 100%);
	color: #0D3183;
}

.algolia-autocomplete .tbc-ac-thumb--placeholder svg {
	opacity: 0.65;
}

/* ---- thumbnail variants (terms / users) --------------------------------- */

.algolia-autocomplete .tbc-ac-thumb--term {
	background: rgba(13, 49, 131, 0.08);
	color: #0D3183;
	box-shadow: none;
	width: 40px;
	height: 40px;
	flex-basis: 40px;
	border-radius: 50%;
}

.algolia-autocomplete .tbc-ac-thumb--user {
	border-radius: 50%;
}

/* ---- text body ---------------------------------------------------------- */

.algolia-autocomplete .tbc-ac-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
	gap: 2px;
}

.algolia-autocomplete .tbc-ac-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #0D3183;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.algolia-autocomplete .tbc-ac-snippet {
	font-size: 12.5px;
	line-height: 1.45;
	color: #5a5e66;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Matched-text highlight — green underline, no block fill. */
.algolia-autocomplete em {
	font-style: normal;
	font-weight: 700;
	color: inherit;
	background: transparent;
	box-shadow: inset 0 -2px 0 0 #1FA659;
	padding: 0 1px;
}

.algolia-autocomplete .tbc-ac-snippet em {
	font-weight: 600;
	box-shadow: inset 0 -2px 0 0 rgba(31, 166, 89, 0.75);
}

/* ---- chevron ------------------------------------------------------------ */

.algolia-autocomplete .tbc-ac-chevron {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #0D3183;
	opacity: 0;
	transition: opacity .15s ease, transform .15s ease;
}

/* ---- empty state -------------------------------------------------------- */

.algolia-autocomplete .tbc-ac-empty {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 22px;
	font-size: 14px;
	color: #5a5e66;
}

.algolia-autocomplete .tbc-ac-empty svg {
	color: #0D3183;
	opacity: 0.55;
	flex: 0 0 auto;
}

.algolia-autocomplete .tbc-ac-empty-query {
	font-style: normal;
	font-weight: 600;
	color: #0D3183;
}

/* ---- footer ------------------------------------------------------------- */

.algolia-autocomplete .tbc-ac-footer {
	display: flex;
	justify-content: flex-end;
	padding: 8px 18px 10px;
	margin-top: 4px;
	border-top: 1px solid rgba(13, 49, 131, 0.08);
	position: sticky;
	bottom: 0;
	background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0.92));
}

.algolia-autocomplete .algolia-powered-by-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: #8a8e96;
	text-decoration: none;
	letter-spacing: 0.02em;
}

.algolia-autocomplete .algolia-powered-by-link svg {
	color: #5468ff;
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 600px) {
	.algolia-autocomplete .aa-dropdown-menu {
		min-width: 0;
		border-radius: 20px;
		max-height: 52vh;
	}

	.algolia-autocomplete .tbc-ac-hit {
		padding: 10px 14px;
		gap: 10px;
	}

	.algolia-autocomplete .tbc-ac-section-head {
		padding: 12px 14px 4px;
	}

	.algolia-autocomplete .tbc-ac-thumb {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}
}

/* -------------------------------------------------------------------------
 * Single `mapping-enterprise` page — two-column layout matching the map
 * popup's information (title, meta, content, contact block) alongside a
 * small standalone Leaflet map pinned at the enterprise's coordinates.
 * Scoped under `.mapping-enterprise-single` so nothing leaks to the main
 * map page or other singulars.
 * ----------------------------------------------------------------------- */

.mapping-enterprise-single {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
}

.mapping-enterprise-single .me-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}

.mapping-enterprise-single .me-grid--no-map {
	grid-template-columns: minmax(0, 1fr);
}

.mapping-enterprise-single .me-thumb {
	margin-bottom: 1.5rem;
}

.mapping-enterprise-single .me-thumb img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.mapping-enterprise-single .me-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.75rem, 2.5vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -1px !important;
}

.mapping-enterprise-single .me-meta {
	color: #5b6470;
	font-size: 0.95rem;
	margin-bottom: 1.75rem;
}

.mapping-enterprise-single .me-content {
	font-size: 1rem;
	line-height: 1.65;
	margin-bottom: 2rem;
}

.mapping-enterprise-single .me-content p {
	margin: 0 0 1rem;
}

.mapping-enterprise-single .me-contact {
	border-top: 1px solid #e5e7eb;
	padding-top: 1.25rem;
}

.mapping-enterprise-single .me-contact p {
	margin: 0 0 0.5rem;
	line-height: 1.5;
}

.mapping-enterprise-single .me-contact a {
	text-decoration: none;
}

.mapping-enterprise-single .me-contact a:hover {
	text-decoration: underline;
}

.mapping-enterprise-single .me-side {
	position: sticky;
	top: 2rem;
}

.mapping-enterprise-single .me-side-title {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.04em !important;
	text-transform: uppercase;
	color: #5b6470;
}

.mapping-enterprise-single .me-back {
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
}

.mapping-enterprise-single .me-back a {
	color: #5b6470;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.mapping-enterprise-single .me-back a:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.mapping-enterprise-single .me-single-map {
	width: 100%;
	height: 480px;
	border-radius: 8px;
	overflow: hidden;
	background: #eef2f5;
}

.mapping-enterprise-single .me-side-address {
	margin: 0.75rem 0 0;
	color: #5b6470;
	font-size: 0.9rem;
}

@media (max-width: 900px) {
	.mapping-enterprise-single .me-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.mapping-enterprise-single .me-side {
		position: static;
	}

	.mapping-enterprise-single .me-single-map {
		height: 360px;
	}
}

/* -------------------------------------------------------------------------
 * Algolia instantsearch results page — overrides the plugin's default
 * markup with a centered hero, big search input, post-type pill tabs row,
 * left-sidebar refinement lists (Région / Thématique / Catégorie), and
 * card-style results. Scoped under `.sw-page` so the rules don't reach
 * the autocomplete dropdown or any other page on the site.
 * ----------------------------------------------------------------------- */

.sw-page {
	max-width: 1240px;
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
	color: #1f2937;
}

/* Search results page: clip any horizontal overflow from the 100vw hero
 * breakout (the vertical scrollbar makes 100vw slightly wider than the
 * visible viewport). Scoped to the WP body class so other pages aren't
 * affected. */
body.search-results {
	overflow-x: clip;
}

/* ---- Hero (full-bleed photo) ---- */
.sw-page .sw-hero {
	position: relative;
	width: 100vw;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	margin-top: -2.5rem; /* offset .sw-page padding-top */
	margin-bottom: 2.5rem;
	padding: 5rem 1.5rem 4.5rem;
	background-image:
		linear-gradient(rgba(11, 27, 51, 0.55), rgba(11, 27, 51, 0.55)),
		url('/wp-content/uploads/2026/04/imageregionvancouver_Destination-BC_Albert-Normandin.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #fff;
	text-align: center;
	overflow: hidden;
	border-bottom-left-radius: 80px;
}

.sw-page .sw-hero-inner {
	max-width: 760px;
	margin: 0 auto;
}

.sw-page .sw-hero-eyebrow {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.04em !important;
	color: #fff;
	opacity: 0.95;
}

.sw-page .sw-hero-eyebrow span {
	display: inline-block;
	margin-right: 0.4rem;
	color: #fff;
	font-weight: 700;
}

.sw-page .sw-hero-title {
	margin: 0 0 1.75rem !important;
	font-size: clamp(2rem, 4.5vw, 3.25rem) !important;
	font-weight: 400 !important;
	letter-spacing: -1px !important;
	line-height: 1.1 !important;
	color: #fff !important;
}

.sw-page .sw-hero-title strong {
	font-weight: 800;
	color: #fff;
}

/* ---- Search input (lives inside the hero) ---- */
.sw-page .sw-searchbar-wrap {
	max-width: 720px;
	margin: 0 auto;
}

.sw-page .sw-sb-form {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	padding: 0.25rem 0.5rem 0.25rem 1.25rem;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.sw-page .sw-sb-form:focus-within {
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}

.sw-page .sw-sb-form::before {
	content: '';
	width: 22px;
	height: 22px;
	margin-right: 0.75rem;
	background-color: #6b7280;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") no-repeat center / contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>") no-repeat center / contain;
	flex-shrink: 0;
}

.sw-page .sw-sb-input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	outline: none !important;
	background: transparent !important;
	padding: 0.85rem 0 !important;
	font-size: 1.05rem;
	color: #1f2937 !important;
	box-shadow: none !important;
}

.sw-page .sw-sb-input::placeholder {
	color: #9ca3af;
}

.sw-page .sw-sb-input::-webkit-search-cancel-button,
.sw-page .sw-sb-input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.sw-page .sw-sb-input::-ms-clear,
.sw-page .sw-sb-input::-ms-reveal {
	display: none;
}

.sw-page .sw-sb-reset {
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0.4rem 0.6rem;
	color: #6b7280;
	border-radius: 999px;
}

.sw-page .sw-sb-reset:hover {
	color: #1f2937;
	background: #f3f4f6;
}

.sw-page .sw-sb-loading {
	margin-right: 0.5rem;
}

/* ---- Pill tabs ---- */
.sw-pills-wrap {
	max-width: 900px;
	margin: 0 auto 1.5rem;
}

.sw-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.sw-page .sw-pill {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.4rem !important;
	background: #f3f4f6 !important;
	background-image: none !important;
	color: #1f2937 !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 0.45rem 0.95rem !important;
	font-size: 0.85rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	transition: background 0.15s, color 0.15s !important;
	min-height: 0 !important;
	height: auto !important;
}

.sw-page .sw-pill:hover {
	background: #e5e7eb !important;
	color: #1f2937 !important;
}

.sw-page .sw-pill.is-active {
	background: #111827 !important;
	color: #fff !important;
}

.sw-page .sw-pill.is-active .sw-pill-count {
	color: #fff;
}

.sw-page .sw-pill .sw-pill-count {
	display: inline-flex !important;
	align-items: center !important;
	font-weight: 700 !important;
	font-size: 0.85em !important;
	line-height: 1 !important;
	color: #6b7280;
	opacity: 1;
}

/* ---- Stats line ---- */
.sw-stats {
	max-width: 1100px;
	margin: 0 auto 1rem;
	color: #6b7280;
	font-size: 0.9rem;
}

/* ---- Two-col layout ---- */
.sw-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}

.sw-sidebar {
	position: sticky;
	top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.sw-page .sw-facet-title {
	margin: 0 0 0.6rem !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
	color: #6b7280 !important;
}

/* refinementList CSS classes ('sw-rl-*' set via cssClasses option) */
.sw-page .sw-rl-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sw-page .sw-rl-item {
	margin: 0 0 0.35rem;
}

.sw-page .sw-rl-label {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.93rem;
	color: #1f2937;
	cursor: pointer;
	line-height: 1.3;
}

.sw-page .sw-rl-checkbox {
	width: 18px;
	height: 18px;
	accent-color: #1d4ed8;
	margin: 0;
}

.sw-page .sw-rl-count {
	color: #6b7280;
	font-size: 0.85em;
	margin-left: 0.25rem;
}

.sw-page .sw-rl-more {
	display: inline-block !important;
	margin-top: 0.4rem !important;
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	padding: 0 !important;
	color: #1d4ed8 !important;
	font-size: 0.85rem !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
}

.sw-page .sw-rl-more:hover,
.sw-page .sw-rl-more:focus {
	color: #1d4ed8 !important;
	background: transparent !important;
	text-decoration: underline !important;
}

.sw-page .sw-rl-more[disabled],
.sw-page .sw-rl-more.ais-RefinementList-showMore--disabled {
	display: none !important;
}

.sw-page .sw-clear-button {
	display: inline-block !important;
	margin-top: 0.25rem !important;
	background: transparent !important;
	background-image: none !important;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	padding: 0.5rem 0.8rem !important;
	font-size: 0.85rem !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	color: #1f2937 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
	transition: background 0.15s, border-color 0.15s !important;
}

.sw-page .sw-clear-button:hover {
	background: #f3f4f6 !important;
	color: #1f2937 !important;
}

.sw-page .sw-clear-button.is-disabled,
.sw-page .sw-clear-button:disabled {
	color: #9ca3af !important;
	cursor: not-allowed;
	border-color: #e5e7eb !important;
	background: transparent !important;
}

/* "Regions only" mode (Régions pill active): hide the post results,
 * leave the regions section visible. */
.sw-page.is-regions-only #sw-hits,
.sw-page.is-regions-only #sw-pagination {
	display: none !important;
}

.sw-page.is-regions-only #sw-regions-section {
	display: block !important;
}

/* ---- Régions section (secondary index, same card layout as posts) ---- */
.sw-page .sw-regions-section {
	margin: 0 0 1rem;
}

.sw-page .sw-regions-title {
	margin: 0 0 0.6rem !important;
	font-size: 0.78rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
	color: #6b7280 !important;
}

.sw-page #sw-region-hits .ais-Hits-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.sw-page #sw-region-hits .ais-Hits-item {
	margin: 0;
	padding: 0;
}

/* ---- Result cards ---- */
.sw-results {
	min-width: 0;
}

#sw-hits .ais-Hits-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

#sw-hits .ais-Hits-item {
	margin: 0;
	padding: 0;
}

.sw-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.sw-card:hover {
	border-color: #c7d2fe;
	box-shadow: 0 6px 18px rgba(17,24,39,0.06);
}

.sw-card-link {
	display: flex;
	gap: 1rem;
	padding: 0.9rem;
	text-decoration: none;
	color: inherit;
	align-items: stretch;
}

.sw-card-thumb {
	flex: 0 0 140px;
	width: 140px;
	height: 100px;
	border-radius: 6px;
	overflow: hidden;
	background: #eef2f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
}

.sw-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sw-card-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.sw-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}

.sw-card-snippet {
	color: #4b5563;
	font-size: 0.92rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sw-card-snippet em {
	font-style: normal;
	background: #fef3c7;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}

.sw-card-title em {
	font-style: normal;
	background: #fef3c7;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}

.sw-card-meta {
	margin-top: auto;
	color: #6b7280;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: normal !important;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.sw-card-meta-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	vertical-align: -2px;
}

.sw-card-meta-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Lucide-style icons rendered as inline SVG data URIs so they don't depend
 * on Underscore template raw-HTML output or post-render JS injection. */
.sw-card-meta-icon[data-icon-key="Entreprises"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 21h18'/><path d='M5 21V7l8-4v18'/><path d='M19 21V11l-6-4'/><path d='M9 9h.01'/><path d='M9 12h.01'/><path d='M9 15h.01'/><path d='M9 18h.01'/></svg>");
}

.sw-card-meta-icon[data-icon-key="Articles"],
.sw-card-meta-icon[data-icon-key="Article"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/><path d='M18 14h-8'/><path d='M15 18h-5'/><path d='M10 6h8v4h-8V6Z'/></svg>");
}

.sw-card-meta-icon[data-icon-key="Pages"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/><path d='M14 2v4a2 2 0 0 0 2 2h4'/><path d='M9 13h6'/><path d='M9 17h6'/></svg>");
}

.sw-card-meta-icon[data-icon-key="Circuits"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='6' cy='19' r='3'/><path d='M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15'/><circle cx='18' cy='5' r='3'/></svg>");
}

.sw-card-meta-icon[data-icon-key="Vidéos"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='m22 8-6 4 6 4V8Z'/><rect width='14' height='12' x='2' y='6' rx='2' ry='2'/></svg>");
}

.sw-card-meta-icon[data-icon-key="Événements"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M8 2v4'/><path d='M16 2v4'/><rect width='18' height='18' x='3' y='4' rx='2'/><path d='M3 10h18'/><path d='M8 14h.01'/><path d='M12 14h.01'/><path d='M16 14h.01'/><path d='M8 18h.01'/><path d='M12 18h.01'/><path d='M16 18h.01'/></svg>");
}

.sw-card-meta-icon[data-icon-key="Région"] {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21s-7-5.5-7-11a7 7 0 1 1 14 0c0 5.5-7 11-7 11Z'/><circle cx='12' cy='10' r='2.5'/></svg>");
}

/* ---- Empty / pagination ---- */
.sw-empty {
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	padding: 1.5rem;
	text-align: center;
	color: #6b7280;
}

.sw-pagination {
	margin-top: 1.75rem;
}

.sw-page .sw-pg-list {
	list-style: none;
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.sw-page .sw-pg-item {
	margin: 0;
}

.sw-page .sw-pg-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 0.6rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
	color: #1f2937;
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 500;
}

.sw-page .sw-pg-link:hover {
	background: #f3f4f6;
}

.sw-page .sw-pg-item.is-selected .sw-pg-link {
	background: #111827;
	color: #fff;
	border-color: #111827;
}

.sw-page .sw-pg-item.is-disabled .sw-pg-link {
	color: #d1d5db;
	pointer-events: none;
}

/* ---- Mobile filters toggle (hidden on desktop) ---- */
.sw-page .sw-filters-toggle {
	display: none !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 0.5rem !important;
	width: 100% !important;
	margin: 0 0 1rem !important;
	padding: 0.7rem 1rem !important;
	background: #fff !important;
	background-image: none !important;
	color: #1f2937 !important;
	border: 1px solid #d1d5db !important;
	border-radius: 8px !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	cursor: pointer;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	min-height: 0 !important;
	height: auto !important;
}

.sw-page .sw-filters-toggle .sw-filters-toggle-icon {
	transition: transform 0.2s;
}

.sw-page .sw-filters-toggle.is-open .sw-filters-toggle-icon {
	transform: rotate(180deg);
}

/* ---- Responsive ---- */
@media (max-width: 880px) {
	.sw-page .sw-hero {
		padding: 3rem 1.25rem 3rem;
		margin-bottom: 1.75rem;
	}

	.sw-page .sw-filters-toggle {
		display: inline-flex !important;
	}

	.sw-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.sw-sidebar {
		position: static;
		display: none;
		flex-direction: column;
		gap: 1.25rem;
		padding: 1rem;
		background: #f9fafb;
		border: 1px solid #e5e7eb;
		border-radius: 8px;
		margin-bottom: 1rem;
	}

	.sw-sidebar.is-open {
		display: flex;
	}

	.sw-sidebar .sw-pills-wrap {
		margin: 0 0 0.5rem;
		max-width: none;
	}

	.sw-sidebar .sw-pills {
		justify-content: flex-start;
	}

	.sw-facet {
		margin: 0;
	}

	.sw-card-thumb {
		flex-basis: 100px;
		width: 100px;
		height: 80px;
	}
}

@media (max-width: 480px) {
	.sw-card-link {
		flex-direction: column;
	}

	.sw-card-thumb {
		width: 100%;
		height: 160px;
		flex-basis: auto;
	}
}

/* -------------------------------------------------------------------------
 * Initial loading state for the search results page.
 *
 * `.sw-page.is-initializing` is set in the template and removed after the
 * first InstantSearch render. While present, we paint shimmering skeleton
 * blocks inside the empty widget containers so the page doesn't look
 * half-finished during the (sometimes slow) initial query round-trip.
 *
 * The .sw-facet sections aren't included here because they're rendered
 * empty until refinementList has items anyway, and `toggleFacetSection`
 * keeps them hidden when there's nothing to show — a skeleton there would
 * flash and disappear.
 * ----------------------------------------------------------------------- */

@keyframes sw-skeleton-pulse {
	0%   { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

.sw-page.is-initializing .sw-sb-form,
.sw-page.is-initializing #sw-post-type-pills,
.sw-page.is-initializing #sw-stats,
.sw-page.is-initializing #sw-facet-region,
.sw-page.is-initializing #sw-facet-thematique,
.sw-page.is-initializing #sw-facet-category,
.sw-page.is-initializing #sw-hits {
	position: relative;
	min-height: 1px;
}

/* Generic skeleton bar — sized differently per slot via the rules below. */
.sw-page.is-initializing #sw-post-type-pills::after,
.sw-page.is-initializing #sw-stats::after,
.sw-page.is-initializing #sw-facet-region::after,
.sw-page.is-initializing #sw-facet-thematique::after,
.sw-page.is-initializing #sw-facet-category::after,
.sw-page.is-initializing #sw-hits::after {
	content: "";
	display: block;
	background: linear-gradient(
		90deg,
		rgba(13, 49, 131, 0.04) 0%,
		rgba(13, 49, 131, 0.10) 50%,
		rgba(13, 49, 131, 0.04) 100%
	);
	background-size: 200% 100%;
	animation: sw-skeleton-pulse 1.4s ease-in-out infinite;
	border-radius: 999px;
}

/* Search input: shimmer fills the empty form box so the input doesn't
 * appear missing during init. The form itself already has a fixed height
 * so we just tint it. */
.sw-page.is-initializing .sw-sb-form {
	background: linear-gradient(
		90deg,
		rgba(13, 49, 131, 0.04) 0%,
		rgba(13, 49, 131, 0.10) 50%,
		rgba(13, 49, 131, 0.04) 100%
	);
	background-size: 200% 100%;
	animation: sw-skeleton-pulse 1.4s ease-in-out infinite;
	pointer-events: none;
}

/* Pills row — 4 fake pills */
.sw-page.is-initializing #sw-post-type-pills {
	display: flex;
	gap: 8px;
	min-height: 36px;
}
.sw-page.is-initializing #sw-post-type-pills::after {
	width: 96px;
	height: 36px;
	box-shadow:
		112px 0 0 0 rgba(13, 49, 131, 0.07),
		224px 0 0 0 rgba(13, 49, 131, 0.07),
		336px 0 0 0 rgba(13, 49, 131, 0.07);
}

/* Stats line */
.sw-page.is-initializing #sw-stats::after {
	width: 140px;
	height: 14px;
	border-radius: 4px;
}

/* Sidebar facet placeholders — three stacked rows per facet */
.sw-page.is-initializing #sw-facet-region,
.sw-page.is-initializing #sw-facet-thematique,
.sw-page.is-initializing #sw-facet-category {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 88px;
}
.sw-page.is-initializing #sw-facet-region::after,
.sw-page.is-initializing #sw-facet-thematique::after,
.sw-page.is-initializing #sw-facet-category::after {
	width: 100%;
	height: 20px;
	border-radius: 6px;
	box-shadow:
		0 28px 0 0 rgba(13, 49, 131, 0.07),
		0 56px 0 0 rgba(13, 49, 131, 0.07);
}

/* Results area — three card-shaped skeletons */
.sw-page.is-initializing #sw-hits {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 320px;
}
.sw-page.is-initializing #sw-hits::after {
	width: 100%;
	height: 96px;
	border-radius: 14px;
	box-shadow:
		0 108px 0 0 rgba(13, 49, 131, 0.06),
		0 216px 0 0 rgba(13, 49, 131, 0.06);
}

/* Reduced-motion users get a static tint, no shimmer. */
@media (prefers-reduced-motion: reduce) {
	.sw-page.is-initializing .sw-sb-form,
	.sw-page.is-initializing #sw-post-type-pills::after,
	.sw-page.is-initializing #sw-stats::after,
	.sw-page.is-initializing #sw-facet-region::after,
	.sw-page.is-initializing #sw-facet-thematique::after,
	.sw-page.is-initializing #sw-facet-category::after,
	.sw-page.is-initializing #sw-hits::after {
		animation: none;
		background: rgba(13, 49, 131, 0.07);
	}
}

