/* AEC Témoignages – styles front */

.aec-tems {
	--aec-rule: rgba(0, 0, 0, .14);
	--aec-muted: rgba(0, 0, 0, .58);
	--aec-gap: 40px;
}

.aec-tem {
	margin: 0;
	padding: 0;
}

/* Texte du témoignage */
.aec-tem__quote {
	margin: 0 0 28px;
	padding: 0;
	border: 0;
	quotes: "\201C" "\201D";
	font-size: 1.0625em;
	line-height: 1.65;
}

.aec-tem__quote p {
	margin: 0 0 .8em;
}

.aec-tem__quote p:last-child {
	margin-bottom: 0;
}

.aec-tem__quote p:first-child::before {
	content: open-quote;
}

.aec-tem__quote p:last-child::after {
	content: close-quote;
}

/* Bloc signature */
.aec-tem__meta {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.aec-tem__logo {
	line-height: 0;
}

.aec-tem__logo img {
	width: auto;
	height: 40px;
	max-width: 160px;
	object-fit: contain;
	object-position: left center;
}

.aec-tem__logo a {
	display: inline-block;
	box-shadow: none;
	transition: opacity .2s ease;
}

.aec-tem__logo a:hover,
.aec-tem__logo a:focus-visible {
	opacity: .65;
}

.aec-tem__author {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: .875em;
	line-height: 1.45;
}

.aec-tem__name {
	font-weight: 600;
}

.aec-tem__role {
	color: var(--aec-muted);
}

.aec-tem__role a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .18em;
}

.aec-tems :focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* -------------------------------------------------
   Layout : grille
   ------------------------------------------------- */

.aec-tems--grid {
	display: grid;
	grid-template-columns: repeat(var(--aec-cols, 3), minmax(0, 1fr));
	gap: var(--aec-gap);
	align-items: start;
}

.aec-tems--grid .aec-tem {
	padding-top: 26px;
	border-top: 1px solid var(--aec-rule);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.aec-tems--grid .aec-tem__quote {
	flex: 1 1 auto;
}

.aec-tems--grid .aec-tem__meta {
	margin-top: auto;
}

/* -------------------------------------------------
   Layouts centrés : citation seule + carrousel
   ------------------------------------------------- */

.aec-tems--featured,
.aec-tems--carousel {
	max-width: 1080px;
	margin-inline: auto;
}

.aec-tems--featured .aec-tem,
.aec-tems--carousel .aec-tem {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.aec-tems--featured .aec-tem__quote,
.aec-tems--carousel .aec-tem__quote {
	font-size: 1.0625em;
	line-height: 1.62;
	margin-bottom: 30px;
	max-width: 58em;
}

.aec-tems--featured .aec-tem__meta,
.aec-tems--carousel .aec-tem__meta {
	align-items: center;
}

.aec-tems--featured .aec-tem__logo img,
.aec-tems--carousel .aec-tem__logo img {
	object-position: center;
}

/* -------------------------------------------------
   Carrousel
   ------------------------------------------------- */

.aec-tems__viewport {
	overflow: hidden;
}

.aec-tems__track {
	display: flex;
	align-items: stretch;
	transition: transform .55s cubic-bezier(.25, .8, .3, 1);
	will-change: transform;
}

.aec-tems--carousel .aec-tem {
	flex: 0 0 100%;
	min-width: 100%;
	padding: 0 8px;
	justify-content: center;
}

/* Sans JavaScript : on n'affiche que le premier témoignage. */
.aec-tems--carousel:not(.aec-is-ready) .aec-tem + .aec-tem {
	display: none;
}

.aec-tems__nav {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 22px;
	margin-top: 34px;
}

.aec-tems--carousel.aec-is-ready .aec-tems__nav {
	display: flex;
}

.aec-tems__arrow {
	appearance: none;
	background: none;
	border: 1px solid var(--aec-rule);
	border-radius: 50%;
	width: 42px;
	height: 42px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	cursor: pointer;
	transition: border-color .2s ease;
}

.aec-tems__arrow:hover {
	border-color: currentColor;
}

.aec-tems__arrow svg {
	width: 17px;
	height: 17px;
	display: block;
}

.aec-tems__dots {
	display: flex;
	align-items: center;
	gap: 10px;
}

.aec-tems__dot {
	appearance: none;
	background: none;
	border: 0;
	padding: 6px 0;
	width: 26px;
	cursor: pointer;
	line-height: 0;
}

.aec-tems__dot::before {
	content: "";
	display: block;
	height: 1px;
	background: currentColor;
	opacity: .25;
	transition: opacity .2s ease, height .2s ease;
}

.aec-tems__dot:hover::before {
	opacity: .55;
}

.aec-tems__dot.is-active::before {
	opacity: 1;
	height: 2px;
}

/* -------------------------------------------------
   Responsive & accessibilité
   ------------------------------------------------- */

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

@media (max-width: 640px) {
	.aec-tems--grid {
		grid-template-columns: minmax(0, 1fr);
		--aec-gap: 28px;
	}

	.aec-tems--featured .aec-tem__quote,
	.aec-tems--carousel .aec-tem__quote {
		font-size: 1em;
		margin-bottom: 26px;
	}

	.aec-tems__nav {
		gap: 16px;
		margin-top: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aec-tems__track {
		transition: none;
	}
}
