/* ==========================================================================
   LINK SECTION - Conteneur principal
   ========================================================================== */
.link-section {
    overflow: hidden;
    display: flex;
    gap: var(--gap-l);
    align-items: stretch;
}

.link-section.centered-left-qui-marche {
    padding: clamp(50px, 3.2vw, 70px) clamp(calc(50vw - 625px), 30px, 30px) clamp(50px, 3.2vw, 70px) 0;
}

.link-section.centered-right-qui-marche {
    padding: clamp(50px, 3.2vw, 70px) var(--gap-l) clamp(50px, 3.2vw, 70px) clamp(calc(50vw - 625px), 30px, 30px);
    /* max-width: calc(100vw - clamp(calc(50vw - 625px), 30px, 30px)); */
}

/* Option layout "download" avec image à gauche */
.link__download-section {
    display: flex;
    align-items: flex-end;
    gap: var(--gap-l);
}

.link__image-left {
    max-width: 20%;
    overflow: hidden;
    border-radius: 0 25px 25px 0;
}

.link__image-left img {
    height: 100%;
}

/* ==========================================================================
   LISTE DE LIENS
   ========================================================================== */
.link__repeater {
    padding-inline-start: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: flex-end;
}

.link-gallery .link__repeater {
    width: 60%;
}

.link-section li {
    position: relative;
    list-style: none;
    border-bottom: solid 2px var(--first-color);
    padding: var(--gap-s) var(--gap-xs);
}

.link__base-content,
.link__hover-content {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.link__hover-container {
    position: absolute;
    bottom: 0;
    left: 0;
    transition: clip-path .5s cubic-bezier(0.25, 0.1, 0, 0.91);
    height: 100%;
    width: 100%;
    padding: var(--gap-s) var(--gap-xs);
    clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
    overflow: hidden;
    background-color: var(--second-color);
}

.link__repeater-fifth .link__hover-container {
    background-color: var(--fifth-color);
}

.link-section li:hover .link__hover-container {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.link__hover-content {
    width: 100%;
}

.link__hover-content * {
    color: white;
}

/* ==========================================================================
   ICÔNE DU LIEN
   ========================================================================== */
.link__icon {
    aspect-ratio: 1;
    padding: 14px;
    border-radius: var(--circle-radius);
    background-color: var(--first-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.link__hover-container .link__icon {
    background-color: var(--third-color);
}

.link__icon svg,
.link__icon img {
    width: 24px;
    object-fit: contain;
}

.link__hover-container .link__icon path {
    stroke: var(--second-color);
}

.link__repeater-fifth .link__hover-container .link__icon path {
    stroke: var(--fifth-color);
}

/* ==========================================================================
   CONTENU DU LIEN (TEXTE)
   ========================================================================== */
.link__content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.link__content span {
    margin-bottom: 3px;
    line-height: var(--line-height-m);
}

.link__title {
    display: inline-flex;
    justify-content: space-between;
    width: 100%;
    font-family: var(--font-extra-bold);
    font-size: var(--font-h3);
    line-height: var(--line-height-xs);
    text-transform: uppercase;
}

/* Fond cliquable (à animer au hover si nécessaire) */
.link__title a:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    height: 100%;
    width: 100%;
}

.link__title a {
    font-family: var(--font-extra-bold);
}

/* Flèche à droite du lien */
.link__base-content::after,
.link__hover-content::after {
    content: url(/wp-content/themes/webline/assets/arrow-cta.svg);
}

.link__base-container .link__base-content::after {
    filter: invert(1) brightness(0);
}

/* ==========================================================================
   GALERIE D’IMAGES (choice === 'images')
   ========================================================================== */
.link__gallery {
    margin-top: auto;
    gap: var(--gap-s);
}

/* 1 à 2 images */
.link__gallery--flex {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* 3 images */
.link__gallery--grid {
    height: max-content;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.link__gallery--grid .link__image-container:first-child {
    grid-column: 2 span;
    aspect-ratio: initial;
    margin-right: calc(var(--gap-l) * -2);
}

.link__image-container {
    max-height: 260px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-clasic);
    overflow: hidden;
}

.link__image {
    height: 100%;
    width: 100%;
    display: flex;
}

/* ==========================================================================
   SECTION LATERALE (choice === 'section')
   ========================================================================== */
.link__section {
    position: relative;
    /* max-height: max-content; */
    max-width: 30%;
    background-color: var(--second-color);
    border-radius: var(--radius-clasic);
    overflow: hidden;
    /* align-self: flex-end; */
}

.link-section.centered-left-qui-marche .link__section {
    max-width: calc(100% - (25vw - 312.5px - var(--gap-l) * 2/3) - 70%);
}

.link__desc {
    padding: var(--gap-s) var(--gap-s) 10px var(--gap-s);
    color: var(--third-color);
}

.link-section__imaged .link__desc {
    margin-bottom: clamp(200px, 100%, 50%);
}

.link__section-image {
    position: absolute;
    bottom: 0;
    max-height: clamp(200px, 100%, 50%);
}

.link__section-image img {
    object-position: bottom;
    display: flex;
}

/* ==========================================================================
   CTA (bouton) dans la section latérale
   ========================================================================== */
.link__cta {
    position: absolute;
    bottom: var(--gap-xs);
    left: var(--gap-xs);
    z-index: 1;
    width: max-content;
    min-width: 260px;
    max-width: calc(64% - var(--gap-xs) * 2);
    box-shadow: 0 11px 24px #00000017;
    padding: 8px 8px 8px 15px;
    border-radius: 12px;
    background-color: var(--third-color);
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.link__cta a:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

.link__cta:after {
    content: url("/wp-content/themes/webline/assets/telechargement.svg");
    height: 49px;
    aspect-ratio: 1;
    border-radius: 6px;
    background-color: var(--second-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   LIENS GLOBAUX
   ========================================================================== */
.link-section a {
    text-decoration: none;
    cursor: pointer;
    text-transform: uppercase;
}

.link__section a {
    font-family: 'Poppins Black';
}

@media (max-width: 1300px) {
    .link-section.centered-bigger-left .link__repeater {
        padding-right: var(--padding-centered);
    }

    .link-section.centered-bigger-right .link__repeater {
        padding-left: var(--padding-centered);
    }

    .link__image-left {
        max-width: 800px;
        max-height: 400px;
    }

    .link__image-left img {
        width: 100%;
    }

    .link-section .link__section,
    .link__image-left,
    .link-gallery .link__repeater {
        width: 100%;
    }

    .link-section.centered-bigger-right .link__section {
        width: calc(100% - var(--gap-m));
        margin-left: auto;
    }

    .link-section .link__section {
        max-width: 600px;
    }
}

@media (min-width: 830px) and (max-width: 1300px) {
    .link-section {
        flex-wrap: wrap;
    }

    .link-section .link__section,
    .link-section .link__gallery {
        max-width: calc(50% - var(--gap-l));
    }

    .link__repeater {
        max-width: 50%;
    }
}

@media (max-width: 830px) {
    .link-section {
        flex-direction: column;
    }

    .link__section-image {
        bottom: -10px;
    }
}