/*
 * Responsive awaiken-portfolio carousel.
 * The Blog Posts class names are intentional: Builtup's .latest-blog-post
 * overrides continue to style image hover and button typography.
 */

.norfil-portfolio-carousel {
	--norfil-carousel-gap: 30px;
	--norfil-slides-per-view: 3;
	--norfil-image-ratio: 1 / 0.65;
	--norfil-control-size: 48px;
	position: relative;
	width: 100%;
}

.norfil-carousel__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	width: 100%;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.norfil-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.norfil-carousel__viewport:focus-visible {
	outline: 3px solid var(--accent-color, #ffb703);
	outline: 3px solid color-mix(in srgb, var(--accent-color, #ffb703) 75%, transparent);
	outline-offset: 5px;
}

.norfil-portfolio-carousel > .ekit-wid-con {
	width: 100%;
}

.norfil-portfolio-carousel .post-items.norfil-carousel__track {
	display: flex !important;
	flex-flow: row nowrap !important;
	align-items: stretch;
	gap: var(--norfil-carousel-gap);
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	transform: none !important;
}

.norfil-portfolio-carousel .norfil-carousel__slide {
	display: flex;
	flex: 0 0 calc((100% - 60px) / 3);
	min-width: 0;
	width: auto !important;
	height: auto;
	margin: 0 !important;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.norfil-portfolio-carousel .elementskit-post-image-card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	background: var(--white-color, #fff);
	border-radius: 24px;
}

.norfil-portfolio-carousel .elementskit-entry-header,
.norfil-portfolio-carousel .elementskit-entry-thumb {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
}

/* More specific than Builtup's fixed Blog Posts ratio, while retaining its hover effect. */
.norfil-portfolio-carousel.latest-blog-post .post-items .elementskit-post-image-card .elementskit-entry-header img,
.norfil-portfolio-carousel.latest-blog-post .post-items .elementskit-post-image-card .norfil-carousel__placeholder {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--norfil-image-ratio);
	object-fit: cover;
}

.norfil-carousel__placeholder {
	display: grid !important;
	place-items: center;
	background: linear-gradient(145deg, var(--secondary-color, #e9f7fe), #dcecf5);
}

.norfil-carousel__placeholder svg {
	width: clamp(42px, 16%, 68px);
	height: auto;
	fill: none;
	stroke: var(--primary-color, #12223b);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	opacity: 0.38;
}

.norfil-portfolio-carousel .elementskit-post-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	padding: 24px;
}

.norfil-carousel__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin: 0 0 12px;
}

.norfil-carousel__category {
	font-family: var(--accent-font, inherit);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.055em;
	text-transform: uppercase;
	color: var(--accent-color, #ffb703);
}

.norfil-carousel__category + .norfil-carousel__category::before {
	content: "•";
	margin-right: 12px;
	color: var(--divider-color, rgb(18 34 59 / 19%));
}

.norfil-portfolio-carousel .elementskit-entry-title {
	margin: 0 0 14px;
	font-family: var(--accent-font, inherit);
	font-size: clamp(20px, 1.8vw, 25px);
	font-weight: 800;
	line-height: 1.2;
	text-transform: none;
}

.norfil-portfolio-carousel .elementskit-entry-title a {
	color: var(--primary-color, #12223b);
	text-decoration: none;
	transition: color 180ms ease;
}

.norfil-portfolio-carousel .elementskit-entry-title a:hover,
.norfil-portfolio-carousel .elementskit-entry-title a:focus-visible {
	color: var(--accent-color, #ffb703);
}

.norfil-carousel__excerpt {
	margin: 0 0 20px;
	color: var(--text-color, var(--e-global-color-text, #667282));
}

.norfil-carousel__excerpt p {
	margin: 0;
}

.norfil-portfolio-carousel .btn-wraper {
	margin-top: auto;
}

.norfil-portfolio-carousel .norfil-carousel__read-more.elementskit-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0;
	font-family: var(--accent-font, inherit);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--accent-color, #ffb703);
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-decoration: none;
	overflow: visible;
}

.norfil-portfolio-carousel .norfil-carousel__read-more svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	transition: transform 180ms ease;
}

.norfil-portfolio-carousel .norfil-carousel__read-more:hover,
.norfil-portfolio-carousel .norfil-carousel__read-more:focus-visible {
	color: var(--primary-color, #12223b);
}

.norfil-portfolio-carousel .norfil-carousel__read-more:hover svg,
.norfil-portfolio-carousel .norfil-carousel__read-more:focus-visible svg {
	transform: translateX(4px);
}

.norfil-portfolio-carousel a:focus-visible,
.norfil-carousel__arrow:focus-visible,
.norfil-carousel__dot:focus-visible {
	outline: 3px solid var(--accent-color, #ffb703);
	outline: 3px solid color-mix(in srgb, var(--accent-color, #ffb703) 72%, transparent);
	outline-offset: 3px;
}

.norfil-carousel__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 28px;
}

.norfil-carousel__dots {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
}

.norfil-carousel__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	background: var(--divider-color, rgb(18 34 59 / 19%));
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	transition: width 180ms ease, background-color 180ms ease;
}

.norfil-carousel__dot[aria-current="true"] {
	width: 28px;
	background: var(--accent-color, #ffb703);
}

.norfil-carousel__arrows {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
}

.norfil-portfolio-carousel .norfil-carousel__arrows > .norfil-carousel__arrow {
	display: inline-grid;
	place-items: center;
	box-sizing: border-box;
	width: var(--norfil-control-size);
	height: var(--norfil-control-size);
	padding: 0;
}

.norfil-carousel__arrow {
	color: var(--primary-color, #12223b);
	background: var(--secondary-color, #e9f7fe);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.norfil-portfolio-carousel .norfil-carousel__arrow > svg {
	display: block;
	/* ElementsKit applies width: inherit !important to SVGs in this widget. */
	width: 22px !important;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.norfil-carousel__arrow:hover:not(:disabled),
.norfil-carousel__arrow:focus-visible:not(:disabled) {
	color: var(--primary-color, #12223b);
	background: var(--accent-color, #ffb703);
	transform: translateY(-2px);
}

.norfil-carousel__arrow:disabled {
	cursor: not-allowed;
	opacity: 0.35;
}

.norfil-portfolio-carousel.is-static .norfil-carousel__controls {
	display: none;
}

.norfil-carousel__empty {
	padding: 24px;
	color: var(--primary-color, #12223b);
	background: var(--secondary-color, #e9f7fe);
	border-radius: 16px;
	font-weight: 700;
	text-align: center;
}

/* Slider projets from the supplied desktop and mobile layouts. */
.norfil-portfolio-carousel--featured {
	--gcb-slider-wine: #5a1621;
	--gcb-slider-ink: #30151f;
	--gcb-slider-muted: #6a7280;
	font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
}

.norfil-portfolio-carousel.norfil-portfolio-carousel--featured .norfil-carousel__track {
	position: relative;
	gap: 22px;
	padding: 4px 22px 4px 0 !important;
}

.norfil-portfolio-carousel.norfil-portfolio-carousel--featured .norfil-carousel__slide {
	flex: 0 0 min(400px, 84%);
}

.norfil-portfolio-carousel a.norfil-carousel__project-card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	color: var(--gcb-slider-muted);
	text-decoration: none;
}

.norfil-carousel__project-image {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 20px;
	background: #f0f0f0;
}

.norfil-portfolio-carousel .norfil-carousel__project-image img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.norfil-carousel__project-card:hover .norfil-carousel__project-image img {
	transform: scale(1.045);
}

.norfil-carousel__project-placeholder {
	display: grid;
	height: 100%;
	place-items: center;
	color: var(--gcb-slider-wine);
	font-weight: 800;
}

.norfil-carousel__project-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: calc(100% - 24px);
	padding: 6px 11px 6px 9px;
	border-radius: 8px;
	background: #fff;
	color: var(--gcb-slider-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}

.norfil-carousel__project-image .norfil-carousel__project-badge {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-start: 12px;
}

.norfil-carousel__project-badge svg {
	flex: none;
	width: 11px;
	height: 14px;
	fill: var(--gcb-project-color, #66061e);
	stroke: var(--gcb-project-color, #66061e);
	stroke-width: 3;
}

.norfil-carousel__project-caption {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.norfil-carousel__project-copy {
	display: grid;
	gap: 3px;
	min-width: 0;
	font-size: 15px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.norfil-portfolio-carousel .norfil-carousel__project-title {
	margin: 0;
	color: var(--gcb-slider-ink);
	font: 800 20px / 1.22 Montserrat, "Helvetica Neue", Arial, sans-serif;
}

.norfil-carousel__project-arrow {
	display: grid;
	flex: 0 0 46px;
	height: 46px;
	place-items: center;
	border: 1.5px solid #ddd6d6;
	border-radius: 50%;
	background: #fff;
	color: var(--gcb-slider-wine);
	transition: background .2s, color .2s, border-color .2s;
}

.norfil-carousel__project-arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.norfil-carousel__project-card:hover .norfil-carousel__project-arrow,
.norfil-carousel__project-card:focus-visible .norfil-carousel__project-arrow {
	border-color: var(--gcb-slider-wine);
	background: var(--gcb-slider-wine);
	color: #fff;
}

.norfil-portfolio-carousel--featured .norfil-carousel__controls {
	gap: clamp(10px, 2vw, 20px);
	margin-top: 26px;
	padding-inline-end: 22px;
}

.norfil-carousel__count {
	flex: none;
	color: var(--gcb-slider-muted);
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}

.norfil-carousel__count strong {
	color: var(--gcb-slider-ink);
	font-weight: 800;
}

.norfil-carousel__progress {
	flex: 1;
	min-width: 0;
	height: 3px;
	overflow: hidden;
	border-radius: 2px;
	background: #e8e2e2;
}

.norfil-carousel__progress > span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--gcb-slider-wine);
}

.norfil-portfolio-carousel--featured .norfil-carousel__arrows > .norfil-carousel__arrow {
	width: 52px;
	height: 52px;
	border: 1.5px solid var(--gcb-slider-wine);
	border-radius: 9px;
	background: #fff;
	color: var(--gcb-slider-wine);
}

.norfil-portfolio-carousel--featured .norfil-carousel__arrow--next:not(:disabled) {
	background: var(--gcb-slider-wine);
	color: #fff;
}

.norfil-portfolio-carousel--featured .norfil-carousel__arrow:hover:not(:disabled) {
	border-color: var(--gcb-slider-ink);
	background: var(--gcb-slider-ink);
	color: #fff;
	transform: none;
}

.norfil-portfolio-carousel--featured .norfil-carousel__arrow:disabled {
	border-color: #e8e2e2;
	color: #9c9292;
	opacity: 1;
}

.norfil-portfolio-carousel--featured a:focus-visible,
.norfil-portfolio-carousel--featured button:focus-visible {
	outline: 2px solid var(--gcb-slider-wine);
	outline-offset: -2px;
}

@media (max-width: 1024px) {
	.norfil-portfolio-carousel {
		--norfil-carousel-gap: 24px;
		--norfil-slides-per-view: 2;
	}

	.norfil-portfolio-carousel .norfil-carousel__slide {
		flex-basis: calc((100% - 24px) / 2);
	}
}

@media (max-width: 767px) {
	.norfil-portfolio-carousel {
		--norfil-carousel-gap: 16px;
		--norfil-control-size: 44px;
		--norfil-slides-per-view: 1;
	}

	.norfil-portfolio-carousel .elementskit-post-body {
		padding: 20px;
	}

	.norfil-portfolio-carousel .norfil-carousel__slide {
		flex-basis: 100%;
	}

	.norfil-carousel__controls {
		margin-top: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.norfil-carousel__viewport {
		scroll-behavior: auto;
	}

	.norfil-portfolio-carousel *,
	.norfil-portfolio-carousel *::before,
	.norfil-portfolio-carousel *::after {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* Numérotation et cadrage des cartes de l’accueil. */
.norfil-portfolio-carousel.norfil-portfolio-carousel--numbered {
	--gcb-slider-wine: #66051e;
}

.norfil-portfolio-carousel.norfil-portfolio-carousel--numbered .norfil-carousel__slide {
	flex-basis: min(360px, 78%);
}

.norfil-portfolio-carousel--numbered .norfil-carousel__project-image {
	aspect-ratio: 4 / 5;
	border-radius: 22px;
}

.norfil-portfolio-carousel--numbered .norfil-carousel__project-badge {
	display: block;
	color: var(--gcb-slider-wine);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
}

.norfil-carousel__badge-total {
	display: none;
}

/* Sections éditables de l’accueil. */
.elementor .gcb-home-figures.e-con {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.gcb-home-figures.e-con > :is(.gcb-home-stat, .gcb-home-stat-photo) {
	width: 100%;
	min-width: 0;
	margin: 0;
	align-self: stretch;
}

.elementor .gcb-home-figures.e-con > .gcb-home-stat-photo {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.elementor .gcb-home-figures.e-con > .gcb-home-stat-photo:nth-child(2) {
	aspect-ratio: 16 / 9;
}

.elementor .gcb-home-figures.e-con > .gcb-home-stat-photo:nth-child(n+8) {
	aspect-ratio: 16 / 10;
}

.gcb-home-figures .gcb-home-stat-photo .elementor-widget-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.gcb-home-figures .gcb-home-stat-photo .elementor-widget-container,
.elementor .gcb-home-figures .gcb-home-stat-photo img {
	display: block;
	width: 100%;
	height: 100%;
}

.elementor .gcb-home-figures .gcb-home-stat-photo img {
	object-fit: cover;
}

.gcb-home-figures .gcb-home-stat .elementor-counter {
	min-width: 0;
}

.elementor .gcb-home-figures .gcb-home-stat .elementor-counter-number-wrapper {
	--counter-prefix-grow: 0;
	--counter-number-grow: 0;
	--counter-suffix-grow: 0;
	justify-content: center;
}

.gcb-home.gcb-home-projects.gcb-home-projects-featured {
	--gcb-project-section-gutter: clamp(34px, 6.3vw, 91px);
	padding: clamp(56px, 6.5vw, 96px) 0 clamp(56px, 6.5vw, 96px) var(--gcb-project-section-gutter);
}

.gcb-home-projects-featured > .e-con-inner {
	width: 100%;
	max-width: none;
}

.gcb-home-projects-featured .gcb-home-project-slider .norfil-carousel__controls {
	padding-inline-end: var(--gcb-project-section-gutter);
}

.gcb-home-projects-featured .gcb-home-project-slider .norfil-portfolio-carousel--numbered .norfil-carousel__track {
	padding-inline-end: var(--gcb-project-section-gutter) !important;
}

@media (max-width: 1024px) {
	.elementor .gcb-home-figures.e-con {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-flow: row dense;
		gap: 16px;
	}

	.elementor .gcb-home-figures.e-con > :is(.gcb-home-stat, .gcb-home-stat-photo) {
		grid-row: auto;
	}

	.elementor .gcb-home-figures.e-con > :is(:nth-child(4n+1), :nth-child(4n+4)) {
		grid-column: 1;
	}

	.elementor .gcb-home-figures.e-con > :is(:nth-child(4n+2), :nth-child(4n+3)) {
		grid-column: 2;
	}

	.elementor .gcb-home-figures.e-con > .gcb-home-stat:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		aspect-ratio: auto;
	}

	.gcb-home.gcb-home-projects.gcb-home-projects-featured {
		--gcb-project-section-gutter: 22px;
		padding-inline: var(--gcb-project-section-gutter);
	}

	.gcb-home-projects-featured .gcb-home-intro {
		display: contents;
	}

	.gcb-home-projects-featured .gcb-home-project-slider {
		order: 1;
		min-width: 0;
	}

	.gcb-home-projects-featured .gcb-home-project-action {
		order: 2;
	}
}

@media (max-width: 767px) {
	.elementor .gcb-home-figures.e-con {
		gap: 10px;
	}

	.elementor .gcb-home-figures.e-con > .gcb-home-stat-photo:nth-child(n) {
		aspect-ratio: 1;
	}

	.elementor .gcb-home-figures .gcb-home-stat .elementor-counter-number-wrapper {
		justify-content: flex-start;
	}

	.norfil-portfolio-carousel.norfil-portfolio-carousel--numbered .norfil-carousel__track {
		gap: 12px;
	}

	.norfil-portfolio-carousel.norfil-portfolio-carousel--numbered .norfil-carousel__slide {
		flex-basis: 82%;
	}

	.norfil-portfolio-carousel--numbered .norfil-carousel__project-image {
		border-radius: 20px;
	}

	.norfil-portfolio-carousel--numbered .norfil-carousel__project-title {
		font-size: 18px;
	}

	.norfil-portfolio-carousel--numbered .norfil-carousel__project-arrow {
		flex-basis: 44px;
		height: 44px;
	}

	.norfil-portfolio-carousel--numbered .norfil-carousel__controls {
		display: none;
	}

	.norfil-carousel__badge-total {
		display: inline;
	}

	.gcb-home-projects-featured .gcb-home-project-action .elementor-button {
		display: flex;
		width: 100%;
		justify-content: center;
	}

	.gcb-home-projects-featured .gcb-home-project-action .elementor-widget-button {
		width: 100%;
	}
}
