/* ==========================================================================
   FC Reviews Carousel — Mobile-first, Shoptimizer-compatible
   ========================================================================== */

.fc-rc-carousel {
	--fc-rc-card-bg: #ffffff;
	--fc-rc-card-radius: 20px;
	--fc-rc-star-color: #f5a623;
	--fc-rc-text-color: #2c2c2c;
	--fc-rc-muted: #888888;
	--fc-rc-border: #e8e8e8;
	--fc-rc-link: #4a6cf7;

	margin: 0 0;
	padding: 20px 12px;
	position: relative;
}

/* ---------- Swiper overrides ---------- */

.fc-rc-swiper .swiper-wrapper {
	align-items: stretch;
}

/* ---------- Slide spacing ---------- */

.fc-rc-carousel .swiper-slide {
	height: auto;
}

/* ---------- Pagination (hidden) ---------- */

.fc-rc-carousel .swiper-pagination {
	display: none;
}

/* ---------- Navigation arrows ---------- */

/* Hide native Swiper chevron pseudo-elements */
.fc-rc-swiper .swiper-button-prev::after,
.fc-rc-swiper .swiper-button-next::after {
	content: none;
}

/* Hide nav on mobile — swipe only */
.fc-rc-swiper .swiper-button-prev,
.fc-rc-swiper .swiper-button-next {
	display: none;
}

@media (min-width: 640px) {

	.fc-rc-swiper .swiper-button-prev,
	.fc-rc-swiper .swiper-button-next {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin-top: -20px;
		background: #ffffff;
		border-radius: 50%;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
		transition: transform 0.2s, box-shadow 0.2s;
		z-index: 10;
	}

	.fc-rc-swiper .swiper-button-prev {
		left: 10;
	}

	.fc-rc-swiper .swiper-button-next {
		right: 10;
	}

	.fc-rc-swiper .swiper-button-prev:hover,
	.fc-rc-swiper .swiper-button-next:hover {
		transform: scale(1.05);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	}

	.fc-rc-swiper .swiper-button-prev .fc-rc-nav__icon {
		transform: scaleX(-1);
	}
}

.fc-rc-nav__icon {
	width: 14px;
	height: 14px;
	color: #2c2c2c;
}

/* ---------- Card ---------- */

.fc-rc-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--fc-rc-card-bg);
	border-radius: var(--fc-rc-card-radius);
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
	padding: 18px;
	box-sizing: border-box;
	margin-left: 10px;
	margin-right: 20px;
	margin-top: 16px;
	margin-bottom: 16px;

	transition: transform 250ms ease, box-shadow 250ms ease;
}

.fc-rc-card:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* ---------- Rating row (stars + badge) ---------- */

.fc-rc-card__rating {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

/* ---------- Stars (sprite overlay) ---------- */

.fc-rc-card__stars {
	display: inline-block;
	width: 91px;
	height: 25px;
	background-image: url('../images/etoile_off.png');
	background-size: 91px 25px;
	background-repeat: no-repeat;
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
}

.fc-rc-card__stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background-image: url('../images/etoile_on.png');
	background-size: 91px 25px;
	background-repeat: no-repeat;
}

/* ---------- Verified badge ---------- */

.fc-rc-card__verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #16a34a;
	font-size: 0.85em;
	font-weight: 500;
}

.fc-rc-card__verified svg {
	flex-shrink: 0;
}

/* ---------- Content ---------- */

.fc-rc-card__content {
	flex: 1;
	margin-bottom: 12px;
}

.fc-rc-card__text,
.fc-rc-card__text-full {
	font-size: 14px;
	line-height: 1.5;
	color: var(--fc-rc-text-color);
	font-style: italic;
	margin: 0;
}

/* Full text hidden by default, shown when card is expanded */
.fc-rc-card__text-full {
	display: none;
}

.fc-rc-card.is-expanded .fc-rc-card__text {
	display: none;
}

.fc-rc-card.is-expanded .fc-rc-card__text-full {
	display: block;
}

.fc-rc-readmore {
	display: inline;
	margin-top: 6px;
	padding: 0;
	border: none;
	background: none;
	color: var(--fc-rc-link);
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.fc-rc-readmore:hover {
	text-decoration-thickness: 2px;
}

/* ---------- Author (bottom) ---------- */

.fc-rc-card__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}

.fc-rc-card__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 50%;
	color: #ffffff;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
}

.fc-rc-card__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.fc-rc-card__author {
	font-weight: 600;
	font-size: 14px;
	color: var(--fc-rc-text-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fc-rc-card__date {
	font-size: 10px;
	color: var(--fc-rc-muted);
}

/* ---------- Footer ---------- */

.fc-rc-card__footer {
	margin-top: auto;
	padding-top: 8px;
}

.fc-rc-card__product-link {
	font-size: 12px;
	color: var(--fc-rc-muted);
	text-decoration: none;
	transition: color 0.15s;
}

.fc-rc-card__product-link:hover {
	color: var(--fc-rc-link);
}

/* ---------- Mobile ---------- */

@media (max-width: 639px) {
	.fc-rc-card {
		margin-left: 8px;
		margin-right: 8px;
	}

	.fc-rc-card__date {
		font-size: 11px;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.fc-rc-swiper .swiper-wrapper {
		transition-duration: 0ms;
	}

	.fc-rc-card {
		transition: none;
	}

	.fc-rc-card:hover {
		transform: none;
	}

	.fc-rc-swiper .swiper-button-prev,
	.fc-rc-swiper .swiper-button-next,
	.fc-rc-card__product-link,
	.fc-rc-readmore {
		transition: none;
	}
}

/* --- v1.0.4 : Masquage propre des fleches aux extremites --- */

.fc-rc-carousel .swiper-button-prev,
.fc-rc-carousel .swiper-button-next {
	transition: opacity 200ms ease, visibility 200ms ease;
}

.fc-rc-carousel .swiper-button-disabled {
	opacity: 0 !important;
	pointer-events: none;
	visibility: hidden;
}

/* --- v1.0.5 : Titre H2 au-dessus du carrousel --- */

.fc-rc-title {
	font-size: 1.4em;
	font-weight: 700;
	color: var(--fc-rc-text-color);
	margin: 24px 0 0px 12px;
	padding: 0;
}
/* --- v1.0.6 : Mise en page avant l'init Swiper (JS retarde par WP Rocket) --- */
/*
 * Tant que Swiper n'a pas tourne (scripts differes, "Delay JS", JS lent),
 * on reproduit en CSS la grille finale : memes points de rupture que le
 * JS (1 / 2 / 3 / 4 slides a 0 / 640 / 1024 / 1280 px). L'init ne change
 * alors plus rien a la mise en page : pas de carte pleine largeur, pas de
 * decalage (CLS) au premier scroll. Des que Swiper ajoute
 * .swiper-container-initialized, ces regles ne s'appliquent plus.
 */

.fc-rc-swiper:not(.swiper-container-initialized) {
	overflow: hidden;
}

.fc-rc-swiper:not(.swiper-container-initialized) .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
}

.fc-rc-swiper:not(.swiper-container-initialized) .swiper-slide {
	flex: 0 0 100%;
	max-width: 100%;
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.fc-rc-swiper:not(.swiper-container-initialized) .swiper-slide {
		flex-basis: 50%;
		max-width: 50%;
	}
}

@media (min-width: 1024px) {
	.fc-rc-swiper:not(.swiper-container-initialized) .swiper-slide {
		flex-basis: 33.3333%;
		max-width: 33.3333%;
	}
}

@media (min-width: 1280px) {
	.fc-rc-swiper:not(.swiper-container-initialized) .swiper-slide {
		flex-basis: 25%;
		max-width: 25%;
	}
}

/* Fleches masquees tant que Swiper ne les pilote pas (sinon inertes). */
.fc-rc-swiper:not(.swiper-container-initialized) .swiper-button-prev,
.fc-rc-swiper:not(.swiper-container-initialized) .swiper-button-next {
	visibility: hidden;
}
