/* =====================================================
   BLOG CSS - Blog uniquement
   BIM Expert v3.0 - BLEU MARINE
   ===================================================== */

/* Variables locales */
:root {
    --blog-primary: #0f2557;
    --blog-secondary: #1e3a8a;
    --blog-accent: #3b5998;
}

/* =====================================================
   FIL D'ARIANE
   ===================================================== */
.breadcrumb-container {
    background: #f9fafb;
    padding: 1.5rem 0;
    margin-top: var(--nav-height);
    border-bottom: 1px solid #e5e7eb !important;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #1a1a1a;
}

.breadcrumb span:last-child {
    color: #1a1a1a;
    font-weight: 500;
}

/* =====================================================
   HERO BLOG
   ===================================================== */
.blog-hero {
    position: relative;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: var(--nav-height);
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../../images/dessinateur-modelation-3D.webp');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 2;
}

.blog-hero .container {
    position: relative;
    z-index: 3;
}

.blog-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.blog-hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

/* =====================================================
   NAVIGATION CATÉGORIES - BLEU MARINE AVEC SCROLL FIN
   ===================================================== */
.blog-categories-nav {
    background: white;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-categories-nav .container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.blog-categories-nav .container::-webkit-scrollbar {
    height: 6px;
}

.blog-categories-nav .container::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.blog-categories-nav .container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.blog-categories-nav .container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.cat-nav-item {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    white-space: nowrap;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
    font-weight: 500;
    flex-shrink: 0;
}

.cat-nav-item::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blog-primary);
    transition: width 0.3s;
}

.cat-nav-item:hover,
.cat-nav-item.active {
    color: var(--blog-primary);
}

.cat-nav-item:hover::after,
.cat-nav-item.active::after {
    width: 100%;
}

/* =====================================================
   LISTE ARTICLES
   ===================================================== */
.blog-list-section {
    padding: 4rem 0;
    background: #f9fafb;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(15, 37, 87, 0.15);
}

.blog-card-image {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e5e7eb;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
}

.blog-card-category {
    background: #f0f4ff;
    color: var(--blog-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.blog-card-category:hover {
    background: #e0e9ff;
}

.blog-card-date {
    color: #9ca3af;
}

.blog-card h3 {
    margin: 0 0 1rem 0;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
}

.blog-card h3 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card h3 a:hover {
    color: var(--blog-primary);
}

.blog-card-content > p {
    color: #6b7280;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.blog-card-link {
    color: var(--blog-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
    margin-top: auto;
}

.blog-card-link:hover {
    color: var(--blog-secondary);
}

/* =====================================================
   PAGINATION - BLEU MARINE
   ===================================================== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-numbers a,
.pagination-current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-numbers a {
    color: #6b7280;
    background: white;
    border: 1px solid #e5e7eb;
}

.pagination-numbers a:hover {
    background: #f9fafb;
    border-color: var(--blog-primary);
    color: var(--blog-primary);
}

.pagination-current {
    background: var(--blog-primary);
    color: white;
    border: 1px solid var(--blog-primary);
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: #1a1a1a;
    color: white;
}

/* =====================================================
   PAGE ARTICLE - BLEU MARINE
   ===================================================== */
.blog-article-page {
    padding: 4rem 0;
    background: #f9fafb;
}

.article-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.article-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.article-category {
    background: #f0f4ff;
    color: var(--blog-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.article-date {
    color: #6b7280;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-meta-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.article-author,
.article-reading-time,
.article-views {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.article-author {
    font-weight: 600;
    color: #1a1a1a;
}

.article-image-container {
    max-width: 900px;
    margin: 0 auto 3rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: auto;
    display: block;
}

.article-chapeau {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #374151;
    font-style: italic;
    padding: 2rem;
    background: #f9fafb;
    border-left: 4px solid var(--blog-primary);
    border-radius: 8px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}

.article-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: #1a1a1a;
    margin: 3rem 0 1.5rem;
    line-height: 1.3;
}

.article-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin: 2.5rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content a {
    color: var(--blog-primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.article-content a:hover {
    color: var(--blog-secondary);
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f9fafb;
    border-left: 4px solid var(--blog-primary);
    font-style: italic;
    color: #4b5563;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.article-tags {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tag-badge {
    background: white;
    color: var(--blog-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.tag-badge:hover {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

/* =====================================================
   PARTAGE - AVEC BORDURE HARMONISÉE
   ===================================================== */
.article-share {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.article-share h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    text-align: center;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s;
    border: 2px solid;
}

.share-linkedin {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-linkedin:hover {
    background: #006399;
    border-color: #006399;
    transform: translateY(-2px);
}

.share-twitter,
.share-x {
    background: #000000;
    color: white;
    border-color: #000000;
}

.share-twitter:hover,
.share-x:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-2px);
}

.share-facebook {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    transform: translateY(-2px);
}

/* =====================================================
   ARTICLES CONNEXES
   ===================================================== */
.related-articles {
    padding: 4rem 0;
    background: #f9fafb;
}

.related-articles h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 3rem;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

/* =====================================================
   BLOC D'INFORMATIONS
   ===================================================== */
.info-box {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.info-box.info-blue {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.info-box.info-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.info-box.info-success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.info-box h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 968px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.75rem;
    }
    
    .blog-hero {
        padding: 3rem 0;
        min-height: 220px;
    }
    
    .blog-categories-nav .container {
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .blog-hero {
        min-height: 220px;
        padding: 3rem 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card-content {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-chapeau {
        padding: 1.5rem;
        font-size: 1.125rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }
    
    .article-tags {
        padding: 1.5rem;
    }
    
    .article-share {
        padding: 1.5rem;
    }
    
    .share-buttons {
        gap: 0.75rem;
    }
    
    .share-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .pagination-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 370px) {
    .blog-hero {
        min-height: 220px;
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    
    .blog-card-image {
        height: 320px;
    }
    
    .article-content ul,
    .article-content ol {
        padding-left: 1.5rem;
    }
    
    .related-articles h2 {
        font-size: 2rem;
    }
    
    .blog-hero {
        min-height: 220px;
        padding: 2rem 0;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}