body, h1, h2, h3, p, ul {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}

/* ---- STYLE GÉNÉRAL ---- */
body {
  font-family: Arial, sans-serif;
  font-size : 14px;
  color: #000000;
  background: #e5e5e5;
  line-height: 1.5;
  margin: 0;
}

/* ---- NAVIGATION ---- */
header {
  background: #e5e5e5;
  border-bottom: 1px solid #000000;
  padding: 1rem 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #000000;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ← clé */
    gap: 0.4rem;
  }

  nav a {
    text-align: left;
  }

  nav ul {
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 0;
  }
}

/* ---- CONTENU ---- */
main {
  padding: 2rem;
}

.intro {
  max-width: 700px;
  margin-bottom: 1rem;
}

.portfolio .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.project img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ---- FOOTER ---- */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.7rem;
  color: #666;
}
/* ---- PAGE À PROPOS ---- */


.about-wrapper {
  display: grid;
  grid-template-columns: 1fr; /* 1 colonne sur mobile */
  gap: 0.8rem; /* marges fines */
  padding: 0 0.3rem; /* marge latérale*/
  max-width: 1600px; /* ajuste la largeur totale ici */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .about-wrapper {
    grid-template-columns: repeat(1, 1fr); /* 2 colonnes sur ordi */
    gap: 0.8rem;
    padding: 0 0.2rem;
    max-width: 1600px; /* largeur adaptée au texte du menu */
  }
}
.about-wrapper p {
  margin-bottom: 1.6rem;
  line-height: 1.6;
  color: #000;
}

.about-wrapper h1,
.about-wrapper h2 {
  margin-bottom: 1.6rem;
}


.about-page a {
  color: #000;
  text-decoration: none;
}

.about-page a:visited {
  color: #000;
}

.about-page a:hover {
  color: #000000;
  text-decoration: underline;
}
.cv-button:hover {
  background: #333;
}

.about-photo {
  flex: 1 1 300px;
  text-align: center;
}

.about-photo img {
  width: 100%;
  max-width: 300px;
  border-radius: 0px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ---- Grille de projets (page d'accueil) ---- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 colonne sur mobile */
  gap: 0.8rem; /* marges fines */
  padding: 0 0.3rem; /* marge latérale*/
  max-width: 1600px; /* ajuste la largeur totale ici */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr); /* 2 colonnes sur ordi */
    gap: 0.8rem;
    padding: 0 0.2rem;
    max-width: 1600px; /* largeur adaptée au texte du menu */
  }
}

.project-card {
 display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  transform: scale(1.02);
}

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


.project-caption {
  margin-top: 0.5rem;
  font-size: 12px; /*0.6rem*/
  line-height: 1.4;
  color: #000000;
  font-family: 'arial', sans-serif;
  text-align: left;
}

.project-caption em {
  color: #000000;
  font-style: italic;
}

.project-caption strong {
  font-weight: 500;
}

.project-caption a {
  color: #000000;
  text-decoration: none;
}

.project-caption a:visited {
  color: #000000;
}

.project-caption a:hover {
  color: #000000;
  text-decoration: underline;
}


/* --------- LIGHTBOX (sans scroll, avec espace autour) --------- */

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  padding: 3rem; /* espace autour de l’image */
  box-sizing: border-box;
}

.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 80%; /* pour garder une marge en bas et en haut */
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content video {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-content img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* l’image s’adapte à la fenêtre sans débordement */
}

/* Toute la zone devient cliquable pour fermer */
.lightbox-close {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
  z-index: 1; /* sous l'image, mais clique traversant */
}

@media (max-width: 768px) {

  .lightbox {
    padding: 1rem; /* moins de marge autour */
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .lightbox-content img,
  .lightbox-content video {
    max-width: 100%;
    max-height: 100%;
  }
}
