/**
 * Blog Grid Shortcode Styles
 * Shortcode: [projective_posts]
 * 
 * Utilise les variables CSS Elementor pour cohérence avec le design
 */

/* =============================================
   VARIABLES LOCALES (fallback)
   ============================================= */
:root {
    --projective-teal: var(--e-global-color-primary, #006D77);
    --projective-dark: var(--e-global-color-secondary, #1A1A1A);
    --projective-text: var(--e-global-color-text, #666666);
    --projective-accent: var(--e-global-color-accent, #E9C46A);
    --projective-accent-dark: var(--e-global-color-7083a51, #D4AF37);
    --projective-bg-light: var(--e-global-color-8be5bac, #EDF6F5);
    --projective-teal-vibrant: var(--e-global-color-afeb929, #0A9396);
    --projective-gap: var(--wp--style--block-gap, 24px);
    --projective-max-width: var(--wp--style--global--wide-size, 1200px);
}

/* =============================================
   NO POSTS MESSAGE
   ============================================= */
.projective-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--projective-text);
    font-family: 'Work Sans', sans-serif;
    font-size: 1.1rem;
}

/* =============================================
   FEATURED ARTICLE SECTION
   ============================================= */
.projective-featured {
    max-width: var(--projective-max-width);
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.featured-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-container:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 109, 119, 0.15);
    border-color: var(--projective-accent);
}

.featured-image {
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-placeholder {
    width: 100%;
    height: 100%;
    min-height: 350px;
    background: linear-gradient(135deg, var(--projective-bg-light) 0%, #d1e8e6 100%);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--projective-accent);
    color: var(--projective-dark);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 16px;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.featured-category {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--projective-teal);
}

.featured-meta time {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--projective-text);
}

.featured-content h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 16px 0;
}

.featured-content h2 a {
    color: var(--projective-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-content h2 a:hover {
    color: var(--projective-teal);
}

.featured-excerpt {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--projective-text);
    margin: 0 0 24px 0;
}

.featured-link {
    display: inline-block;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #006D77 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-link:hover {
    color: #D4AF37 !important;
}

/* =============================================
   ARTICLES GRID SECTION
   ============================================= */
.projective-grid-section {
    max-width: var(--projective-max-width);
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

.projective-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--projective-gap);
}

/* =============================================
   ARTICLE CARD
   ============================================= */
.article-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 109, 119, 0.12);
    border-color: var(--projective-accent);
}

.article-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--projective-bg-light) 0%, #d1e8e6 100%);
}

.article-content {
    padding: 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.article-category {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--projective-teal);
}

.article-meta time {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--projective-text);
}

.article-content h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.article-content h3 a {
    color: var(--projective-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: var(--projective-teal);
}

.article-excerpt {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--projective-text);
    margin: 0 0 16px 0;
}

.article-read-more {
    display: inline-block;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #006D77 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-read-more:hover {
    color: #D4AF37 !important;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Tablet - 2 colonnes */
@media (max-width: 992px) {
    .projective-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-container {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 280px;
    }

    .featured-content {
        padding: 30px;
    }

    .featured-content h2 {
        font-size: 1.5rem;
    }
}

/* Mobile - 1 colonne */
@media (max-width: 640px) {
    .projective-grid {
        grid-template-columns: 1fr;
    }

    .projective-featured {
        margin-bottom: 40px;
    }

    .featured-image {
        min-height: 220px;
    }

    .featured-content {
        padding: 24px;
    }

    .featured-content h2 {
        font-size: 1.35rem;
    }

    .featured-excerpt {
        font-size: 0.95rem;
    }

    .projective-grid-section {
        padding-bottom: 40px;
    }
}