body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #222;
}

/* Navbar blanche, fixe en haut, avec ombre */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 15px 0;
}

/* Nav centré, max-width et espacement */
nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Liens navbar */
nav a {
  color: #222;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s;
}

nav a:hover {
  color: #00bcd4;
}

/* Pour éviter que le contenu soit caché sous la navbar fixe */
main {
  padding-top: 70px;
}

/* Hero */
.hero {
  background-color: #f9f9f9;
  text-align: center;
  padding: 120px 20px;
  font-size: 3rem;
  font-weight: 700;
  color: #222;
}

/* Profile Section */
.profile-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  gap: 40px;
}

.profile-text {
  max-width: 500px;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Contact Section */
.contact-section {
  background-color: #fff;
  padding: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* Titre Contact */
.contact-section h2 {
  font-size: 2rem;
  margin: 0;
}

/* Wrapper des icônes : centrage + espacement */
#contact-icons-wrapper {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Style des liens icônes */
.contact-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Taille des images à l’intérieur */
.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Hover avec zoom */
.contact-icon:hover {
  transform: scale(1.3);
  color: #00bcd4;
}

/* Bouton */
.btn-profile {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #1f1f1f;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.btn-profile:hover {
  background-color: #333;
}

/* Footer */
footer {
  text-align: center;
  background-color: #1f1f1f;
  color: white;
  padding: 20px 0;
  margin-top: 80px;
}

/* === CV PAGE === */
.cv-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
  background: #fff;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cv-image {
  width: 100%;
  height: auto;
  margin: 30px 0;
  border-radius: 4px;
}

/* === PORTFOLIO PAGE === */
.portfolio-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
}

.portfolio-container h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.portfolio-container p {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 40px;
  color: #555;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.portfolio-item {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #222;
  transition: transform 0.2s, box-shadow 0.3s;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.portfolio-thumb {
  height: 160px;
  overflow: hidden;  /* pour cacher ce qui dépasse */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e0e0e0; /* couleur de fond au cas où image lente à charger */
}

.portfolio-thumb img {
  width: 100%;      /* l’image remplit toute la largeur du conteneur */
  height: 100%;     /* et toute la hauteur */
  object-fit: cover; /* *important* pour garder le ratio et recadrer si besoin */
  display: block;
}

/* Fix pour que le portfolio soit bien centré et pas collé aux bords */
.portfolio-container {
  width: 100%;
  box-sizing: border-box;
  padding-left: 40px;
  padding-right: 40px;
}

/* Coller le footer en bas de la page même quand peu de contenu */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}


/* === SAE 501 Banner === */
.sae501-banner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 300px;
  padding-top: 70px; /* compense la navbar fixe */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}



.sae501-banner-text {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px 40px;
  border-radius: 10px;
}

.sae501-banner-text h1 {
  color: white;
  font-size: 2rem;
  margin: 0;
}

/* === SAE 501 Main Content === */
.sae501-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.sae501-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}

.sae501-text {
  flex: 1;
  min-width: 280px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.sae501-gallery {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sae501-gallery img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}

.sae501-gallery img:hover {
  transform: scale(1.03);
}

/* Responsive */
@media (max-width: 900px) {
  .sae501-content {
    flex-direction: column;
  }

  .sae501-banner-text h1 {
    font-size: 1.5rem;
  }
}
