/**
 * SGP Harmonisa - Avis Google : styles front.
 * Toutes les règles sont préfixées .sgp-hgp pour ne pas impacter le thème.
 * Les valeurs personnalisables sont injectées via des variables CSS inline.
 */

.sgp-hgp {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	margin-top: var(--sgp-hgp-margin-top, 24px);
	margin-bottom: var(--sgp-hgp-margin-bottom, 24px);
	justify-content: center;
}

.sgp-hgp *,
.sgp-hgp *::before,
.sgp-hgp *::after {
	box-sizing: border-box;
}

/* Alignement du bloc */
.sgp-hgp--align-left {
	justify-content: flex-start;
}

.sgp-hgp--align-center {
	justify-content: center;
}

.sgp-hgp--align-right {
	justify-content: flex-end;
}

/* Carte interne */
.sgp-hgp__card {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px 22px;
	width: 100%;
	max-width: var(--sgp-hgp-max-width, 1040px);
	padding: var(--sgp-hgp-padding, 16px 32px);
	background: var(--sgp-hgp-bg, #ffffff);
	border: var(--sgp-hgp-border-width, 1px) solid var(--sgp-hgp-border-color, #f0d7de);
	border-radius: var(--sgp-hgp-radius, 999px);
	box-shadow: var(--sgp-hgp-shadow, none);
	color: var(--sgp-hgp-text, #480e15);
	font-family: var(--sgp-hgp-font, inherit);
	letter-spacing: var(--sgp-hgp-letter-spacing, normal);
	line-height: 1.45;
}

/* Effet hover (élévation douce) */
.sgp-hgp--hover .sgp-hgp__card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sgp-hgp--hover .sgp-hgp__card:hover {
	transform: translateY(-2px);
	box-shadow: var(--sgp-hgp-shadow-hover, var(--sgp-hgp-shadow, none));
}

/* Glassmorphism */
.sgp-hgp--glass .sgp-hgp__card {
	-webkit-backdrop-filter: blur(var(--sgp-hgp-blur, 12px));
	backdrop-filter: blur(var(--sgp-hgp-blur, 12px));
}

/* Icône SVG */
.sgp-hgp__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sgp-hgp__icon svg {
	display: block;
	width: var(--sgp-hgp-svg-size, 28px);
	height: var(--sgp-hgp-svg-size, 28px);
}

/* Étoiles texte */
.sgp-hgp__stars {
	color: var(--sgp-hgp-star-color, #f5b642);
	font-size: 1.15em;
	letter-spacing: 0.12em;
	line-height: 1;
	flex-shrink: 0;
	white-space: nowrap;
}

/* Texte lisible uniquement par les lecteurs d'écran */
.sgp-hgp__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Contenu texte */
.sgp-hgp__content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sgp-hgp__title {
	font-size: var(--sgp-hgp-title-size, 17px);
	font-weight: var(--sgp-hgp-title-weight, 600);
	color: var(--sgp-hgp-text, #480e15);
}

.sgp-hgp__count {
	font-weight: 400;
	opacity: 0.85;
}

.sgp-hgp__secondary {
	font-size: var(--sgp-hgp-secondary-size, 14px);
	font-weight: var(--sgp-hgp-secondary-weight, 400);
	color: var(--sgp-hgp-text2, #3f2d33);
}

/* Lien vers les avis */
.sgp-hgp__link {
	margin-left: auto;
	flex-shrink: 0;
	font-size: var(--sgp-hgp-link-size, 14px);
	font-weight: var(--sgp-hgp-link-weight, 600);
	color: var(--sgp-hgp-link, #a71c33);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.sgp-hgp__link:hover {
	color: var(--sgp-hgp-link-hover, #480e15);
}

.sgp-hgp__link:focus-visible {
	outline: 2px solid var(--sgp-hgp-link, #a71c33);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---- Layout compact ---- */
.sgp-hgp--layout-compact .sgp-hgp__card {
	gap: 10px 16px;
	padding: 10px 22px;
	width: auto;
}

.sgp-hgp--layout-compact .sgp-hgp__secondary {
	display: none;
}

/* ---- Layout inline ---- */
.sgp-hgp--layout-inline {
	display: inline-flex;
	width: auto;
	margin: 0;
	vertical-align: middle;
}

.sgp-hgp--layout-inline .sgp-hgp__card {
	width: auto;
	gap: 8px 12px;
	padding: 6px 16px;
	box-shadow: none;
}

.sgp-hgp--layout-inline .sgp-hgp__secondary {
	display: none;
}

.sgp-hgp--layout-inline .sgp-hgp__link {
	margin-left: 4px;
}

/* ---- Accessibilité : animations réduites ---- */
@media (prefers-reduced-motion: reduce) {
	.sgp-hgp--hover .sgp-hgp__card,
	.sgp-hgp__link {
		transition: none;
	}

	.sgp-hgp--hover .sgp-hgp__card:hover {
		transform: none;
	}
}
