/* =========================================================
   SECTION : CERTIFICATIONS
========================================================= */

.certifications {
    position: relative;
    padding: 80px 20px;
    height: 100%;

    flex-direction: column;
    align-items: center;

    text-align: center;
    color: var(--text-main);
    overflow: hidden;
}

/* =========================================================
   TITRE
========================================================= */

.certifications h2 {
    position: relative;
    z-index: 2;

    margin-bottom: 48px;
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* =========================================================
   WRAPPER
========================================================= */

.certifications-wrapper {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;

    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* =========================================================
   CARTE CERTIFICATION
========================================================= */

.cert-card {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 22px 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 250px;
    max-height: 250px;

    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.92),
        rgba(255, 255, 255, 0.65)
    );

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.45);

    text-decoration: none;
    text-align: center;
    color: #1f2937;

    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.35s cubic-bezier(.2,.8,.2,1),
        box-shadow 0.35s ease;
}

/* Carte cliquable */
.cert-card[href] {
    cursor: pointer;
}

/* Carte non cliquable */
.cert-card:not([href]) {
    opacity: 0.92;
}

/* clic carte entière */
.cert-card * {
    pointer-events: none;
}

/* Hover carte */
.cert-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 28px 60px rgba(193, 18, 31, 0.35),
        inset 0 0 0 1px rgba(193, 18, 31, 0.35);
}

/* =========================================================
   ICÔNE / BADGE
========================================================= */

.cert-icon {
    width: 82px;
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: radial-gradient(circle at top, #ffffff, #f1f5f9);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 0 3px rgba(193, 18, 31, 0.15);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.cert-icon img {
    width: 70%;
    height: auto;
}

/* Hover icône */
.cert-card:hover .cert-icon {
    transform: scale(1.1) rotate(-4deg);
    box-shadow:
        0 14px 32px rgba(193, 18, 31, 0.45),
        inset 0 0 0 3px rgba(193, 18, 31, 0.35);
}

/* =========================================================
   TEXTE
========================================================= */

.cert-card p {
    margin: 0;
    max-width: 100%;

    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;

    color: #111827;
    line-height: 1.3;

    word-break: break-word;
    hyphens: auto;
}

.cert-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c1121f;
}

/* Badge "Certifié" */
.cert-card span::after {
    content: " • Certifié";
    font-weight: 500;
    opacity: 0.8;
}

/* =========================================================
   DÉTAIL ACCENT BAS DE CARTE
========================================================= */

.cert-card::after {
    content: "";
    position: absolute;
    bottom: 12px;

    width: 42%;
    height: 3px;

    border-radius: 999px;
    background: linear-gradient(
        to right,
        transparent,
        #c1121f,
        transparent
    );

    opacity: 0.6;
}

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

@media (max-width: 600px) {
    .certifications h2 {
        margin-bottom: 36px;
    }

    .certifications-wrapper {
        gap: 18px;
    }

    .cert-card {
        padding: 20px 16px;
    }
}
