/* ==========================================================================
   Avis Clients — styles publics
   La couleur principale est injectée via --avc-primary (réglages du plugin).
   ========================================================================== */

.avc-avis,
.avc-formulaire,
.avc-badge {
	--avc-primary: #ea533e;
	--avc-primary-dark: #c2402f;
	--avc-etoile: #f5b301;
	--avc-etoile-vide: #d8d8d8;
	--avc-texte: #333;
	--avc-gris: #767676;
	--avc-fond-carte: #fff;
	--avc-bordure: #e6e6e6;
}

/* --- Étoiles (remplissage partiel par superposition) --- */

.avc-stars {
	position: relative;
	display: inline-block;
	line-height: 1;
	font-size: 1.1em;
	letter-spacing: 2px;
}

.avc-stars-fond {
	color: var(--avc-etoile-vide);
}

.avc-stars-plein {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: var(--avc-etoile);
}

.avc-stars-grande {
	font-size: 1.6em;
}

/* --- Résumé (note moyenne) --- */

.avc-resume {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 20px;
	text-align: center;
}

.avc-resume-note {
	font-size: 2.2em;
	font-weight: 800;
	color: var(--avc-texte);
	line-height: 1;
}

.avc-resume-note small {
	font-size: 0.5em;
	font-weight: 600;
	color: var(--avc-gris);
}

.avc-resume-total {
	color: var(--avc-gris);
}

/* --- Barre de filtres par étoiles --- */

.avc-filtres {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 24px;
}

.avc-filtre {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 2px solid var(--avc-primary);
	border-radius: 999px;
	background: transparent;
	color: var(--avc-primary);
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.avc-filtre:hover {
	background: var(--avc-primary);
	color: #fff;
}

.avc-filtre.est-actif {
	background: var(--avc-primary);
	color: #fff;
}

.avc-filtre-etoile {
	color: inherit;
}

.avc-filtre-count {
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.12);
	font-size: 0.85em;
}

/* --- Grille des avis --- */

.avc-grille {
	display: grid;
	grid-template-columns: repeat(var(--avc-cols, 3), minmax(0, 1fr));
	gap: 20px;
}

.avc-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	border: 1px solid var(--avc-bordure);
	border-radius: 12px;
	background: var(--avc-fond-carte);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.avc-card[hidden] {
	display: none;
}

.avc-card-texte {
	flex: 1;
	color: var(--avc-texte);
	font-size: 0.98em;
	line-height: 1.6;
}

.avc-card-texte p:last-child {
	margin-bottom: 0;
}

/* Lien « Lire la suite… » des avis raccourcis. */
.avc-lire-suite {
	display: block;
	margin-top: 6px;
	padding: 0;
	border: none;
	background: none;
	color: var(--avc-primary);
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.avc-lire-suite:hover {
	color: var(--avc-primary-dark);
}

.avc-card-pied {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--avc-bordure);
}

.avc-card-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--avc-primary);
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
	flex-shrink: 0;
}

.avc-card-infos {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

.avc-card-meta {
	color: var(--avc-gris);
	font-size: 0.85em;
}

/* Logo Google sur les avis importés de la fiche Google Business Profile. */
.avc-google-logo {
	margin-left: auto;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
}

.avc-vide {
	text-align: center;
	color: var(--avc-gris);
	padding: 24px 0;
}

/* --- Notices de retour --- */

.avc-notice {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 8px;
	font-weight: 600;
}

.avc-notice-succes {
	background: #e7f6ec;
	border: 1px solid #34a853;
	color: #1e7e34;
}

.avc-notice-erreur {
	background: #fdecea;
	border: 1px solid #d93025;
	color: #b3261e;
}

/* --- Formulaire de dépôt --- */

.avc-formulaire {
	max-width: 640px;
	margin: 40px auto 0;
	padding: 28px;
	border: 1px solid var(--avc-bordure);
	border-radius: 12px;
	background: var(--avc-fond-carte);
}

.avc-form-titre {
	margin: 0 0 18px;
}

.avc-form label,
.avc-form-label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	color: var(--avc-texte);
}

.avc-form input[type="text"],
.avc-form input[type="email"],
.avc-form textarea {
	box-sizing: border-box; /* Certains thèmes ne l'appliquent pas : évite le débordement des colonnes. */
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--avc-bordure);
	border-radius: 8px;
	font: inherit;
}

.avc-form input:focus,
.avc-form textarea:focus {
	outline: none;
	border-color: var(--avc-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--avc-primary) 25%, transparent);
}

.avc-form-ligne {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.avc-form-ligne p {
	margin: 0 0 14px;
}

/* Pot de miel : caché aux humains, visible pour les robots. */
.avc-champ-site {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	overflow: hidden;
}

/* --- Sélecteur d'étoiles du formulaire (bloc centré) --- */

.avc-form-note {
	text-align: center;
	margin-bottom: 14px;
}

.avc-form-note .avc-form-label {
	display: block;
	margin-bottom: 6px;
}

.avc-note-picker {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 2px;
}

.avc-note-picker input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.avc-note-picker label {
	font-size: 2em;
	line-height: 1;
	color: var(--avc-etoile-vide);
	cursor: pointer;
	transition: color 0.15s ease, transform 0.15s ease;
	margin: 0;
}

/* Grâce à row-reverse, les étoiles à gauche de celle cochée/ciblée sont ses suivantes dans le DOM. */
.avc-note-picker input:checked ~ label,
.avc-note-picker label:hover,
.avc-note-picker label:hover ~ label {
	color: var(--avc-etoile);
}

.avc-note-picker label:hover {
	transform: scale(1.15);
}

.avc-note-picker input:focus-visible + label {
	outline: 2px solid var(--avc-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* --- Bouton (aligné à droite) --- */

.avc-form-envoi {
	text-align: right;
	margin-bottom: 4px;
}

.avc-bouton {
	display: inline-block;
	padding: 12px 28px;
	border: none;
	border-radius: 999px;
	background: var(--avc-primary);
	color: #fff;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.avc-bouton:hover {
	background: var(--avc-primary-dark);
}

.avc-form-mention {
	color: var(--avc-gris);
	font-size: 0.85em;
	margin: 6px 0 0;
	text-align: right;
}

/* --- Message de remerciement (remplace le formulaire après envoi) --- */

.avc-merci {
	text-align: center;
	padding: 40px 28px;
}

.avc-merci-coche {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #34a853;
	color: #fff;
	font-size: 30px;
	font-weight: 700;
	margin-bottom: 14px;
}

.avc-merci-titre {
	margin: 0 0 8px;
}

.avc-merci-texte {
	color: var(--avc-gris);
	margin: 0;
}

/* --- Badge résumé --- */

.avc-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border: 1px solid var(--avc-bordure);
	border-radius: 999px;
	background: var(--avc-fond-carte);
	color: var(--avc-texte);
	font-size: 0.95em;
}

/* --- Responsive --- */

@media (max-width: 980px) {
	.avc-grille {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.avc-grille {
		grid-template-columns: 1fr;
	}

	.avc-form-ligne {
		grid-template-columns: 1fr;
	}
}
