// Apricus — Paroles de la communauté (défilement horizontal auto + flèches)
function TestimonialCard({ t }) {
const D = 'var(--font-display)';
return (
{[0, 1, 2, 3, 4].map(s => )}
« {t.quote} »
{t.name}{t.context}
);
}
function Testimonials() {
const ref = useReveal();
const D = 'var(--font-display)';
const trackRef = React.useRef(null);
const pausedRef = React.useRef(false);
// défilement automatique doux via requestAnimationFrame (robuste face au throttling CSS)
React.useEffect(() => {
const el = trackRef.current;
if (!el) return;
let raf;
const tick = () => {
if (el && !pausedRef.current) {
el.scrollLeft += 0.45;
const half = el.scrollWidth / 2;
if (half > 0 && el.scrollLeft >= half) el.scrollLeft -= half;
}
raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
return () => cancelAnimationFrame(raf);
}, []);
const nudge = (dir) => {
const el = trackRef.current;
if (el) el.scrollBy({ left: dir * 380, behavior: 'smooth' });
};
const arrow = (dir) => (
);
const loop = TEMOINS.concat(TEMOINS);
return (