/**
 * Fichier  : /pages/homepage/section-2/assets/css/list.css
 * Fonction : style de la liste des outils de l'écosystème
 */


/* ==================================================
   LIST
================================================== */

.tools .list {
    border-top: 1px solid rgba(255, 255, 255, .12);
}


/* ==================================================
   TOOL
================================================== */

.tool {
    position: relative;
    overflow: hidden;
}

.tool {
    padding:
        clamp(2em, 3vw, 3em)
        .25em;
}

.tool {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.tool {
    cursor: pointer;
}

.tool {
    transition:
        padding .5s
        cubic-bezier(.22, 1, .36, 1);
}


/* ==================================================
   BACKGROUND
================================================== */

.tool::before {
    content: "";
}

.tool::before {
    position: absolute;
    inset: 0;
}

.tool::before {
    background:
        linear-gradient(
            90deg,
            rgba(233, 64, 27, .08),
            transparent 60%
        );
}

.tool::before {
    opacity: 0;
    pointer-events: none;
}

.tool::before {
    transition: opacity .5s;
}

.tool.is-active::before {
    opacity: 1;
}


/* ==================================================
   TOP
================================================== */

.tool .top {
    position: relative;
    z-index: 1;
}

.tool .top {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 16px;
}


/* ==================================================
   SVG
================================================== */

.tool svg {
    width: 1.3em;
    height: auto;
}

.tool svg {
    color: rgba(255, 255, 255, .3);
}

.tool svg {
    transition:
        color .4s;
}


/* ==================================================
   TITLE
================================================== */

.tool h3 {
    margin: 0;
}

.tool h3 {
    font-family: 'bold-font';
    font-size: clamp(25px, 2.3vw, 36px);
    font-weight: 400;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .48);
}

.tool h3 {
    transition:
        color .4s,
        transform .5s
        cubic-bezier(.22, 1, .36, 1);
}


/* ==================================================
   ARROW
================================================== */

.tool .arrow {
    width: 38px;
    height: 38px;
}

.tool .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool .arrow {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.tool .arrow {
    font-size: 16px;
    color: rgba(255, 255, 255, .45);
}

.tool .arrow {
    transition: .4s;
}


/* ==================================================
   CONTENT
================================================== */

.tool .content {
    position: relative;
    z-index: 1;
}

.tool .content {
    max-height: 0;
    margin-left: 58px;
}

.tool .content {
    overflow: hidden;
}

.tool .content {
    opacity: 0;
    transform: translateY(12px);
}

.tool .content {
    transition:
        max-height .6s
        cubic-bezier(.22, 1, .36, 1),
        opacity .4s,
        transform .6s,
        padding .6s;
}


/* ==================================================
   DESCRIPTION
================================================== */

.tool .content p {
    margin: 0 0 .65em;
}

.tool .content p {
    font-family: 'content-font';
    font-size: 16px;
    line-height: 1.5em;
    color: rgba(255, 255, 255, .78);
}


/* ==================================================
   META
================================================== */

.tool .content span {
    font-family: 'content-font';
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .34);
}


/* ==================================================
   ACTIVE STATE
================================================== */

.tool.is-active {
    padding-left: 1.25em;
    padding-right: 1.25em;
}

.tool.is-active svg {
    color: var(--color-primary);
}

.tool.is-active h3 {
    color: var(--color-white);
    transform: translateX(4px);
}

.tool.is-active .arrow {
    color: var(--color-white);
    border-color: rgba(233, 64, 27, .55);
}

.tool.is-active .arrow {
    transform: rotate(-45deg);
}

.tool.is-active .content {
    max-height: 130px;
    padding-top: 1.4em;
}

.tool.is-active .content {
    opacity: 1;
    transform: translateY(0);
}


/* ==================================================
   PROGRESS
================================================== */

.tool .progress {
    position: absolute;
    left: 0;
    bottom: -1px;
}

.tool .progress {
    width: 0;
    height: 2px;
}

.tool .progress {
    display: block;
}

.tool .progress {
    background: var(--gradient-primary);
}

.tool.is-active .progress {
    animation:
        expertiseProgress 6s
        linear
        forwards;
}


/* ==================================================
   ANIMATION
================================================== */

@keyframes expertiseProgress {

    from {
        width: 0;
    }

    to {
        width: 100%;
    }

}


/* ==================================================
   RESPONSIVE
================================================== */

@media screen and (max-width: 640px) {

    .tool {
        padding:
            1.8em
            .1em;
    }

    .tool.is-active {
        padding-left: .8em;
        padding-right: .8em;
    }

    .tool .top {
        grid-template-columns: 30px 1fr auto;
        gap: 10px;
    }

    .tool h3 {
        font-size: 25px;
    }

    .tool .arrow {
        width: 34px;
        height: 34px;
    }

    .tool .content {
        margin-left: 40px;
    }

    .tool .content p {
        font-size: 14px;
    }

}