/* Ajustements mobiles communs à tout le site (chargé sur toutes les pages).
   Les changements sont limités au téléphone (≤ 640 px, seuil d'Avada) ; les quelques
   règles hors media query servent seulement à garder l'affichage d'avant en
   tablette et ordinateur. */

/* ===== Zones d'intervention (shortcode [villes_par_categorie], pied de page) =====
   Tablette / ordinateur : comme avant, titres + villes séparées par des virgules,
   les titres ne se replient pas. */
.acp-zone > summary { display: block; list-style: none; cursor: default; }
.acp-zone > summary::-webkit-details-marker { display: none; }
.acp-zone-nb,
.acp-zone-chev { display: none; }
.acp-zone-ville + .acp-zone-ville::before { content: ", "; }

@media (max-width: 640px) {
	/* Téléphone : accordéon par département (replié par le script du shortcode),
	   chaque ville devient un bouton de 44 px, deux par ligne. */
	.acp-zones { border-top: 1px solid rgba(255, 255, 255, .16); }
	.acp-zone { border-bottom: 1px solid rgba(255, 255, 255, .16); }
	.acp-zone > summary {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 60px;
		padding: 12px 2px;
		cursor: pointer;
	}
	.acp-zone > summary h3 {
		flex: 1;
		margin: 0 !important;
		font-size: 15.5px !important;
		font-weight: 600 !important;
		line-height: 1.3 !important;
	}
	.acp-zone-nb {
		display: inline-block;
		flex: none;
		padding: 3px 9px;
		border-radius: 999px;
		background: rgba(255, 255, 255, .1);
		color: #bbb;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.3;
	}
	.acp-zone-chev {
		display: block;
		flex: none;
		width: 18px;
		height: 18px;
		color: #fff;
		transition: transform .2s;
	}
	.acp-zone[open] .acp-zone-chev { transform: rotate(180deg); }
	.acp-zone-villes {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin: 2px 0 18px !important;
	}
	.acp-zone-ville + .acp-zone-ville::before { content: none; }
	.acp-zone-suite { display: none; }
	.acp-zone-ville a {
		display: flex;
		align-items: center;
		min-height: 44px;
		height: 100%;
		padding: 8px 12px;
		border-radius: 10px;
		background: rgba(255, 255, 255, .08);
		color: #fff !important;
		font-size: 13.5px;
		font-weight: 500;
		line-height: 1.2;
		text-decoration: none;
	}
	.acp-zone-ville a:active { background: #f41000; }

	/* ===== Avis Google (widget Trustindex, pied de page) : carrousel au doigt =====
	   Le widget est réglé en « grille » : sur téléphone les avis s'empilaient
	   (≈ 1 000 px). Ici, un avis à la fois, le suivant dépasse pour inviter à glisser.
	   Tous les avis sont dans le carrousel, le bouton « Charger plus » devient inutile. */
	/* Sélecteurs longs : il faut passer devant les !important du CSS Trustindex. */
	.ti-widget.ti-goog .ti-widget-container .ti-reviews-container .ti-reviews-container-wrapper {
		display: flex !important;
		flex-wrap: nowrap !important;
		/* Espace entre les cartes = marge de calage : la carte précédente sort
		   juste de l'écran, seule la suivante dépasse à droite. */
		gap: 12px !important;
		/* pleine largeur d'écran, comme la galerie des pages villes */
		margin: 0 calc(50% - 50vw) !important;
		padding: 0 12px 4px !important;
		scroll-padding: 0 12px;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.ti-widget.ti-goog .ti-widget-container .ti-reviews-container .ti-reviews-container-wrapper::-webkit-scrollbar { display: none; }
	.ti-widget.ti-goog .ti-widget-container .ti-reviews-container .ti-reviews-container-wrapper > .ti-review-item,
	.ti-widget.ti-goog .ti-widget-container .ti-reviews-container .ti-reviews-container-wrapper > .ti-review-item.ti-hide {
		display: block !important;
		flex: 0 0 86% !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		scroll-snap-align: start;
	}
	.ti-widget.ti-goog .ti-load-more-reviews-container { display: none !important; }
}
