/**
 * Carte des voyages: Leaflet map wrapper, destination chips and popups.
 *
 * Adapted from sliceofcactus-astro/src/pages/voyage-carte.astro and
 * sliceofcactus-astro/public/css/style.css. Only .map-wrap and .dest-chips
 * are ported: Astro's stylesheet also has an older hand-drawn map
 * (.map, .pin, .mi-series, .map-info) that voyage-carte.astro no longer
 * uses — it was replaced by Leaflet — so it's left out here.
 *
 * The shared magazine-hub chrome (runhead, masthead, view-toggle) lives in
 * assets/styles/components/magazine-hub.css. Astro applies the same
 * bodyClass="theme-voyage" as on voyage series and Color Your Life.
 */

body.page-template-page-voyage-carte-php {
	--accent: var(--accent-carte);
	--accent-deep: var(--accent-deep-carte);
}

.map-wrap {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: var(--accent-deep);
	padding: clamp(1rem, 3vw, 2.4rem) 0;
	margin-top: clamp(1rem, 3vw, 1.4rem);
}

.soc-leaflet-map {
	width: 100%;
	height: 520px;
}

.dest-articles {
	max-width: 1180px;
	margin: 0 auto 1.6rem;
	padding-top: clamp(1rem, 3vw, 2.4rem);
	border-top: 1px solid rgb(251 238 218 / 20%);
	color: var(--paper);
}

.dest-articles__title {
	margin: 0 0 .8rem;
	font-family: var(--font-mono);
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .7;
}

.dest-articles__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: .4rem .8rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dest-articles__list a {
	display: flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.dest-articles__list a:hover {
	opacity: .8;
}

.dest-articles__list a img {
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	border-radius: 4px;
	object-fit: cover;
}

.dest-articles__list a strong {
	display: block;
	font-size: .85rem;
}

.dest-articles__list a span span {
	font-size: .75rem;
	opacity: .7;
}

.dest-chips {
	display: flex;
	flex-wrap: wrap;
	max-width: 1180px;
	gap: .6rem;
	margin: 1.6rem auto 0;
}

.dest-chips button {
	padding: .5rem .95rem;
	border: 1px solid rgb(251 238 218 / 40%);
	border-radius: 40px;
	background: transparent;
	color: var(--paper);
	font-family: var(--font-mono);
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .3s, color .3s, border-color .3s;
}

.dest-chips button:hover,
.dest-chips button.is-active {
	border-color: var(--flash);
	background: var(--flash);
	color: var(--ink);
}

.leaflet-popup-dark .leaflet-popup-content-wrapper {
	border: 1px solid #333;
	border-radius: 6px;
	background: #1a1a1a;
	color: #eee;
}

.leaflet-popup-dark .leaflet-popup-tip {
	background: #1a1a1a;
}

.soc-dest-popup__title {
	display: block;
	margin-bottom: 8px;
	font-size: .9rem;
}

.soc-dest-popup__serie {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	color: inherit;
	text-decoration: none;
}

.soc-dest-popup__serie:hover {
	opacity: .8;
}

.soc-dest-popup__serie img {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 4px;
	object-fit: cover;
}

.soc-dest-popup__serie strong {
	display: block;
	font-size: .85rem;
}

.soc-dest-popup__serie span span {
	font-size: .75rem;
	opacity: .7;
}