/* ============================================================
   SECTION CATÉGORIE — Layout général
   ============================================================ */
#et-main-area,
.section-categorie {
    min-height: 89vh;
    }
.wps-pgfw-pdf-generate-icon__wrapper-frontend {
	display: none;
}

.et_pb_row_0_tb_body.et_pb_row {
    padding: 8vh 15px !important;
    background-color: #3863e2;
}

h1 {
    color: white !important;
    text-transform: capitalize;
}

.category-page-title {
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    font-size: 3rem;
    line-height: 1.2;
}


/* ============================================================
   GRILLE PDF — 3 colonnes uniformes (vignettes document)
   ============================================================ */

/* On neutralise les largeurs Divi */
.et_pb_blog_grid .column {
    width: auto !important;
}

.pdf-doc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pdf-doc-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 0;
}

.pdf-doc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13);
}

.pdf-doc-thumb-link {
    display: block;
    text-decoration: none;
}

.pdf-doc-thumb {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f4f4f8;
}

.pdf-doc-thumb img,
.pdf-doc-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}

.pdf-doc-card:hover .pdf-doc-thumb img {
    transform: scale(1.04);
}

.pdf-doc-card .entry-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 14px 16px 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-doc-card .entry-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.pdf-doc-card .entry-title a:hover {
    color: #3863e2;
}

.pdf-doc-pagination {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 24px;
    text-align: center;
}

.pdf-doc-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    background: #f4f4f8;
    transition: background 0.2s ease, color 0.2s ease;
}

.pdf-doc-pagination .page-numbers:hover,
.pdf-doc-pagination .page-numbers.current {
    background: #3863e2;
    color: #fff;
}

.pdf-doc-pagination .page-numbers.dots {
    background: transparent;
    color: #888;
}


/* ============================================================
   ONGLETS DE CATÉGORIES
   ============================================================ */
.category-tabs {
    margin-top: 20px;
}

.category-tabs-nav-wrap {
    margin-bottom: 20px;
}

.category-tabs-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.category-tabs-nav li {
    cursor: pointer;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 6px 6px 0 0;
    background: #f4f4f8;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.category-tabs-nav li:hover {
    background: #e6e0f5;
}

.category-tabs-nav li.active {
    background: #0c71c3 !important;
    color: #fff;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
}

.category-tabs-content .tab-panel {
    display: none;
}

.category-tabs-content .tab-panel.active {
    display: block;
}


/* ============================================================
   TABLETTE (961px–1199px) — grille 2 colonnes
   ============================================================ */
@media (min-width: 961px) and (max-width: 1199px) {
    .pdf-doc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   MOBILE (≤960px) — 1 colonne
   ============================================================ */
@media (max-width: 960px) {
    .section-categorie, .et_pb_row_0_tb_body.et_pb_row {
       	padding-top:20px;

    }
    

    .category-page-title {
        font-size: 2.4rem;
    }

    .category-tabs-nav-wrap {
        position: sticky;
        top: var(--category-tabs-sticky-top, 0px);
        z-index: 200;
        margin-bottom: 20px;
        padding: 8px 15px 14px;
        background: #fff;
        isolation: isolate;
    }

    /* Fond blanc pleine largeur — masque les articles sous la barre sticky */
    .category-tabs-nav-wrap::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(50% - 50vw);
        width: 100vw;
        background: #fff;
        z-index: -1;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    }

    .category-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 8px;
        background: #fff;
        border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    }

    .category-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .category-tabs-nav li {
        flex: 0 0 auto;
        margin-right: 0;
        white-space: nowrap;
        border-radius: 6px;
    }

    .pdf-doc-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pdf-doc-card .entry-title {
        font-size: 15px;
        padding: 12px 14px 14px;
    }

    /* Pas de hover lift sur mobile/tactile */
    .pdf-doc-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .et_pb_post .entry-featured-image-url {
        margin-bottom: 0;
    }
}