/**
 * DéfisMed Map — page accueillant (single) et archive.
 *
 * Les tokens `--dm-*` viennent de front-map.css : le conteneur racine porte
 * aussi la classe `.defismed-map-wrap`.
 *
 * @package DefismedMap
 */

.defismed-single {
	--dm-single-gap: 32px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 64px;
	line-height: 1.6;
}

/* --- Fil d'Ariane --- */
.defismed-single__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	list-style: none;
	margin: 16px 0;
	padding: 0;
	font-size: 13px;
	color: var( --dm-muted );
}

.defismed-single__crumbs li::after {
	content: "›";
	margin-left: 6px;
	color: var( --dm-tertiary );
}

.defismed-single__crumbs li:last-child::after {
	content: none;
}

.defismed-single__crumbs a {
	color: var( --dm-muted );
	text-decoration: none;
}

.defismed-single__crumbs a:hover {
	color: var( --dm-primary );
	text-decoration: underline;
}

/* --- Hero --- */
.defismed-single__hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 380px;
	padding: 32px;
	border-radius: var( --dm-radius-lg );
	overflow: hidden;
	background: linear-gradient( 135deg, var( --dm-primary ) 0%, var( --dm-tertiary-dark ) 100% );
	color: #fff;
}

.defismed-single__hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.defismed-single__hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba( 19, 71, 62, 0.88 ) 0%, rgba( 19, 71, 62, 0.45 ) 45%, rgba( 19, 71, 62, 0.1 ) 100% );
}

.defismed-single__hero-body {
	position: relative;
	z-index: 1;
	max-width: 760px;
}

.defismed-single__hero .defismed-single__title {
	margin: 8px 0;
	color: #fff;
	font-size: clamp( 28px, 4vw, 44px );
	line-height: 1.15;
	text-shadow: 0 2px 12px rgba( 0, 0, 0, 0.35 );
}

.defismed-single__address {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 15px;
	color: rgba( 255, 255, 255, 0.92 );
}

.defismed-single__hero .defismed-map-card__badge {
	display: inline-block;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 14px;
	border-radius: var( --dm-radius-pill );
}

/* Chips « Aussi classé dans » : autres filtres principaux, dans la section À propos. */
.defismed-single__secondary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var( --dm-border );
}

.defismed-single__secondary-label {
	font-size: 13px;
	font-weight: 600;
	color: var( --dm-muted );
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.defismed-single__secondary-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.defismed-single__secondary-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var( --dm-chip-color, var( --dm-primary ) );
	background: #fff;
	border: 1.5px solid var( --dm-chip-color, var( --dm-primary ) );
	border-radius: var( --dm-radius-pill );
}

.defismed-single__secondary-chip img {
	width: 16px;
	height: 16px;
	object-fit: contain;
	display: block;
}

/* Palmarès des badges reçus via les témoignages : bas droite du hero. */
.defismed-single__hero-badges {
	position: relative;
	z-index: 1;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-self: flex-end;
	gap: 8px;
	margin: 0 0 0 auto;
	padding: 0;
}

.defismed-single__hero-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px 5px 6px;
	border-radius: var( --dm-radius-pill );
	background: rgba( 255, 255, 255, 0.94 );
	color: var( --dm-tertiary-dark );
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.25 );
}

.defismed-single__hero-badge img {
	width: 30px;
	height: 30px;
	object-fit: contain;
}

/* Animation discrète au survol (cf. pastilles des témoignages, en plus sobre). */
.defismed-single__hero-badge {
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media ( hover: hover ) {
	.defismed-single__hero-badge:hover {
		transform: translateY( -2px );
		box-shadow: 0 6px 16px rgba( 0, 0, 0, 0.3 );
	}
}

@media ( max-width: 782px ) {
	.defismed-single__hero {
		flex-wrap: wrap;
	}

	.defismed-single__hero-badges {
		justify-content: flex-start;
		margin: 16px auto 0 0;
	}
}

/* --- Grille principale --- */
.defismed-single__layout {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) 340px;
	gap: var( --dm-single-gap );
	margin-top: var( --dm-single-gap );
	align-items: start;
}

.defismed-single__main {
	display: grid;
	gap: var( --dm-single-gap );
	min-width: 0;
}

.defismed-single__aside {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 16px;
	min-width: 0;
}

/* --- Blocs --- */
.defismed-single__block {
	background: var( --dm-bg );
	border: 1px solid var( --dm-border );
	border-radius: var( --dm-radius-md );
	padding: 24px;
}

.defismed-single__block-title {
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 1.2;
	color: var( --dm-primary );
}

.defismed-single__block > :last-child {
	margin-bottom: 0;
}

.defismed-single__content > :first-child {
	margin-top: 0;
}

.defismed-single__lead {
	font-size: 17px;
	color: var( --dm-text );
	margin: 0 0 16px;
}

/* --- Pills (champs booléens) --- */
.defismed-single__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.defismed-single__pills .defismed-map-pill {
	background: var( --dm-surface );
	padding: 6px 14px;
	font-size: 14px;
}

/* --- Galerie --- */
.defismed-single__gallery {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 180px, 1fr ) );
	gap: 8px;
}

.defismed-single__gallery button {
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: var( --dm-radius-sm );
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.defismed-single__gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.defismed-single__gallery button:hover img {
	transform: scale( 1.05 );
}

/* Visionneuse plein écran. */
.defismed-single__lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 19, 71, 62, 0.92 );
	padding: 32px;
}

.defismed-single__lightbox[hidden] {
	display: none;
}

.defismed-single__lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: var( --dm-radius-md );
}

.defismed-single__lightbox button {
	position: absolute;
	background: rgba( 255, 255, 255, 0.9 );
	border: 0;
	border-radius: 999px;
	width: 44px;
	height: 44px;
	font-size: 20px;
	line-height: 1;
	color: var( --dm-tertiary-dark );
	cursor: pointer;
}

.defismed-single__lightbox .is-close {
	top: 16px;
	right: 16px;
}

.defismed-single__lightbox .is-prev {
	left: 16px;
}

.defismed-single__lightbox .is-next {
	right: 16px;
}

/* --- Vidéo --- */
.defismed-single__video {
	position: relative;
	padding-top: 56.25%;
	border-radius: var( --dm-radius-md );
	overflow: hidden;
}

.defismed-single__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- Champs perso en blocs (horaires, saisons…) --- */
.defismed-single__facts {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 240px, 1fr ) );
	gap: 20px;
}

.defismed-single__facts .defismed-map-cf {
	background: var( --dm-surface );
	border-radius: var( --dm-radius-md );
	padding: 16px;
	align-items: flex-start;
}

.defismed-single__facts .defismed-map-cf__label {
	margin-bottom: 4px;
}

/* --- Colonne latérale --- */
.defismed-single__card {
	background: var( --dm-bg );
	border: 1px solid var( --dm-border );
	border-radius: var( --dm-radius-md );
	padding: 20px;
}

.defismed-single__card-title {
	margin: 0 0 12px;
	font-size: 16px;
	color: var( --dm-primary );
}

.defismed-single__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
	font-size: 14px;
}

.defismed-single__contact li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.defismed-single__contact a {
	color: var( --dm-accent );
	text-decoration: none;
	word-break: break-word;
}

.defismed-single__contact a:hover {
	text-decoration: underline;
}

.defismed-single__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.defismed-single__actions {
	display: grid;
	gap: 8px;
	margin-top: 16px;
}

.defismed-single__actions .defismed-map-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
}

.defismed-single__fav-invite {
	margin: 12px 0 0;
	padding: 12px;
	background: var( --dm-surface );
	border-radius: var( --dm-radius-md );
	font-size: 14px;
}

.defismed-single__fav-invite a {
	color: var( --dm-primary );
	font-weight: 600;
}

.defismed-single__map {
	height: 240px;
	border-radius: var( --dm-radius-md );
	overflow: hidden;
	margin-bottom: 12px;
}

.defismed-single__back {
	display: inline-block;
	margin-top: 12px;
	font-size: 14px;
	color: var( --dm-primary );
	text-decoration: none;
}

.defismed-single__back:hover {
	text-decoration: underline;
}

/* --- Avantages adhérents --- */
.defismed-single .defismed-map-panel__members {
	margin-bottom: 0;
	font-size: 15px;
}

/* --- Tags --- */
.defismed-single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.defismed-single__tags a {
	display: inline-block;
	background: var( --dm-surface );
	border-radius: var( --dm-radius-pill );
	padding: 4px 12px;
	font-size: 13px;
	color: var( --dm-text );
	text-decoration: none;
}

.defismed-single__tags a:hover {
	background: var( --dm-primary );
	color: #fff;
}

/* --- Accueillants similaires --- */
.defismed-single__related {
	margin-top: 48px;
}

.defismed-single__related-title {
	margin: 0 0 16px;
	font-size: 22px;
	color: var( --dm-primary );
}

/* --- Cartes (archive + similaires) --- */
.defismed-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
	gap: 20px;
}

.defismed-card {
	background: var( --dm-bg );
	border: 1px solid var( --dm-border );
	border-radius: var( --dm-radius-md );
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.defismed-card:hover {
	transform: translateY( -2px );
	box-shadow: var( --dm-shadow );
}

.defismed-card a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.defismed-card__thumb {
	aspect-ratio: 3 / 2;
	background: var( --dm-surface );
}

.defismed-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.defismed-card__body {
	padding: 16px;
}

.defismed-card__badge {
	display: inline-block;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	border-radius: var( --dm-radius-pill );
	padding: 2px 10px;
	margin-bottom: 8px;
}

.defismed-card__title {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.25;
	color: var( --dm-text );
}

.defismed-card__desc {
	margin: 0;
	font-size: 14px;
	color: var( --dm-muted );
}

/* --- Archive --- */
.defismed-archive {
	max-width: 1180px;
	margin: 0 auto;
	padding: 32px 16px 64px;
}

.defismed-archive__header {
	margin-bottom: 32px;
}

.defismed-archive__header h1 {
	margin: 0 0 8px;
	color: var( --dm-primary );
}

.defismed-archive__intro {
	margin: 0;
	color: var( --dm-muted );
}

/* --- Responsive --- */
@media ( max-width: 900px ) {
	.defismed-single__layout {
		grid-template-columns: minmax( 0, 1fr );
	}

	.defismed-single__aside {
		position: static;
	}

	.defismed-single__hero {
		min-height: 260px;
		padding: 20px;
	}

	.defismed-single__block {
		padding: 20px;
	}

	.defismed-single {
		--dm-single-gap: 20px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.defismed-single__gallery img,
	.defismed-card {
		transition: none;
	}
}
