/********************************************************/
/*
/*      Projets CSS
/*
/********************************************************/
:not(.wp-block-cke-projets) > .wp-block-cke-projets {
	max-width: var(--wp--style--global--wide-size) !important;
}

.wp-block-cke-projets .acf-innerblocks-container > * {
	margin-block: 0;
}

.wp-block-cke-projets .projet-filter-form input[type="submit"] {
	display: none;
}

.wp-block-cke-projets :is(.projet-filters, .projet-info) {
	display: flex;
}

.wp-block-cke-projets .projet-filters {
	justify-content: space-between;
	gap: var(--wp--preset--spacing--2);
	margin-block-end: var(--wp--preset--spacing--6);
}

.wp-block-cke-projets .projet-filter {
	flex: 1;
}

.wp-block-cke-projets .projet-filter p {
	padding-block-end: .5rem;
	padding-inline-start: 1rem;
	margin-block: 0;
}

.wp-block-cke-projets .projet-filter select {
	width: 100%;
}

.wp-block-cke-projets .spinner {
	display: none;
	margin-inline: auto;
	filter: var(--wp--custom--filter--dark-green);
}

.wp-block-cke-projets .htmx-request ~ .spinner {
	display: block;
}

.wp-block-cke-projets .projet-items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 1fr;
	gap: var(--wp--preset--spacing--2);	
}

.wp-block-cke-projets .projet-item {
	display: grid;
	grid-template-rows: .75fr 1fr;
	gap: .75rem;
	padding: .75rem;
	border-radius: 1rem;
	box-shadow: 5px 5px 15px 2px rgba(0, 0, 0, .2);
	box-sizing: border-box;
}

/* .wp-block-cke-projets:has(.projet-item:nth-child(-n+3):last-child) .projet-item {
	height: max-content;
} */

.wp-block-cke-projets .projet-item,
.wp-block-cke-projets .projet-item .projet-info {
	background-color: var(--wp--custom--default-color--bg);
}

.wp-block-cke-projets .projet-item :is(.projet-thumbnail, .projet-info) {
	height: 100%;
	min-height: 100%;
	border-radius: .5rem;
	box-sizing: border-box;
}

.wp-block-cke-projets .projet-item .projet-thumbnail {
	grid-row: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	box-shadow: 7px 7px 10px 3px rgba(0, 0, 0, .1);
}

.wp-block-cke-projets .projet-item .projet-info {
	grid-row: 2;
	flex-direction: column;
	padding: 1rem 1.5rem 1.5rem;
	box-shadow: 3px 3px 15px 5px rgba(0, 0, 0, .1);
}

.wp-block-cke-projets .projet-item .projet-info:only-child {
	grid-row: 1 / span 2;
}

.wp-block-cke-projets .projet-item .projet-info > * {
	color: var(--wp--custom--default-color--text);
	margin-block: 0;
}

/* .wp-block-cke-projets .projet-item .projet-info > :is(.projet-title, .projet-excerpt) {
	max-width: 80%;
} */

.wp-block-cke-projets .projet-item .projet-info > .projet-title {
	/* word-break: break-all; */
	hyphens: auto;
	margin-block: .5rem;
} 

.wp-block-cke-projets .projet-item .projet-info:not(:has(.projet-excerpt)) > .projet-title,
.wp-block-cke-projets .projet-item .projet-info > .projet-expertise {
	margin-block-end: 1.5rem;
}

.wp-block-cke-projets .projet-item .projet-info > .projet-excerpt {
	margin-block: 1.5rem;
}

.wp-block-cke-projets .projet-item .projet-info > .wp-block-buttons {
	margin-block-start: auto;
}

.wp-block-cke-projets .no-project-found {
	grid-column: span 3;
	user-select: none;
}

.wp-block-cke-projets .projet-items + .wp-block-buttons {
	width: max-content;
	margin-block-start: var(--wp--preset--spacing--3);
	margin-inline: auto;
}

/* Slider layout */
.wp-block-cke-projets[data-layout="slider"] .projet-items {
	--slide: 0;
	--gap: var(--wp--preset--spacing--2);
	--item-count: 1;
	--items-per-slide: 1;
	--items-visible-at-once: 3;
	--item-width: 0px;
	
	display: flex;
	flex-direction: row !important;
	flex-wrap: nowrap;
	gap: var(--gap);
	translate: calc( ((var(--item-width) + var(--gap)) * var(--items-per-slide)) * (var(--slide) * -1) );
	transition: translate .3s;
}

.wp-block-cke-projets[data-layout="slider"] .projet-item {
	min-width: calc((100% - (var(--gap) * (var(--items-visible-at-once) - 1))) / var(--items-visible-at-once));
	max-width: calc((100% - (var(--gap) * (var(--items-visible-at-once) - 1))) / var(--items-visible-at-once));
	/* height: max-content; */
}

.wp-block-cke-projets[data-layout="slider"] .controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--wp--preset--spacing--2);
}

.wp-block-cke-projets[data-layout="slider"]:has(.projet-item:nth-child(-n+3):last-child) .controls {
	display: none;
}

.wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link {
	width: 2.25rem;
	height: 2.25rem;
	/* border: none; */
}

.wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link::before,
.wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link::after {
	display: flex;
	right: 0;
	height: 100%;
	scale: 1.05;
}

.wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link[rel="prev"]::before,
.wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link[rel="prev"]::after {
	rotate: 180deg;
}

:is(.has-dark-green-background-color, .has-black-background-color, .has-gray-background-color) .wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link:hover {
	background-color: var(--wp--custom--default-color--focus);
}

:is(.has-dark-green-background-color, .has-black-background-color, .has-gray-background-color) .wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link::before {
	filter: var(--wp--custom--filter--lime-green);
}

:is(.has-dark-green-background-color, .has-black-background-color, .has-gray-background-color) .wp-block-cke-projets[data-layout="slider"] .controls .wp-block-button__link::after {
	filter: var(--wp--custom--filter--dark-green);
}

@media screen and (max-width: 1568px) {
	:not(.wp-block-cke-projets) > .wp-block-cke-projets { max-width: calc(var(--wp--custom--viewport-width) - (var(--wp--custom--outer-pad) * 2)) !important; }
}

@media screen and (max-width: 1200px) {
	.wp-block-cke-projets .projet-items { grid-template-columns: repeat(2, 1fr); }
	.wp-block-cke-projets[data-layout="slider"] .projet-items { --items-visible-at-once: 2; }
	.wp-block-cke-projets[data-layout="slider"]:has(.projet-item:nth-child(-n+3):last-child) .controls { display: flex; }
	.wp-block-cke-projets[data-layout="slider"]:has(.projet-item:nth-child(-n+2):last-child) .controls { display: none; }
}

@media screen and (max-width: 850px) {
	.entry-content > .wp-block-group.alignfull:has(.wp-block-cke-projets)
	{ width: calc(min(var(--wp--custom--full-size), var(--wp--custom--viewport-width)) - 1.5rem) !important; }
	.wp-block-cke-projets .projet-filters { display: grid; grid-template-columns: 100%; grid-auto-rows: max-content; }
	.wp-block-cke-projets .projet-filter { width: max-content; max-width: 100%; justify-self: center; }
	.wp-block-cke-projets .projet-filter p { text-align: center; padding-inline-start: 0; }
	.wp-block-cke-projets .projet-item .projet-info { padding: 1rem 1rem 1.5rem; }
	.wp-block-cke-projets .projet-item .projet-info > :is(.projet-title, .projet-excerpt) { max-width: unset; }
}

@media screen and (max-width: 750px) {
	.wp-block-cke-projets :is(.projet-items, .projet-item) { display: flex; flex-direction: column; }
	.wp-block-cke-projets[data-layout="slider"] .projet-items { --items-visible-at-once: 1; }
	.wp-block-cke-projets[data-layout="slider"]:has(.projet-item:nth-child(-n+3):last-child) .controls,
	.wp-block-cke-projets[data-layout="slider"]:has(.projet-item:nth-child(-n+2):last-child) .controls { display: flex; }
	.wp-block-cke-projets[data-layout="slider"]:has(.projet-item:nth-child(-n+1):last-child) .controls { display: none; }
	.wp-block-cke-projets .projet-item { height: max-content; min-height: unset; }
	.wp-block-cke-projets .projet-item .projet-thumbnail { height: auto; aspect-ratio: 5/2; }
}

@media screen and (max-width: 500px) {
	.entry-content > .wp-block-group.alignfull:has(.wp-block-cke-projets)
	{ width: var(--wp--custom--viewport-width) !important; border-radius: unset !important; }
	.wp-block-cke-projets .projet-item .projet-thumbnail { aspect-ratio: 3/2; }
}