/* ============================================================
   SECTION CATÉGORIE — Layout général
   ============================================================ */
#et-main-area,
.section-categorie {
    min-height: 89vh;
}

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

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 DESKTOP — Featured (1 grande + 2×2 petites)
   ============================================================ */

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

.et_pb_blog_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
}

/* Article générique */
.et_pb_blog_grid article {
    position: relative;
    overflow: hidden;
    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;
}

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

/* ---- Premier article : pleine hauteur (2 lignes) ---- */
.et_pb_blog_grid article:first-child {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.et_pb_blog_grid article:first-child .et_pb_image_container {
    flex: 1;
    min-height: 220px;
}

.et_pb_blog_grid article:first-child .et_pb_image_container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.et_pb_blog_grid article:first-child:hover .et_pb_image_container img {
    transform: scale(1.04);
}

.et_pb_blog_grid article:first-child .post-content {
    padding: 18px 20px 22px;
}

.et_pb_blog_grid article:first-child .entry-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}

.et_pb_blog_grid article:first-child .entry-title a {
    color: #1a1a2e;
    text-decoration: none;
}

/* ---- Articles 2–5 : thumbnail + texte horizontaux ---- */
.et_pb_blog_grid article:not(:first-child) {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.et_pb_blog_grid article:not(:first-child) .et_pb_image_container {
    width: 110px;
    min-width: 110px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
}

.et_pb_blog_grid article:not(:first-child) .et_pb_image_container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.et_pb_blog_grid article:not(:first-child):hover .et_pb_image_container img {
    transform: scale(1.06);
}

.et_pb_blog_grid article:not(:first-child) .post-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.et_pb_blog_grid article:not(:first-child) .entry-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.et_pb_blog_grid article:not(:first-child) .entry-title a {
    color: #1a1a2e;
    text-decoration: none;
}

/* Extrait masqué sur les petites cartes */
.et_pb_blog_grid article:not(:first-child) .entry-summary,
.et_pb_blog_grid article:not(:first-child) .more-link {
    display: none;
}

/* Extrait visible sur la grande carte */
.et_pb_blog_grid article:first-child .entry-summary {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 12px;
}

/* Méta (date, auteur) */
.et_pb_blog_grid .et_pb_post .post-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

/* Lien "Lire la suite" */
.et_pb_blog_grid article:first-child .more-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #3863e2;
    text-decoration: none;
    margin-top: 4px;
}

.et_pb_blog_grid article:first-child .more-link:hover {
    text-decoration: underline;
}


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

.category-tabs-nav {
    list-style: none;
    margin: 0 0 20px;
    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;
}


/* ============================================================
   OVERRIDE — Toutes les publications en grandes cartes verticales
   ============================================================ */

/* Grille desktop : 2 grandes cartes par ligne */
.et_pb_blog_grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    gap: 24px !important;
}

/* Tous les articles prennent le format grande carte */
.et_pb_blog_grid article,
.et_pb_blog_grid article:first-child,
.et_pb_blog_grid article:not(:first-child) {
    grid-row: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: 640px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #fff !important;
}

/* Grande image en haut pour tous */
.et_pb_blog_grid article .et_pb_image_container,
.et_pb_blog_grid article:first-child .et_pb_image_container,
.et_pb_blog_grid article:not(:first-child) .et_pb_image_container {
    width: 100% !important;
    min-width: 0 !important;
    height: 480px !important;
    min-height: 480px !important;
    flex: none !important;
    overflow: hidden !important;
    border-radius: 12px 12px 0 0 !important;
}

/* Lien image Divi */
.et_pb_blog_grid article .entry-featured-image-url {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 0 !important;
}

/* Image plein cadre */
.et_pb_blog_grid article .et_pb_image_container img,
.et_pb_blog_grid article:first-child .et_pb_image_container img,
.et_pb_blog_grid article:not(:first-child) .et_pb_image_container img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    display: block !important;
}

/* Contenu texte sous l’image */
.et_pb_blog_grid article .post-content,
.et_pb_blog_grid article:first-child .post-content,
.et_pb_blog_grid article:not(:first-child) .post-content {
    padding: 18px 20px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

/* Titres grands partout */
.et_pb_blog_grid article .entry-title,
.et_pb_blog_grid article:first-child .entry-title,
.et_pb_blog_grid article:not(:first-child) .entry-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 10px !important;
    line-height: 1.3 !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
}

.et_pb_blog_grid article .entry-title a {
    color: #1a1a2e !important;
    text-decoration: none !important;
}

/* Extraits visibles partout */
.et_pb_blog_grid article .entry-summary,
.et_pb_blog_grid article:first-child .entry-summary,
.et_pb_blog_grid article:not(:first-child) .entry-summary {
    display: block !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #555 !important;
    margin-bottom: 12px !important;
}

/* Lire la suite visible partout */
.et_pb_blog_grid article .more-link,
.et_pb_blog_grid article:first-child .more-link,
.et_pb_blog_grid article:not(:first-child) .more-link {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3863e2 !important;
    text-decoration: none !important;
    margin-top: 4px !important;
}

.et_pb_blog_grid article .more-link:hover {
    text-decoration: underline !important;
}

/* Mobile : 1 grande carte par ligne */
@media (max-width: 960px) {
    .et_pb_blog_grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .et_pb_blog_grid article,
    .et_pb_blog_grid article:first-child,
    .et_pb_blog_grid article:not(:first-child) {
        min-height: auto !important;
    }

    .et_pb_blog_grid article .et_pb_image_container,
    .et_pb_blog_grid article:first-child .et_pb_image_container,
    .et_pb_blog_grid article:not(:first-child) .et_pb_image_container {
        height: 320px !important;
        min-height: 320px !important;
    }

    .et_pb_blog_grid article .entry-title,
    .et_pb_blog_grid article:first-child .entry-title,
    .et_pb_blog_grid article:not(:first-child) .entry-title {
        font-size: 20px !important;
    }
}