/* ============================
   🎨 Variables globales (formation)
============================ */
:root {
	--primary-color: #875e40;
	--secondary-color: #05121e;
	--primary-color-dark: #6c4a33;
	--text-dark: #333;
	--white: #fff;
	--light-gray: #f9f6f4;

	--shadow-light: 0 4px 12px rgba(0, 0, 0, 0.12);
	--shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.16);
	--shadow-strong: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ============================
   📐 Box Sizing (formation uniquement)
============================ */
.single-formation *,
.single-formation ::after,
.single-formation ::before {
	box-sizing: border-box; /* retiré le !important */
}

.formations-domaines,
.single-formation-content {
	background: var(--light-gray);
}

/* ============================
   🎨 Couleurs & Boutons
============================ */
.single-formation .text-primary-color {
	color: var(--primary-color);
}
.single-formation .btn-primary-color {
	background-color: var(--primary-color);
	border: none;
	color: var(--white);
}
.single-formation .btn-primary-color:hover {
	background-color: var(--primary-color-dark);
}
.single-formation .btn-outline-primary-color {
	border: 2px solid var(--primary-color);
	color: var(--primary-color);
}
.single-formation .btn-outline-primary-color:hover {
	background-color: var(--primary-color);
	color: var(--white);
}

/* ============================
   🔘 Icônes cerclées
============================ */
.single-formation .icon-circle {
	width: 70px;
	height: 70px;
	background-color: var(--primary-color);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	color: var(--white);
	font-size: 1.4rem;
}

/* ============================
   📦 Sidebar
============================ */

.single-formation .sidebar .sidebar-box {
	background: var(--white);
	border-left: 6px solid var(--primary-color);
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-light);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.single-formation .sidebar-box:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-2px);
}
.single-formation .sidebar .sidebar-box h2 {
	font-weight: 600;
	margin-bottom: 0.75rem;
}
.single-formation .sidebar .sidebar-box p,
.single-formation .sidebar .sidebar-box ul {
	margin: 0;
	font-size: 0.95rem;
	color: var(--text-dark);
}

/* Liens */
.single-formation .sidebar .sidebar-box .link {
	color: var(--primary-color);
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
}
.single-formation .sidebar .sidebar-box .link:hover {
	color: var(--primary-color-dark);
	text-decoration: underline;
}

/* Bloc qualité */
.single-formation .sidebar .highlight-box {
	background: linear-gradient(135deg, var(--primary-color), #a57858);
	color: var(--white);
	border-radius: 12px;
	padding: 1.75rem;
	margin-bottom: 2rem;
	box-shadow: var(--shadow-strong);
	position: relative;
	overflow: hidden;
}
.single-formation .sidebar .highlight-box::before {
	content: "";
	position: absolute;
	top: -30px;
	right: -30px;
	width: 100px;
	height: 100px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	z-index: 0;
}
.single-formation .sidebar .highlight-box h2,
.single-formation .sidebar .highlight-box h6,
.single-formation .sidebar .highlight-box p,
.single-formation .sidebar .highlight-box b {
	color: var(--white);
	position: relative;
	z-index: 1;
}
.single-formation .sidebar .highlight-box i {
	padding: 4px;
}

/* ============================
   🗂 Onglets
============================ */
.single-formation .nav-tabs {
	border-bottom: none;
	gap: 0.5rem;
}
.single-formation .nav-tabs .nav-link {
	font-weight: 600;
	color: var(--text-dark);
	border: none;
	background: #f9f9f9;
	border-radius: 6px 6px 0 0;
	padding: 0.75rem 1rem;
	transition: all 0.2s ease;
}
.single-formation .nav-tabs .nav-link:hover {
	background: #f1f1f1;
	color: var(--primary-color);
}
.single-formation .nav-tabs .nav-link.active {
	background: var(--white);
	color: var(--primary-color);
	border-left: 6px solid var(--primary-color);
	border-radius: 0;
	font-weight: 700;
}
.single-formation .tab-content {
	background: var(--white);
	padding: 1.5rem;
}

/* ============================
   Accordéon
============================ */
.single-formation .accordion-button {
	font-weight: 600;
	color: var(--text-dark);
	background: #f9f9f9;
	transition: all 0.2s ease;
}
.single-formation .accordion-button:not(.collapsed) {
	color: var(--primary-color);
	background: var(--white);
	border-left: 6px solid var(--primary-color);
}
.single-formation .accordion-item {
	border: none;
	border-bottom: 1px solid #eaeaea;
}

/* Affichage responsive */
@media (max-width: 767.98px) {
	.single-formation .nav-tabs,
	.single-formation .tab-content {
		display: none !important;
	}
}

/* ============================
   🖼 Images
============================ */
.single-formation .paiement-multi {
	box-shadow: var(--shadow-light);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.single-formation .paiement-multi:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-2px);
}
.single-formation .cover-img {
	max-height: 300px;
	width: 100%;
	object-fit: cover;
	border-radius: 8px;
}

/* ============================
   🧭 Breadcrumb
============================ */
.breadcrumb-area {
	background: linear-gradient(135deg, #05121e, #0c2236);
	padding: 3rem 0;
	position: relative;
}
.breadcrumb {
	background: transparent;
	padding: 0;
	margin-bottom: 0.75rem;
}
.breadcrumb-item + .breadcrumb-item::before {
	color: #ccc;
	content: "›";
	font-weight: bold;
}
.breadcrumb-link {
	color: #ddd;
	font-size: 0.9rem;
	font-weight: 500;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.2s ease;
}
.breadcrumb-link:hover {
	color: var(--primary-color);
	text-decoration: underline;
}
.breadcrumb-title {
	font-weight: 700;
	font-size: 2.2rem;
	color: #fff;
	border-left: 6px solid var(--primary-color);
	padding-left: 0.75rem;
	margin-top: 0.5rem;
}

/* ============================
   🖼 Logo formations
============================ */
.single-formation .logo_rassurance_formation {
	position: absolute;
	top: 10px;
	right: 10px;
	max-width: 120px;
	z-index: 2; /* abaissé pour ne pas gêner le menu burger */
}
.single-formation .logo_rassurance_formation img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
	.single-formation .logo_rassurance_formation {
		position: static;
		display: block;
		margin: 0 auto 15px;
		max-width: 120px;
	}
}

/* ============================
   📏 Ajustements Footer
============================ */
.single-formation .site-content,
.single-formation main {
	margin-bottom: 0;
	padding-bottom: 0;
}
.single-formation section.container:last-of-type {
	margin-bottom: 2rem;
}

/* ============================
   🔠 Typographie ajustée
============================ */
.single-formation .details {
	font-size: 1.2rem;
}

/* ============================
   Domain cards
============================ */

.domaine-card-container.row {
	margin-top: 0;
	padding: 0;
}

.domains-container {
	background: #2b2d4242;
	padding: 2rem 1rem;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
}

.domaine-card {
	background-color: #f9f6f4 !important; /* couleur initiale */
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
	transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
	border-radius: 12px;
	cursor: pointer;
}
.domaine-card:hover {
	background-color: #fff; /* passe au blanc au hover */
	transform: translateY(-6px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Icône ronde */
.domaine-card .icon-circle {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background-color: var(--secondary-color);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
	font-size: 2rem;
	margin-bottom: 15px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.domaine-card:hover .icon-circle {
	background-color: var(--primary-color);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.domaine-card:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Texte */
.domaine-card h5 {
	color: var(--text-dark) !important;
	font-weight: 600;
	margin-top: 10px;
}

.domaine-card:hover h5 {
	color: var(--primary-color) !important;
}

@media (min-width: 992px) {
	.domains-container {
		flex-wrap: nowrap; /* une seule ligne sur desktop */
	}
	.domaine-card-container {
		flex: 1; /* les cartes prennent la même largeur */
		max-width: 25%; /* 4 cartes par ligne */
	}
}

@media (max-width: 991px) {
	.domaine-card-container {
		flex: 1 1 calc(50% - 1rem); /* 2 cartes par ligne sur tablette */
	}
}

@media (max-width: 575px) {
	.domaine-card-container {
		flex: 1 1 100%; /* 1 carte par ligne sur mobile */
	}
	.domain-title {
		font-size: 2em !important;
	}
}

/* ============================
   Layout Formations par domaine (fixe + scroll)
============================ */

/* Corrige le layout principal */
.formations-domaines .container {
	display: block; /* on garde le flow normal */
}

.formations-obligatoires-container {
	background-color: var(--white);
}

.formations-obligatoires-container h5 {
	color: var(--secondary-color);
}

.formation-card-title {
	color: var(--secondary-color);
}

.formations-domaines aside {
	transition: top 0.2s ease;
	z-index: 10;
}

@media (max-width: 991px) {
	.formations-domaines aside {
		position: static !important;
		width: auto !important;
	}
}

@media (min-width: 992px) {
	.formations-domaines .row {
		display: flex;
		align-items: flex-start;
	}

	/* Colonne principale */
	.formations-domaines .col-lg-8 {
		flex: 0 0 70%;
		max-width: 70%;
	}

	/* Sidebar à droite */
	.formations-domaines .col-lg-4 {
		flex: 0 0 30%;
		max-width: 30%;
		padding-left: 2rem;
	}

	/* petite ombre visuelle pour démarquer le bloc */
	.formations-domaines aside .bg-light {
		background: #f9f6f4;
		border: 1px solid #e7e4e2;
		border-radius: 12px;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	}
}

/* Mobile : bloc au-dessus, sans sticky */
@media (max-width: 991px) {
	.formations-domaines aside {
		position: static;
		max-height: none;
		overflow: visible;
		margin-bottom: 2rem;
	}
}

/* Titre du bloc */
.formations-domaines aside h5 {
	font-size: 1.1rem;
	border-bottom: 2px solid var(--primary-color);
	padding-bottom: 0.5rem;
	margin-bottom: 1rem;
}

/* Liens de la liste */
.formations-domaines aside ul li a {
	color: var(--primary-color);
	display: block;
	padding: 0.25rem 0;
	transition: color 0.2s ease;
}
.formations-domaines aside ul li a:hover {
	color: var(--secondary-color);
	text-decoration: underline;
}

/* Empêche le contenu principal de passer sous le aside */
.formations-domaines .col-lg-4 {
	position: relative;
}

/* Réserve visuellement la place du aside quand il devient fixe */
.formations-domaines .aside-placeholder {
	width: 100%;
	height: 0; /* sera ajusté dynamiquement par JS */
}

.formations-domaines aside {
	transition: top 0.25s ease, box-shadow 0.25s ease;
	z-index: 20; /* passe au-dessus du contenu mais pas du header */
}

/* Optionnel : ombre douce quand le aside devient sticky */
.formations-domaines aside.is-sticky .bg-light {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Sur mobile : désactivation du sticky */
@media (max-width: 991px) {
	.formations-domaines aside {
		position: static !important;
		width: auto !important;
		z-index: 1;
	}
}

/* ============================
   Formation cards (page domaine)
============================ */
.formation-card {
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	overflow: hidden;
}

.formation-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Image de formation */
.formation-img {
	width: 100%;
	max-width: 240px;
	height: 160px;
	object-fit: cover;
	display: block;
	margin: 0 auto;
}

.formation-card .card-body {
	padding: 1rem;
}

/* Titre et texte */
.formation-card h3 {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-dark);
}
.formation-card p {
	font-size: 0.95rem;
	color: var(--text-dark);
}

/* Badges */
.formation-badge {
	background-color: var(--primary-color);
	color: var(--white);
	font-size: 0.85rem;
	font-weight: 500;
	padding: 0.4rem 0.75rem;
	border-radius: 12px;
	white-space: nowrap;
}

/* ============================
   Responsive
============================ */
@media (max-width: 992px) {
	.formation-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.formation-img {
		width: 100%;
		max-width: 320px;
		height: auto;
	}

	.formation-card .flex-grow-1 {
		padding: 1rem 0 0 0 !important;
	}

	.formation-card hr {
		width: 80%;
		margin: 0.5rem auto;
	}
}
/* ============================
   Fin formation.css
============================ */

/* Empêche tout débordement horizontal sur mobile */
html,
body {
	overflow-x: hidden;
}

/* Corrige le débordement des rows Bootstrap dans les conteneurs étroits */
.container,
.container-fluid {
	overflow-x: hidden;
}

/* Supprime le léger débordement lié à la combinaison row/col + p-3 sur mobile */
@media (max-width: 768px) {
	.formations-domaines .row {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.formations-domaines [class^="col-"],
	.formations-domaines [class*=" col-"] {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}
