/* ─── Page Formation ─── */

/* ─── Grille d'archives ─── */
.formations-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.formation-card {
	background: #ffffff;
	border: 1px solid #e4e4e7;
	border-radius: 10px;
	padding: 16px;
}

.formation-card__title {
	margin-top: 0;
	margin-bottom: 0.75rem;
	font-size: 1.15rem;
}

.archive-header {
	margin-bottom: 1.5rem;
}

/* ─── Fiche Formation Individuelle ─── */

.sf-page {
	background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 1) 100%);
}

.sf-page__main {
	margin: 0 auto;
	padding: 0rem 2.5rem 3rem;
}

/* ─── Base d'icônes SVG ─── */
.sf-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 22px;
	height: 22px;
}

.sf-icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

/* ─── Héro ─── */

.sf-hero__content {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-top: 2.7rem;
	margin-bottom: 2rem;
}

.sf-hero__categories {
	margin: 0;
	font-size: 0.82rem;
	font-weight: var(--fcspe-font-weight-bold);
	letter-spacing: 0.08em;
	color: var(--fcspe-color-orange);
	line-height: 1.4;
}

.sf-hero__title {
	margin: 0;
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	font-weight: var(--fcspe-font-weight-black);
	line-height: 1.1;
	color: var(--fcspe-color-blue-dark);
}

.sf-hero__meta {
	margin: 0;
	font-size: 0.95rem;
	color: rgba(25, 36, 78, 0.72);
	line-height: 1.5;
}

/* ─── Badges ─── */
.sf-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 1.5rem;
	justify-content: center;
}

.sf-badge {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.4rem;
	padding: 0.4rem 0.7rem;
	border-radius: 7px;
	font-size: 0.88rem;
	font-weight: var(--fcspe-font-weight-bold);
	line-height: 1.3;
	white-space: normal;
	word-break: break-word;
	text-align: left;
	background: var(--fcspe-color-orange);
	color: var(--fcspe-color-white);
}

.sf-badge .sf-icon svg {
	fill: var(--fcspe-color-white);
}

.sf-badge--outline {
	background: rgba(219, 234, 254, 0.95);
	color: var(--fcspe-color-blue-dark);
	border: 1.5px solid rgba(25, 36, 78, 0.25);
}

.sf-badge--outline .sf-icon svg {
	fill: var(--fcspe-color-blue-text-light);
}

.sf-badge--dark {
	background: var(--fcspe-color-blue-dark);
	color: var(--fcspe-color-white);
}

.sf-badge--dark .sf-icon svg {
	fill: var(--fcspe-color-white);
}

.sf-hero__certification {
	margin-top: 0.25rem;
	text-align: center;
}

/* ─── Image du héro ─── */
.sf-hero__image {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.sf-hero__img {
	width: 100%;
	max-height: 340px;
	object-fit: cover;
	box-shadow: var(--fcspe-shadow-soft);
}

.sf-hero__img-placeholder {
	width: 100%;
	aspect-ratio: 8/7;
	background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

/* ─── Structure de la page (2 colonnes) ─── */
.sf-layout {
	display: grid;
	grid-template-columns: 1fr 0.5fr;
	gap: 2rem;
	align-items: start;
	margin-bottom: 2rem;
}

.sf-column-left {
	display: flex;
	flex-direction: column;
}

.sf-column-right {
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 6rem;
}

.sf-body__main {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.sf-body__sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* ─── Composant Carte ─── */
.sf-card {
	background: #ffffff;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 14px;
	padding: 1.5rem 1.75rem;
	box-shadow: 0 4px 18px rgba(2, 8, 23, 0.06);
}

.sf-card__heading {
	margin: 0 0 1rem;
	font-size: 0.82rem;
	font-weight: var(--fcspe-font-weight-extrabold);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--fcspe-color-blue-dark);
	line-height: 1;
}

.sf-card__body {
	font-size: 0.95rem;
	line-height: 1.6;
	color: rgba(25, 36, 78, 0.88);
}

.sf-card__body p {
	margin: 0 0 0.6rem;
}

.sf-card__body ul {
	margin: 0.4rem 0 0.6rem;
	padding-left: 1.3rem;
	list-style: disc;
}

.sf-card__body li {
	margin-bottom: 0.35rem;
}

/* ─── Liste d'objectifs ─── */
.sf-objectives-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sf-objectives-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin: 0;
}

.sf-objectives-list .sf-icon {
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	margin-top: 1px;
}

.sf-objectives-list .sf-icon svg {
	fill: var(--fcspe-color-orange);
}

/* ─── Carte divisée (Public & Prérequis) ─── */
.sf-card__body--split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

.sf-split__col {
	padding: 0 1.25rem;
}

.sf-split__col:first-child {
	padding-left: 0;
	border-right: 1px solid rgba(148, 163, 184, 0.3);
}

.sf-split__col:last-child {
	padding-right: 0;
}

.sf-split__label {
	display: block;
	font-size: 0.78rem;
	font-weight: var(--fcspe-font-weight-bold);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--fcspe-color-orange);
	margin-bottom: 0.4rem;
}

.sf-split__value {
	font-size: 0.95rem;
	color: rgba(25, 36, 78, 0.88);
	line-height: 1.5;
}

/* ─── Ligne de demi-cartes (Évaluation & Reconnaissance) ─── */
.sf-card-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	align-items: start;
}

.sf-card--half {
	padding: 1.25rem 1.5rem;
}

.sf-card--half .sf-card__body {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* ─── Encart Contact (Sidebar) ─── */
.sf-contact {
	background: var(--fcspe-color-blue-dark);
	color: var(--fcspe-color-white);
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	box-shadow: var(--fcspe-shadow-soft);
	border-radius: 0 0 14px 14px;
}

.sf-contact__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: var(--fcspe-font-weight-extrabold);
	color: var(--fcspe-color-white);
	line-height: 1.25;
}

.sf-contact__subtitle {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(248, 250, 252, 0.75);
}

.sf-contact__link {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 0.85rem;
	border-radius: 8px;
	background: var(--fcspe-color-white);
	color: var(--fcspe-color-blue-dark);
	text-decoration: none;
	font-weight: var(--fcspe-font-weight-bold);
	font-size: 0.9rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: fit-content;
}

.sf-contact__link .sf-icon svg {
	fill: var(--fcspe-color-blue-text-light);
}

.sf-contact__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	color: var(--fcspe-color-blue-dark);
}

.sf-contact__copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0;
	border: none;
	background: transparent;
	color: rgba(248, 250, 252, 0.8);
	font-size: 0.85rem;
	font-weight: var(--fcspe-font-weight-bold);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	transition: color 0.2s ease;
	margin-top: 1.2rem;
}

.sf-contact__copy .sf-icon svg {
	fill: rgba(248, 250, 252, 0.8);
	width: 16px;
	height: 16px;
}

.sf-contact__copy:hover {
	color: var(--fcspe-color-white);
}

.sf-contact__copy-ok {
	visibility: hidden;
	color: #4ade80;
	margin-left: 2px;
	transition: visibility 0s;
}

.sf-contact__copy.is-copied .sf-contact__copy-ok {
	visibility: visible;
}

/* ─── Infos Pratiques (Sidebar) ─── */

.sf-info-rows {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.sf-info-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0.85rem;
	border-radius: 10px;
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(248, 250, 252, 0.6);
}

.sf-info-row__label {
	font-size: 0.78rem;
	font-weight: var(--fcspe-font-weight-extrabold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fcspe-color-orange);
	white-space: nowrap;
}

.sf-info-row__value {
	text-align: right;
	font-size: 0.9rem;
	font-weight: var(--fcspe-font-weight-bold);
	color: var(--fcspe-color-blue-dark);
	line-height: 1.35;
}

.sf-info-row__value small {
	display: block;
	font-size: 0.8rem;
	font-weight: var(--fcspe-font-weight-regular);
	color: rgba(25, 36, 78, 0.6);
}

/* ─── Tarifs (Sidebar) ─── */
.sf-tarif {
	margin-bottom: 1rem;
}

.sf-tarif:last-child {
	margin-bottom: 0;
}

.sf-tarif__label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.6rem;
	font-size: 0.82rem;
	font-weight: var(--fcspe-font-weight-extrabold);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--fcspe-color-blue-text-light);
}

.sf-tarif__label .sf-icon svg {
	fill: var(--fcspe-color-blue-text-light);
}

.sf-tarif__line {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.2rem 0;
	font-size: 0.9rem;
	color: var(--fcspe-color-blue-dark);
}

.sf-tarif__amount {
	font-weight: var(--fcspe-font-weight-bold);
	color: var(--fcspe-color-orange);
	white-space: nowrap;
}

/* ─── Lien de retour ─── */
.sf-back {
	padding: 1rem 0 2rem;
}

.sf-back__link {
	font-weight: var(--fcspe-font-weight-bold);
	color: var(--fcspe-color-blue-text-light);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

.sf-back__link:hover {
	color: var(--fcspe-color-blue-dark);
}

/* ─── Responsive ─── */
@media (max-width: 980px) {
	.sf-layout {
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
		align-items: stretch;
	}

	.sf-column-left,
	.sf-column-right {
		display: contents;
	}

	.sf-hero__content {
		order: 1;
		margin-bottom: 0;
	}

	.sf-hero__image {
		order: 2;
		margin-bottom: 0;
	}

	.sf-hero__img {
		max-height: 260px;
	}

	.sf-body__main {
		order: 3;
	}

	.sf-body__sidebar {
		order: 4;
		position: static;
	}

	.sf-card-row {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.sf-page__main {
		padding: 1rem 1rem 2rem;
	}

	.sf-hero__title {
		font-size: clamp(1.45rem, 7vw, 2rem);
	}

	.sf-hero__badges {
		gap: 0.4rem;
	}

	.sf-badge {
		font-size: 0.8rem;
		padding: 0.38rem 0.65rem;
	}

	.sf-card {
		padding: 1.15rem 1.25rem;
		border-radius: 12px;
	}

	.sf-card__body--split {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.sf-split__col:first-child {
		border-right: none;
		border-bottom: 1px solid rgba(148, 163, 184, 0.3);
		padding: 0 0 1rem;
	}

	.sf-split__col:last-child {
		padding: 0;
	}

	.sf-card-row {
		grid-template-columns: 1fr;
	}

	.sf-contact {
		border-radius: 12px;
	}
}

/* ─── Formations Similaires ─── */
.sf-related-formations {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.sf-related-formations__title {
	font-size: 1.5rem;
	font-weight: var(--fcspe-font-weight-black);
	color: var(--fcspe-color-blue-dark);
	margin-bottom: 1.5rem;
}

.sf-related-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

@media (max-width: 768px) {
	.sf-related-list {
		grid-template-columns: 1fr;
	}
}