/* ===== BOUTONS FILTRE ===== */
#myBtnContainer {
  text-align: left;
  margin-bottom: 40px;
    display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-p {
  border: none;
  outline: none;
  padding: 12px 16px;
  background-color: #fff;
  cursor: pointer;
  border-radius: 6px;
  transition: .3s;
    flex: 1 1 calc(50% - 10px);
  text-align: center;
}

/* Grey background color on mouse-over */
.btn-p:hover {
  background-color: #ddd;
}

/* Dark background color to the active button */
.btn-p.active {
  background-color: #243040;
  color: #fff;
}

.btn-p.active:hover {
  background-color: #ddd;
  color: #000;  
}

@media (max-width: 538px) {
	#myBtnContainer {
	  display: flex;
	  flex-wrap: wrap;
	  gap: 10px;
	}

	.btn-p {
	  flex: 1 1 calc(50% - 10px); /* 2 boutons par ligne */
	  text-align: center;
	}

}

/* Desktop → ligne normale */
@media (min-width: 539px) {
  .btn-p {
    flex: initial;
  }
}

/* ===== GRID PORTFOLIO ===== */

#portfolioContainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}


/* ===== VIGNETTES ===== */

.column {
  transition:.35s ease;
}

.column.hide {
  opacity: 0;
  transform: scale(.9);
  pointer-events: none;
  position: absolute;
}


/* ===== ITEM ===== */

.portfolio-item {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
}

.portfolio-item a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== MINIATURE PDF ===== */

.portfolio-item figure {
  margin       : 0;
  position     : relative;
  float        : left;
  overflow     : hidden;
  width        : 100%;
  text-align   : left;
  border-radius: 8px;
}

/* ===== IMAGE ===== */

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.08);
}


/* ===== TITRE OVERLAY ===== */

.portfolio-item h5 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 15px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  transform: translateY(100%);
  transition: .35s ease;
}

.portfolio-item:hover h5 {
  transform: translateY(0);
}


/* ===== GRID RESPONSIVE ===== */

@media(max-width:900px) {

  #portfolioContainer {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media(max-width:600px) {

  #portfolioContainer {
    grid-template-columns: 1fr;
  }

}
