/* On importe les fonts */
@import url("https://fonts.googleapis.com/css2?family=Lusitana:wght@400;700&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");

/* Pour poser une base propre */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* On définit les variables */
:root {
	--color-one: #f6f4ef;
	--color-two: #2e2c28;
	--color-three: #5a564f;
	--color-four: #6e86a6;
	--color-five: #b7c7da;
	--font-one: "Lusitana", serif;
	--font-two: "Nunito", sans-serif;
	--space-one: 4rem 0;
	--space-two: 2rem;
}

body {
	font-family: var(--font-two);
	background-color: var(--color-one);
	color: var(--color-two);
	line-height: 1.6;
}

h2 {
	font-family: var(--font-one);
	font-size: clamp(1.3rem, 3vw, 2.5rem);
	margin-bottom: var(--space-two);
	color: var(--color-four);
}

.hero {
	position: relative;
	width: 100%;
	min-height: 50vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow: hidden;

	img {
		position: absolute;
		width: 100%;
		height: 100%;
		object-fit: cover;
		z-index: 1;
	}

	h1 {
		position: relative;
		z-index: 2;
		text-align: center;
		margin-top: 4vh;
		color: var(--color-one);
		font-size: clamp(2rem, 5vw, 4rem);
		font-family: var(--font-one);
		text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
	}
}

.hero::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 100px;
	background: linear-gradient(to bottom, transparent, var(--color-five));
	z-index: 2;
}

.transition {
	min-height: 200px;
	padding: var(--space-one);
	background-color: var(--color-five);

	.transition-text {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		border: 1px solid var(--color-three);
		border-radius: 15px;
		margin: 0 auto;
		max-width: clamp(100px, 80vw, 800px);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
		padding: 2rem;

		p {
			max-width: 80vw;
			font-size: 1rem;
			color: var(--color-two);
		}

		p:not(:last-child) {
			padding-bottom: 1rem;
		}
	}
}

.works {
	padding: var(--space-one);
	width: 80vw;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;

	h2 {
		width: 80vw;
		max-width: 800px;
	}

	.work-pieces {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 4rem;
	}

	.work-item {
		width: clamp(200px, 75vw, 300px);
		height: 200px;
		overflow: hidden;
		flex: 0 0 auto;
		cursor: pointer;
		transition: all 0.3s ease;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
		border-radius: 15px;

		img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			display: block;
		}
	}

	.work-item:is(:hover, :focus-visible) {
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
		transform: scale(1.05);
	}

	.work-item:focus-visible {
		outline: 2px solid var(--color-four);
		outline-offset: 4px;
	}

	.work-item:focus {
		outline: none;
	}

	.work-item:active {
		opacity: 0.8;
	}
}

/* Effet de "push" au clic/tap */
.work-item:active {
	transform: scale(0.95);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	opacity: 0.9;
	transition: all 0.1s ease;
}

/* Désactiver le tap highlight sur mobile */
.work-item {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

.artist {
	padding: var(--space-one);
	width: 80vw;
	max-width: 800px;
	margin: 0 auto;

	.avatar {
		display: none;
	}

	p {
		font-size: clamp(0.95rem, 2vw, 1.05rem);
		color: var(--color-three);
	}

	p:not(:last-child) {
		margin-bottom: var(--space-two);
	}
}

@media (min-width: 1024px) {
	.artist {
		.artist-wrapper {
			display: flex;
			flex-direction: row;
			gap: 4rem;
			align-items: center;
		}

		.avatar {
			display: block;
			width: 15vw;
			height: 15vw;
			aspect-ratio: 1 / 1;
			object-fit: cover;
			border-radius: 50%;
			border: 0.5rem solid var(--color-five);
		}
	}
}

.contact-wrapper {
	background-color: var(--color-five);
	padding: 4rem 0;
	box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05), 0 4px 10px rgba(0, 0, 0, 0.05);

	.contact {
		width: 80vw;
		max-width: 800px;
		margin: 0 auto;

		p {
			font-size: clamp(0.95rem, 2vw, 1.05rem);
			color: var(--color-two);
			margin-bottom: var(--space-two);
		}

		a {
			background-color: var(--color-one);
			color: var(--color-four);
			text-decoration: none;
			border: 1px solid var(--color-four);
			border-radius: 15px;
			padding: 0.8rem 1.6rem;
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
			transition: all 0.3s ease;
		}

		a:hover {
			color: var(--color-one);
			background-color: var(--color-four);
			box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
		}
	}
}

footer {
	padding: var(--space-one);
	text-align: center;

	p {
		font-size: 0.9rem;
		color: var(--color-two);
	}
}

/* Modale */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 10;
	align-items: center;
	justify-content: center;
}

.modal.active {
	display: flex;
}

.modal-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-image {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
}

.modal-close {
	position: absolute;
	top: -2rem;
	right: 0rem;
	background: none;
	border: none;
	color: var(--color-one);
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.modal-close:hover {
	opacity: 0.7;
}
