.m-image-texte {

  &.has-dark-background-color, &.has-secondary-background-color {
    .m-image-texte__titre, .m-image-texte__texte {
      color: white;
    }

    .wp-block-button.is-style-outline a {
      color: white;
      border-color: white;

      &:hover {
        border-color: var(--wp--preset--color--primary);
        background-color: var(--wp--preset--color--primary);
      }
    }

    .wp-block-button.is-style-link a {
      color: white;

      &:after {
        content: url('../../../assets/img/arrow-small-white.svg');
      }
    }
  }

  &.has-dark-grey-background-color {
    .prefixe {
      background-color: #84BF41;
    }

    .m-image-texte__titre, .m-image-texte__texte {
      color: white;
    }

    .wp-block-button.is-style-fill a {
      background-color: #84BF41;
      border-color: #6C9C32;

      &:after {
        color: #84BF41;
      }

      &:hover {
        background-color: #6C9C32;
      }
    }

    .wp-block-button.is-style-outline a {
      color: white;
      border-color: white;

      &:hover {
        background-color: #84BF41;
      }
    }

    .wp-block-button.is-style-link a {
      color: white;

      &:after {
        content: url('../../../assets/img/arrow-small-white.svg');
      }
    }
  }

  &.has-grey-background-color, &.has-base-background-color {
    .prefixe {
      background-color: #84BF41;
    }

    .m-image-texte__titre, .m-image-texte__texte {
      color: var(--wp--preset--color--dark);
    }

    .wp-block-button.is-style-fill a {
      background-color: #84BF41;
      border-color: #6C9C32;

      &:after {
        color: #84BF41;
      }

      &:hover {
        background-color: #6C9C32;
      }
    }

    .wp-block-button.is-style-outline a {
      color: var(--wp--preset--color--dark);
      border-color: var(--wp--preset--color--dark);

      &:hover {
        background-color: #84BF41;
        color: white;
      }
    }

    .wp-block-button.is-style-link a {
      color: #84BF41;

      &:after {
        content: url('../../../assets/img/arrow-small-green.svg');
      }
    }
  }

  &.has-light-grey-background-color {
    .prefixe {
      background-color: var(--wp--preset--color--primary);
    }

    .m-image-texte__titre, .m-image-texte__texte {
      color: var(--wp--preset--color--dark);
    }

    .wp-block-button.is-style-fill a {
      background-color: var(--wp--preset--color--primary);
      border-color: #0091A0;

      &:after {
        color: var(--wp--preset--color--primary);
      }

      &:hover {
        background-color: #0091A0;
      }
    }

    .wp-block-button.is-style-outline a {
      color: var(--wp--preset--color--dark);
      border-color: var(--wp--preset--color--dark);

      &:hover {
        background-color: var(--wp--preset--color--primary);
        color: white;
      }
    }

    .wp-block-button.is-style-link a {
      color: var(--wp--preset--color--primary);

      &:after {
        content: url('../../../assets/img/arrow-small-blue.svg');
      }
    }
  }

  &.has-primary-background-color, &.has-primary-darken-background-color  {
    .prefixe {
      background-color: #84BF41;
    }

    .m-image-texte__titre, .m-image-texte__texte {
      color: white;
    }

    .wp-block-button.is-style-fill a {
      background-color: #84BF41;
      border-color: #6C9C32;

      &:after {
        color: #84BF41;
      }

      &:hover {
        background-color: #6C9C32;
      }
    }

    .wp-block-button.is-style-outline a {
      color: white;
      border-color: white;

      &:hover {
        background-color: #84BF41;
        color: white;
      }
    }

    .wp-block-button.is-style-link a {
      color: white;

      &:after {
        content: url('../../../assets/img/arrow-small-white.svg');
      }
    }
  }

  .m-image-texte__texte {
    margin: 2em 0;
  }

  .m-image-texte__image {
    @media (width < 768px) {
      margin-bottom: 2em;
    }

    &.shadow,
    &.shadow-none {
      border-radius: 50px;

      @media (width < 768px) {
        border-radius: 30px;
      }

      img {
        border-radius: 50px;

        @media (width < 768px) {
          border-radius: 30px;
        }
      }

    }
  }

  &.has-secondary-background-color {
    .m-image-texte__titre {
      color: #fff;
    }
  }

  .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;

    @media (max-width: 576px) {
      justify-content: center;
    }
  }
}

.m-image-texte--droite {
  .m-image-texte__image {

    &.shadow img {
      box-shadow: -15px 15px 0 0 #00ACBA;
    }
  }

  .m-image-texte__texte_wrap {
    padding-right: 65px;

    @media (width < 768px) {
      padding-right: 0;
    }
  }
}

.m-image-texte--gauche {
  .m-image-texte__image {

    &.shadow img {
      box-shadow: 15px 15px 0 0 #00ACBA;
    }
  }

  .m-image-texte__texte_wrap {
    padding-left: 65px;

    @media (width < 768px) {
      padding-left: 0;
    }
  }
}

.m-image-texte {
  &:not(.alignfull):not(.alignwide) {
    &.has-background {
      border-radius: 30px;

      .row {
        align-items: center;
      }

      &.m-image-texte--droite {
        .m-image-texte__texte_wrap {
          padding-left: 65px;

          @media (width < 768px) {
            padding-left: 0;
          }
        }
      }
    }
  }
}