/* ==========================================================================
   CMS-WP — Shortcodes Components CSS
   Styles des composants visuels [cmswp_*].
   Toutes les couleurs utilisent les variables CSS du thème → surchargeable
   via thème enfant sans modifier ce fichier.

   @package CMS-WP
   @since   2.12.0
   ========================================================================== */

/* ─── Séparateur vague [cmswp_wave] ──────────────────────────────── */

.cmswp-wave {
	width: 100%;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	line-height: 0;
}

/* ─── Section avec vagues [cmswp_section_wave] ───────────────────── */

.cmswp-section-wave {
	position: relative;
	background: var(--cmswp-sw-bg, var(--cmswp-primary));
	color: var(--cmswp-sw-color, #fff);
	padding: 4rem 1.5rem;
	margin: 2.5rem 0;
	overflow: visible;
}

.cmswp-section-wave::before,
.cmswp-section-wave::after {
	content: '';
	position: absolute;
	left: 0;
	width: 100%;
	height: 50px;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	z-index: 1;
}

.cmswp-section-wave::before {
	top: -40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C300,120 400,0 600,60 C800,120 900,0 1200,60 L1200,120 L0,120 Z' fill='var(--cmswp-sw-bg)'/%3E%3C/svg%3E");
}

.cmswp-section-wave::after {
	bottom: -40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C300,0 400,120 600,60 C800,0 900,120 1200,60 L1200,0 L0,0 Z' fill='var(--cmswp-sw-bg)'/%3E%3C/svg%3E");
}

.cmswp-section-wave-inner {
	position: relative;
	z-index: 2;
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

.cmswp-section-wave-inner h2 { color: inherit; }

/* ─── Hero plein écran [cmswp_hero] ──────────────────────────────── */

.cmswp-hero {
	position: relative;
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.cmswp-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.5) 100%);
}

.cmswp-hero-overlay {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 3rem 1.5rem;
	max-width: 900px;
}

.cmswp-hero-title {
	font-family: var(--cmswp-font-heading);
	font-size: clamp(2.5rem, 7vw, 5rem);
	color: #fff;
	text-shadow: 0 2px 12px rgba(0,0,0,0.3);
	margin-bottom: .75rem;
	font-weight: 700;
	line-height: 1.1;
}

.cmswp-hero-subtitle {
	font-size: clamp(1rem, 3vw, 1.5rem);
	color: #fff;
	font-weight: 600;
	margin-bottom: 2rem;
	text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.cmswp-hero-cta {
	display: inline-block;
	padding: .875rem 2.5rem;
	background: var(--cmswp-primary);
	color: #fff;
	text-decoration: none;
	border-radius: var(--cmswp-radius, .5rem);
	font-weight: 600;
	font-size: 1.0625rem;
	transition: all .25s ease;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

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

/* ─── Slider circulaire [cmswp_slider] ───────────────────────────── */

.cmswp-slider-circular {
	position: relative;
	overflow: hidden;
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cmswp-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3rem;
	padding: 2rem;
	opacity: 0;
	transition: opacity .8s ease;
	pointer-events: none;
}

.cmswp-slide-active {
	opacity: 1;
	pointer-events: auto;
	position: relative;
}

.cmswp-slide-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: .15;
	z-index: 0;
}

.cmswp-slide-circle {
	flex-shrink: 0;
	width: 280px;
	height: 280px;
	border-radius: 50%;
	overflow: hidden;
	position: relative;
	z-index: 1;
	box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.cmswp-slide-circle img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: cmswp-rotate 25s linear infinite;
}

@keyframes cmswp-rotate {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.cmswp-slide-content {
	position: relative;
	z-index: 1;
	max-width: 440px;
}

.cmswp-slide-title {
	font-family: var(--cmswp-font-heading);
	font-size: clamp(2rem, 4vw, 3rem);
	color: var(--cmswp-primary);
	margin-bottom: .5rem;
	font-weight: 700;
	line-height: 1.15;
}

.cmswp-slide-desc {
	color: var(--cmswp-text-light, #475569);
	font-size: 1rem;
	margin-bottom: 1.25rem;
	line-height: 1.6;
}

.cmswp-slide-cta {
	display: inline-block;
	padding: .625rem 1.75rem;
	background: var(--cmswp-primary);
	color: #fff;
	text-decoration: none;
	border-radius: var(--cmswp-radius, .5rem);
	font-weight: 600;
	font-size: .9375rem;
	transition: all .25s ease;
}

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

.cmswp-slider-dots {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: .5rem;
	z-index: 5;
}

.cmswp-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--cmswp-primary);
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: background .2s;
}

.cmswp-slider-dot.active {
	background: var(--cmswp-primary);
}

/* ─── Tuiles mosaïque [cmswp_tuiles] ─────────────────────────────── */

.cmswp-tuiles {
	display: grid;
	grid-template-columns: repeat(var(--cmswp-tuiles-cols, 4), 1fr);
	gap: .5rem;
	max-width: 1100px;
	margin: 2rem auto;
}

.cmswp-tuile {
	position: relative;
	aspect-ratio: 1;
	border-radius: var(--cmswp-radius, .5rem);
	overflow: hidden;
	transition: transform .3s ease;
}

.cmswp-tuile:hover {
	transform: scale(1.03);
}

.cmswp-tuile-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cmswp-tuile-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: .75rem;
	background: linear-gradient(transparent, rgba(0,0,0,0.5));
	color: #fff;
	font-size: .8125rem;
	font-weight: 500;
}

.cmswp-tuile-stat {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-family: var(--cmswp-font-heading);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	color: #fff;
	text-align: center;
	text-shadow: 0 1px 4px rgba(0,0,0,0.1);
	padding: 1rem;
	line-height: 1.15;
}

.cmswp-tuile-text {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #fff;
	text-align: center;
	padding: 1rem;
	font-size: 1rem;
	font-weight: 500;
}

.cmswp-tuile-link {
	position: absolute;
	inset: 0;
	z-index: 2;
}

/* ─── Section kraft / cahier spirales [cmswp_kraft] ──────────────── */

.cmswp-kraft {
	position: relative;
	max-width: 900px;
	margin: 3rem auto;
	padding: 3rem 4rem 3rem 5rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E")
		, linear-gradient(135deg, #f5e6d3 0%, #ede0cc 50%, #e8d5bc 100%);
	border-radius: 4px;
	box-shadow: 2px 3px 12px rgba(0,0,0,0.08);
	font-style: italic;
	color: #2D3748;
	line-height: 1.8;
}

.cmswp-kraft-spirals {
	position: absolute;
	top: 1.5rem;
	bottom: 1.5rem;
	left: 1.75rem;
	width: 12px;
	background-image: repeating-linear-gradient(
		180deg,
		transparent 0px,
		transparent 14px,
		#a3917d 14px,
		#a3917d 16px,
		transparent 16px,
		transparent 24px,
		#b8a892 24px,
		#b8a892 36px,
		transparent 36px,
		transparent 38px
	);
	background-size: 100% 38px;
	border-radius: 6px;
	opacity: .45;
}

.cmswp-kraft-body {
	position: relative;
	z-index: 1;
}

.cmswp-kraft-body h2,
.cmswp-kraft-body h3 {
	font-family: var(--cmswp-font-heading);
	color: var(--cmswp-primary);
	font-style: normal;
	margin-top: 0;
}

.cmswp-kraft-body p {
	text-align: justify;
}

/* ─── Savoir-faire cards rondes [cmswp_savoir_faire] ─────────────── */

.cmswp-savoir-faire {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	max-width: 1100px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.cmswp-sf-card {
	flex: 0 1 190px;
	text-align: center;
}

.cmswp-sf-image {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	overflow: hidden;
	margin: 0 auto 1rem;
	background: var(--cmswp-bg-alt, #eef2f7);
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
	transition: transform .3s ease;
}

.cmswp-sf-card:hover .cmswp-sf-image {
	transform: scale(1.05);
}

.cmswp-sf-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cmswp-sf-title {
	font-family: var(--cmswp-font-heading);
	font-size: 1.75rem;
	color: var(--cmswp-primary);
	margin-bottom: .375rem;
	font-weight: 700;
}

.cmswp-sf-desc {
	font-size: .8125rem;
	color: var(--cmswp-text-light, #64748b);
	line-height: 1.5;
	margin-bottom: .5rem;
}

.cmswp-sf-link {
	font-size: .8125rem;
	color: var(--cmswp-primary);
	font-weight: 600;
	text-decoration: none;
}

.cmswp-sf-link:hover {
	color: var(--cmswp-primary-dark);
}

/* ─── LinkedIn [cmswp_linkedin] ──────────────────────────────────── */

.cmswp-linkedin {
	max-width: 900px;
	margin: 2rem auto;
}

.cmswp-linkedin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.cmswp-linkedin-title {
	font-family: var(--cmswp-font-heading);
	color: var(--cmswp-primary);
	font-size: 2rem;
	font-weight: 700;
}

.cmswp-linkedin-follow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: #0A66C2;
	color: #fff;
	text-decoration: none;
	padding: .75rem 1.75rem;
	border-radius: var(--cmswp-radius, .5rem);
	font-weight: 600;
	font-size: .9375rem;
	transition: all .25s ease;
	box-shadow: 0 2px 8px rgba(10,102,194,0.25);
}

.cmswp-linkedin-follow:hover {
	background: #004182;
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(10,102,194,0.35);
	color: #fff;
}

.cmswp-linkedin-posts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1rem;
}

.cmswp-linkedin-post iframe {
	border-radius: var(--cmswp-radius, .5rem);
}

.cmswp-linkedin-more {
	text-align: center;
	margin-top: 1.5rem;
}

.cmswp-linkedin-more a {
	color: var(--cmswp-primary);
	font-weight: 600;
	text-decoration: none;
}

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

/* ─── Animations d'entrée (générique) ────────────────────────────── */

.cmswp-animate-in {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .6s ease-out, transform .6s ease-out;
}

.cmswp-animate-in.cmswp-visible {
	opacity: 1;
	transform: translateY(0);
}

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

@media (max-width: 800px) {
	.cmswp-slide {
		flex-direction: column;
		text-align: center;
		gap: 1.5rem;
	}

	.cmswp-slide-circle {
		width: 200px;
		height: 200px;
	}

	.cmswp-slide-content {
		max-width: 100%;
	}
}

@media (max-width: 640px) {
	.cmswp-tuiles {
		grid-template-columns: repeat(2, 1fr);
	}

	.cmswp-section-wave {
		padding: 2rem 1rem;
		margin: 1.5rem 0;
	}

	.cmswp-kraft {
		padding: 2rem 1.5rem 2rem 3rem;
		margin: 1.5rem 1rem;
	}

	.cmswp-sf-card {
		flex: 0 1 140px;
	}

	.cmswp-sf-image {
		width: 120px;
		height: 120px;
	}

	.cmswp-sf-title {
		font-size: 1.375rem;
	}

	.cmswp-hero {
		min-height: 50vh;
	}

	.cmswp-linkedin-header {
		flex-direction: column;
		text-align: center;
	}
}

@media print {
	.cmswp-slide-circle img { animation: none !important; }
	.cmswp-wave, .cmswp-section-wave::before, .cmswp-section-wave::after { display: none; }
}
