body {
   background-image: url(../PIC/Reproducteur/IMG-20250820-WA0017.jpg);
   background-size: 100%;
   background-position-y: -125px;
   background-repeat: no-repeat;
}

@layer base,
demo;

@layer demo {
	.carousel {
		--items: 5;
		--carousel-duration: 40s;

		@media (width > 600px) {
			--carousel-duration: 20s;
		}

		--carousel-width: min(80vw,
			1200px);
		/* note - it will "break" if it gets too wide and there aren't enough items */
		--carousel-item-width: 300px;
		--carousel-item-height: 400px;
		--carousel-item-gap: 2rem;

		--clr-cta: rgb(0, 132, 209);

		position: relative;
		width: var(--carousel-width);
		height: var(--carousel-item-height);
		overflow: clip;


		&[mask] {
			/* fade out on sides */
			mask-image: linear-gradient(to right,
					transparent,
					black 10% 90%,
					transparent);
		}

		&[reverse]>article {
			animation-direction: reverse;
		}

		/* hover pauses animation */
		&:hover>article {
			animation-play-state: paused;
		}

		.gp-car-1-art-1:hover,
		.gp-car-1-art-2:hover,
		.gp-car-1-art-3:hover,
		.gp-car-1-art-4:hover,
		.gp-car-1-art-5:hover,
		.gp-car-1-art-6:hover {
			background: var(--Colp1);
			color: var(--ColBack);
			transform: scale(1.03);

		}


		.gp-car-2-art-1:hover,
		.gp-car-2-art-2:hover,
		.gp-car-2-art-3:hover,
		.gp-car-2-art-4:hover,
		.gp-car-2-art-5:hover,
		.gp-car-2-art-6:hover {
			background: var(--ColS2);
			color: var(--Text1);
			transform: scale(1.03);

		}
	}

	.carousel>article {

		position: absolute;
		top: 0;
		left: calc(100% + var(--carousel-item-gap));
		width: var(--carousel-item-width);
		height: var(--carousel-item-height);
		display: grid;
		grid-template-rows: 200px auto 1fr auto;
		gap: 0.25rem;
		border: 1px solid light-dark(rgba(0 0 0 / 0.25), rgba(255 255 255 / 0.15));

		padding-block-end: 1rem;
		border-radius: 10px;
		background: light-dark(white, rgba(255 255 255 / 0.05));
		color: light-dark(rgb(0, 106, 255), white);



		/* animation */
		will-change: transform;
		animation-name: marquee;
		animation-duration: var(--carousel-duration);
		animation-timing-function: linear;
		animation-iteration-count: infinite;
		animation-delay: calc(var(--carousel-duration) / var(--items) * 1 * var(--i) * -1);

		&:nth-child(1) {
			--i: 0;
		}

		&:nth-child(2) {
			--i: 1;
		}

		&:nth-child(3) {
			--i: 2;
		}

		&:nth-child(4) {
			--i: 3;
		}

		&:nth-child(5) {
			--i: 4;
		}

		&:nth-child(6) {
			--i: 5;
		}

		&:nth-child(7) {
			--i: 6;
		}

		&:nth-child(8) {
			--i: 7;
		}
		&:nth-child(9) {
			--i: 8;
		}

		&:nth-child(10) {
			--i: 9;
		}
	}

	.carousel img {
		width: 100%;
		height: 100%;
		object-fit: cover;

		border-radius: 10px 10px 0 0;
	}
	.gp-art-4-pic{
		top: -150px ;
	}
	.carousel>article>*:not(img) {
		padding: 0 1rem;
	}

	.carousel>article>div {
		grid-row: span 2;
		display: grid;
		grid-template-rows: subgrid;
		font-size: 0.8rem;
	}

	.carousel>article h2 {
		font-size: 1.2rem;
		font-weight: 300;
		padding-block: 0.75rem 0.25rem;
		margin: 0;
	}

	.carousel>article p {
		margin: 0;
	}

	.carousel>article a {
		text-decoration: none;
		text-transform: lowercase;
		border: 1px solid var(--clr-cta);
		color: light-dark(var(--clr-cta), white);
		border-radius: 3px;
		padding: 0.25rem 0.5rem;
		place-self: start;
		transition: 150ms ease-in-out;

		&:hover,
		&:focus-visible {
			background-color: var(--clr-cta);
			color: white;
			outline: none;
		}
	}

	@keyframes marquee {
		100% {
			transform: translateX(calc((var(--items) * (var(--carousel-item-width) + var(--carousel-item-gap))) * -1));
		}
	}
}

/* general styling */
@layer base {
	* {
		box-sizing: border-box;
	}

	main section {
		min-height: 70svh;
		margin: 0;
		padding: 1rem;
		font-size: 1rem;
		line-height: 1.5;
		display: grid;
		place-items: center;
		gap: 2rem;
	}
}

@media (max-width: 480px) {
@layer demo {

		.carousel {
			--items: 5;
			--carousel-duration: 20s;

			@media (width > 600px) {
				--carousel-duration: 20s;
			}

			--carousel-item-width: 175px;
			--carousel-item-height: 380px;
			--carousel-item-gap: 1rem;
		}
	}
	div,p{
      text-align: start;
   }
}