.recent-posts {
  position: relative;
  margin: 1rem 0;
}

.acf-block-preview .recent-posts {
  margin: 0.5rem 0;
}

.slider-post-container {
  overflow: hidden;
  width: calc(100% - 0.5rem);
  margin: 0 auto;
}

.acf-block-preview .slider-post-container {
  overflow: auto;
  width: calc(100% - 0.5rem);
  margin: 0 auto;
}

.slide-post {
  transition: transform 0.33s ease;
}
.slide-post a {
  display: block;
  text-decoration: none;
  pointer-events: fill;
  margin: 0 -2rem;
}

.acf-block-preview .slide-post a {
  pointer-events: none;
}
.slide-post:hover,
.slide-post.active {
  transform: scale(1.05) !important;
}

/*** FAIRE HOVER DU BOUTON == SLidePostTitle => background-color passe au clair ***/
.slide-image {
  position: relative;
  display: block;
  width: 100%;
  height: 68vw;
}

.acf-block-preview .slide-image {
  height: 20rem;
}

.slide-post-figure {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 2rem;
  margin: 0;
}
.slide-post-figure::after {
  box-sizing: border-box;
  position: relative;
  content: " ";
  display: block;
  width: 100%;
  height: 100%;
  border: solid medium white;
  top: calc(-100% - 1rem);
  left: 1rem;
  z-index: -2;
}
.slide-post-figure::before {
  box-sizing: border-box;
  position: relative;
  content: " ";
  display: block;
  width: 100%;
  height: 100%;
  background-color: #fdebed;
  bottom: -1rem;
  left: -1rem;
  z-index: -2;
}
.slide-post-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  padding: 2rem;
}

.acf-block-preview .slide-post-figure img {
  display: block;
  width: 100%;
  height: 100%;
}

.slide-post-title {
  position: relative;
  right: 0;
  top: 0;
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem 1.2rem 0.6rem;
  text-align: center;
  border: 2px white solid;
  border-radius: 5rem;
  background-color: #365664;
  transition: background-color 0.33s ease;
}

.bg-peche .slide-post-title {
  background-color: #f09992;
}
.bg-peche-light .slide-post-title {
  background-color: #f8cac8;
}
.bg-petrole .slide-post-title {
  background-color: #81adc8;
}
.bg-petrole-light .slide-post-title {
  background-color: #b6d8ee;
}
.bg-white .slide-post-title {
  background-color: white;
}
.bg-peche .slide-post:hover .slide-post-title {
  background-color: #365664;
}
.bg-peche-light .slide-post:hover .slide-post-title {
  background-color: #365664;
}
.bg-petrole .slide-post:hover .slide-post-title {
  background-color: #f5b6b2;
}
.bg-petrole-light .slide-post:hover .slide-post-title {
  background-color: #f5b6b2;
}
.bg-white .slide-post:hover .slide-post-title {
  background-color: #bebebe;
}

.slide-post-title h3 {
  margin: 0;
  font-size: 1rem;
  color: white;
}

.bg-white .slide-post-title h3 {
  color: #878787;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .recent-posts {
    margin: 3rem -4rem 2rem;
    padding-bottom: 2rem;
  }
  .slide-post a {
    margin: 0;
  }
  .slide-image {
    height: 38vw;
  }
}

@media (min-width: 1024px) {
  .recent-posts {
    margin: 2rem -8rem -2rem;
    padding-bottom: 1rem;
  }

  .slide-post a {
    margin: 0;
  }
  .slide-image {
    height: 20vw;
  }
}
