@import "./etape1-perso.css";
@import "./etape9-pendule.css";
@import "./etape3-insectes.css";
@import "./etape4-blob.css";
@import "./etape5-coeur.css";
@import "./etape6-grille.css";
@import "./etape7-escargot.css";
@import "./etape8-vibrations.css";
@import "./etape2-text.css";
@import "./etape10-conclusion.css";

@font-face {
	font-family: VarelaRound;
	src: url("./../fonts/VarelaRound-Regular.ttf");
}

body,
html {
	overflow-x: clip;
}

body {
	margin: 0;
	background-color: #f4f4f4;
	font-family: VarelaRound;
	padding-bottom: 3rem;
}

p {
	margin: 0;
}

.gradient {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: rgb(244, 244, 244);
	background: linear-gradient(
		0deg,
		rgba(244, 244, 244, 1) 0%,
		rgba(229, 51, 42, 1) 13%,
		rgba(244, 244, 244, 1) 31%,
		rgba(157, 179, 236, 1) 48%,
		rgba(244, 244, 244, 1) 65%,
		rgba(0, 149, 64, 1) 84%,
		rgba(244, 244, 244, 1) 100%
	);
	padding-left: 2rem;
	padding-right: 2rem;
}

body::-webkit-scrollbar {
	display: none;
}

svg {
	overflow: visible;
}

.svg_container {
	width: 100%;
	height: 90vh;
	height: calc(var(--vh, 1vh) * 90);
	position: relative;
	border: 1rem solid hsl(0, 0%, 96%);
	border-width: calc(var(--vh, 1vh) * 10) 2rem 0rem 2rem;
	background: radial-gradient(
				farthest-side at bottom right,
				transparent 98%,
				#f4f4f4
			)
			top left,
		radial-gradient(farthest-side at top right, transparent 98%, #f4f4f4) bottom
			left,
		radial-gradient(farthest-side at bottom left, transparent 98%, #f4f4f4) top
			right,
		radial-gradient(farthest-side at top left, transparent 98%, #f4f4f4) bottom
			right,
		transparent;

	background-size: 3rem 3rem;
	/* inner Radius */
	background-repeat: no-repeat;
	background-origin: padding-box;
}

.title {
	position: -webkit-sticky;
	/* Safari */
	position: sticky;
	top: 6rem;
	transform: translate(0, -5rem);
	text-align: center;
	width: 100%;
	height: 0;
	margin: 0;
	z-index: 9;
}

.text_container {
	position: absolute;
	top: 50%;
	background-color: #f4f4f4;
	color: black;
	width: 30%;
	padding: 2.5rem;
	transition: all 1s;
	font-size: 1.2rem;
	font-weight: bold;
}

.text_container-left {
	transform: translate(-150%, -50%);
	border-left: 0;
	border-radius: 0 3rem 3rem 0;
}

.text_container-right {
	right: 0;
	transform: translate(150%, -50%);
	border-right: 0;
	border-radius: 3rem 0 0 3rem;
}

.text_container-center {
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 3rem 3rem 3rem 3rem;
}

.paused * {
	animation-play-state: running;
}

.clicked ~ .perso_state:not(.text, .blob_container) > .text_container {
	transform: translate(0, -50%);
}

.clicked ~ .text.perso_state > .text_container {
	animation-name: tilt-shaking;
	animation-duration: 0.5s;
	animation-iteration-count: infinite;
}

/* Responsiveness */

@media screen and (max-width: 1025px) {
	.svg_container {
		background-size: 1rem 1rem;
	}

	.title {
		position: sticky;
		top: 4rem;
		transform: translate(0, -3rem);
	}

	.text_container {
		font-size: 1.2rem;
	}

	.text_container-left {
		border-radius: 0 1.5rem 1.5rem 0;
	}

	.text_container-right {
		border-radius: 1.5rem 0 0 1.5rem;
	}

	.text_container-center {
		border-radius: 1.5rem 1.5rem 1.5rem 1.5rem;
	}
}

@media screen and (max-width: 600px) {
	.image_description {
		font-size: 0.9rem;
	}

	.title {
		font-size: 1.5rem;
	}

	.text_container {
		padding: 1rem;
	}

	.text_container-left {
		border-radius: 0 0.5rem 0.5rem 0;
	}

	.text_container-right {
		border-radius: 0.5rem 0 0 0.5rem;
	}

	.text_container-center {
		border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
	}
}
