/* =========================================================================
   Candidates: explorer (/candidati/) and dossier (spec §6).
   Mobile first: filter → map → list (spec §6.6).
   ========================================================================= */

/* ---------- Filter ---------- */
.bz-filter {
	position: sticky;
	top: 0;
	z-index: 5;
	margin: 0 -16px 20px;
	padding: 12px 16px;
	background: var(--theme-palette-color-7);
	border-bottom: 1px solid var(--theme-palette-color-5);
}
.bz-filter__label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--theme-palette-color-4); }
.bz-filter__row { display: flex; gap: 8px; }
.bz-filter__select {
	flex: 1;
	min-height: 48px;
	padding: 0 14px;
	border: 2px solid var(--theme-palette-color-1);
	border-radius: 12px;
	background-color: var(--theme-palette-color-8);
	color: var(--theme-palette-color-4);
	font-size: 17px; /* 16px or more: no zoom on focus in iOS Safari */
	font-weight: 600;
}
@media (min-width: 1000px) {
	.bz-filter { position: static; margin: 0 0 24px; padding: 0; background: none; border: 0; max-width: 520px; }
}

/* ---------- Map ---------- */
.bz-map {
	position: relative;
	margin-bottom: 20px;
	border-radius: 16px;
	overflow: hidden;
	background: var(--theme-palette-color-6);
	border: 1px solid var(--theme-palette-color-5);
}
.bz-map__canvas { height: 340px; }
@media (min-width: 1000px) { .bz-map__canvas { height: 520px; } }
.bz-map__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 260px;
	padding: 28px 20px;
	text-align: center;
	color: var(--theme-palette-color-3);
	background:
		radial-gradient(circle at 30% 30%, rgba(4, 80, 163, 0.08), transparent 60%),
		radial-gradient(circle at 75% 70%, rgba(227, 4, 13, 0.06), transparent 55%);
}
.bz-map__placeholder[hidden] { display: none; }
.bz-map__placeholder svg { color: var(--theme-palette-color-1); }
.bz-map__placeholder p { margin: 0; max-width: 46ch; }
.bz-map__hint { font-size: 14px; opacity: 0.85; }
@media (max-width: 519.98px) {
	.bz-map__placeholder { min-height: 0; padding: 18px 16px; gap: 8px; font-size: 15px; }
	.bz-map__placeholder svg { width: 28px; height: 28px; }
}
.bz-map .leaflet-container { font: inherit; background: var(--theme-palette-color-6); }
[data-bz-mode="dark"] .bz-map .leaflet-tile-pane { filter: brightness(0.75) contrast(1.1) saturate(0.8); }

.pcc-pin span {
	display: block;
	width: 18px;
	height: 18px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--bz-red);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.bz-map .marker-cluster { background: rgba(4, 80, 163, 0.25); border-radius: 50%; }
.bz-map .marker-cluster div { width: 30px; height: 30px; margin: 5px; border-radius: 50%; background: var(--bz-blue); color: #fff; font-weight: 700; text-align: center; line-height: 30px; }
/* Pins and clusters are reachable with Tab: make the focus visible (WCAG 2.4.7). */
.bz-map .leaflet-marker-icon:focus-visible { outline: 3px solid var(--bz-focus, #FECA05); outline-offset: 2px; border-radius: 50%; }
.bz-map .leaflet-popup-content { margin: 12px 14px; font-size: 15px; }
.pcc-popup a { font-weight: 700; }

/* ---------- Results ---------- */
.bz-results-status { margin: 0 0 14px; font-weight: 700; font-size: 18px; color: var(--theme-palette-color-4); scroll-margin-top: 90px; }
.bz-empty {
	margin: 0 0 24px;
	padding: 20px;
	border-radius: 16px;
	border: 2px dashed var(--theme-palette-color-5);
	font-size: 17px;
	color: var(--theme-palette-color-3);
}
.bz-empty[hidden] { display: none; }
.bz-more { text-align: center; margin: 8px 0 12px; }

.bz-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 16px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.bz-card[hidden] { display: none; }
.bz-card__link {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 16px;
	overflow: hidden;
	background: var(--theme-palette-color-8);
	border: 1px solid var(--theme-palette-color-5);
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.bz-card__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11, 31, 58, 0.12); border-color: var(--theme-palette-color-1); }
/* The name is the link; its ::after makes the whole card clickable (accessible name = the name). */
.bz-card__target { color: inherit; text-decoration: none; }
.bz-card__target::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bz-card__target:focus-visible { outline: none; }
.bz-card__link:has(.bz-card__target:focus-visible) { outline: 3px solid var(--theme-palette-color-1); outline-offset: 2px; }
.bz-card__photo {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	background: linear-gradient(160deg, var(--theme-palette-color-6), var(--theme-palette-color-5));
}
.bz-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bz-card__photo .bz-badge { position: absolute; top: 8px; left: 8px; }
.bz-card__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 44px;
	font-weight: 800;
	color: var(--theme-palette-color-1);
	opacity: 0.6;
}
.bz-card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.bz-card__name { margin: 0; font-size: 19px; line-height: 1.25; color: var(--theme-palette-color-4); }
.bz-card__place { font-size: 14px; font-weight: 600; color: var(--theme-palette-color-1); }
.bz-card__excerpt { font-size: 15px; line-height: 1.45; color: var(--theme-palette-color-3); }

@media (max-width: 519.98px) {
	/* Phones: compact horizontal cards, more candidates per screen. */
	.bz-cards { grid-template-columns: 1fr; gap: 10px; }
	.bz-card__link { flex-direction: row; }
	.bz-card__photo { flex: 0 0 88px; }
	.bz-card__initials { font-size: 30px; }
	.bz-card__body { justify-content: center; padding: 12px 14px; }
	.bz-card__name { font-size: 18px; }
	.bz-card__excerpt { display: none; }
}

/* ---------- Dossier ---------- */
.bz-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.bz-candidate__hero { display: grid; gap: 24px; margin-bottom: 40px; }
@media (min-width: 760px) { .bz-candidate__hero { grid-template-columns: minmax(240px, 380px) 1fr; gap: 40px; align-items: start; } }
.bz-candidate__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, var(--theme-palette-color-6), var(--theme-palette-color-5)); }
.bz-candidate__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-candidate__photo .bz-badge { position: absolute; top: 12px; left: 12px; }
@media (max-width: 759.98px) { .bz-candidate__photo { max-width: 320px; } }
.bz-candidate__name { margin: 0 0 8px; font-size: clamp(32px, 5vw, 50px); line-height: 1.08; letter-spacing: -0.01em; }
.bz-candidate__place { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--theme-palette-color-1); }
.bz-demo-note { margin: 0 0 12px; font-size: 14px; color: var(--theme-palette-color-3); }
.bz-candidate__message {
	margin: 20px 0;
	padding: 20px 22px;
	border: 0;
	border-left: 5px solid var(--bz-yellow);
	border-radius: 0 16px 16px 0;
	background: var(--theme-palette-color-6);
	font-size: 19px;
	font-style: normal;
	line-height: 1.55;
	color: var(--theme-palette-color-4);
}
.bz-candidate__message p:last-child { margin-bottom: 0; }
.bz-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bz-social a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--theme-palette-color-5); border-radius: var(--bz-radius); font-weight: 600; text-decoration: none; }
.bz-social a:hover { border-color: var(--theme-palette-color-1); }
.bz-candidate__sections { display: grid; gap: 8px; max-width: 760px; }
.bz-section { margin-bottom: 32px; }
.bz-section h2 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 3px solid var(--theme-palette-color-5); font-size: 26px; }
.bz-section p { font-size: 18px; line-height: 1.65; }
.bz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.bz-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.bz-others h2 { font-size: 22px; }
.bz-back { margin-top: 12px; }
