/* Avis Google — Groupe Abri Français (v1.2)
   Cartes immersives : photo en fond, dégradé sombre, avis par-dessus.
   CSS scopé .gaf-avis — tailles autonomes, accent via --gaf-accent. */

.gaf-avis {
	--gaf-accent: #565024;
	--gaf-star: #f6bb06;
	--gaf-text: #1f2124;
	--gaf-muted: #85878a;
	font-size: 16px;
	line-height: 1.5;
	color: var(--gaf-text);
	margin: 0 auto;
	max-width: 1200px;
	-webkit-font-smoothing: antialiased;
}
.gaf-avis *,
.gaf-avis *::before,
.gaf-avis *::after {
	box-sizing: border-box;
}

/* ---- En-tête : titre + bandeau de note sur une ligne ---- */
.gaf-avis-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding-top: 26px;
	margin-bottom: 36px;
	text-align: center;
}
.gaf-avis-title {
	font-size: 32px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--gaf-text);
	margin: 0;
	padding: 0;
}
.gaf-avis-scorebar {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}
.gaf-avis-glogo {
	display: inline-flex;
	padding: 8px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(24, 25, 18, 0.22);
}
.gaf-avis-glogo svg {
	display: block;
}
.gaf-avis-note {
	font-size: 30px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--gaf-text);
}
.gaf-avis-note small {
	font-size: 15px;
	font-weight: 700;
	color: var(--gaf-muted);
	margin-left: 1px;
}
.gaf-avis-total {
	font-size: 14px;
	color: var(--gaf-muted);
}

/* ---- Bouton « Laissez-nous un avis » (sous le carrousel) ---- */
.gaf-avis-footer {
	text-align: center;
	margin-top: 30px;
	padding-bottom: 10px;
}
.gaf-avis-cta {
	display: inline-block;
	background: var(--gaf-accent);
	color: #fff !important;
	padding: 16px 38px;
	border-radius: 999px;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 8px 22px rgba(24, 25, 18, 0.2);
}
.gaf-avis-cta:hover {
	filter: brightness(1.08);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(24, 25, 18, 0.28);
}

/* ---- Sur fond sombre (classe posée automatiquement par widget.js) ---- */
.gaf-avis.gaf-on-dark {
	--gaf-text: #ffffff;
	--gaf-muted: rgba(255, 255, 255, 0.62);
}
.gaf-avis.gaf-on-dark .gaf-star-empty {
	background-color: rgba(255, 255, 255, 0.28);
}
.gaf-avis.gaf-on-dark .gaf-avis-cta {
	background: #fff;
	color: var(--gaf-accent) !important;
}
.gaf-avis.gaf-on-dark .gaf-avis-cta:hover {
	filter: none;
	background: rgba(255, 255, 255, 0.92);
}

/* ---- Étoiles ---- */
.gaf-avis-stars {
	display: inline-flex;
	gap: 3px;
	line-height: 1;
}
.gaf-star {
	width: 17px;
	height: 17px;
	display: inline-block;
	background-color: var(--gaf-star);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.gaf-star-half {
	background-image: linear-gradient(90deg, var(--gaf-star) 50%, rgba(255, 255, 255, 0.35) 50%);
	background-color: transparent;
}
.gaf-star-empty {
	background-color: rgba(140, 142, 145, 0.35);
}

/* ---- Carrousel ---- */
.gaf-avis-viewport {
	position: relative;
	/* gouttières : les flèches vivent à côté des cartes, jamais dessus */
	padding: 0 64px;
}
@media (max-width: 620px) {
	.gaf-avis-viewport {
		padding: 0;
	}
}
.gaf-avis-track {
	display: flex;
	align-items: stretch;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	list-style: none !important;
	margin: 0;
	padding: 6px 4px 28px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.gaf-avis-track::-webkit-scrollbar {
	display: none;
}

/* ---- Carte : image en haut (fondu doux vers l'olive) + texte dessous ---- */
.gaf-avis-card {
	position: relative;
	flex: 0 0 calc((100% - 48px) / 3);
	min-width: 280px;
	min-height: 440px;
	scroll-snap-align: start;
	border-radius: 26px;
	overflow: hidden;
	background-color: #3c3a22;
	display: flex;
	flex-direction: column;
	margin: 0;
	list-style: none !important;
	box-shadow: 0 10px 30px rgba(31, 33, 36, 0.14);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gaf-avis-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(31, 33, 36, 0.22);
}
.gaf-avis-card::before,
.gaf-avis-card::after {
	display: none;
}

/* ---- Zone photo en haut (background-image : insensible au thème) ---- */
.gaf-avis-photo {
	position: relative;
	z-index: 0;
	flex: 0 0 auto;
	width: 100%;
	height: 226px;
	overflow: hidden;
	display: block;
	padding: 0;
	margin: 0;
	border: none;
	background-color: #3c3a22;
	background-size: cover;
	background-position: center;
	transition: background-size 0.35s ease;
}
/* Fondu du bas de l'image vers l'olive du corps de carte */
.gaf-avis-fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 120px;
	background: linear-gradient(180deg, rgba(60, 58, 34, 0) 0%, rgba(60, 58, 34, 0.65) 55%, #3c3a22 100%);
	pointer-events: none;
}
/* Curseur « agrandir » (icône Feather maximize-2 sur pastille sombre) */
button.gaf-avis-photo-click {
	cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><circle cx='20' cy='20' r='19' fill='%231f2124' fill-opacity='0.82' stroke='white' stroke-opacity='0.9' stroke-width='1.5'/><g fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='23 12 28 12 28 17'/><polyline points='17 28 12 28 12 23'/><line x1='28' y1='12' x2='22.5' y2='17.5'/><line x1='12' y1='28' x2='17.5' y2='22.5'/></g></svg>") 20 20, zoom-in;
}
button.gaf-avis-photo-click:hover {
	background-size: 108%;
}
/* Indice discret « agrandir » (+ nombre de photos) en haut à gauche */
.gaf-avis-expand {
	position: absolute;
	top: 20px;
	left: 20px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(24, 25, 18, 0.3);
	line-height: 0;
}
.gaf-avis-expand b {
	font-size: 11px;
	font-weight: 700;
	color: #1f2124;
	line-height: 1;
}

/* ---- Visionneuse (lightbox) ---- */
.gaf-avis-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 16, 12, 0.93);
	display: flex;
	align-items: center;
	justify-content: center;
}
.gaf-avis-lightbox img {
	max-width: 90vw;
	max-height: 84vh;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.gaf-avis-lb-close,
.gaf-avis-lb-prev,
.gaf-avis-lb-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}
.gaf-avis-lb-close:hover,
.gaf-avis-lb-prev:hover,
.gaf-avis-lb-next:hover {
	background: rgba(255, 255, 255, 0.28);
	color: #fff;
}
.gaf-avis-lb-close {
	top: 22px;
	right: 22px;
}
.gaf-avis-lb-prev {
	left: 22px;
	top: 50%;
	transform: translateY(-50%);
}
.gaf-avis-lb-next {
	right: 22px;
	top: 50%;
	transform: translateY(-50%);
}
.gaf-avis-lb-count {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	letter-spacing: 0.06em;
}
/* Avis sans aucune photo : carte pleine olive, texte centré verticalement */
.gaf-avis-card.gaf-no-photo {
	background: linear-gradient(160deg, #4a4729 0%, #3c3a22 60%, #302e1b 100%);
	justify-content: center;
}
.gaf-avis-card.gaf-no-photo .gaf-avis-cardbody {
	margin-top: 0;
}
.gaf-avis-cardlogo {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 3;
	display: inline-flex;
	padding: 8px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(24, 25, 18, 0.3);
}
.gaf-avis-cardlogo svg {
	display: block;
}
.gaf-avis-cardbody {
	position: relative;
	z-index: 2;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 11px;
	color: #fff;
	/* remonte le texte sur le bas de l'image, dans la zone de fondu */
	margin-top: -46px;
	padding: 0 24px 24px;
}
@media (max-width: 900px) {
	.gaf-avis-card {
		flex-basis: calc((100% - 24px) / 2);
	}
}
@media (max-width: 620px) {
	.gaf-avis-card {
		flex-basis: 85%;
		min-height: 420px;
	}
}

.gaf-avis-who {
	display: flex;
	align-items: center;
	gap: 12px;
}
.gaf-avis-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 46px;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 3px 10px rgba(24, 25, 18, 0.45);
}
.gaf-avis-avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--gaf-accent);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
}
.gaf-avis-author {
	display: block;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	text-shadow: 0 1px 4px rgba(24, 25, 18, 0.4);
}
.gaf-avis-date {
	display: block;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.66);
	margin-top: 1px;
}

.gaf-avis-text {
	font-size: 14.5px;
	line-height: 1.62;
	color: rgba(255, 255, 255, 0.88);
	text-shadow: 0 1px 3px rgba(24, 25, 18, 0.35);
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}
.gaf-avis-card.gaf-open .gaf-avis-text {
	-webkit-line-clamp: unset;
	display: block;
}
.gaf-avis-text p {
	margin: 0 0 0.6em;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}
.gaf-avis-text p:last-child {
	margin-bottom: 0;
}
.gaf-avis-more {
	align-self: flex-start;
	background: none !important;
	border: none;
	padding: 0;
	color: #fff;
	opacity: 0.85;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.gaf-avis-more:hover {
	opacity: 1;
	background: none;
	color: #fff;
}

/* ---- Flèches ---- */
.gaf-avis-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: var(--gaf-accent);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(31, 33, 36, 0.22);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.gaf-avis-nav:hover {
	background: var(--gaf-accent);
	color: #fff;
}
.gaf-avis-prev {
	left: 4px;
}
.gaf-avis-next {
	right: 4px;
}
.gaf-avis-nav[disabled] {
	opacity: 0;
	pointer-events: none;
}
@media (max-width: 620px) {
	.gaf-avis-nav {
		display: none;
	}
}
