/* =============================================
   CORRECTION : scroll-behavior doit être sur html, pas dans *
   Dans * il n'a aucun effet
   ============================================= */
html {
	scroll-behavior: smooth;
}

/* CORRECTION : suppression de scroll-behavior et text-decoration de *
   text-decoration:none dans * écrase des comportements par défaut utiles */
* {
	/* CORRECTION : 'cascadia code' n'est pas une police web standard,
	   remplacé par une police importée via Google Fonts */
	font-family: 'DM Sans', sans-serif;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

a {
	text-decoration: none;
}

body {
	/* CORRECTION : background-size: contain laisse des bandes vides sur les côtés
	   cover assure que toute la page est couverte */
	background-image: url("img/portfolio_page.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-position: center;
	color: white;
}

/* =============================================
   HEADER
   ============================================= */
header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	display: flex;
	justify-content: space-between; /* AMÉLIORATION : mieux que flex-start */
	align-items: center;
	padding: 24px 60px;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	transition: background 0.3s ease;
}

.logo h1 {
	margin: 0;
	font-family: 'DM Serif Display', serif;
	font-size: 22px;
	color: black;
	letter-spacing: 0.02em;
}

nav ul {
	list-style: none;
	display: flex;
	gap: 40px;
	/* CORRECTION : padding-left: 400px est une valeur fixe qui casse sur mobile
	   margin-left: auto est inutile avec justify-content: space-between sur le header */
}

nav li a {
	color: black;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: opacity 0.2s ease;
}

nav li a:hover {
	opacity: 0.5;
	text-decoration: none;
}

/* =============================================
   SECTIONS (base)
   ============================================= */
section {
	min-height: 100vh;
	padding: 120px 10%;
}

/* =============================================
   HERO (#home)
   AMÉLIORATION : section était complètement vide
   ============================================= */
#home {
	display: flex;
	align-items: center;
	padding: 0 10%;
}

.hero-content {
	max-width: 700px;
}

.hero-label {
	font-size: 13px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(0, 0, 0, 0.5);
	margin-bottom: 16px;
}

.hero-name {
	font-family: 'DM Serif Display', serif;
	font-size: clamp(56px, 8vw, 100px);
	line-height: 1.0;
	color: black;
	margin-bottom: 24px;
}

.hero-sub {
	font-size: 18px;
	color: rgba(0, 0, 0, 0.65);
	font-weight: 300;
	margin-bottom: 40px;
	line-height: 1.5;
}

.btn-hero {
	display: inline-block;
	padding: 14px 36px;
	border: 1.5px solid black;
	color: black;
	font-size: 14px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: background 0.25s ease, color 0.25s ease;
}

.btn-hero:hover {
	background: black;
	color: white;
}

/* =============================================
   ABOUT
   ============================================= */
#about {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 60px;
	align-items: flex-start;
	color: black;
}

.photo-moi img {
	width: 260px;
	border-radius: 12px;
	display: block;
}

.text {
	max-width: 560px;
	padding-top: 10px;
}

.text h2 {
	font-family: 'DM Serif Display', serif;
	font-size: 36px;
	margin-bottom: 20px;
}

.text p {
	margin-top: 10px;
	line-height: 1.8;
	color: rgba(0, 0, 0, 0.75);
	font-weight: 300;
}

/* AMÉLIORATION : les logos prennent toute la largeur disponible */
.skills {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-top: 20px;
}

.skills img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	filter: grayscale(100%);
	transition: filter 0.3s ease, transform 0.3s ease;
}

.skills img:hover {
	filter: grayscale(0%);
	transform: scale(1.15);
}

/* =============================================
   WORK
   ============================================= */
#work {
	color: black;
	text-align: center;
}

#work h2 {
	font-family: 'DM Serif Display', serif;
	font-size: 40px;
	margin-bottom: 60px;
}

.projects {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	text-align: left;
}

.project {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	/* AMÉLIORATION : aspect-ratio pour uniformiser les vignettes */
	aspect-ratio: 4 / 3;
}

.project img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.project:hover img {
	transform: scale(1.08);
}

.overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	color: white;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	font-size: 16px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: opacity 0.35s ease;
}

.project:hover .overlay {
	opacity: 1;
}

/* =============================================
   CONTACT
   AMÉLIORATION : section était complètement vide
   ============================================= */
#contact {
	display: flex;
	align-items: center;
	justify-content: center;
}

.contact-inner {
	text-align: center;
	color: black;
}

.contact-inner h2 {
	font-family: 'DM Serif Display', serif;
	font-size: 48px;
	margin-bottom: 16px;
}

.contact-inner p {
	font-size: 18px;
	color: rgba(0, 0, 0, 0.65);
	font-weight: 300;
	margin-bottom: 32px;
}

.contact-email {
	display: inline-block;
	font-size: 20px;
	color: black;
	border-bottom: 1.5px solid black;
	padding-bottom: 2px;
	margin-bottom: 48px;
	transition: opacity 0.2s ease;
}

.contact-email:hover {
	opacity: 0.5;
}

.contact-links {
	display: flex;
	justify-content: center;
	gap: 40px;
}

.contact-links a {
	font-size: 13px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: black;
	font-weight: 500;
	transition: opacity 0.2s ease;
}

.contact-links a:hover {
	opacity: 0.45;
}

/* =============================================
   RESPONSIVE — tablette et mobile
   ============================================= */
@media (max-width: 900px) {
	header {
		padding: 20px 30px;
	}

	nav ul {
		gap: 20px;
	}

	.projects {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	header {
		flex-direction: column;
		gap: 12px;
		padding: 16px 20px;
	}

	.hero-name {
		font-size: 48px;
	}

	.projects {
		grid-template-columns: 1fr;
	}

	section {
		padding: 100px 6%;
	}
}