/* ----- Réinitialisation ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ----- Paramètres globaux ----- */
body {
  font-family: 'Roboto Condensed', sans-serif;
  background-color: #fff;
  color: #000;
  line-height: 1.6;
}

a {
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: red;
}

/* ----- Conteneur principal ----- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ----- Header ----- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #ccc;
}

.site-title {
  font-size: 2rem;
  font-weight: 300;
}

.main-nav {
  position: relative;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links.open {
  display: flex;
}

/* ----- Main + Layout ----- */
main {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-top: 2rem;
}

/* ----- Galerie d’accueil ----- */
.gallery {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.gallery-item {
  flex: 1 1 calc(33.333% - 10px);
  max-width: 400px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.gallery-item img {
  width: 100%;
	max-height: 350px;
	object-fit: cover;
	align-items: center;
	vertical-align: middle;
	justify-content: center;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item span {
  display: block;
  margin-top: 0.5rem;
  font-weight: 300;
}

/* ----- Sidebar (Aside) ----- */
.sidebar {
 width: max-content; /* prend seulement la largeur du contenu */
  flex-shrink: 0;     /* ne se réduit pas */
  padding-left: 1rem;
}

.menu-group {
  margin-bottom: 2rem;
}

.menu-group h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.menu-group ul {
  list-style: none;
}

.menu-group li {
  margin-bottom: 0.3rem;
}

/* ----- Page Portfolio ----- */
.portfolio-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.subcat-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.subcat-title {
  font-size: 2rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 0rem;
  max-width: 100%;
}

.sub-subcat {
  width: 100%;
  margin-bottom: 1rem;
}

.sub-subcat-title {
  font-size: 1.4rem;
  font-weight: 300;
  margin-bottom: 1rem;
  padding-left: 0.5px;
  border-left: 0px solid red;
	text-align: center;
}


/* Galerie de projets */
.portfolio-gallery {
  display: contents;
}

/* Élément image */
.portfolio-item {
  position: relative;
  flex: 100%;
  max-width: 400px;
  overflow: hidden;
}

.portfolio-item img {
  width: 100%;
  display: block;
  transition: opacity 0.3s ease;
}

/* Effet hover : changement d'image */
.img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.portfolio-item:hover .img-hover {
  opacity: 1;
}

.portfolio-item:hover .img-base {
  opacity: 0;
}

/* Bloc texte entre les images */
.portfolio-description {
  background: #f4f4f4;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
}

.portfolio-description h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.portfolio-description h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.portfolio-description p + p {
  margin-top: 0.5rem;
}

/* Grille : le texte peut prendre 1, 2 ou 3 colonnes */
.portfolio-description.span-1 {
  grid-column: span 1;
}

.portfolio-description.span-2 {
  grid-column: span 2;
}

.portfolio-description.span-3 {
  grid-column: span 3;
}

/* Responsive */
@media (max-width: 900px) {
.portfolio-description {
    grid-column: span 1 !important;
  }
.portfolio-gallery {
    flex-direction: column;
    align-items: center;
  }
.subcat-content {
    grid-template-columns: 1fr;
  }
}


/* ----- Footer ----- */
footer {
  text-align: center;
  margin-top: auto;
  padding: 1rem 0;
  font-size: 0.9rem;
  border-top: 1px solid #ccc;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  main {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    order: 2;
    padding-left: 0;
  }

  .gallery {
    order: 1;
  }

  .gallery-item {
    flex: 1 1 100%;
  }
  }
.portfolio-gallery {
	grid-template-columns: repeat(3, 1fr); 
  }
  .menu-toggle {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    padding: 1rem;
    border: 1px solid #ccc;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
.contact {
  font-size: 21px;
  }
