.m-onglets {
  overflow: hidden;

  .m-onglets__loop {
    position: relative;
    overflow: hidden;
    background-color: inherit;

    .tab-pane--content {
      h3 {
        color: currentColor;
        font-weight: 300;
        font-size: 1.4375rem;
      }
    }

    &.m-onglets__loop--default {
      .m-onglets__loop--desktop {
        display: flex;
        max-width: var(--wp--style--global--wide-size);
        margin: 0 auto;
        background-color: inherit;

        @media(width <=991px) {
          display: none;
        }
      }

      .nav {
        position: relative;
        z-index: 2;
        flex: 40% 0 0;
        padding: 90px 0;

        @media(width <=991px) {
          flex: 0 0 auto;
          width: 100%;
          padding: 50px 30px;
        }

        .m-onglets__loop__head {
          margin-bottom: 50px;
          max-width: 80%;

          @media(width<=991px) {
            max-width: fit-content;
            margin-bottom: 1em;
          }
        }

        .nav-link {
          background-color: transparent;
          color: #fff;
          padding: 48px 18px;
          border-radius: 0;
          border-top: solid 1px rgba(255, 255, 255, 0.65);
          font-size: 1.25rem;
          text-align: left;
          font-weight: normal;
          font-family: var(--wp--preset--font-family--secondary);
          display: flex;
          align-items: center;
          justify-content: space-between;
          transition: all 0.3s ease-in-out;
          position: relative;

          &.last {
            border-bottom: solid 1px rgba(255, 255, 255, 0.65);
          }

          @media(width <=991px) {
            display: none;
          }

          &:after {
            content: '>';
            font-size: 1rem;
            font-weight: normal;
            transition: all 0.3s ease-in-out;
          }

          &:before {
            content: '';
            width: 100%;
            height: 1px;
            background-color: var(--wp--preset--color--primary);
            position: absolute;
            bottom: -1px;
            left: 0;
            z-index: 2;
            opacity: 0;
            transition: all 0.3s ease-in-out;
          }

          &.active {
            color: var(--wp--preset--color--primary);
            border-top-color: var(--wp--preset--color--primary);
            font-weight: 700;

            &:before {
              opacity: 1;
            }
          }

          &:hover {
            cursor: pointer;
            color: var(--wp--preset--color--primary);
            border-top-color: var(--wp--preset--color--primary);

            &:after {
              transform: translateX(5px);
            }

            &:before {
              opacity: 1;
            }
          }
        }

        .facetwp-type-fselect {
          color: initial;
          margin-bottom: 0;

          @media(width >=991px) {
            display: none;
          }

          .fs-wrap {
            width: 100%;
          }

          .fs-search {
            display: none;
          }
        }
      }

      .tab-content {
        height: auto;
        position: relative;
        background-color: inherit;

        &:after {
          content: '';
          width: 60vw;
          height: 100%;
          position: absolute;
          top: 0;
          left: 0;
          bottom: 0;
          background-color: inherit;
          opacity: .7;
        }

        @media(width <=991px) {
          flex: 0 0 auto;
          width: 100%;
          padding: 0;
        }

        .tab-pane {
          position: relative;
          height: 100%;

          img {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            margin: auto;
            max-width: inherit;
            object-fit: cover;
            width: 60vw;
            height: 100%;
            margin: 0;

            @media(width<=991px) {
              width: 100%;
            }
          }

        }

        .tab-pane--content {
          position: relative;
          z-index: 1;
          padding: 300px 0 240px 150px;

          @media(width<=991px) {
            padding: 30px;
          }

          h3 {
            margin-top: 0;
          }

        }
      }

      /* version mobile */
      .m-onglets__loop--mobile {
        display: none;

        @media(width <=991px) {
          display: block;
          padding: 20px 15px 50px 15px;
          position: relative;
          z-index: 1;
        }

        .accordion {
          margin-top: 2em;

          .accordion-item {
            &:last-child {
              border-bottom: solid 1px rgba(255, 255, 255, 0.65);
            }
          }

          .accordion-header {
            margin: 0;
            padding: 0;

            .accordion-button {
              background-color: transparent;
              padding: 20px 15px;
              display: flex;
              width: 100%;

              &[aria-expanded="true"] {
                font-weight: bold;

                &:before {
                  opacity: 0 !important;
                }
              }
            }

          }

          .accordion-body {
            padding: 0 15px 30px;

            .titre {
              font-weight: bold;
            }
          }
        }
      }
    }


  }

  &.is-style-style2 {

    .m-onglets__loop {
      padding-top: 70px;

      .m-onglets__titre {
        margin-top: 0;
      }

      .m-onglets__texte {
        @media(width <=991px) {
          padding: 0 30px;
        }
      }

      &:after {
        display: none;
      }

      .m-onglets__loop__nav {
        display: flex;
        justify-content: center;
        margin-bottom: 3em;
        margin-top: 2em;

        @media(width <=991px) {
          padding: 0 0 0 30px;
        }

        .nav {
          width: auto;
          justify-content: center;
          gap: 20px;
          border: none;

          @media(width <=991px) {
            border-right: none;
            border-radius: 5px 0 0 5px;
            overflow-x: scroll;
            justify-content: flex-start;
            flex-wrap: nowrap;
            display: inline-flex;
            flex: 100% 0 0;
          }

          .nav-link {
            border-radius: 5px;
            font-weight: bold;
            color: var(--wp--preset--color--main);
            border: solid 1px var(--wp--preset--color--primary);

            @media(width<=991px) {
              flex: 0 0 auto;
            }

            &:hover {
              cursor: pointer;
            }

            &.active {
              background-color: var(--wp--preset--color--primary);
              color: #fff;
            }
          }



        }
      }

      .tab-content {
        .tab-pane {
          .image-wrap--2 {
            display: flex;
            justify-content: flex-end;
            padding-right: 80px;

            @media(width <=991px) {
              padding-right: 0;
              justify-content: center;
            }

            img {
              max-width: none;
              object-fit: cover;
              width: 50vw;
              min-height: 650px;

              @media(width <=991px) {
                width: 100%;
                height: 250px;
                min-height: inherit;
              }
            }
          }

          .tab-pane--content {
            padding-top: 70px;

            @media(width <=991px) {
              padding: 30px;
            }
          }

        }
      }
    }

    &:after {
      top: 0;
      right: 0;
      left: inherit;
      border-top: 240px solid var(--wp--preset--color--primary) !important;
      border-left: 225px solid transparent !important;
      border-bottom: none !important;
      border-right: none !important;

      @media(width <=991px) {
        border-left: 126px solid transparent !important;
        border-top: 128px solid var(--wp--preset--color--primary) !important;
      }

      @media(width <=765px) {
        border-left-width: 50px !important;
        border-top-width: 50px !important;
      }
    }


  }

  &.is-style-style3 {

    .m-onglets__titre {
      margin-top: 0;
    }

    .image-wrap {
      height: 100%;
      padding-right: 80px;
      opacity: 1;
      transition: opacity 0.2s;

      @media(width <=991px) {
        display: none;
      }

      &.is-fading {
        opacity: 0;
      }

      &.is-loaded {
        opacity: 1;
      }

      img {
        height: 100%;
        object-fit: cover;

      }
    }

    .tab-content__wrap {
      position: relative;
      z-index: 1;
      max-width: 690px;
      margin-left: 50px;
      padding-top: 130px;
      padding-bottom: 130px;

      @media(width <=1200px) {
        margin-left: 20px;
      }

      @media(width <=991px) {
        padding-top: 70px;
        padding-bottom: 70px;
        margin-left: 20px;
        margin-right: 20px;

        .m-onglets__titre,
        .m-onglets__texte {
          text-align: center;
        }

      }

    }

    .m-onglets__loop {
      &:after {
        display: none;
      }

      .m-onglets__loop__nav {
        display: flex;
        justify-content: flex-start;
        margin-bottom: 1.875rem;
        margin-top: 2em;

        @media(width <=991px) {
          padding: 0;
          margin-right: -20px;
        }

        .nav {
          width: auto;
          justify-content: center;
          gap: 20px;

          @media(width <=991px) {
            border-radius: 5px 0 0 5px;
            overflow-x: scroll;
            justify-content: flex-start;
            flex-wrap: nowrap;
            display: inline-flex;
            flex: 100% 0 0;
            border-right: none;
          }

          .nav-link {
            border-radius: 5px;
            font-weight: bold;
            color: var(--wp--preset--color--main);
            border: solid 1px var(--wp--preset--color--primary);

            @media(width<=991px) {
              flex: 0 0 auto;
            }

            &:hover {
              cursor: pointer;
            }

            &.active {
              background-color: var(--wp--preset--color--primary);
              color: #fff;
            }
          }



        }
      }
    }

  }
}