/* ==========================================================
   Page R.S.E. 3 — Prix, Certificats, Labels, Engagements,
   Agréments, Attestations (nouvelle conception)
   ========================================================== */

.cert-page {
    width: 100%;
    max-width: 960px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 32px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.cert-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cert-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 36px 24px;
}

/* ---------- Titre avec losange rouge ---------- */
.cert-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-family: "Dax-Light", "dax-light", sans-serif;
    font-weight: 300;
    font-size: 1.65rem;
    line-height: 1;
    color: #252D4B;
    white-space: nowrap;
}

.cert-title::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0 4px;
    background-color: #C21E25;
    border-radius: 2px;
    transform: rotate(45deg);
}

/* ---------- Grille de cartes ---------- */
.cert-grid {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 0 42px !important;
    padding: 0 !important;
}

.cert-grid li {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

/* ---------- Carte ---------- */
.cert-card {
    box-sizing: border-box;
    width: 118px;
    min-height: 188px;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    background-color: #fff;
    border: 1px solid #231F20;
    border-radius: 0;
    box-shadow: 1px 1px 0 #231F20;
    color: #231F20;
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

.cert-card:hover,
.cert-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 1px 1px 0 #231F20, 0 10px 18px rgba(37, 45, 75, .15);
    outline: none;
}

/* les enfants laissent passer le clic à la carte (data-id lu sur e.target) */
.cert-card * {
    pointer-events: none;
}

.cert-card img {
    display: block;
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.cert-card span {
    font-family: "Dax-Light", "dax-light", sans-serif;
    font-size: 11.5px;
    line-height: 1.3;
}

/* ---------- Variante SOCOTEC (bordure bleue) ---------- */
.cert-card--socotec {
    border-color: #00B2E4;
    box-shadow: none;
}

.cert-card--socotec:hover,
.cert-card--socotec:focus-visible {
    box-shadow: 0 10px 18px rgba(0, 178, 228, .2);
}

.cert-card--socotec img {
    width: 70px;
    height: 86px;
}

.cert-card--socotec span {
    font-family: "Dax-Bold", "dax-bold", sans-serif;
    font-size: 10.5px;
    line-height: 1.35;
}

/* ---------- Tablette ---------- */
@media screen and (max-width: 991px) {
    .cert-row {
        justify-content: flex-start;
        gap: 32px 48px;
    }
}

/* ---------- Mobile ---------- */
@media screen and (max-width: 800px) {
    .cert-page {
        padding: 70px 16px 90px;
        gap: 28px;
    }

    .cert-title {
        font-size: 1.3rem;
        gap: 12px;
        white-space: normal;
    }

    .cert-title::before {
        width: 15px;
        height: 15px;
    }

    .cert-grid {
        margin-left: 0 !important;
        gap: 8px;
    }

    .cert-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 12px;
    }

    .cert-row .cert-title {
        font-size: 1.1rem;
        gap: 10px;
    }

    .cert-card {
        width: 104px;
        min-height: 166px;
        padding: 10px 4px 8px;
    }

    .cert-card img {
        width: 64px;
        height: 64px;
    }

    .cert-card--socotec img {
        width: 58px;
        height: 72px;
    }

    .cert-card span {
        font-size: 10.5px;
    }
}
