/* ACP Immo – Fiche programme */

/* Repli : uniquement si JS actif (classe posée dans le <head>), sinon tout reste visible. */
.acp-fp-js .acp-fp-collapsible:not(.is-open) .acp-fp-extra {
	display: none;
}

/* 1.3.0 – Un bouton par carte, en bas de la carte (aligné entre les deux cartes), fond orange. */
.acp-fp-toggle-wrapper {
	display: none;
	justify-content: center;
	margin-top: auto;
	padding-top: 20px;
}

.acp-fp-js .acp-fp-toggle-wrapper {
	display: flex;
}

.acp-fp-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 26px;
	border: 2px solid #eb6209;
	border-radius: 10px;
	background: #eb6209;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(235, 98, 9, .25);
	transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.acp-fp-toggle:hover,
.acp-fp-toggle:focus-visible {
	background: #c95207;
	border-color: #c95207;
	box-shadow: 0 6px 14px rgba(235, 98, 9, .35);
}

.acp-fp-toggle:focus-visible {
	outline: 2px solid #eb6209;
	outline-offset: 3px;
}

.acp-fp-toggle[aria-expanded="true"] {
	background: #fff;
	color: #eb6209;
	box-shadow: none;
}

.acp-fp-toggle[aria-expanded="true"]:hover,
.acp-fp-toggle[aria-expanded="true"]:focus-visible {
	background: #fdf0e7;
}

.acp-fp-toggle-icon {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s ease;
}

.acp-fp-toggle[aria-expanded="true"] .acp-fp-toggle-icon {
	transform: translateY(2px) rotate(-135deg);
}

/* ------------------------------------------------------------------
 * 1.1.0 – Pictos et photos vides : on n'affiche plus de cadre vide.
 * ------------------------------------------------------------------ */
.acp-program-location-next-to-item-icon:not(:has(img[src]:not([src=""]))),
.acp-program-assets-prestation-icon:not(:has(img[src]:not([src=""]))),
.acp-program-assets-avantage-icon:not(:has(img[src]:not([src=""]))),
.acp-program-architect-picture-wrapper:not(:has(img[src]:not([src=""]))) {
	display: none;
}

/* ------------------------------------------------------------------
 * 1.1.0 – Bloc Localisation : carte au format des médias (16:9).
 * ------------------------------------------------------------------ */
.acp-program-location .acp-program-location-map-wrapper {
	position: relative;
	aspect-ratio: 4 / 3;
	min-height: 0;
}

@media (min-width: 768px) {
	.acp-program-location .acp-program-location-map-wrapper {
		aspect-ratio: 16 / 9;
	}
}

.acp-program-location .acp-program-location-map-wrapper .program-detail-map {
	min-height: 0;
	height: 100%;
}

.acp-program-location .acp-program-location-map-wrapper .acp-program-location-map-link,
.acp-program-location .acp-program-location-map-wrapper .acp-program-location-map-picture {
	height: 100%;
	object-fit: cover;
}

/* Desktop : ligne 1 carte | 1er média, ligne 2 À proximité | média suivant. */
@media (min-width: 1024px) {
	.acp-program-location {
		grid-template-areas: none;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-flow: row;
		gap: 2rem;
	}

	.acp-program-location > * {
		grid-area: auto;
	}

	.acp-program-location .acp-program-location-map-wrapper {
		grid-column: 1;
		grid-row: 1;
	}

	.acp-program-location .acp-program-location-media-wrapper {
		display: contents;
	}

	.acp-program-location .acp-program-location-media {
		grid-column: 2;
		min-width: 0;
	}

	.acp-program-location .acp-program-location-next-to-wrapper {
		grid-column: 1;
		grid-row: 2 / span 2;
		align-self: start;
	}

	.acp-program-location .acp-program-location-description {
		grid-column: 1 / -1;
	}

	/* Aucun média : À proximité se place à droite de la carte, la carte prend la hauteur du bloc. */
	.acp-program-location:not(:has(.acp-program-location-media *)) .acp-program-location-next-to-wrapper {
		grid-column: 2;
		grid-row: 1;
	}

	.acp-program-location:not(:has(.acp-program-location-media *)) .acp-program-location-map-wrapper {
		aspect-ratio: auto;
		min-height: 36rem;
		align-self: stretch;
	}
}

/* Médias vides : retirés de la grille (et de l'empilement mobile). */
.acp-program-location .acp-program-location-media:not(:has(*)) {
	display: none;
}

/* ------------------------------------------------------------------
 * 1.1.0 – Écran d'attente de la carte (cookies Google Maps refusés).
 * ------------------------------------------------------------------ */
.acp-fp-map-fallback {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.2rem;
	padding: 2.4rem;
	background: #f1f3f5;
	border: 1px solid #e3e6ea;
	text-align: center;
	font-size: 1.5rem;
	line-height: 1.4;
	color: #1d1d1b;
}

.acp-program-location-map-wrapper:has(.program-detail-map > *) .acp-fp-map-fallback,
.acp-fp-map-fallback[hidden] {
	display: none;
}

.acp-fp-map-fallback-icon {
	width: 3.6rem;
	height: 3.6rem;
	color: #eb6209;
}

.acp-fp-map-fallback-title {
	margin: 0;
	font-size: 1.7rem;
	font-weight: 700;
}

.acp-fp-map-fallback-text,
.acp-fp-map-fallback-address {
	margin: 0;
	max-width: 46rem;
}

.acp-fp-map-fallback-address {
	font-weight: 600;
}

.acp-fp-map-fallback-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	margin-top: .4rem;
}

.acp-fp-map-btn {
	display: inline-flex;
	align-items: center;
	padding: 1rem 1.8rem;
	border: 2px solid #eb6209;
	border-radius: 10px;
	background: #fff;
	color: #eb6209;
	font-family: inherit;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.acp-fp-map-btn--primary,
.acp-fp-map-btn:hover,
.acp-fp-map-btn:focus-visible {
	background: #eb6209;
	color: #fff;
}

.acp-fp-map-btn--primary:hover,
.acp-fp-map-btn--primary:focus-visible {
	background: #c95207;
	border-color: #c95207;
}

.acp-fp-map-btn:focus-visible {
	outline: 2px solid #eb6209;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.acp-fp-map-fallback {
		gap: .8rem;
		padding: 1.6rem;
		font-size: 1.4rem;
	}

	.acp-fp-map-fallback-text {
		display: none;
	}
}
