/*
 Theme Name:   ATTPS
 Theme URI:    https://example.com
 Description:  Thème enfant ATTPS pour Divi 5 – Personnalisations préservées lors des mises à jour.
 Author:       Votre Nom
 Author URI:   https://example.com
 Template:     Divi
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  attps
*/

/* ==========================================================================
   Vos styles personnalisés ci-dessous
   ========================================================================== */

.custom-li {
  ul {
    list-style-type: none;
    padding-left: 0;

    li {
      position: relative;
      display: flex;
      align-items: flex-start;
      margin-bottom: 5px;

      &::before {
        content: "\f00c";
        font-family: "Font Awesome 7 Pro";
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        background-color: #587dbd;
        color: #ffffff;
        font-size: 11px;
        border-radius: 50%;
        margin-right: 12px;
        flex-shrink: 0;
      }
    }
  }
}

.li-custom-box {
  ul {
    list-style-type: none;
    padding-left: 0;

    li {
      position: relative;
      display: block;
      padding-left: 43px;
      margin-bottom: 25px;
      line-height: 1.4;

      &::before {
        content: "\f00c";
        font-family: "Font Awesome 7 Pro";
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 28px;
        height: 28px;
        background-color: #587dbd;
        color: #ffffff;
        font-size: 13px;
        border-radius: 6px;

        position: absolute;
        left: 0;
        top: 2px;
      }

      strong {
        font-size: 16px;
        display: inline-block;
        margin-bottom: 4px;
      }
    }
  }
}

/* ==========================================================================
   STYLISATION DU FORMULAIRE
   ========================================================================== */

#gform_wrapper_1 {
  background-color: #f4f6f9;
  border: 1px solid #4a72b24d;
  border-radius: 24px;
  padding: 50px;
  margin: 40px auto;
  box-sizing: border-box;
}

#gform_wrapper_1 .gform_heading,
#gform_wrapper_1 .gfield_label_before_complex {
  display: none !important;
}

#gform_wrapper_1 fieldset {
  border: none !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
}

#gform_wrapper_1 input[type="text"],
#gform_wrapper_1 input[type="tel"],
#gform_wrapper_1 input[type="email"],
#gform_wrapper_1 textarea,
#gform_wrapper_1 select,
#gform_wrapper_1 .gfield_radio {
  background-color: #ffffff !important;
  border: 1.5px solid #e1ecf4 !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  font-size: 16px !important;
  color: #1f4167 !important;
  width: 100% !important;
  box-sizing: border-box;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

#gform_wrapper_1 textarea {
  height: 160px !important;
  resize: vertical;
}

#gform_wrapper_1 input:focus,
#gform_wrapper_1 textarea:focus,
#gform_wrapper_1 select:focus {
  border-color: #4a72b2 !important;
  outline: none;
}

#gform_wrapper_1 ::placeholder {
  color: #7a8b9e !important;
  opacity: 0.8;
}

#gform_wrapper_1 .gform_fields {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
}

#gform_wrapper_1 .ginput_complex.gform-grid-row {
  display: flex !important;
  gap: 10px !important;
}
#gform_wrapper_1 .ginput_complex .gform-grid-col {
  flex: 1 !important;
}

@media (min-width: 769px) {
  #gform_wrapper_1 .gfield--width-half {
    display: inline-block !important;
    width: calc(50% - 10px) !important;
  }
}

#gform_wrapper_1 .gfield_radio {
  display: flex !important;
  align-items: center !important;
  gap: 40px !important;
  width: 100% !important;
  flex-direction: row;
  justify-content: flex-end;
}

#field_1_9 {
  position: relative;
}
#field_1_9 legend.gfield_label {
  display: inline-block !important;
  font-size: 16px !important;
  color: #7a8b9e !important;
  font-weight: 500;
  margin-bottom: 0 !important;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
#input_1_10,
#input_1_9 {
  padding-left: 140px !important;
}

#gform_wrapper_1 .gchoice {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px;
  cursor: pointer;
}
#gform_wrapper_1 .gchoice label {
  font-size: 16px !important;
  color: #555555 !important;
  margin: 0 !important;
  cursor: pointer;
}

#gform_wrapper_1 select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 1L15 6M15 6L10 11M15 6H1' stroke='%234A72B2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 25px) center !important;
  color: #7a8b9e !important;
  cursor: pointer;
}

#field_1_6 {
  margin-top: 15px !important;
}
#field_1_6 .ginput_container_consent {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px;
}
#field_1_6 .gfield_consent_label {
  font-size: 15px !important;
  color: #555555 !important;
  line-height: 1.3 !important;
}

#gform_wrapper_1 .gfield_consent_description {
  background-color: #eff2f6 !important;
  border: 1px solid #e1ecf4 !important;
  border-radius: 4px;
  padding: 15px 20px !important;
  font-size: 13px !important;
  color: #6a7c92 !important;
  line-height: 1.5 !important;
  margin-top: 12px !important;
}

#gform_wrapper_1 .gform_footer {
  padding: 20px 0 0 0 !important;
  margin: 0 !important;
  clear: both;
}

#gform_wrapper_1 input[type="submit"] {
  background-color: #4a72b2 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 45px !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease !important;
}

#gform_wrapper_1 input[type="submit"]:hover {
  background-color: #3b5e94 !important;
}

#gform_wrapper_1 input[type="submit"]:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  #gform_wrapper_1 {
    padding: 25px 20px;
  }
  #gform_wrapper_1 .ginput_complex.gform-grid-row {
    flex-direction: column !important;
    gap: 15px !important;
  }
  #gform_wrapper_1 .gfield_radio {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
    padding-left: 20px !important;
    padding-top: 45px !important;
  }
  #field_1_9 legend.gfield_label {
    top: 25px;
  }
  #gform_wrapper_1 input[type="submit"] {
    width: 100% !important;
  }
}

#gform_wrapper_1 select.gfield_select {
  color: #7a8b9e !important;
  font-size: 16px !important;
  line-height: 1 !important;
  display: block !important;
  height: auto !important;
  min-height: 56px !important;
  padding: 16px 50px 16px 20px !important;
}

#gform_wrapper_1 select.gfield_select option {
  color: #1f4167 !important;
  background-color: #ffffff !important;
  padding: 10px !important;
}

#gform_wrapper_1 .gfield {
  flex: 1 1 100% !important;
  width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
}

@media (min-width: 769px) {
  #gform_wrapper_1 #field_1_3,
  #gform_wrapper_1 #field_1_4 {
    flex: 1 1 calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
  }
}

@media (max-width: 980px) {
  .et_pb_menu .et_mobile_menu {
    position: fixed;
  }
}

/* ==========================================================================
   STYLISATION BARRE NEWSLETTER
   ========================================================================== */
#gform_wrapper_2 {
  background-color: #ffffff !important;
  border-radius: 10px !important;
  padding: 6px 6px 6px 24px !important;
  box-sizing: border-box;
}

#gform_wrapper_2 .gform_fields {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#gform_wrapper_2 .gfield_label,
#gform_wrapper_2 .gform_heading,
#gform_wrapper_2 fieldset[data-conditional-logic="hidden"],
#gform_wrapper_2 .gfield--type-captcha {
  display: none !important;
}

#gform_wrapper_2 #field_2_1 {
  flex: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#gform_wrapper_2 input[type="email"] {
  background-color: transparent !important;
  border: none !important;
  padding: 14px 0 !important;
  font-size: 16px !important;
  color: #1f4167 !important;
  width: 100% !important;
  box-shadow: none !important;
}

#gform_wrapper_2 input[type="email"]:focus {
  outline: none !important;
}

#gform_wrapper_2 ::placeholder {
  color: #7a8b9e !important;
  opacity: 0.8;
}

#gform_wrapper_2 .gform_footer {
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  position: absolute;
  right: 5px;
  bottom: 6px;
}

#gform_wrapper_2 input[type="submit"] {
  background-color: #e2a593 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-family: "Montserrat", Helvetica, Arial, Lucida, sans-serif;
  transition:
    background-color 0.3s ease,
    transform 0.1s ease !important;
  white-space: nowrap;
}

#gform_wrapper_2 input[type="submit"]:hover {
  background-color: #d49380 !important;
}

#gform_wrapper_2 input[type="submit"]:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  #gform_wrapper_2 {
    margin-bottom: 60px;
  }

  #gform_wrapper_2 .gform_footer {
    right: 0;
  }
}

/* ==========================================================================
   STYLISATION DES CARTES BLOG DIVI
   ========================================================================== */

.et_pb_blog_posts.et_grid_module::before,
.et_pb_blog_posts.et_grid_module::after {
  display: none !important;
}

.et_pb_blog_posts.et_grid_module article.et_pb_post {
  background-color: #1f4167 !important;
  border-radius: 10px !important;
  border: none;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  box-shadow: 0 10px 30px rgba(17, 35, 55, 0.08) !important;
}

/* 3. Conteneur de l'image (Fixer la taille de l'image) */
.et_pb_blog_posts.et_grid_module .et_pb_image_container {
  width: 100% !important;
  height: 300px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.et_pb_blog_posts.et_grid_module .et_pb_image_container a,
.et_pb_blog_posts.et_grid_module .et_pb_image_container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.et_pb_blog_posts.et_grid_module .et_overlay {
  display: none !important;
}

.et_pb_blog_posts.et_grid_module .entry-title {
  flex: 1 !important;
  padding: 30px 25px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  font-family: "Montserrat", Helvetica, Arial, Lucida, sans-serif;
}

.et_pb_blog_posts.et_grid_module .entry-title a {
  color: #ffffff !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.et_pb_blog_posts.et_grid_module .entry-title a:hover {
  opacity: 0.85;
}

.et_pb_blog_posts.et_grid_module .post-meta,
.et_pb_blog_posts.et_grid_module .post-content {
  display: none !important;
}

@media (max-width: 980px) {
  .et_pb_blog_posts.et_grid_module {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 0 20px;
  }
}

@media (max-width: 600px) {
  .et_pb_blog_posts.et_grid_module {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .et_pb_blog_posts.et_grid_module .et_pb_image_container {
    height: 200px !important;
  }
  .et_pb_blog_posts.et_grid_module .entry-title {
    padding: 20px 20px !important;
  }
  .et_pb_blog_posts.et_grid_module .entry-title a {
    font-size: 18px !important;
  }
}

.et_pb_blog_posts .et_pb_post {
  opacity: 0;
}
