/**
 * SD Formation - Archive des formations (catalogue).
 * Mobile-first. Réutilise les classes globales de custom.css
 * (.sdf-band, .sdf-hero, .sdf-badge-categorie, .sdf-btn) et
 * formation-cards.css (.sdf-fcard).
 */

.sdf-archive-formations,
.sdf-archive-formations *,
.sdf-archive-formations *::before,
.sdf-archive-formations *::after {
	box-sizing: border-box;
}

.sdf-archive-formations {
	font-family: var( --sdf-font-body );
}

/* Filtres */
.sdf-af-filters {
	position: sticky;
	top: 0;
	z-index: 40;
	background: #ffffff;
	border-bottom: 1px solid var( --sdf-border );
}
.sdf-af-filters__inner {
	padding: 18px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
/* Rangée de pills en scroll horizontal contenu sur mobile : un libellé de
   catégorie long (ex. "Prévention et management des risques
   professionnels") ne se compressait pas et faisait déborder toute la
   page en horizontal, .sdf-af-filters__pills n'ayant aucune règle propre
   (simple div dans le flex-wrap du parent, donc jamais contraint). */
.sdf-af-filters__pills {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	max-width: 100%;
	padding-bottom: 2px;
	/* évite que ce flex-item ne dépasse la largeur dispo dans
	   .sdf-af-filters__inner (min-width:auto par défaut sur un flex-item) */
	min-width: 0;
}
.sdf-af-filters__pills::-webkit-scrollbar {
	height: 4px;
}
.sdf-af-filters__pills::-webkit-scrollbar-thumb {
	background: var( --sdf-border );
	border-radius: 999px;
}
@media ( min-width: 900px ) {
	.sdf-af-filters__pills {
		flex-wrap: wrap;
		overflow-x: visible;
	}
}
.sdf-af-pill {
	border: 1px solid var( --sdf-border );
	background: rgba(10,13,20,0.03);
	color: var( --sdf-text-primary );
	padding: 8px 17px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	font-family: var( --sdf-font-body );
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
	flex: none;
}
.sdf-af-pill:hover {
	border-color: var( --sdf-blue );
}
.sdf-af-pill.is-active {
	background: var( --sdf-blue );
	border-color: var( --sdf-blue );
	color: #ffffff;
}
.sdf-af-filters__count {
	margin-left: auto;
	font-size: 13.5px;
	color: var( --sdf-text-muted );
	white-space: nowrap;
	flex: none;
}

/* Grille */
.sdf-af-grid-wrap {
	/* padding-top/bottom en longhand : la classe .sdf-band (padding horizontal,
	   shorthand) est aussi posée sur cet élément, un shorthand "padding" ici
	   l'aurait entièrement écrasée. */
	padding-top: clamp( 32px, 5vw, 48px );
	padding-bottom: clamp( 56px, 7vw, 80px );
}
.sdf-af-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 22px;
}
@media ( min-width: 640px ) {
	.sdf-af-grid { grid-template-columns: repeat(2, 1fr); }
}
@media ( min-width: 1024px ) {
	.sdf-af-grid { grid-template-columns: repeat(3, 1fr); }
}
.sdf-fcard.sdf-af-hidden {
	display: none;
}

.sdf-af-empty {
	text-align: center;
	padding: 64px 20px;
	border: 1px dashed var( --sdf-border );
	border-radius: var( --sdf-radius-md );
}
.sdf-af-empty__title {
	font-family: var( --sdf-font-heading );
	font-weight: 700;
	font-size: 22px;
	color: var( --sdf-text-primary );
	margin-bottom: 8px;
}
.sdf-af-empty p {
	font-size: 14.5px;
	color: var( --sdf-text-muted );
	margin: 0 0 18px;
}

/* CTA finale */
.sdf-af-cta {
	/* padding-top/bottom en longhand, même raison que .sdf-af-grid-wrap
	   ci-dessus (cohabite avec la classe .sdf-band). */
	background: var( --sdf-dark );
	padding-top: clamp( 48px, 7vw, 80px );
	padding-bottom: clamp( 48px, 7vw, 80px );
}
.sdf-af-cta__inner {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}
.sdf-af-cta__inner h2 {
	font-family: var( --sdf-font-heading );
	font-weight: 800;
	font-size: clamp( 30px, 4vw, 42px );
	color: #ffffff;
	margin: 0 0 14px;
}
.sdf-af-cta__inner p {
	font-size: 16px;
	color: var( --sdf-gray );
	margin: 0 0 28px;
	line-height: 1.55;
}
.sdf-af-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
}
