/* =========================================================================
   Smarthys – Grille clients (ACF) · v1.0.5
   Jetons repris du Design System Smarthys (préfixe --sm-).
   Grille 4 colonnes : témoignage = 2 colonnes, logo = 1 colonne.
   La disposition en quinconce (masonry) est calculée par sm-clients.js ;
   sans JS, la grille reste une grille régulière parfaitement lisible.
   ========================================================================= */

:root {
	--sm-nuit: #101450;
	--sm-orange: #f36245;
	--sm-orange-fonce: #bd5641;
	--sm-titre: #1c2124;
	--sm-texte: #5a6670;
	--sm-contour: #d7dfe4;
	--sm-blanc: #ffffff;
	--sm-ciel-clair: #a4d0fa;
	--sm-rayon-md: 14px;
	--sm-rayon-pilule: 9999px;
	--sm-ombre-carte: 0 4px 24px 0 rgba(0, 0, 0, .15), 0 2px 6px 0 rgba(0, 0, 0, .05);
	--sm-font: "Open Sans", Helvetica, Arial, sans-serif;
}

.sm-clients {
	--sm-gap: 24px;          /* esp-5 */
	--sm-pad: 32px;          /* esp-6 */
	--sm-ligne: 4px;         /* pas de la grille masonry */
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-flow: row dense;
	gap: var(--sm-gap);
	align-items: start;
	font-family: var(--sm-font);
}

.sm-clients.is-masonry {
	grid-auto-rows: var(--sm-ligne);
	row-gap: 0;               /* l'écart vertical est inclus dans le calcul des lignes */
}

.sm-clients__item {
	min-width: 0;
}

.sm-clients__item--temoignage {
	grid-column: span 2;
}

/* Carte ------------------------------------------------------------------ */
.sm-clients .sm-clients__card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	height: auto;
	padding: var(--sm-pad);
	border: 1px solid var(--sm-contour);
	border-radius: var(--sm-rayon-md);
	background: var(--sm-blanc);
	color: var(--sm-texte);
	transition: box-shadow .2s ease, transform .2s ease;
}

.sm-clients__item--sombre .sm-clients__card {
	background: var(--sm-nuit);
	border-color: var(--sm-nuit);
	color: var(--sm-blanc);
}

.sm-clients__item--temoignage:has(.sm-clients__bouton):hover .sm-clients__card {
	box-shadow: var(--sm-ombre-carte);
}

/* Logo (pilule blanche, logo tel que fourni) ----------------------------- */
.sm-clients .sm-clients__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 240px;
	max-width: 100%;
	height: 80px;
	padding: 8px 24px;
	border-radius: var(--sm-rayon-pilule);
	background: var(--sm-blanc);
}

.sm-clients__item--clair .sm-clients__logo {
	padding-left: 0;
	justify-content: flex-start;
}

.sm-clients .sm-clients__logo-img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 64px;
	margin: 0;
	border-radius: 0;
	object-fit: contain;
}

/* Textes ----------------------------------------------------------------- */
.sm-clients .sm-clients__titre {
	margin: 8px 0 0;
	padding: 0;
	font-family: var(--sm-font);
	/* !important : le site impose « h3 { font-size: 30px; color: #1c2124 !important } » dans une feuille personnalisée */
	font-size: 24px !important;
	line-height: 35px !important;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-wrap: balance;
	color: var(--sm-titre) !important;
}

.sm-clients .sm-clients__item--sombre .sm-clients__titre {
	color: var(--sm-blanc) !important;
}

.sm-clients .sm-clients__citation {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	quotes: none;
	color: inherit;            /* Enfold colore les citations en gris : illisible sur nuit */
	font-size: inherit;
	line-height: inherit;
}

.sm-clients .sm-clients__citation p {
	margin: 0;
	font-family: var(--sm-font);
	font-size: 16px;           /* corps */
	line-height: 26px;
	font-weight: 400;
	font-style: normal;
	color: inherit;
}

/* Bouton : repris à l'identique du bouton « témoignage » de la production
   (fond blanc, contour et texte orange, pilule). !important comme sur le site,
   pour passer devant les couleurs de liens d'Enfold. */
.sm-clients .sm-clients__bouton {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	min-width: unset;
	padding: 12px 32px !important;
	border: 1px solid var(--sm-orange) !important;
	border-radius: 100px;
	background-color: var(--sm-blanc) !important;
	color: var(--sm-orange) !important;
	font-family: 'Open Sans', Helvetica, Arial, Lucida, sans-serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 22px;
	letter-spacing: unset;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: all 150ms ease-out;
}

/* Flèche, à la couleur du texte */
.sm-clients .sm-clients__bouton svg {
	flex: none;
	transition: transform .2s ease;
}

.sm-clients .sm-clients__bouton:hover svg {
	transform: translateX(3px);
}

/* Survol de la production : légère transparence */
.sm-clients .sm-clients__bouton:hover {
	opacity: .9;
	text-decoration: none;
}

/* Focus clavier visible (absent du site actuel) */
.sm-clients .sm-clients__bouton:focus-visible {
	outline: 2px solid var(--sm-ciel-clair);
	outline-offset: 3px;
}

.sm-clients__item--clair .sm-clients__bouton:focus-visible {
	outline-color: var(--sm-nuit);
}

/* Logo seul -------------------------------------------------------------- */
.sm-clients__item--logo .sm-clients__card {
	align-items: center;
	justify-content: center;
	aspect-ratio: 2 / 1;
	max-width: 100%;
	padding: 20px 28px;
}

.sm-clients__item--logo .sm-clients__logo-img {
	max-height: 100%;
}

.sm-clients__nom {
	font-weight: 700;
	color: var(--sm-titre);
}

/* Lecteurs d'écran (si le thème ne fournit pas la classe) ----------------- */
.sm-clients .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Tablette & mobile : 2 colonnes, témoignages en pleine largeur --------- */
@media (max-width: 989px) {
	.sm-clients {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.sm-clients {
		--sm-gap: 16px;        /* esp-4 */
		--sm-pad: 24px;        /* esp-5 */
	}
	.sm-clients .sm-clients__titre {
		font-size: 21px !important;
		line-height: 30px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sm-clients *,
	.sm-clients__card {
		transition: none !important;
	}
}
