/* ============================================================
   BLOG — Design v2
   ============================================================ */

/* --- Hero header (listing + article) --- */
.blog-hero-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid #e5e7eb;
}

/* --- Category badge --- */
.blog-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
}

/* --- Transition hover card --- */
.blog-featured-card,
.blog-card {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.blog-featured-card:hover,
.blog-card:hover {
    transform: translateY(-3px);
}

/* --- Titre card hover --- */
.blog-card-title {
    transition: color 0.2s ease;
}
.blog-card:hover .blog-card-title,
.blog-featured-card:hover .blog-card-title {
    color: var(--color-primary);
}

/* --- Images featured card --- */
.blog-featured-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
@media (min-width: 1024px) {
    .blog-featured-img {
        height: 100%;
        min-height: 320px;
    }
}
.blog-featured-card:hover .blog-featured-img {
    transform: scale(1.04);
}

/* --- Images grille cards --- */
.blog-card-img-wrap {
    height: 210px;
}
.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

/* --- Line clamp fallback --- */
.blog-line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Image hero article --- */
.blog-hero-img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    object-fit: cover;
    max-height: 480px;
}

/* --- Contenu article (prose) --- */
#post-content img {
    margin: auto;
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}
#post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    word-wrap: break-word;
}
#post-content li {
    margin-bottom: 12px;
}
#post-content blockquote {
    font-style: italic;
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
    color: #6b7280;
}

/* --- Sidebar sticky --- */
.blog-sidebar-sticky {
    position: sticky;
    top: 6rem;
}

/* --- Boutons de partage header inline --- */
.blog-share-inline {
    margin-left: auto;
}
.blog-share-icon-btn {
    font-size: 1.4rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s ease;
    padding: 0;
}
.blog-share-icon-btn:hover {
    color: var(--color-primary);
}

/* --- Boutons de partage bas d'article / sidebar --- */
.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    border: none;
}
.blog-share-btn-facebook {
    background-color: #3b5998;
    color: #fff;
}
.blog-share-btn-facebook:hover {
    opacity: 0.9;
}
.blog-share-btn-outline {
    background-color: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.blog-share-btn-outline:hover {
    border-color: #9ca3af;
}

/* --- Pagination --- */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blog-hero-header {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    .blog-featured-img {
        min-height: 220px;
    }
    .blog-sidebar-sticky {
        position: static;
    }
    .blog-share-inline {
        display: none;
    }
}
