/* ========================================
   FEATURES
======================================== */

.b-features {
    width: 100%;
    padding: clamp(60px, 7vw, 110px) 0;
    text-align: center;
}

/* ========================================
   HEADER
======================================== */

.b-features .caption {
    margin-bottom: clamp(45px, 6vw, 85px);
}

.b-features .suptitle {
    margin-bottom: 10px;
    font-family: var(--font-primary);
    font-size: clamp(14px, 1.4vw, 20px);
    font-weight: 300;
    text-transform: uppercase;
}

.b-features .title {
    margin: 0;
    font-size: clamp(28px, 3.5vw, 46px);
    line-height: 1.2;
    font-family: var(--font-secondary);
}

.b-features .description {
    max-width: 850px;
    margin: 20px auto 0;
}

/* ========================================
   ITEMS
======================================== */

.b-features .items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 55px;
}

.b-features .item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 0 clamp(12px, 2vw, 30px);
    color: inherit;
    text-align: center;
    text-decoration: none;
}

/* Séparateurs verticaux */

.b-features .item:not(:nth-child(5n + 1))::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 90px;
    background: currentColor;
    opacity: 0.65;
    transform: translateY(-50%);
}

/* ========================================
   ICONS
======================================== */

.b-features .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    margin-bottom: 20px;
}

.b-features .icon svg,
.b-features .icon img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* ========================================
   TEXT
======================================== */

.b-features .item-suptitle {
    margin-bottom: 8px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.b-features .item-title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5em;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.b-features .item-description {
    max-width: 190px;
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.35;
    font-family: var(--font-secondary);
}

.b-features .item-description p {
    margin: 0;
}

/* ========================================
   LINKS
======================================== */

.b-features .item.is-link {
    z-index: 1;
    isolation: isolate;
    cursor: pointer;
    transition: color 350ms ease;
}

/* Fond noir opaque derrière le contenu */

.b-features .item.is-link::after {
    content: '';
    position: absolute;
    inset: -25px 8px;
    z-index: -1;
    background: #000;
    opacity: 0;
    transform: scale(0.94);
    pointer-events: none;
    transition:
        opacity 350ms ease,
        transform 350ms ease;
}

/* Pictogramme */

.b-features .item.is-link .icon {
    transition: transform 350ms ease;
}

/* Survol */

@media (hover: hover) {
    .b-features .item.is-link:hover {
        color: var(--color-primary);
    }

    .b-features .item.is-link:hover::after {
        opacity: 1;
        transform: scale(1);
    }

    .b-features .item.is-link:hover .icon {
        transform: scale(1.12);
    }
}

/* Navigation clavier */

.b-features .item.is-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}

.b-features .item.is-link:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

.b-features .item.is-link:focus-visible .icon {
    transform: scale(1.12);
}

/* Séparateurs : toujours noirs */

.b-features .item.is-link::before {
    color: var(--color-black);
}

/* Accessibilité */

@media (prefers-reduced-motion: reduce) {
    .b-features .item.is-link,
    .b-features .item.is-link::after,
    .b-features .item.is-link .icon {
        transition: none;
    }
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 991px) {
    .b-features .items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .b-features .item::before {
        display: none;
    }

    .b-features .item:not(:nth-child(3n + 1))::before {
        display: block;
    }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767px) {
    .b-features .items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 40px;
    }

    .b-features .item {
        padding: 0 12px;
    }

    .b-features .item::before {
        display: none !important;
    }

    .b-features .item:not(:nth-child(2n + 1))::before {
        display: block !important;
        height: 70px;
    }

    .b-features .icon {
        width: 65px;
        height: 65px;
    }

    .b-features .icon svg,
    .b-features .icon img {
        width: 50px;
        height: 50px;
    }

    .b-features .item-title {
        font-size: 14px;
    }

    .b-features .item-description {
        font-size: 12px;
    }
}
