/**
 * Blog Integration - Minimal and Customizable CSS
 * Version 1.2 - CLEAN VERSION (Sans shimmer, sans bouton, sans extrait)
 * 
 * RESPONSIVE LOGIC:
 * - Desktop (≥992px)  : 4 columns (4 articles visibles)
 * - Tablet (768-991)  : 3 columns (4ème article caché)
 * - Mobile (<768px)   : 1 column (4ème article caché)
 * 
 * @author Infini Digital
 * @version 1.2
 */


/* ============================================
   CSS VARIABLES - CUSTOMIZE HERE
   ============================================ */

:root {
    --blog-section-padding: 60px 0;
    --blog-card-gap: 30px;
    --blog-max-width: 1400px;
    --blog-border-radius: 12px;
    /* Breakpoints (customizable) */
    --breakpoint-desktop: 992px;
    --breakpoint-tablet: 768px;
}


/* ============================================
   MAIN CONTAINER
   ============================================ */

#blog-integration {
    /* padding: var(--blog-section-padding); */
    /* 👇 Add your styles here (background, etc.) */
}


/* ============================================
   BLOG SECTION HEADER
   ============================================ */

.blog-header {
    text-align: center;
    /* margin-bottom: 50px; */
    /* 👇 Customize header */
    position: relative;
}

.blog-header h2 {
    /* 👇 Title styles */
}

.blog-subtitle {
    /* 👇 Subtitle styles */
}


/* ============================================
   RESPONSIVE GRID (CORE - DO NOT MODIFY)
   ============================================ */

.blog-articles-grid {
    display: grid;
    gap: var(--blog-card-gap);
    margin: 0 auto;
    /* max-width: var(--blog-max-width); */
    width: 100%;
    padding: 0 15px;
}


/* DESKTOP: 4 columns */

@media (min-width: 992px) {
    .blog-articles-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* TABLET: 3 columns + hide 4th article */

@media (min-width: 768px) and (max-width: 991px) {
    .blog-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .blog-article-card:nth-child(4) {
        display: none;
    }
}


/* MOBILE: 1 column + hide 4th article */

@media (max-width: 767px) {
    .blog-articles-grid {
        grid-template-columns: 1fr;
    }
    .blog-article-card:nth-child(4) {
        display: none;
    }
}


/* ============================================
   ARTICLE CARD - BASE STRUCTURE
   ============================================ */

.blog-article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* 👇 Add your styles (background, border, shadow, etc.) */
}


/* ============================================
   IMAGE
   ============================================ */

.blog-article-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    /* Customizable */
    flex-shrink: 0;
    /* 👇 Add your styles */
}

.blog-article-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
    opacity: 0;
    /* 👇 Add transitions, filters, etc. */
}


/* Simple fade-in when image loads */

.blog-article-image img.loaded {
    opacity: 1;
}


/* ============================================
   CARD CONTENT
   ============================================ */

.blog-article-content {
    padding: 25px;
    /* Customizable */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* 👇 Add your styles */
}

.blog-article-title {
    margin-bottom: 15px;
    /* 👇 Title styles */
}

.blog-article-title a {
    color: inherit;
    text-decoration: none;
    /* 👇 Add hover, transitions, etc. */
}


/* ============================================
   CATÉGORIES ET MÉTADONNÉES
   ============================================ */


/* Catégories badges */

.blog-article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.blog-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e7f7ff;
    color: #00aff0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Métadonnées (auteur + date) */

.blog-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}

.blog-meta-author,
.blog-meta-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-meta-author svg,
.blog-meta-date svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: middle;
    color: #00aff0;
    flex-shrink: 0;
}


/* ============================================
   RESPONSIVE - ADDITIONAL ADJUSTMENTS
   ============================================ */

/* Desktop */

@media (min-width: 1025px) {
    #blog-integration {
        /* margin: 140px 0; */
    }
}


/* Tablet */

@media (max-width: 1024px) {
    #blog-integration {
        /* margin: 110px 0; */
    }
}


/* Mobile */

@media (max-width: 767px) {
    #blog-integration {
        /* margin: 60px 0; */
    }
    .blog-article-image {
        height: 200px;
        /* Mobile image height */
    }
    .blog-article-content {
        padding: 20px;
        /* Mobile padding */
    }
    .blog-article-meta {
        font-size: 12px;
    }
}


/* ============================================
   EMPTY STATE (NO ARTICLES)
   ============================================ */

.blog-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.blog-empty-message {
    font-size: 16px;
    margin-top: 20px;
}


/* Mobile empty state */
@media (max-width: 767px) {
    .blog-empty-state {
        padding: 40px 20px;
    }
}