@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

html, body {
  background-color: #f2f2f2;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: #222;
}

/* ========================= */
/* EN-TÊTE */
/* ========================= */

.header {
  background-color: #2f2f2f;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #d9d9d9;
}

.title h1 {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  margin: 0;
}

/* ========================= */
/* NAVIGATION */
/* ========================= */

.nav-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.nav-buttons a {
  background-color: transparent;
  border: 1px solid #d0d0d0;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #f5f5f5;
  font-size: 18px;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.nav-buttons a:hover {
  background-color: #f5f5f5;
  color: #2f2f2f;
  border-color: #f5f5f5;
}

/* ========================= */
/* CONTENU PRINCIPAL */
/* ========================= */

.content-section {
  background-color: #ffffff;
  padding: 24px;
  margin: 24px auto;
  border-radius: 6px;
  border: 1px solid #dddddd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  max-width: 800px;
  width: calc(100% - 32px);
  box-sizing: border-box;
}

.content-section h2 {
  color: #1f1f1f;
  text-align: center;
  font-size: 24px;
  margin-bottom: 18px;
  font-weight: 600;
}

.content-section h3 {
  color: #3a3a3a;
  font-size: 19px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 500;
}

.content-section p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 18px;
  color: #444;
}

/* ========================= */
/* LISTES DE LIENS */
/* ========================= */

.links-list {
  padding-left: 20px;
}

.links-list a {
  text-decoration: none;
  color: #3d3d3d;
  transition: color 0.2s ease;
}

.links-list a:hover {
  color: #000000;
}

/* ========================= */
/* PROJETS / MY_RESEARCH */
/* ========================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 250px);
  gap: 24px;
  justify-content: center;
  margin: 40px auto;
  width: calc(100% - 40px);
  max-width: 1200px;
}

.project-card {
  display: flex;
  width: 250px;
  height: 250px;
  background-color: #ffffff;
  border: 2px solid #2f2f2f;
  border-radius: 10px;
  padding: 20px;
  box-sizing: border-box;
  text-decoration: none;
  color: #222;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  background-color: #f8f8f8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.project-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  color: #1f1f1f;
}

.project-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #444;
}

/* ========================= */
/* IMAGES */
/* ========================= */

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ========================= */
/* PIED DE PAGE */
/* ========================= */

.footer {
  background-color: #2f2f2f;
  color: #f5f5f5;
  text-align: center;
  padding: 14px;
  margin-top: auto;
  width: 100%;
  border-top: 1px solid #d9d9d9;
}

/* ========================= */
/* RESPONSIVE TABLETTE */
/* ========================= */

@media (max-width: 768px) {

  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .title h1 {
    font-size: 24px;
  }

  .nav-buttons {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-buttons a {
    font-size: 16px;
    padding: 7px 12px;
    border-radius: 6px;
    white-space: nowrap;
  }

  .content-section {
    padding: 20px;
    margin: 12px auto;
    max-width: 95%;
    flex: 1;
  }

  .content-section h2 {
    font-size: 20px;
  }

  .content-section p {
    font-size: 14px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, 220px);
    gap: 18px;
  }

  .project-card {
    width: 220px;
    height: 220px;
  }

  .project-card h2 {
    font-size: 20px;
  }

  .project-card p {
    font-size: 14px;
  }
}

/* ========================= */
/* RESPONSIVE MOBILE */
/* ========================= */

@media (max-width: 480px) {

  .header {
    padding: 12px;
  }

  .title h1 {
    font-size: 22px;
  }

  .nav-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-buttons a {
    font-size: 14px;
    padding: 8px 10px;
    max-width: none;
    white-space: nowrap;
  }

  .content-section {
    width: calc(100% - 20px);
    padding: 18px;
  }

  .content-section h2 {
    font-size: 18px;
  }

  .content-section p {
    font-size: 13px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, 160px);
    gap: 14px;
    width: calc(100% - 20px);
    margin: 24px auto;
  }

  .project-card {
    width: 160px;
    height: 160px;
    padding: 14px;
  }

  .project-card h2 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .project-card p {
    font-size: 12px;
    line-height: 1.4;
  }
}
