/*
 * Appel à l'action — Kahel · CTA panel.
 */

.kahel-cta-section {
	padding-top: clamp(20px, 2.5vw, 36px);
	padding-bottom: clamp(32px, 4vw, 56px);
}

.kahel-cta-section .kahel-cta-panel {
	position: relative;
	display: grid;
	grid-template-columns: var(--wp--custom--editorial--cta-columns);
	gap: var(--wp--custom--editorial--cta-gap);
	align-items: end;
	padding: var(--wp--custom--editorial--cta-padding);
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--wp--custom--editorial--cta-radius);
	color: var(--wp--preset--color--ink);
}

.kahel-cta-section .kahel-cta-panel.has-cream-color {
	color: var(--wp--preset--color--cream);
}

.kahel-cta-section .kahel-cta-title {
	max-width: var(--wp--custom--editorial--cta-title-max);
	color: inherit;
}

/* Le gras est orange partout ; sur un panneau déjà orange ou clair, il prend une teinte qui se lit. */
.kahel-cta-section .kahel-cta-panel.is-orange .kahel-cta-title strong {
	color: var(--wp--preset--color--cream);
}

.kahel-cta-section .kahel-cta-panel.is-apricot .kahel-cta-title strong {
	color: var(--wp--preset--color--orange-deep);
}

.kahel-cta-section .kahel-cta-panel.is-leaf .kahel-cta-title strong {
	color: var(--wp--preset--color--apricot);
}

/* Le surtitre prend la couleur du texte du panneau, trait compris. */
.kahel-cta-section .kahel-cta-kicker {
	color: currentColor;
}

.kahel-cta-section .kahel-cta-kicker::before {
	background: currentColor;
}

.kahel-cta-section .kahel-cta-panel.is-ink .kahel-cta-kicker {
	color: var(--wp--preset--color--orange);
}

.kahel-cta-section .kahel-cta-copy {
	margin: 0 0 var(--wp--custom--editorial--cta-copy-margin-bottom);
	font-size: 1.05rem;
	line-height: 1.65;
}

.kahel-cta-section .kahel-cta-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--custom--editorial--cta-actions-gap);
	align-items: center;
}

.kahel-cta-section .kahel-cta-links .wp-block-buttons {
	margin: 0;
}

/* Le bouton principal de Kahel : crème sur encre, et l'inverse sur panneau sombre. */
.kahel-cta-section .kahel-cta-primary .wp-block-button__link {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

.kahel-cta-section .kahel-cta-panel.is-ink .kahel-cta-primary .wp-block-button__link,
.kahel-cta-section .kahel-cta-panel.is-leaf .kahel-cta-primary .wp-block-button__link {
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--ink);
}

.kahel-cta-section .kahel-cta-text-link {
	margin: 0;
	font-weight: 850;
}

.kahel-cta-section .kahel-cta-text-link a {
	color: inherit;
	text-decoration: none;
}

/* L'anneau qui tourne dans l'angle. */
.kahel-cta-section .kahel-cta-anneau {
	position: absolute;
	z-index: -1;
	width: clamp(220px, 34vw, 460px);
	aspect-ratio: 1;
	right: -8%;
	top: -38%;
	border: clamp(26px, 4vw, 54px) solid currentColor;
	border-radius: 50%;
	border-right-color: transparent;
	opacity: 0.1;
	pointer-events: none;
	animation: kahel-anneau-cta 22s linear infinite;
}

@keyframes kahel-anneau-cta {
	to {
		rotate: 360deg;
	}
}

@media (max-width: 900px) {
	.kahel-cta-section .kahel-cta-panel {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 620px) {
	.kahel-cta-section .kahel-cta-panel {
		border-radius: var(--wp--custom--editorial--radius-mobile);
	}
}

@media (prefers-reduced-motion: reduce) {
	.kahel-cta-section .kahel-cta-anneau {
		animation: none;
	}
}
