* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f5f7fa;
}

header {
  background: #222;
  color: #fff;
  padding: 1rem 2rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.section {
  padding: 4rem 2rem;
  text-align: center;
}

.hero {
  background: linear-gradient(to right, #0077b6, #00b4d8);
  color: white;
  padding: 6rem 2rem;
}

.projets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.projet-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.projet-card h3 {
  margin-bottom: 0.5rem;
}

.projet-card a {
  display: inline-block;
  margin-top: 1rem;
  color: #0077b6;
  font-weight: bold;
  text-decoration: none;
}

.projet-img {
  width: 100%;
  max-width: 500px;   /* taille max de l’image */
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.projet-img:hover {
  transform: scale(1.04);
}

.info-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 700px;
  margin: 2rem auto 0 auto; /* centrée */
  text-align: center;
}

.info-card p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Arrière-plan différent pour chaque section */
#apropos {
  background: #f5f5f5; /* gris clair */
  padding: 3rem 1rem;
}

#contact {
  background: #e8f4ff; /* bleu très clair */
  padding: 3rem 1rem;
}

/* Pour garder de l'espace visuel autour des cartes */
#apropos .info-card,
#contact .info-card {
  margin-top: 1.5rem;
}

.section-separator {
  height: 2px;
  width: 80%;
  margin: 0 auto;
  background: linear-gradient(to right, transparent, #bbb, transparent);
  border-radius: 2px;
}

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

/* ========== Responsive design ========== */

/* Tablette */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr; /* 2 colonnes au lieu de 3 */
    gap: 1.5rem;
  }

  .card {
    padding: 1.2rem;
  }

  header h1 {
    font-size: 1.8rem;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr; /* 1 colonne */
  }

  .card {
    width: 100%;
    padding: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .card img {
    width: 100%;
    height: auto;
  }

  section {
    padding: 1.5rem 1rem;
  }

  footer {
    font-size: 0.9rem;
    padding: 1rem;
  }
}

/* Navigation responsive */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* permet de passer à la ligne si besoin */
  gap: 1rem;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 0.5rem 1rem;
}

/* Mobile */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  nav a {
    font-size: 1.1rem;
    padding: 0.4rem;
  }
}

