/*
Theme Name:BS CONSEIL
Theme URI: https://bs-conseil.me
Description: BS CONSEIL
Author: BS CONSEIL
Author URI: https://bs-conseil.me
Template: Divi
Version: 1.0
*/

/* Start your custom CSS bellow this comment
============================================ */
/* ==========================================================================
   STYLE GLOBAL GRAVITY FORMS (S'APPLIQUE À TOUS LES FORMULAIRES)
   ========================================================================== */

:root {
  --gf-custom-primary: #509bca;
  --gf-custom-primary-hover: #1e4b77;
  --gf-custom-border: #e8ecef;
  --gf-custom-text: #00000080;
  --gf-custom-placeholder: #00000080;
}

/* 1. CONTENEUR GLOBAL DE FORMULAIRE (CARTE BLANCHE) */
.gform_wrapper.gform-theme {
  --gf-form-gap-y: 20px !important;
  background-color: #ffffff !important;
  border: 1px solid var(--gf-custom-border) !important;
  border-radius: 10px !important;
  padding: 40px !important;
  box-sizing: border-box !important;
}

/* Cacher la légende par défaut */
.gform_wrapper .gform_required_legend,
.gform_wrapper .gfield_label {
  display: none !important;
}

/* Exception : Réafficher les labels inline (Radio / Checkboxes / RGPD) */
.gform_wrapper .gfield_checkbox .gform-field-label--type-inline,
.gform_wrapper .gfield_radio .gform-field-label--type-inline,
.gform_wrapper .gfield_consent_label {
  display: inline-block !important;
  font-size: 16px !important;
  color: var(--gf-custom-text) !important;
  font-weight: 400 !important;
  cursor: pointer !important;
}

/* 2. STYLE DES CHAMPS TEXTE, TEL, EMAIL & TEXTAREA */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="email"],
.gform_wrapper textarea {
  width: 100% !important;
  background-color: #ffffff !important;
  border: 1px solid var(--gf-custom-border) !important;
  border-radius: 10px !important;
  padding: 18px 15px !important;
  font-size: 16px !important;
  color: var(--gf-custom-text) !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease !important;
  box-shadow: none !important;
}

.gform_wrapper input[type="text"]::placeholder,
.gform_wrapper input[type="tel"]::placeholder,
.gform_wrapper input[type="email"]::placeholder,
.gform_wrapper textarea::placeholder {
  font-size: 16px !important;
  color: var(--gf-custom-text) !important;
}

/* 3. FIX SPÉCIFIQUE POUR LES SELECT (LISTES DÉROULANTES) */
.gform_wrapper select {
  width: 100% !important;
  height: 58px !important; /* Fixe la hauteur totale */
  line-height: 1.3 !important;
  background-color: #ffffff !important;
  border: 1px solid var(--gf-custom-border) !important;
  border-radius: 10px !important;
  padding: 20px 45px 15px 15px !important; /* Padding vertical à 0 pour recentrer le texte */
  font-size: 16px !important;
  color: var(--gf-custom-text) !important;
  outline: none !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  background-size: 12px auto !important;
  cursor: pointer !important;
}

.gform_wrapper select option {
  color: #333333 !important;
  background-color: #ffffff !important;
}

/* 4. TEXTAREA (ZONE DE MESSAGE) */
.gform_wrapper textarea {
  min-height: 140px !important;
  resize: vertical !important;
}

/* 5. CHECKBOXES, RADIO ET RGPD */
.gform_wrapper .gfield_checkbox,
.gform_wrapper .gfield_radio {
  display: flex !important;
  gap: 25px !important;
  flex-wrap: wrap !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

.gform_wrapper .gchoice,
.gform_wrapper .ginput_container_consent {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.gform_wrapper input[type="checkbox"],
.gform_wrapper input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  border: 1px solid var(--gf-custom-border) !important;
  cursor: pointer !important;
  accent-color: var(--gf-custom-primary) !important;
}

.gform_wrapper input[type="checkbox"] {
  border-radius: 4px !important;
}

/* Textes RGPD / Légende bas */
.gform_wrapper .gfield_consent_description {
  font-size: 12px !important;
  color: #777777 !important;
  line-height: 1.5 !important;
  margin-top: 10px !important;
  border: 1px solid var(--gf-custom-border) !important;
  padding: 12px 15px !important;
  border-radius: 8px !important;
  background-color: #fafafa !important;
}

/* 6. BOUTON D'ENVOI (SUBMIT) */
.gform_wrapper .gform_footer {
  display: flex !important;
  justify-content: center !important;
  margin-top: 30px !important;
  padding: 0 !important;
}

.gform_wrapper .gform_button {
  background-color: var(--gf-custom-primary) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 25px !important;
  padding: 12px 50px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition:
    background-color 0.25s ease,
    transform 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(80, 155, 202, 0.2) !important;
}

.gform_wrapper .gform_button:hover {
  background-color: var(--gf-custom-primary-hover) !important;
  transform: translateY(-2px) !important;
}

/* 7. RESPONSIVE MOBILE */
@media screen and (max-width: 767px) {
  .gform_wrapper.gform-theme {
    padding: 25px 20px !important;
    border-radius: 12px !important;
  }

  .gform_wrapper .gfield_checkbox,
  .gform_wrapper .gfield_radio {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .gform_wrapper .gform_button {
    width: 100% !important;
  }
}

/* STYLES UNIQUEMENT MOBILES (<= 767px) */
@media screen and (max-width: 767px) {
  /* Masquage et repliement par défaut */
  .depliant-mobile .et_pb_text_inner {
    position: relative !important;
    max-height: 120px !important; /* Hauteur initiale masquée */
    overflow: hidden !important;
    transition: max-height 0.4s ease-in-out !important;
  }

  /* Repassage du texte en alignement à gauche sur mobile */
  .depliant-mobile .et_pb_text_inner p {
    text-align: left !important;
  }

  /* ÉTAT DÉPLIÉ (Quand la classe is-expanded est active) */
  .depliant-mobile.is-expanded .et_pb_text_inner {
    max-height: 3000px !important; /* Hauteur max pour afficher tout le contenu */
  }

  /* Style du bouton */
  .depliant-mobile-btn {
    display: inline-block !important;
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    padding: 0 !important;
    margin-top: 10px !important;
    font-weight: 600 !important;
    font-style: italic !important;
    color: var(--gcid-primary-color, #1e4b77) !important;
    cursor: pointer !important;
    outline: none !important;
  }
}

h1,
body:not(.single-post) h2:not(.actu-card-title):not(.real-card-title) {
  padding-bottom: 0;
  padding-left: 30px;
  border-left: 1px solid var(--gcid-secondary-color, #1e4b77);
}

@media screen and (min-width: 768px) {
  .depliant-mobile-btn {
    display: none;
  }
}
