/* Variables */
:root {
  --primary: #0a5c84;
  --secondary: #0097c2;
  --border: #7fcbe0;
  --white: #fff;
  --gray: #888787;
  --light-gray: #ccc;
}

/* Listing Tabs */
.listing-tab {
  display: none; /* Par défaut, on cache tous les tabs */

  &[id='listing_tab_' + data-active-tab] {
    display: block; /* Affiche le tab actif */
  }
}

/* Profile Sections */
.profile-body {
  padding-top: 40px !important;
  padding-bottom: 0 !important;

  .section-wrapper .section-title {
    margin-bottom: 60px !important;
  }

  &#avis {
    padding-top: 0;
  }

  .container .description .pf-head {
    display: none;
  }
}

body.single-listing .single-job-listing {
  background: #edf4f7;
  background-image: url('/wp-content/themes/b2b-immo/img/back-apropos.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top left;
  padding-bottom: 100px;
  background-attachment: fixed;
}

body.single-listing.type-programme .featured-section {
  display: none;
}

body.single-listing.type-programme #content {
  display: none;
}
body.single-listing.type-programme #contact {
  display: none;
}

body.single-listing.type-programme .section-wrapper {
  width: 1300px;
  margin: 0 auto;
  position: relative;
}

body.single-listing.type-programme .back-button {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  cursor: pointer;
  transition: all 0.2s ease-in;
  z-index: 3;
}

body.single-listing.type-programme .back-button i {
  width: 50px;
  height: 50px;
  line-height: 50px;
  border: 2px solid #0a5c84;
  border-radius: 100%;
  text-align: center;
  color: #0a5c84;
  font-size: 1.8em;
  cursor: pointer;
}

body.single-listing.type-programme .back-button:hover i {
  background: #0a5c84;
  color: #fff;
}

/* Style des onglets dans le menu */
.profile-menu .cts-carousel li a {
  cursor: pointer;

  &.active {
    /* Styles pour l'onglet actif */
    font-weight: bold;
    color: #0a5c84; /* Ajustez la couleur selon votre charte graphique */
    border-bottom: 2px solid #0a5c84;
  }
}

body.single-listing .profile-cover-image {
  /* Structure de base */
  height: calc(100vh - 145px);
  padding-bottom: 0 !important;
  position: relative;

  /* Overlay et effets */
  .overlay {
    background: linear-gradient(
      0deg,
      rgba(229, 238, 243, 1) 0%,
      rgba(229, 238, 243, 0) 46%
    ) !important;
    opacity: 1 !important;
  }

  &:before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      circle,
      rgba(0, 0, 0, 0) 69%,
      rgba(0, 0, 0, 1) 100%
    );
    z-index: 0;
    opacity: 0.5;
  }

  /* Cache le titre */
  h1 {
    display: none;
  }

  /* Conteneur principal */
  .main-info-desktop {
    .listing-main-info {
      width: 100%;
      height: 100%;
      inset: 0;
      transform: none;
      padding: 0;
    }

    .col-md-6 {
      width: 100%;
      padding: 0;
      height: 100%;

      &:first-of-type {
        display: none;
      }
    }

    /* Bloc prix */
    .price-or-date {
      position: absolute;
      top: 50px;
      left: 0;
      background: rgba(10, 92, 132, 0.8);
      padding: 25px 180px 25px 60px;
      clip-path: polygon(0 0, 100% 0%, 75% 100%, 0% 100%);
      transition: all 0.2s ease-in;
      margin: 0;

      .value {
        font-size: 3em;

        span {
          display: block;
          text-transform: uppercase;
          font-weight: 300;
          font-size: 0.4em;
        }
      }
    }

    /* Bloc action */
    .action {
      position: absolute;
      bottom: 0;
      right: 0;
      background: rgba(10, 92, 132, 0.8);
      width: auto;
      min-width: 30%;
      text-align: center;
      padding: 26px 26px 26px 150px;
      clip-path: polygon(32% 0%, 100% 0%, 100% 100%, 0% 100%);

      .lmb-calltoaction {
        > a {
          background: transparent;
          &:before {
            background: transparent;
            transform: none;
          }
        }

        &:first-child {
          a span {
            font-size: 1.5em;
            font-weight: 300;
            position: relative;

            &:before,
            &:after {
              content: '';
              width: 50px;
              height: 1px;
              border-bottom: 1px solid #fff;
              position: absolute;
              bottom: 51%;
            }
            &:before {
              left: -76%;
            }
            &:after {
              right: -76%;
            }
          }
        }

        &:nth-child(2) {
          padding: 0;
          span {
            font-size: 2.5em;
            letter-spacing: 1px;
            font-weight: 400;
          }
        }
      }

      /* Style du log */
      .log {
        .element {
          background: transparent;
          border: none;
          margin: 0;
        }

        .pf-head {
          display: inline-block;
          vertical-align: top;
          i {
            font-size: 3em;
            color: #fff !important;
            margin-right: 10px;
          }
        }

        .pf-body {
          display: inline-block;
          width: auto;
          vertical-align: middle;
          padding-top: 0;

          ul {
            margin-top: 5px;

            li {
              min-width: unset;

              i {
                display: none;
              }

              a {
                font-size: 1.4em;
                text-transform: uppercase;
                color: #fff;
                margin-bottom: 0;
                padding-top: 5px;

                &:after {
                  content: '|';
                  padding: 0 10px;
                }
              }

              &:last-of-type a:after {
                content: '';
              }
            }
          }
        }
      }
    }
  }
}

.tab-template-full-width .gallery-carousel .item {
  height: 240px;
}

body.single-listing .tab-content .description .iframe {
  position: relative;
  overflow: hidden;
  width: 100% !important;
  padding-top: 56.25%;
  margin: 50px auto;
}

body.single-listing .tab-content .description .iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

body.single-listing .tab-content #log-type {
  display: none;
}

body.single-listing.type-programme .section-title .totalprice {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  font-size: 2em;
  text-transform: uppercase;
  font-weight: 600 !important;
  color: #fff;
  background: #0097c2;
  clip-path: polygon(32% 0%, 100% 0%, 100% 100%, 0% 100%);
  width: auto;
  padding: 5px 20px 0 90px;
}

body.single-listing.type-programme {
  .featured-section,
  #content,
  #contact,
  .programme,
  .lot,
  .block-type-categories,
  .type {
    display: none;
  }

  .tab-content {
    padding-top: 60px !important;
  }

  .element {
    margin-bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Section Titles */
  .section-title {
    padding: 0;
    position: relative;

    h1 {
      font-family: 'Montserrat';
      text-transform: uppercase;
      font-size: 3em;
      font-weight: 600 !important;
      letter-spacing: 2px;
      color: var(--primary);
      position: relative;
      margin-bottom: 30px;

      &:after {
        content: '';
        width: 16%;
        border-bottom: 2px solid var(--primary);
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
      }
    }

    h2 {
      text-align: left;
      font-size: 2em;
      text-transform: uppercase;
      font-weight: 600 !important;
      padding-bottom: 10px;
      color: var(--primary);
      border-bottom: 1px solid var(--primary);

      .divider {
        display: inline-block;
        width: 5px;
        height: 5px;
        border-radius: 100%;
        background: var(--primary);
        margin-left: 10px;
        position: relative;
        top: -5px;
      }
    }
  }
}

/* Type Title */
.typetitle {
  padding: 50px 50px 0;
}

/* Left Column */
.cts-left-column {
  background: white;

  .price {
    display: none;
  }

  .lot-img {
    margin-top: -40px;
    margin-bottom: -38px;
  }

  .status .element {
    padding-top: 0;
  }

  .details-block {
    margin-top: -30px;

    .element {
      i {
        display: none;
      }

      ul {
        padding-left: 20px;

        li {
          border-bottom: 1px dashed var(--border);
          padding-bottom: 15px;

          span {
            font-size: 1.3em;

            strong {
              color: var(--primary);
            }

            &:before {
              content: '';
              width: 8px;
              height: 8px;
              border-radius: 100%;
              background: var(--primary);
              margin-right: 10px;
              display: inline-block;
            }
          }
        }
      }
    }
  }
}

/* Status Styles */
.status {
  .pf-body {
    padding-top: 0;

    &.libre li {
      background: var(--secondary);
    }
    &.reserve li {
      background: var(--light-gray);
    }
    &.vendu li {
      background: var(--gray);
    }

    ul li {
      padding: 8px 0;
      text-align: center;
      display: block;

      span {
        color: var(--white);
        font-size: 1.5em;
        text-transform: uppercase;
        font-weight: 600;
      }
    }
  }
}

/* Contact Form */
.contact {
  .pf-body form {
    input,
    select,
    textarea {
      font-family: 'Montserrat';
      max-width: unset !important;
      border: none;
      border-bottom: 1px solid rgba(10, 92, 132, 0.6);
      background: rgba(10, 92, 132, 0.3);
      border-radius: 0;
      color: var(--primary);
    }

    textarea {
      height: 200px;
    }

    .wpforms-submit {
      border-radius: 0 !important;
      width: 60% !important;
      margin: 20px auto 0;
      text-transform: uppercase;
      font-size: 1.2em;
      display: block;

      &:hover {
        background: var(--primary) !important;
      }
    }
  }
}

/* Block Plan Styles */
.cts-left-column .block-field-plan {
  .title-style-1 i {
    font-size: 2em;
    color: var(--secondary);
  }

  h5 {
    font-size: 1.4em;
    text-transform: uppercase;
    color: var(--primary);
  }

  ul li {
    .file-icon {
      display: none;
    }

    .file-name {
      font-size: 1.3em;
    }
  }
}

/* Contact Section Styles */
.cts-right-column {
  .contact {
    /* Header */
    .pf-head {
      text-align: center;
      margin-bottom: 15px;

      h5 {
        font-size: 1.8em;
        text-transform: uppercase;
        color: var(--primary);
        float: none;

        &:after {
          content: '';
          width: 40%;
          border-bottom: 2px solid var(--primary);
          position: absolute;
          bottom: -15px;
          left: 50%;
          transform: translateX(-50%);
        }
      }
    }

    /* Logo */
    #logocontact svg {
      margin-top: -50px;
    }

    /* Form Styles */
    .pf-body form {
      /* Common Input Styles */
      input,
      select,
      textarea {
        max-width: unset !important;
        background: rgba(10, 92, 132, 0.3);
        background-color: rgba(10, 92, 132, 0.3) !important;
      }

      /* Placeholder Color */
      input::placeholder,
      textarea::placeholder {
        color: var(--primary);
      }

      /* Textarea Specific */
      textarea {
        height: 200px;
      }

      /* Field Width */
      .wpforms-field-medium {
        width: 100%;
        max-width: unset !important;
      }

      /* Submit Button */
      .wpforms-submit {
        border-radius: 0 !important;
        width: 60% !important;
        margin: 20px auto 0;
        text-transform: uppercase;
        font-size: 1.2em;
        display: block;
      }

      .wpforms-submit-container:hover .wpforms-submit {
        background: var(--primary) !important;
      }

      /* RGPD Section */
      .rgpd {
        text-align: left;

        label {
          color: var(--primary);
        }
      }
    }
  }
}

body.single-listing.type-programme
  .cts-right-column
  .contact
  .pf-body
  form
  .wpforms-submit {
  background: var(--secondary) !important;
  color: var(--white) !important;
  border-radius: 0 !important;
  width: 60% !important;
  margin: 20px auto 0 auto;
  text-transform: uppercase;
  font-size: 1.2em;
  display: block;
}
