/*
Theme Name: syvrac
Description: Theme enfant de Divi
Author: Mikaël Le Rest
Author URI:
Template: Divi
Version: 0.1.0
*/

/*****************************************************************************/
/***************************** Section services *****************************/
/*****************************************************************************/

/* Assurer que le conteneur de la carte est en position relative */
.et-db #page-container #et-boc .et-l .card_section {
  position: relative;
}

/* Conteneur de chaque colonne de carte en flex */
.et-db #page-container #et-boc .et-l .card_section .et_pb_column {
  flex: 1 1 33.333%;
  height: max-content;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
}

.et-db #page-container #et-boc .et-l .card_section .et_pb_module {
  position: relative;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 33%;
}

.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content {
  position: relative;
  background-color: #fff;
  overflow: hidden;
  border-bottom: 6px solid #FCC400;
  height: 435px;
  transition: opacity 1s ease-in-out, transform 3s ease-in-out;
}

.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content::before {
  background-image: url('/wp-content/uploads/sdot.svg');
  content: "";
  position: absolute;
  background-repeat: no-repeat;
  top: 0;
  left: 2.5rem;
  width: 50px;
  height: 140px;
  z-index: 1;
}

.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_container {
  margin: 20px 30px 0 30px;
}

@media only screen and (min-width: 981px) {
/* Lors du hover */
    .et-db #page-container #et-boc .et-l .card_section .et_pb_module:hover .et_pb_blurb_container {
      position: absolute;
      animation: deplacement 0.5s ease-in-out 1 forwards;
      transition: opacity 1s ease-in-out, transform 0.5s ease-in-out;
    }

    @keyframes deplacement {
      from {
        top: 100%;
      }

      to {
        top: 25%;
      }
    }

}

.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content .et_pb_main_blurb_image {
  max-width: 100%;
}

.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content img {
  height: 320px;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.5s ease-in;
  border-radius: 0 0 30px 0;
}

/* Lors du hover */
.et-db #page-container #et-boc .et-l .card_section .et_pb_module:hover .et_pb_blurb_content img {
  opacity: 0;
}

/* Style du titre h3 initialement positionné en bas */
.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content .et_pb_blurb_container h3.et_pb_module_header {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}

/* Style du texte initialement positionné en bas */
.et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content .et_pb_blurb_container p {
  display: none;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 400;
}

/* Lors du hover */
.et-db #page-container #et-boc .et-l .card_section .et_pb_module:hover .et_pb_blurb_content p {
  display: block;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/*****************************************************************************/
/***************************** Version Responsive ***************************/
/*****************************************************************************/

/* Écrans moyens (max-width: 1024px) : 3 colonnes */
@media only screen and (max-width: 1024px) {
  .et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content {
    height: 465px;
  }

  .et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_container {
    margin: -0px 20px 0 20px;
  }

  .et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content .et_pb_blurb_container h3.et_pb_module_header {
    font-size: 1.15rem;
    line-height: 1.2;
    font-weight: 600;
  }
}

/* Écrans plus petits (max-width: 768px) : 2 colonnes */
@media only screen and (max-width: 768px) {
  .et-db #page-container #et-boc .et-l .card_section .et_pb_module {
    width: 50%;
  }

  .et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content {
    height: 720px;
  }

  .et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content .et_pb_blurb_container p {
    display: block;
    padding-bottom: 1rem;
  }
}

/* Mobile (max-width: 450px) : 1 colonne */
@media only screen and (max-width: 450px) {
  .et-db #page-container #et-boc .et-l .card_section .et_pb_module {
    width: 100%;
  }

  .et-db #page-container #et-boc .et-l .card_section .et_pb_module .et_pb_blurb_content {
    height: auto;
  }

  .et-db #page-container #et-boc .et-l .card_section .et_pb_module:hover .et_pb_blurb_content img {
    opacity: 1;
  }
}
