/**
 * Sophia – Corps des pages de formation
 *
 * Ne concerne que le contenu central : en-tête, hero et pied de page
 * restent gérés par le thème.
 */

.sfp {
	--sfp-gold: #d4af37;
	--sfp-gold-soft: rgba(212, 175, 55, 0.16);
	--sfp-gold-line: rgba(212, 175, 55, 0.32);
	--sfp-ink: #2c2a27;
	--sfp-muted: #6f6a63;
	--sfp-bg: #fbf9f5;
	--sfp-card: #ffffff;
	--sfp-border: rgba(44, 42, 39, 0.08);
	--sfp-shadow: 0 10px 30px rgba(48, 40, 24, 0.07);
	--sfp-radius: 14px;
	/* Décalage vers le haut du bandeau d'informations, pour le faire chevaucher
	   la hero section du thème (ex. -56px). */
	--sfp-facts-offset: 0px;

	box-sizing: border-box;
	background: var(--sfp-bg);
	color: var(--sfp-ink);
	font-size: 16px;
	line-height: 1.6;
}

.sfp *,
.sfp *::before,
.sfp *::after {
	box-sizing: border-box;
}

.sfp img {
	max-width: 100%;
	height: auto;
}

.sfp-container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

.sfp-section {
	padding: 46px 0;
}

.sfp-section--facts {
	padding-top: 0;
	padding-bottom: 10px;
}

.sfp-section--intro {
	padding-top: 40px;
}

.sfp-section--cta {
	padding: 56px 0 0;
}

/* ---------------------------------------------------------------- Titres */

.sfp-heading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin: 0 0 30px;
	padding: 0;
	font-family: Georgia, "Times New Roman", "Playfair Display", serif;
	font-size: clamp(1.45rem, 2.6vw, 1.95rem);
	font-weight: 400;
	line-height: 1.25;
	text-align: center;
	color: var(--sfp-ink);
}

.sfp-flourish-wrap {
	display: none;
	color: var(--sfp-gold);
	flex: 0 0 auto;
}

.sfp-heading--ornament .sfp-flourish-wrap {
	display: inline-flex;
}

.sfp-flourish-wrap--right .sfp-flourish {
	transform: scaleX(-1);
}

.sfp-eyebrow {
	margin: 0 0 12px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--sfp-gold);
}

/* ------------------------------------------------- Bandeau informations */

.sfp-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: var(--sfp-facts-offset) 0 0;
	padding: 22px 10px;
	list-style: none;
	border: 1px solid var(--sfp-border);
	border-radius: var(--sfp-radius);
	background: var(--sfp-card);
	box-shadow: var(--sfp-shadow);
}

.sfp-fact {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 6px 18px;
	border-right: 1px solid var(--sfp-border);
}

.sfp-fact:last-child {
	border-right: 0;
}

.sfp-fact__icon {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--sfp-gold);
}

.sfp-fact__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sfp-fact__label {
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sfp-ink);
}

.sfp-fact__value {
	font-size: 0.85rem;
	line-height: 1.3;
	color: var(--sfp-muted);
}

/* ------------------------------------------------------ Bloc présentation */

.sfp-intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: 44px;
	align-items: start;
}

.sfp-intro__title {
	margin: 0 0 16px;
	font-family: Georgia, "Times New Roman", "Playfair Display", serif;
	font-size: clamp(1.4rem, 2.4vw, 1.85rem);
	font-weight: 400;
	line-height: 1.3;
	color: var(--sfp-ink);
}

.sfp-intro__text {
	margin: 0 0 20px;
	font-size: 0.94rem;
	line-height: 1.7;
	color: var(--sfp-muted);
}

/* Listes à coches (volontairement standardisées) */

.sfp-checklist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfp-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--sfp-ink);
}

.sfp-checklist li:last-child {
	margin-bottom: 0;
}

.sfp-check {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--sfp-gold);
}

.sfp-checklist--sm li {
	margin-bottom: 8px;
	font-size: 0.84rem;
	line-height: 1.45;
	color: var(--sfp-muted);
}

.sfp-checklist--sm .sfp-check {
	width: 13px;
	height: 13px;
	margin-top: 3px;
}

.sfp-plainlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfp-plainlist li {
	margin: 0 0 8px;
	font-size: 0.86rem;
	line-height: 1.5;
	color: var(--sfp-muted);
}

/* Encadré de droite */

.sfp-highlights {
	margin: 0;
	padding: 26px 26px 12px;
	list-style: none;
	border: 1px solid var(--sfp-border);
	border-radius: var(--sfp-radius);
	background: var(--sfp-card);
	box-shadow: var(--sfp-shadow);
}

.sfp-highlight {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 22px;
}

.sfp-highlight__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border: 1px solid var(--sfp-gold-line);
	border-radius: 50%;
	background: var(--sfp-gold-soft);
	color: var(--sfp-gold);
}

.sfp-highlight__body {
	display: block;
	min-width: 0;
}

.sfp-highlight__title {
	display: block;
	margin-bottom: 4px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sfp-ink);
}

.sfp-highlight__text {
	display: block;
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--sfp-muted);
}

/* ------------------------------------------------------------- Grilles */

.sfp-grid {
	display: grid;
	gap: 22px;
}

.sfp-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sfp-card {
	position: relative;
	padding: 26px 22px;
	border: 1px solid var(--sfp-border);
	border-radius: var(--sfp-radius);
	background: var(--sfp-card);
	box-shadow: var(--sfp-shadow);
}

.sfp-card--learn {
	text-align: center;
}

.sfp-card__icon {
	display: inline-flex;
	margin-bottom: 12px;
	color: var(--sfp-gold);
}

.sfp-card__title {
	margin: 0 0 8px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sfp-ink);
}

.sfp-card__text {
	margin: 0;
	font-size: 0.84rem;
	line-height: 1.55;
	color: var(--sfp-muted);
}

/* ------------------------------------------------------------- Galerie */

.sfp-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	padding: 18px;
	border: 1px solid var(--sfp-border);
	border-radius: var(--sfp-radius);
	background: var(--sfp-card);
	box-shadow: var(--sfp-shadow);
}

.sfp-gallery__item {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	aspect-ratio: 5 / 4;
	border: 0;
	border-radius: 10px;
	background: #f2eee6;
	cursor: zoom-in;
}

.sfp-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sfp-gallery__item:hover img,
.sfp-gallery__item:focus-visible img {
	transform: scale(1.07);
}

.sfp-gallery__item:focus-visible {
	outline: 2px solid var(--sfp-gold);
	outline-offset: 2px;
}

.sfp-gallery__zoom {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(28, 24, 16, 0.28);
	color: #fff;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sfp-gallery__item:hover .sfp-gallery__zoom,
.sfp-gallery__item:focus-visible .sfp-gallery__zoom {
	opacity: 1;
}

.sfp-gallery__item--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed var(--sfp-gold-line);
	background: #faf7f0;
	cursor: default;
}

.sfp-gallery__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-align: center;
	color: #b9ad91;
}

/* Lightbox */

.sfp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	background: rgba(20, 17, 12, 0.92);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sfp-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.sfp-lightbox__figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	text-align: center;
}

.sfp-lightbox__img {
	max-width: 100%;
	max-height: 82vh;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.sfp-lightbox__caption {
	margin-top: 14px;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.8);
}

.sfp-lightbox__btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.sfp-lightbox__btn:hover,
.sfp-lightbox__btn:focus-visible {
	background: var(--sfp-gold, #d4af37);
	border-color: var(--sfp-gold, #d4af37);
	color: #1c1c1c;
}

.sfp-lightbox__btn--prev {
	left: 3vw;
	top: 50%;
	transform: translateY(-50%);
}

.sfp-lightbox__btn--next {
	right: 3vw;
	top: 50%;
	transform: translateY(-50%);
}

.sfp-lightbox__btn--close {
	top: 3vh;
	right: 3vw;
}

/* ----------------------------------------------------------- Programme */

.sfp-card--step {
	padding-top: 36px;
	text-align: left;
}

.sfp-card--step .sfp-card__title {
	margin-bottom: 14px;
	text-align: center;
}

.sfp-step__number {
	position: absolute;
	top: -17px;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--sfp-gold);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.sfp-section--program .sfp-grid {
	margin-top: 34px;
}

/* --------------------------------------------------- Pour qui / Prérequis */

.sfp-two-cols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.sfp-card--side {
	display: flex;
	align-items: flex-start;
	gap: 18px;
}

.sfp-side__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 54px;
	height: 54px;
	border: 1px solid var(--sfp-gold-line);
	border-radius: 50%;
	background: var(--sfp-gold-soft);
	color: var(--sfp-gold);
}

.sfp-side__body {
	min-width: 0;
}

/* -------------------------------------------------------------- Atouts */

.sfp-perks {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfp-perk {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 22px;
	border-right: 1px solid var(--sfp-border);
}

.sfp-perk:last-child {
	border-right: 0;
}

.sfp-perk__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border: 1px solid var(--sfp-gold-line);
	border-radius: 50%;
	color: var(--sfp-gold);
}

.sfp-perk__body {
	min-width: 0;
}

.sfp-perk__title {
	display: block;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--sfp-ink);
}

.sfp-perk__text {
	display: block;
	font-size: 0.79rem;
	line-height: 1.45;
	color: var(--sfp-muted);
}

/* ---------------------------------------------------------------- Avis */

.sfp-section--avis .sfc-avis {
	padding: 0;
}

/* ------------------------------------------------------------ Bandeau CTA */

.sfp-cta {
	position: relative;
	padding: 34px 0;
	background:
		radial-gradient(circle at 12% 50%, rgba(255, 255, 255, 0.28), transparent 42%),
		linear-gradient(100deg, #e2c477 0%, #d2ab4d 45%, #c79b34 100%);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.sfp-cta--image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(226, 196, 119, 0.9), rgba(199, 155, 52, 0.85));
}

.sfp-cta__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
}

.sfp-cta__title {
	margin: 0 0 6px;
	font-family: Georgia, "Times New Roman", "Playfair Display", serif;
	font-size: clamp(1.3rem, 2.4vw, 1.75rem);
	font-weight: 400;
	line-height: 1.25;
	color: #3a2d10;
}

.sfp-cta__desc {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.5;
	color: #4c3c17;
}

.sfp-cta__button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
	padding: 15px 26px;
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 4px;
	background: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: #6b5418;
	box-shadow: 0 8px 20px rgba(90, 68, 16, 0.18);
	transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.sfp-cta__button svg {
	color: var(--sfp-gold);
	transition: transform 0.3s ease;
}

.sfp-cta__button:hover,
.sfp-cta__button:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(90, 68, 16, 0.26);
	color: #3a2d10;
}

.sfp-cta__button:hover svg {
	transform: translateX(3px);
}

/* --------------------------------------------------------- Responsive */

@media (max-width: 1024px) {
	.sfp-intro {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.sfp-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sfp-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sfp-perks {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 6px 0;
	}

	.sfp-perk:nth-child(2n) {
		border-right: 0;
	}
}

@media (max-width: 820px) {
	.sfp-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px 0;
		margin-top: 0;
	}

	.sfp-fact:nth-child(2n) {
		border-right: 0;
	}

	.sfp-two-cols {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfp-cta__inner {
		flex-direction: column;
		text-align: center;
	}
}

@media (max-width: 640px) {
	.sfp-section {
		padding: 34px 0;
	}

	.sfp-grid--4,
	.sfp-gallery,
	.sfp-perks {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfp-facts {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfp-fact,
	.sfp-perk {
		justify-content: flex-start;
		border-right: 0;
		border-bottom: 1px solid var(--sfp-border);
	}

	.sfp-fact:last-child,
	.sfp-perk:last-child {
		border-bottom: 0;
	}

	.sfp-heading {
		gap: 10px;
	}

	.sfp-flourish-wrap {
		display: none !important;
	}

	.sfp-highlights {
		padding: 20px 18px 6px;
	}

	.sfp-card--side {
		flex-direction: column;
		align-items: flex-start;
	}

	.sfp-lightbox__btn--prev {
		left: 10px;
	}

	.sfp-lightbox__btn--next {
		right: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sfp-gallery__item img,
	.sfp-cta__button,
	.sfp-lightbox {
		transition: none !important;
	}
}
