/* Row Avis clients (module review) : note moyenne, avis en liste, grille ou défilement, formulaire « Donner mon avis ». Site et éditeur. Couleurs du thème du projet (--theme-*) ; les cards suivent Design > Cartes, puis le module et la row (--cd-*, CardDesignLib) */

.rv {
	position: relative;
	width: 100%;
	--rv-star: #f5a623;
	--rv-border: color-mix(in srgb, currentColor 22%, transparent);
	--rv-muted: color-mix(in srgb, currentColor 62%, transparent);
	--rv-gap: 1rem;
}

.rv-stars {
	display: inline-flex;
	gap: .1rem;
	vertical-align: middle;
}

.rv-star {
	width: 1.05rem;
	height: 1.05rem;
	fill: var(--rv-star);
}

.rv-star.rv-off {
	fill: color-mix(in srgb, currentColor 22%, transparent);
}

/* Note moyenne */
.rv-summary {
	display: flex;
	align-items: center;
	gap: .9rem;
	margin-bottom: 1.25rem;
}

.rv-average {
	font-family: var(--theme-font-title, inherit);
	font-size: 2.75rem;
	font-weight: 700;
	line-height: 1;
}

.rv-summary-side {
	display: flex;
	flex-direction: column;
	gap: .25rem;
}

.rv-summary .rv-star {
	width: 1.3rem;
	height: 1.3rem;
}

.rv-count {
	font-size: .9rem;
	color: var(--rv-muted);
}

.rv-empty {
	margin: 0 0 1rem;
	color: var(--rv-muted);
}

/* Avis */
.rv-track {
	display: flex;
	flex-direction: column;
	gap: var(--rv-gap);
}

.rv-grid .rv-track {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.rv-carousel .rv-track {
	flex-direction: row;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-bottom: .25rem;
}

.rv-carousel .rv-track::-webkit-scrollbar {
	display: none;
}

.rv-carousel .rv-item {
	flex: 0 0 min(88%, 21rem);
	scroll-snap-align: start;
}

.rv-item {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding: 1rem 1.1rem;
	min-width: 0;
}

.rv-head {
	display: flex;
	align-items: center;
	gap: .7rem;
}

.rv-avatar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	object-fit: cover;
	font-weight: 600;
	color: var(--theme-primary-text, #fff);
	background: var(--theme-primary, #555);
}

.rv-who {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.rv-author {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rv-author a {
	color: inherit;
	text-decoration: none;
}

.rv-date {
	font-size: .8rem;
	color: var(--rv-muted);
}

.rv-source {
	margin-left: auto;
	padding: .15rem .55rem;
	font-size: .72rem;
	font-weight: 600;
	white-space: nowrap;
	border: 1px solid var(--rv-border);
	border-radius: 999px;
	color: var(--rv-muted);
}

.rv-title {
	margin: 0;
	font-family: var(--theme-font-title, inherit);
	font-size: 1.05rem;
	font-weight: 700;
}

.rv-content {
	margin: 0;
	overflow-wrap: anywhere;
}

.rv-reply {
	margin-top: .25rem;
	padding: .65rem .8rem;
	font-size: .92rem;
	background: color-mix(in srgb, currentColor 7%, transparent);
	border-left: 3px solid var(--theme-primary, currentColor);
	border-radius: 0 .5rem .5rem 0;
}

.rv-reply p {
	margin: .2rem 0 0;
}

.rv-reply-label {
	font-size: .8rem;
	font-weight: 700;
}

.rv-draft {
	opacity: .65;
}

.rv-draft-note {
	font-size: .8rem;
	color: var(--rv-muted);
}

/* Flèches du défilement */
.rv-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	color: var(--theme-text, #222);
	background: var(--theme-background, #fff);
	border: 1px solid var(--rv-border);
	border-radius: 50%;
	box-shadow: 0 .15rem .6rem rgba(0, 0, 0, .18);
	cursor: pointer;
	transform: translateY(-50%);
}

.rv-nav svg {
	width: 1.2rem;
	height: 1.2rem;
}

.rv-prev {
	left: -.5rem;
}

.rv-next {
	right: -.5rem;
}

.rv-stage {
	position: relative;
}

@media (max-width: 520px) {
	.rv-nav {
		display: none;
	}
}

/* Donner son avis */
.rv-give {
	margin-top: 1.25rem;
}

.rv-login {
	margin: 0;
}

.rv-form {
	margin-top: 1rem;
	padding: 1.1rem;
}

.rv-form[hidden] {
	display: none;
}

.rv-field {
	margin-bottom: .9rem;
}

.rv-label {
	display: block;
	margin-bottom: .3rem;
	font-size: .9rem;
	font-weight: var(--theme-form-label-weight, 600);
}

.rv-input {
	display: block;
	width: 100%;
	padding: .65rem .8rem;
	font: inherit;
	border: var(--theme-form-border-width, 1px) solid var(--theme-form-border-color, var(--rv-border));
	border-radius: var(--theme-form-border-radius, .5rem);
	background: var(--theme-form-background, transparent);
	color: var(--theme-form-text, inherit);
}

.rv-input:focus {
	outline: var(--theme-form-focus-width, 1px) solid var(--theme-form-focus-color, var(--theme-primary, currentColor));
	outline-offset: var(--theme-form-focus-offset, 1px);
}

textarea.rv-input {
	resize: vertical;
}

.rv-error {
	display: block;
	min-height: 0;
	margin-top: .25rem;
	font-size: .85rem;
	color: var(--theme-form-error-color, #d93025);
}

.rv-error:empty {
	display: none;
}

/* Choix de la note : de la première à l'étoile choisie colorées (les étoiles sont dans l'ordre inverse dans la page) */
.rv-rating {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: .15rem;
}

.rv-rating input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rv-rating label {
	margin: 0;
	cursor: pointer;
}

.rv-rating .rv-star {
	width: 2rem;
	height: 2rem;
	fill: color-mix(in srgb, currentColor 22%, transparent);
	transition: fill .1s;
}

.rv-rating input:checked ~ label .rv-star,
.rv-rating label:hover .rv-star,
.rv-rating label:hover ~ label .rv-star {
	fill: var(--rv-star);
}

.rv-rating input:focus-visible + label .rv-star {
	outline: 2px solid var(--theme-primary, currentColor);
	outline-offset: 2px;
}

.rv-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rv-message {
	margin: .75rem 0 0;
	font-weight: 600;
}

.rv-message:empty {
	display: none;
}

.rv-message.rv-fail {
	color: var(--theme-form-error-color, #d93025);
}

.rv-form.rv-done .rv-field,
.rv-form.rv-done .rv-send {
	display: none;
}

/* Liste des avis clients : bouton « Suivant » sous les avis */
.rv-more-wrap {
	margin-top: 1.25rem;
	text-align: center;
}

.rv-more-wrap[hidden] {
	display: none;
}

.rv-more:disabled {
	opacity: .6;
	cursor: progress;
}
