/*
Theme Name: CMS-WP
Author: Cavac
Author URI: https://www.coop-cavac.fr
Description: Thème WordPress multi-sites Cavac.
Version: 2.8.2
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: cms-wp
*/

/* ==========================================================================
   CSS VARIABLES — Configurable via admin (Réglages → Identité du site)
   ========================================================================== */

:root {
	/* Couleurs principales — écrasées dynamiquement par cmswp_inline_css() */
	--cmswp-primary: #2563eb;
	--cmswp-primary-dark: #1d4ed8;
	--cmswp-primary-light: #3b82f6;
	--cmswp-secondary: #10b981;
	--cmswp-secondary-dark: #059669;
	--cmswp-accent: #f59e0b;
	--cmswp-text: #1e293b;
	--cmswp-text-light: #64748b;
	--cmswp-bg: #ffffff;
	--cmswp-bg-alt: #f8fafc;
	--cmswp-border: #e2e8f0;
	--cmswp-danger: #ef4444;
	--cmswp-success: #22c55e;
	--cmswp-warning: #f59e0b;

	/* Typographie */
	--cmswp-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--cmswp-font-heading: var(--cmswp-font-body);

	/* Espacements */
	--cmswp-radius: 0.5rem;
	--cmswp-radius-lg: 1rem;
	--cmswp-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	--cmswp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

	/* Transitions */
	--cmswp-transition: 0.3s ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

body {
	font-family: var(--cmswp-font-body);
	color: var(--cmswp-text);
	background-color: var(--cmswp-bg);
	line-height: 1.6;
}

a {
	color: var(--cmswp-primary);
	text-decoration: none;
	transition: color var(--cmswp-transition);
}

a:hover {
	color: var(--cmswp-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cmswp-font-heading);
	font-weight: 700;
	line-height: 1.3;
	color: var(--cmswp-text);
}

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.cmswp-navbar {
	background: var(--cmswp-bg);
	box-shadow: var(--cmswp-shadow);
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	transition: padding var(--cmswp-transition), box-shadow var(--cmswp-transition);
	z-index: 1030;
}

.cmswp-navbar.scrolled {
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
	box-shadow: var(--cmswp-shadow-lg);
}

.cmswp-navbar .navbar-brand {
	display: flex;
	align-items: center;
	gap: .625rem;
	text-decoration: none;
}

.cmswp-navbar .navbar-brand img {
	max-height: 50px;
	min-width: 50px;
	height: auto;
	width: auto;
	display: block;
	transition: max-height var(--cmswp-transition);
}

.cmswp-navbar.scrolled .navbar-brand img {
	max-height: 38px;
}

.cmswp-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.cmswp-brand-name {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--cmswp-text);
}

.cmswp-brand-tagline {
	font-size: .75rem;
	color: var(--cmswp-text-light);
	font-weight: 400;
	letter-spacing: .01em;
}

@media (max-width: 575.98px) {
	.cmswp-brand-tagline { display: none; }
	.cmswp-brand-name { font-size: 1rem; }
}

.cmswp-navbar .nav-link {
	color: var(--cmswp-text) !important;
	font-weight: 500;
	padding: 0.5rem 1rem !important;
	transition: color var(--cmswp-transition), background-color var(--cmswp-transition);
	border-radius: var(--cmswp-radius);
}

.cmswp-navbar .nav-link:hover,
.cmswp-navbar .nav-link.active {
	color: var(--cmswp-primary) !important;
}

/* Dropdown : fond clair, couleur au survol */
.cmswp-navbar .dropdown-menu {
	border: 1px solid var(--cmswp-border);
	border-radius: var(--cmswp-radius);
	box-shadow: var(--cmswp-shadow-lg);
	background: var(--cmswp-bg);
	padding: 0.5rem 0;
	min-width: 220px;
}

.cmswp-navbar .dropdown-item {
	color: var(--cmswp-text);
	padding: 0.5rem 1.25rem;
	font-weight: 500;
	transition: all var(--cmswp-transition);
}

.cmswp-navbar .dropdown-item:hover,
.cmswp-navbar .dropdown-item:focus {
	color: #fff;
	background: var(--cmswp-primary);
}

.cmswp-navbar .dropdown-item.active {
	color: #fff;
	background: var(--cmswp-primary);
}

.cmswp-navbar .dropdown-item i.bi {
	opacity: 0.7;
	font-size: 0.85em;
}

.cmswp-navbar .dropdown-header {
	color: var(--cmswp-text-light);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.5rem 1.25rem 0.25rem;
}

/* Dropdown au survol (desktop) */
@media (min-width: 992px) {
	.cmswp-navbar .dropdown:hover > .dropdown-menu {
		display: block;
		margin-top: 0;
	}
}

/* Alignement vertical des icônes Bootstrap */
.bi {
	vertical-align: -0.125em;
}

/* Icônes dans les nav-link top-level */
.cmswp-navbar .nav-link i.bi {
	font-size: 0.9em;
}

/* ==========================================================================
   BURGER ANIMÉ + MENU MOBILE
   ========================================================================== */

/* ─── Burger button ──────────────────────────────────────────────── */

.cmswp-burger {
	display: none; /* visible via d-lg-none dans le HTML */
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: var(--cmswp-radius);
	background: transparent;
	cursor: pointer;
	padding: 0;
	z-index: 1051;
	-webkit-tap-highlight-color: transparent;
}

.cmswp-burger-line {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--cmswp-text);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.cmswp-burger.open .cmswp-burger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.cmswp-burger.open .cmswp-burger-line:nth-child(2) {
	opacity: 0;
}

.cmswp-burger.open .cmswp-burger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile nav panel ───────────────────────────────────────────── */

.cmswp-nav-mobile {
	position: fixed;
	top: 0;
	right: 0;
	width: 300px;
	max-width: 85vw;
	height: 100vh;
	background: var(--cmswp-bg);
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	z-index: 1050;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.cmswp-nav-mobile.open {
	transform: translateX(0);
}

.cmswp-nav-mobile-body {
	padding: 5rem 1.5rem 2rem;
}

.cmswp-nav-mobile .navbar-nav {
	flex-direction: column;
}

.cmswp-nav-mobile .nav-link {
	color: var(--cmswp-text) !important;
	font-weight: 500;
	padding: 0.75rem 0 !important;
	border-bottom: 1px solid var(--cmswp-border);
	font-size: 1rem;
}

.cmswp-nav-mobile .nav-link:hover,
.cmswp-nav-mobile .nav-link.active {
	color: var(--cmswp-primary) !important;
}

.cmswp-nav-mobile .dropdown-menu {
	position: static !important;
	border: none;
	box-shadow: none;
	padding: 0 0 0 1rem;
	background: transparent;
	display: block;
}

.cmswp-nav-mobile .dropdown-item {
	padding: 0.5rem 0;
	font-size: 0.9375rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ─── Overlay ────────────────────────────────────────────────────── */

.cmswp-nav-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1049;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.cmswp-nav-overlay.open {
	opacity: 1;
	pointer-events: auto;
}

/* ─── Responsive display ─────────────────────────────────────────── */

@media (max-width: 991.98px) {
	.cmswp-burger { display: flex; }
}

/* ==========================================================================
   HERO / SLIDER
   ========================================================================== */

.cmswp-hero {
	position: relative;
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	overflow: hidden;
}

.cmswp-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
	z-index: 1;
}

.cmswp-hero .hero-content {
	position: relative;
	z-index: 2;
	max-width: 800px;
	padding: 2rem;
}

.cmswp-hero h1 {
	color: #fff;
	font-size: clamp(2rem, 5vw, 3.5rem);
	margin-bottom: 1rem;
}

.cmswp-hero p {
	font-size: clamp(1rem, 2vw, 1.25rem);
	margin-bottom: 2rem;
	opacity: 0.9;
}

/* Carousel slides */
.cmswp-slider .carousel-item {
	min-height: 70vh;
	background-size: cover;
	background-position: center;
}

.cmswp-slider .carousel-caption {
	bottom: 50%;
	transform: translateY(50%);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.cmswp-section {
	padding: 5rem 0;
}

.cmswp-section-alt {
	background-color: var(--cmswp-bg-alt);
}

.cmswp-section-title {
	text-align: center;
	margin-bottom: 3rem;
}

.cmswp-section-title h2 {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	margin-bottom: 0.75rem;
}

.cmswp-section-title p {
	color: var(--cmswp-text-light);
	max-width: 600px;
	margin: 0 auto;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.cmswp-card {
	background: var(--cmswp-bg);
	border: 1px solid var(--cmswp-border);
	border-radius: var(--cmswp-radius);
	box-shadow: var(--cmswp-shadow);
	transition: transform var(--cmswp-transition), box-shadow var(--cmswp-transition);
	overflow: hidden;
}

.cmswp-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--cmswp-shadow-lg);
}

.cmswp-card-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.cmswp-card-body {
	padding: 1.5rem;
}

.cmswp-card-meta {
	font-size: 0.85rem;
	color: var(--cmswp-text-light);
	margin-bottom: 0.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-cmswp {
	background-color: var(--cmswp-primary);
	border-color: var(--cmswp-primary);
	color: #fff;
	border-radius: var(--cmswp-radius);
	padding: 0.625rem 1.5rem;
	font-weight: 500;
	transition: all var(--cmswp-transition);
}

.btn-cmswp:hover {
	background-color: var(--cmswp-primary-dark);
	border-color: var(--cmswp-primary-dark);
	color: #fff;
	transform: translateY(-1px);
}

.btn-cmswp-outline {
	background: transparent;
	border: 2px solid var(--cmswp-primary);
	color: var(--cmswp-primary);
	border-radius: var(--cmswp-radius);
	padding: 0.5rem 1.5rem;
	font-weight: 500;
	transition: all var(--cmswp-transition);
}

.btn-cmswp-outline:hover {
	background-color: var(--cmswp-primary);
	color: #fff;
}

.btn-cmswp-secondary {
	background-color: var(--cmswp-secondary);
	border-color: var(--cmswp-secondary);
	color: #fff;
	border-radius: var(--cmswp-radius);
	padding: 0.625rem 1.5rem;
	font-weight: 500;
	transition: all var(--cmswp-transition);
}

.btn-cmswp-secondary:hover {
	background-color: var(--cmswp-secondary-dark);
	border-color: var(--cmswp-secondary-dark);
	color: #fff;
}

/* ==========================================================================
   FORMULAIRE, CARTE, ESPACE MEMBRES → assets/css/contact.css (conditionnel)
   ========================================================================== */

/* ==========================================================================
   FOOTER
   ========================================================================== */

.cmswp-footer {
	background-color: var(--cmswp-text);
	color: #cbd5e1;
	padding: 3rem 0 1.5rem;
}

.cmswp-footer h5 {
	color: #fff;
	font-size: 1.1rem;
	margin-bottom: 1rem;
}

.cmswp-footer a {
	color: #94a3b8;
	transition: color var(--cmswp-transition);
}

.cmswp-footer a:hover {
	color: #fff;
}

.cmswp-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 1.5rem;
	margin-top: 2rem;
	font-size: 0.85rem;
	color: #64748b;
}

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */

.cmswp-back-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--cmswp-primary);
	color: #fff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all var(--cmswp-transition);
	z-index: 1000;
	cursor: pointer;
	box-shadow: var(--cmswp-shadow-lg);
}

.cmswp-back-to-top.visible {
	opacity: 1;
	visibility: visible;
}

.cmswp-back-to-top:hover {
	background: var(--cmswp-primary-dark);
	transform: translateY(-2px);
}

/* ==========================================================================
   ACTUALITÉS
   ========================================================================== */

.cmswp-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 2rem;
}

.cmswp-post-date {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.85rem;
	color: var(--cmswp-text-light);
}

.cmswp-post-category {
	display: inline-block;
	background-color: var(--cmswp-primary);
	color: #fff;
	padding: 0.15rem 0.625rem;
	border-radius: 2rem;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
}

/* ==========================================================================
   PARTENAIRES
   ========================================================================== */

.cmswp-partners {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 2rem;
}

.cmswp-partners img {
	max-height: 60px;
	width: auto;
	opacity: 0.5;
	transition: all var(--cmswp-transition);
}

.cmswp-partners img:hover {
	opacity: 1;
}

.cmswp-partners a {
	cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 991.98px) {
	.cmswp-hero {
		min-height: 50vh;
	}

	.cmswp-section {
		padding: 3rem 0;
	}

	.cmswp-post-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 575.98px) {
	.cmswp-hero h1 {
		font-size: 1.75rem;
	}

	.cmswp-section-title h2 {
		font-size: 1.5rem;
	}

	.cmswp-card-img {
		height: 160px;
	}
}

/* ==========================================================================
   UTILITAIRES
   ========================================================================== */

.cmswp-content-private {
	border: 2px dashed var(--cmswp-warning);
	padding: 2rem;
	border-radius: var(--cmswp-radius);
	text-align: center;
	background: #fffbeb;
}

.cmswp-badge-private {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	background: #fef3c7;
	color: #92400e;
	padding: 0.15rem 0.5rem;
	border-radius: 2rem;
	font-size: 0.75rem;
	font-weight: 500;
}

.cmswp-pagination .page-link {
	color: var(--cmswp-primary);
	border-radius: var(--cmswp-radius);
}

.cmswp-pagination .page-item.active .page-link {
	background-color: var(--cmswp-primary);
	border-color: var(--cmswp-primary);
}

/* Animation d'apparition — système enrichi (V5) */
.cmswp-appear {
	opacity: 0;
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.cmswp-appear.up { transform: translateY(30px); }
.cmswp-appear.left { transform: translateX(40px); }
.cmswp-appear.visible {
	opacity: 1;
	transform: translate(0, 0);
}

/* Rétrocompatibilité .cmswp-fade-in */
.cmswp-fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.cmswp-fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Nav mobile offcanvas (V6) */
.cmswp-offcanvas {
	width: 280px !important;
	background: var(--cmswp-bg);
}

.cmswp-offcanvas .nav-link {
	padding: 0.85rem 1.25rem !important;
	border-bottom: 1px solid var(--cmswp-border);
	font-weight: 500;
	color: var(--cmswp-text) !important;
}

.cmswp-offcanvas .nav-link:hover {
	color: var(--cmswp-primary) !important;
	background: var(--cmswp-bg-alt);
}

.cmswp-offcanvas .offcanvas-header {
	border-bottom: 1px solid var(--cmswp-border);
	padding: 1rem 1.25rem;
}

/* Parallaxe hero (V4) */
.cmswp-hero.parallax {
	will-change: background-position;
}

/* Prose — limite la largeur du texte dans les layouts larges (V3) */
.cmswp-prose {
	max-width: 75ch;
}

.cmswp-fullwidth .cmswp-prose {
	margin-inline: auto;
	padding-inline: 1.5rem;
}

/* Sidebar (V3) */
.cmswp-sidebar-title {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--cmswp-primary);
}

.cmswp-sidebar-nav li {
	margin-bottom: 0.25rem;
}

.cmswp-sidebar-nav a {
	display: block;
	padding: 0.4rem 0.75rem;
	color: var(--cmswp-text);
	border-radius: var(--cmswp-radius);
	transition: all var(--cmswp-transition);
}

.cmswp-sidebar-nav a:hover,
.cmswp-sidebar-nav .current_page_item > a {
	background: var(--cmswp-bg-alt);
	color: var(--cmswp-primary);
}

/* Pièces jointes — bloc front-end */
.cmswp-attachments-block {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--cmswp-border);
}

.cmswp-attachments-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--cmswp-text);
}

.cmswp-attachments-grid {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cmswp-att-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: var(--cmswp-bg-alt);
	border: 1px solid var(--cmswp-border);
	border-radius: var(--cmswp-radius);
	transition: border-color var(--cmswp-transition), box-shadow var(--cmswp-transition);
}

.cmswp-att-card:hover {
	border-color: var(--cmswp-primary-light);
	box-shadow: var(--cmswp-shadow);
}

.cmswp-att-card-icon {
	font-size: 1.75rem;
	line-height: 1;
	flex-shrink: 0;
}

.cmswp-att-card-info {
	flex: 1;
	min-width: 0;
}

.cmswp-att-card-title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cmswp-att-card-meta {
	font-size: 0.8rem;
	color: var(--cmswp-text-light);
	margin-top: 0.15rem;
}

.cmswp-att-card-actions {
	display: flex;
	gap: 0.5rem;
	flex-shrink: 0;
}

@media (max-width: 576px) {
	.cmswp-att-card {
		flex-wrap: wrap;
	}
	.cmswp-att-card-actions {
		width: 100%;
		justify-content: flex-end;
	}
}

/* Séparateurs SVG entre sections (V7) */
.cmswp-section-divider {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	z-index: 1;
}
.cmswp-section-divider svg {
	display: block;
	width: 100%;
	height: 50px;
}

/* Ombres internes de section (V7) */
.cmswp-section-shadow-top {
	box-shadow: inset 0 8px 16px -8px rgba(0, 0, 0, 0.08);
}
.cmswp-section-shadow-bottom {
	box-shadow: inset 0 -8px 16px -8px rgba(0, 0, 0, 0.08);
}

/* Wrap de section avec fond personnalisé */
.cmswp-section-wrap {
	overflow: hidden;
}
.cmswp-section-wrap > .cmswp-section {
	position: relative;
	z-index: 2;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.cmswp-breadcrumbs .breadcrumb {
	background: none;
	padding: 0;
	margin-bottom: 1.5rem;
	font-size: 0.85rem;
}

.cmswp-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
	content: "›";
	color: var(--cmswp-text-light);
}

.cmswp-breadcrumbs .breadcrumb-item a {
	color: var(--cmswp-text-light);
	text-decoration: none;
}

.cmswp-breadcrumbs .breadcrumb-item a:hover {
	color: var(--cmswp-primary);
}

/* ==========================================================================
   CONTENU DES PAGES (importé ou éditeur)
   ========================================================================== */

.cmswp-page-content {
	line-height: 1.8;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.cmswp-page-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--cmswp-radius);
}

/* WordPress Block — alignements images */
.cmswp-page-content .aligncenter,
.cmswp-page-content .wp-block-image.is-style-default,
.cmswp-page-content .wp-block-image:not(.alignleft):not(.alignright) {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.cmswp-page-content .aligncenter img {
	margin-left: auto;
	margin-right: auto;
	display: block;
}

.cmswp-page-content .alignleft {
	float: left;
	margin: 0.5rem 1.5rem 1rem 0;
	max-width: 50%;
}

.cmswp-page-content .alignright {
	float: right;
	margin: 0.5rem 0 1rem 1.5rem;
	max-width: 50%;
}

.cmswp-page-content .wp-block-image {
	margin: 1.5rem 0;
}

.cmswp-page-content .wp-block-image figcaption {
	font-size: 0.85rem;
	color: var(--cmswp-text-light);
	text-align: center;
	margin-top: 0.5rem;
}

.cmswp-page-content figure {
	margin: 1.5rem 0;
}

.cmswp-page-content figure.aligncenter {
	display: table;
	margin-left: auto;
	margin-right: auto;
}

/* WordPress Block — galerie, colonnes, séparateur */
.cmswp-page-content .wp-block-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cmswp-page-content .wp-block-columns {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.cmswp-page-content .wp-block-column {
	flex: 1;
	min-width: 200px;
}

.cmswp-page-content .wp-block-separator {
	border: none;
	border-top: 2px solid var(--cmswp-border);
	margin: 2rem 0;
}

/* Clear floats */
.cmswp-page-content::after {
	content: '';
	display: table;
	clear: both;
}

.cmswp-page-content h1,
.cmswp-page-content h2,
.cmswp-page-content h3 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

.cmswp-page-content h2 { font-size: 1.5rem; }
.cmswp-page-content h3 { font-size: 1.25rem; }

.cmswp-page-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.cmswp-page-content table td,
.cmswp-page-content table th {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--cmswp-border);
}

.cmswp-page-content iframe,
.cmswp-page-content video,
.cmswp-page-content embed {
	max-width: 100%;
}

.cmswp-page-content > div {
	max-width: 100%;
	overflow-x: auto;
}

/* Contenu importé : gérer les structures Bootstrap/CMS résiduelles */
.cmswp-page-content .row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.cmswp-page-content [class*="col-"] {
	flex: 1;
	min-width: 250px;
}

.cmswp-page-content .container,
.cmswp-page-content .container-fluid {
	max-width: 100%;
	padding: 0;
}

/* Sections importées sans style : espacement naturel */
.cmswp-page-content > section {
	margin-bottom: 2rem;
}

.cmswp-breadcrumbs .breadcrumb-item.active {
	color: var(--cmswp-text);
}

/* ==========================================================================
   ACCESSIBILITÉ — Skip link
   ========================================================================== */

.cmswp-skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 9999;
	background: var(--cmswp-primary);
	color: #fff;
	padding: 0.5rem 1rem;
	border-radius: var(--cmswp-radius);
	text-decoration: none;
	font-weight: 500;
}

.cmswp-skip-link:focus {
	top: 0.5rem;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */

.cmswp-topbar {
	background: var(--cmswp-primary);
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.8rem;
	padding: 0.375rem 0;
	transition: transform var(--cmswp-transition);
}

.cmswp-topbar a {
	color: #fff;
	text-decoration: none;
	font-weight: 500;
}

.cmswp-topbar a:hover {
	color: rgba(255, 255, 255, 0.8);
}

.cmswp-topbar-right {
	display: flex;
	gap: 1.5rem;
	align-items: center;
}

@media (max-width: 575.98px) {
	.cmswp-topbar-left { display: none; }
}

/* ==========================================================================
   BOUTON CONTACT FLOTTANT
   ========================================================================== */

.cmswp-floating-contact {
	position: fixed;
	bottom: 2rem;
	right: 6rem;
	background: var(--cmswp-primary);
	color: #fff;
	border-radius: 2rem;
	padding: 0.625rem 1.25rem;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	z-index: 1000;
	box-shadow: var(--cmswp-shadow-lg);
	transition: all var(--cmswp-transition);
}

.cmswp-floating-contact:hover {
	background: var(--cmswp-primary-dark);
	color: #fff;
	transform: translateY(-2px);
}

@media (max-width: 575.98px) {
	.cmswp-floating-contact span { display: none; }
	.cmswp-floating-contact {
		width: 44px;
		height: 44px;
		border-radius: 50%;
		padding: 0;
		justify-content: center;
	}
}

/* ==========================================================================
   CITATION DU DIRIGEANT
   ========================================================================== */

.cmswp-quote {
	display: flex;
	gap: 2rem;
	align-items: center;
	max-width: 800px;
	margin: 0 auto;
}

.cmswp-quote-photo {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--cmswp-primary);
}

.cmswp-quote blockquote {
	font-size: 1.1rem;
	font-style: italic;
	color: var(--cmswp-text);
	border-left: 4px solid var(--cmswp-primary);
	padding-left: 1.5rem;
	margin: 0;
	line-height: 1.7;
}

.cmswp-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-style: normal;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--cmswp-primary);
}

.cmswp-quote cite span {
	font-weight: 400;
	color: var(--cmswp-text-light);
}

@media (max-width: 575.98px) {
	.cmswp-quote { flex-direction: column; text-align: center; }
	.cmswp-quote blockquote { border-left: none; padding-left: 0; }
}

/* ==========================================================================
   CHIFFRES CLÉS
   ========================================================================== */

.cmswp-figures {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2rem;
}

.cmswp-figure-item {
	text-align: center;
	min-width: 150px;
}

.cmswp-figure-number {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	color: var(--cmswp-primary);
	line-height: 1.2;
}

.cmswp-figure-label {
	font-size: 0.9rem;
	color: var(--cmswp-text-light);
	margin-top: 0.25rem;
}

/* ==========================================================================
   VIDÉO YOUTUBE (Facade)
   ========================================================================== */

.cmswp-video-facade {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	background: #000;
	border-radius: var(--cmswp-radius);
	overflow: hidden;
	cursor: pointer;
}

.cmswp-video-facade img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cmswp-video-facade::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 68px;
	height: 48px;
	background: rgba(255, 0, 0, 0.85);
	border-radius: 12px;
	pointer-events: none;
}

.cmswp-video-facade::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-46%, -50%);
	border-style: solid;
	border-width: 10px 0 10px 18px;
	border-color: transparent transparent transparent #fff;
	z-index: 1;
	pointer-events: none;
}

/* ==========================================================================
   CARD HOVER ENRICHI
   ========================================================================== */

.cmswp-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--cmswp-shadow-lg);
	border-color: var(--cmswp-primary-light);
}

/* ==========================================================================
   DARK MODE (préférence système)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
	:root {
		--cmswp-text: #e2e8f0;
		--cmswp-text-light: #94a3b8;
		--cmswp-bg: #0f172a;
		--cmswp-bg-alt: #1e293b;
		--cmswp-border: #334155;
		--cmswp-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
		--cmswp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
	}

	body { color-scheme: dark; }

	.cmswp-navbar { background: var(--cmswp-bg); }
	.cmswp-navbar .dropdown-menu { background: var(--cmswp-bg-alt); border-color: var(--cmswp-border); }
	.cmswp-navbar .dropdown-item { color: var(--cmswp-text); }
	.cmswp-card { background: var(--cmswp-bg); }
	.cmswp-footer { background: #020617; }

	.cmswp-content-private { background: #422006; }
	.cmswp-badge-private { background: #422006; color: #fbbf24; }

	.cmswp-partners img { opacity: 0.4; }
	.cmswp-partners img:hover { opacity: 1; }

	img { opacity: 0.9; }
}
