/* Material family icon grid (homepage, under the banner). */

.family-icons {
    background: #fff;
    border-radius: 0;
    padding: 42px 0 14px;
}

.family-icons__list {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.family-icons__item {
    display: flex;
}

.family-icons__link {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 8px 12px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    color: #005027;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.family-icons__link:hover,
.family-icons__link:focus-visible,
.family-icons__link.is-active {
    border-color: #398e12;
    box-shadow: 0 2px 10px rgba(0, 80, 39, .12);
    color: #005027;
    transform: translateY(-2px);
}

.family-icons__link.is-active {
    border-width: 2px;
}

.family-icons__img {
    display: block;
    width: 100%;
    max-width: 76px;
    height: 62px;
    object-fit: contain;
}

.family-icons__label {
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

@media (max-width: 991px) {
    .family-icons__list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Phones keep the 4-column grid from the rule above (4 x 2), just tighter: at
   ~375px that leaves roughly 75px of content per card, so the icon, padding and
   label all shrink to keep "Moissonneuses" and "Télescopiques" on one line. */
@media (max-width: 575px) {
    .family-icons {
        padding-top: 28px;
    }

    .family-icons__list {
        gap: 6px;
    }

    .family-icons__link {
        padding: 10px 4px 8px;
        gap: 5px;
    }

    .family-icons__img {
        height: 44px;
    }

    .family-icons__label {
        font-size: .7rem;
        /* Last resort on ~320px screens: break the word rather than overflow. */
        overflow-wrap: break-word;
        hyphens: auto;
    }
}
