/* Pages villes (CPT « portails ») : galerie en carrousel sur mobile.
   Chargé uniquement sur is_singular('portails'). Le carrousel est en CSS pur
   (défilement natif + aimantation) ; le JS n'ajoute que les points et le compteur. */

/* ===== Galerie « Trouvez l'inspiration » : carrousel, une photo entière à la fois ===== */
.acp-gal-pied { display: none; }

@media (max-width: 640px) {
	/* La galerie Avada est placée par Isotope (positions absolues en ligne) :
	   on reprend la main avec une rangée qui défile au doigt. Sans dépendre du JS,
	   pour que le carrousel soit là dès le premier affichage. */
	.single-portails .fusion-gallery {
		display: flex !important;
		gap: 10px;
		height: auto !important;
		/* Pleine largeur d'écran (la section a de grosses marges sur mobile) :
		   photos plus grandes, la suivante dépasse jusqu'au bord. */
		margin: 0 calc(50% - 50vw) !important;
		padding: 0 16px !important;
		scroll-padding: 0 16px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.single-portails .fusion-gallery::-webkit-scrollbar { display: none; }
	.single-portails .fusion-gallery > .clearfix { display: none; }
	/* 86 % de large : on voit le bord de la photo suivante, ce qui invite à glisser */
	.single-portails .fusion-gallery > .fusion-gallery-column {
		flex: 0 0 86%;
		position: static !important;
		left: auto !important;
		top: auto !important;
		width: auto !important;
		padding: 0 !important;
		transform: none !important;
		scroll-snap-align: start;
	}
	.single-portails .fusion-gallery .fusion-gallery-image,
	.single-portails .fusion-gallery .fusion-gallery-image img {
		display: block;
		width: 100%;
		aspect-ratio: 424 / 245; /* format des photos de réalisations */
		object-fit: cover;
		border-radius: 10px;
	}

	/* Points + compteur « 1 / 12 » sous le carrousel (villes-mobile.js) */
	.acp-gal-pied {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin-top: 12px;
		font-family: Montserrat, sans-serif;
	}
	.acp-gal-points { display: flex; flex-wrap: wrap; gap: 5px; }
	.acp-gal-points i {
		display: block;
		width: 6px;
		height: 6px;
		border-radius: 3px;
		background: #d0d0d0;
		transition: width .2s, background-color .2s;
	}
	.acp-gal-points i.acp-on { width: 18px; background: #111; }
	.acp-gal-compte { margin-left: auto; font-size: 12.5px; font-weight: 600; color: #666; white-space: nowrap; }
}

/* ===== Carte de la ville : image fixe de Google, carte interactive au toucher (villes-mobile.js) ===== */
.acp-carte-ville,
.acp-carte-ville-vive { position: relative; width: 100%; height: 400px; border-radius: 14px; overflow: hidden; background: #e8eef0; }
.acp-carte-ville picture,
.acp-carte-ville img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; }
.acp-carte-ville-btn {
	position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
	display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
	border: 0; border-radius: 999px; background: #fff; color: #111;
	font: 700 14px Montserrat, sans-serif; line-height: 1; white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;
}
.acp-carte-ville-btn::before {
	content: ""; width: 16px; height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3 3 6v15l6-3 6 3 6-3V3l-6 3-6-3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.acp-carte-ville-btn:hover { background: #111; color: #fff; }
.acp-carte-ville-btn:hover::before { filter: invert(1); }
.acp-carte-ville-btn[disabled] { opacity: .85; cursor: wait; }
.acp-carte-ville-lien {
	position: absolute; top: 10px; right: 10px; padding: 6px 10px; border-radius: 8px;
	background: rgba(255, 255, 255, .92); color: #111 !important;
	font: 600 12px Montserrat, sans-serif; text-decoration: none !important;
}
@media (max-width: 1024px) {
	.acp-carte-ville, .acp-carte-ville-vive { height: 320px; }
}
@media (max-width: 640px) {
	.acp-carte-ville, .acp-carte-ville-vive { height: 260px; }
}
