/* Reset et styles de base */
* {
  box-sizing: border-box;
}

.galerie {
  box-sizing: border-box;
}

.body {
  font-size: 1.2rem;
}

.content img {
  max-width: 100%;
  height: auto;
}

.row {
  margin: 8px -16px;
  display: flex;
  flex-wrap: wrap;
}

/* Conteneur des boutons de filtrage */
#myBtnContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  color: white;
  padding: 10px;
  margin: 0 0 20px 0;
}

#myBtnContainer button {
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 1rem;
  color: white;
  background-color: transparent;
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#myBtnContainer button:hover,
#myBtnContainer button.active {
  background-color: white;
  color: black;
}

/* Colonnes */
.column {
  float: left;
  display: none;
  padding: 15px;
  width: 100%; /* Par défaut: 1 colonne sur mobile */
}

/* Afficher les éléments filtrés */
.show {
  display: block;
}

/* Clear floats */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Contenu des cartes */
.content {
  position: relative;
  transition: all 0.4s ease;
  padding: 10px;
  overflow: hidden;
}

.content span img {
  margin: 50px auto;
  width: 15%;
  box-shadow: none;
}

.content img {
  width: 100%;
  height: auto;
  display: block;
}

.content p {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
}

.content span {
  display: block;
  border: 3px solid #fff;
  width: 100%;
  padding: 15px;
  text-align: center;
  color: white;
  font-family: 'Merienda', cursive;
  font-size: 1rem;
  text-transform: capitalize;
}

.button.portfolio {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background-color: white;
  color: black;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9rem;
}

.button.portfolio-savoir {
  display: block;
  text-align: center;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: white;
  color: black;
  text-decoration: none;
  border-radius: 5px;
  max-width: 200px;
}

/* Sur mobile, afficher le texte au tap/click */
.content:active p {
  opacity: 1;
}

/* TABLETTE (768px - 979px) */
@media screen and (min-width: 768px) and (max-width: 979px) {
  .column {
    width: 50%; /* 2 colonnes sur tablette */
  }

  #myBtnContainer button {
    font-size: 0.9rem;
    padding: 10px 15px;
  }

  .content span {
    font-size: 1.5rem;
    border: 4px solid #fff;
  }

  .content:hover {
    transform: scale(1.05);
  }

  .content:hover p {
    opacity: 1;
  }
}

/* DESKTOP (980px et plus) */
@media screen and (min-width: 980px) {
  .container {
    max-width: 100%;
  }

  .column {
    width: 33.33%; /* 3 colonnes sur desktop */
  }

  #myBtnContainer button {
    font-size: 1rem;
    padding: 10px 20px;
  }

  .content img {
    max-height: 289px;
    object-fit: cover;
  }

  .content span {
    font-size: 2rem;
    border: 6px solid #fff;
    padding: 20px;
  }

  .content:hover {
    transform: scale(1.1);
    z-index: 10;
  }

  .content:hover p {
    opacity: 1;
  }
}

/* GRAND ÉCRAN (1200px et plus) */
@media screen and (min-width: 1200px) {
  .column {
    width: 25%; /* 4 colonnes sur grand écran */
  }

  .content span {
    font-size: 2.5rem;
  }

  #myBtnContainer button {
    font-size: 1.2rem;
  }
}