/**
 * IFS Tabs — onglets de cours (front + éditeur).
 */
.ifs-tabs {
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin-inline: auto;
}

/* Navigation = cartes-images cliquables (image de fond + overlay + titre + tiret). */
.ifs-tabs__nav {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(0.75rem, 2vw, 1.75rem);
}

@media (max-width: 781px) {
	.ifs-tabs__nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.ifs-tabs__nav { grid-template-columns: 1fr; }
}

.ifs-tabs__tab {
	position: relative;
	appearance: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	background-color: var(--wp--preset--color--primary, #3558a2);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	color: #fff;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ifs-tabs__tab-overlay {
	position: absolute;
	inset: 0;
	border-radius: 4px;
	background: linear-gradient(to top, rgba(14, 29, 51, 0.8) 0%, rgba(14, 29, 51, 0.25) 45%, rgba(14, 29, 51, 0) 75%);
	transition: background 0.25s ease;
}

/* Flèche orange sous la carte active, pointant vers le panneau. */
.ifs-tabs__tab.is-active::after {
	content: "";
	position: absolute;
	bottom: -13px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 16px solid transparent;
	border-right: 16px solid transparent;
	border-top: 14px solid var(--wp--preset--color--orange, #ff9575);
	z-index: 3;
}

.ifs-tabs__tab-title {
	position: relative;
	z-index: 1;
	font-size: clamp(1.05rem, 1.4vw, 1.35rem);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	padding: 0 1rem 1.6rem;
}

.ifs-tabs__tab-title::after {
	content: "";
	display: block;
	width: 46px;
	height: 4px;
	margin: 0.75rem auto 0;
	background: var(--wp--preset--color--orange, #ff9575);
}

.ifs-tabs__tab:hover,
.ifs-tabs__tab:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(14, 29, 51, 0.25);
	outline: none;
}

.ifs-tabs__tab.is-active {
	box-shadow: 0 0 0 3px var(--wp--preset--color--orange, #ff9575);
}

.ifs-tabs__tab.is-active .ifs-tabs__tab-overlay {
	background: linear-gradient(to top, rgba(14, 29, 51, 0.85) 0%, rgba(53, 88, 162, 0.45) 60%, rgba(53, 88, 162, 0.15) 100%);
}

/* Panneau de l'onglet actif (fermé par défaut, s'ouvre au clic), fond gris. */
.ifs-tabs__panels { margin-top: clamp(1.25rem, 3vw, 2rem); }

.ifs-tabs__panel[hidden] { display: none; }

.ifs-tabs__panel {
	background: var(--wp--preset--color--light_gray, #f6f6f6);
	border-radius: 6px;
	padding: clamp(1.5rem, 4vw, 3rem);
}

.ifs-tabs__panel-title {
	margin: 0 0 1rem;
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--wp--preset--color--foreground, #0e1d33);
}

.ifs-tabs__desc { line-height: 1.7; }
.ifs-tabs__desc > :first-child { margin-top: 0; }
.ifs-tabs__desc > :last-child { margin-bottom: 0; }

.ifs-tabs__offers-label {
	margin: 1.75rem 0 1rem;
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	font-weight: 700;
	color: var(--wp--preset--color--orange, #ff9575);
}

.ifs-tabs__offers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.ifs-tabs__offer {
	background: #fff;
	border-left: 4px solid var(--wp--preset--color--green, #21AB88);
	border-radius: 3px;
	padding: 0.85rem 1.1rem;
	line-height: 1.5;
	box-shadow: 0 1px 4px rgba(14, 29, 51, 0.06);
}
.ifs-tabs__offer-sub { color: #5a6b80; }

/* Éditeur : montrer tous les panneaux empilés (pas de JS de bascule). */
.ifs-tabs--editor .ifs-tabs__panels--editor .ifs-tabs__panel { margin-top: 1rem; opacity: 0.85; }
