/**
 * La carte du lieu.
 *
 * Le cadre d'attente et la carte occupent la même place et la même hauteur : le contenu qui
 * suit ne bouge pas quand le visiteur affiche la carte.
 */

.ante-carte {
	position: relative;
	width: 100%;
	margin: 2.5rem 0 0;
	clear: both;
}

/* --- Le cadre d'attente --- */

.ante-carte-attente {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	height: 400px;
	padding: 1.5rem;
	box-sizing: border-box;
	text-align: center;
	background: #f1efeb;
	border: 1px solid #ddd6cb;
}

.ante-carte-attente[hidden] { display: none; }

.ante-carte-adresse {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.ante-carte-note {
	max-width: 34rem;
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.5;
	opacity: 0.75;
}

.ante-carte-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem 1.2rem;
	margin: 0.4rem 0 0;
}

.ante-carte-bouton {
	padding: 0.7em 1.6em;
	font: inherit;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	background: #ceb499;
	border: 1px solid #ceb499;
	border-radius: 0;
	transition: background 0.2s ease, color 0.2s ease;
}

.ante-carte-bouton:hover,
.ante-carte-bouton:focus-visible {
	color: #ceb499;
	background: transparent;
}

.ante-carte-lien {
	font-size: 0.85rem;
	text-decoration: underline;
}

/* --- La carte --- */

.ante-carte-toile {
	width: 100%;
	height: 400px;
	/* Tant que la carte n'est pas bâtie, la toile ne doit pas doubler la hauteur du cadre. */
	display: none;
}

.ante-carte--affichee .ante-carte-toile { display: block; }

/* Le repère est une image à nous : ni ombre ni fond de Leaflet. */
.ante-carte-marqueur {
	background: none;
	border: 0;
}

.ante-carte-infobulle {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	line-height: 1.4;
}

/* Le thème étire volontiers les images des contenus : la carte n'en est pas une. */
.ante-carte-toile img {
	max-width: none !important;
	height: auto;
}

/* Une carte posée à la main choisit sa hauteur ; celle des fiches garde ses 400 px. */
.ante-carte--libre .ante-carte-attente,
.ante-carte--libre .ante-carte-toile {
	height: var(--ante-carte-hauteur, 400px);
}

@media (max-width: 600px) {
	.ante-carte-attente,
	.ante-carte-toile { height: 320px; }

	.ante-carte--libre .ante-carte-attente,
	.ante-carte--libre .ante-carte-toile {
		height: min(var(--ante-carte-hauteur, 400px), 340px);
	}
}
