@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,800');
@import url('https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css');

/* Flex Container */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Snippet 1567 */
.snip1567 {
  background-color: #000000;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
  color: #ffffff;
  display: inline-block;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6em;
  margin: 10px;
  max-width: 270px;
  min-width: 250px;
  overflow: hidden;
  position: relative;
  text-align: left;
  width: 100%;
  flex: 1 1 calc(25% - 20px); /* Ajuste la largeur et l'espace entre les éléments */
  box-sizing: border-box;
}

.snip1567 * {
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.snip1567 img {
  max-width: 100%;
  opacity: 0.75;
  position: relative;
  vertical-align: top;
}

.snip1567 figcaption {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.snip1567 h3 {
  transform: translateY(-100%);
  background-color: #000000;
  top: 0;
  font-weight: 550;
  letter-spacing: -0.4px;
  margin: 0;
  padding: 10px 20px;
  position: absolute;
  width: 100%;
  color: #ffffff;
  font-size: 18px;
}

.snip1567 p {
  position: absolute;
  width: 100%;
  bottom: 0;
  padding: 0px 20px;
  opacity: 0;
  text-align: right;
  transition-delay: 0.15s;
}

.snip1567 i {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 54px;
  transform: translate(-50%, -50%) scale(1);
}

.snip1567 .hover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  align-items: center;
  background-color: rgba(195, 50, 58, 0.75); /* Opacité à 50 % */
  display: flex;
  font-size: 65px;
  justify-content: center;
  opacity: 0;
}

.snip1567 a {
  left: 0;
  bottom: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

.snip1567:hover .hover,
.snip1567.hover .hover {
  opacity: 1;
}

.snip1567:hover p,
.snip1567.hover p {
  opacity: 1;
}

.snip1567:hover h3,
.snip1567.hover h3 {
  transform: translateY(0%);
}

.snip1567:hover i,
.snip1567.hover i {
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0;
}

/* Pour les tailles d'écran plus petites, comme les téléphones */
@media only screen and (max-width: 768px) {
  .flex-container {
    justify-content: center; /* Centre les éléments */
  }
  
  .snip1567 {
    flex: 1 1 calc(50% - 20px); /* Ajuste la largeur pour deux images par ligne */
    max-width: calc(50% - 20px); /* Ajuste la largeur pour deux images par ligne */
    margin: 10px;
  }
}
