
.portfolio-hero h1 {
  position: absolute;
  top: 17%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(216, 216, 216);
  font-size: clamp(32px, 5vw, 64px);
  font-family: 'ClashDisplay-Bold', serif;
  text-align: center;
  letter-spacing: 1px;
  z-index: 2;
}
.section-intro-portfolio{
  font-family: "Outfit", serif;
  font-size: 20px;
  font-weight: lighter;
  letter-spacing: 0.6;
  font-weight: 500;
  top: 0px;
}
/* Grille classique */
#portfolioGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.masonry-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.masonry-item img {
  width: 100%;
  height: 200px; /* toutes les cartes mêmes dimensions */
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.masonry-item:hover img {
  transform: scale(1.05);
}

/* Overlay */
.masonry-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-text {
  color: #fff;
  text-align: center;
  padding: 0 10px;
  font-size: 15px;
  line-height: 0.8;
}
.masonry-text h3{
  color: #fff;
  text-align: center;
  padding: 0 10px;
  font-size: 15px;
  line-height: 0.8;
  font-weight: 700;
}
/* Responsive */
@media (max-width: 1024px) {
  #portfolioGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #portfolioGrid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 768px) {
  .portfolio-hero {
    height: 40vh;
  }

  .portfolio-hero h1 {
    font-size: clamp(24px, 8vw, 40px);
  }
}





/* État initial des éléments animés */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}

/* Quand l’élément entre dans la lumière (viewport) */
[data-animate].in-view,
[data-animate].in-view .section-title,
[data-animate].in-view .section-intro,
[data-animate].in-view .service-card,
[data-animate].in-view .masonry-grid,
[data-animate].in-view .masonry-grid > div,
[data-animate].in-view .portfolio-card,
[data-animate].in-view .carousel-slide {
  opacity: 1;
  transform: none;
}

.portfolio-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 3rem;
}

/* Hero image */
.hero-image {
  width: 100%;
  height: 45vh; /* hauteur raisonnable */
  overflow: hidden;
  z-index: 0;
}

.hero-image img {
  width: 100%;
  height: 45vh;
  object-fit: cover; /* recadre l’image sans la déformer */
  display: block;
  filter: brightness(0.6);
  z-index: 1;
}

/* Texte hero sous l'image */
.hero-text {
  text-align: center;
  margin-top: 1rem;
}



.textsizeport {
  padding-top: 40px;
  width: 87%;
  align-items: center;
  margin: auto;
  padding-bottom: 60px;
}


.section-title-portfolio {
  font-family: "ClashDisplay-Light", serif;
  font-size: 25px;
  font-weight: lighter;
  letter-spacing: 0.6px;
  color: #ccc; /* ou var(--muted) */
  z-index: 10;
}

/* Responsive */
@media (max-width:768px) {
  .hero-image {
    height: 60vh;
  }
  .hero-image img {
    height: 35vh;
  }

  .hero-text h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .section-title-portfolio {
    font-size: 18px;
  }
}
/* Overlay visible tout le temps sur mobile */
@media (max-width: 768px) {
  .masonry-overlay {
    opacity: 1 !important; /* toujours visible */
    background: rgba(0,0,0,0.45); /* tu peux ajuster la transparence si besoin */
  }

}
