.dsfr-doc-hp-showcase {
  padding: 2rem 0;

  &__title {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  &__container {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin: 4rem 0;
    list-style: none;
    padding: 0;
  }

  &__link {
    .fr-btn {
      width: 100%;
      justify-content: center;
    }
  }

  &-card {
    position: relative;
    width: 100%;
    padding: 0;

    &__img {
      display: flex;
      margin-bottom: 0.75rem;
      overflow: hidden;
      box-shadow: 0 0 0 1px var(--border-default-grey);
      background-image: none;

      &::after {
        content: none;
      }

      &--dark {
        display: none;
      }

      &:has(+ .dsfr-doc-hp-showcase-card__link--extended:hover) {
        img,
        svg {
          transform: scale(1.05);
        }
      }

      img,
      svg {
        transition: transform 0.3s ease-out;
        transform-origin: bottom;
        width: 100%;
        height: auto;
      }
    }

    &__links-group {
      margin: 0;
      padding: 0;
      list-style: none;

      li {
        padding: 0;

        &:not(:last-child) {
          margin-bottom: 1rem;
        }
      }
    }

    &__link--extended {
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 2.25rem);
      }
    }
  }

  @media (min-width: 36em) {
    &-card {
      flex-basis: calc(50% - 1.25rem);
    }
  }

  @media (min-width: 48em) {
    &__container {
      gap: 3rem;
    }

    &__link {
      .fr-btn {
        width: auto;
        justify-content: flex-start;
      }
    }

    &-card {
      flex-basis: calc(50% - 1.5rem);

      &__img {
        margin-bottom: 1rem;
      }

      &__links-group {
        li {
          display: inline;

          &:not(:last-child) {
            margin-bottom: 0;
            margin-right: 1rem;
          }
        }
      }

      &__link--extended::before {
        height: calc(100% - 2.5rem);
      }
    }

    &__title {
      font-size: 2rem;
      line-height: 2.5rem;
    }
  }

  @media (min-width: 62em) {
    padding: 5rem 0;
  }
}

[data-fr-theme='dark'] {
  .dsfr-doc-hp-showcase-card__img--dark {
    display: flex;
  }

  .dsfr-doc-hp-showcase-card__img--light {
    display: none;
  }
}
