/* Blog Styles */

:root {
    --earth-dark: #2C1810;
    --earth-medium: #8B4513;
    --earth-light: #D4A574;
    --green-primary: #2D5016;
    --green-accent: #4A7C2C;
    --cream: #F5EFE7;
    --white: #FFFFFF;
}

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, var(--earth-dark) 0%, var(--earth-medium) 100%);
    color: var(--white);
    padding: 8rem 0 4rem;
    text-align: center;
}

.blog-header h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-header .subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Main */
.blog-main {
    padding: 4rem 0;
}

.section-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2rem;
    color: var(--earth-dark);
    margin-bottom: 2rem;
    border-left: 4px solid var(--green-primary);
    padding-left: 1rem;
}

/* Featured Articles */
.featured-articles {
    margin-bottom: 4rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.articles-grid.featured {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* Article Cards */
.article-card {
    background: var(--white);
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--green-accent);
}

.article-card.featured-card {
    grid-column: span 1;
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
}

.article-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--green-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.article-card h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-card h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card h3 a,
.article-card h4 a {
    color: var(--earth-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card h3 a:hover,
.article-card h4 a:hover {
    color: var(--green-primary);
}

.article-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #888;
}

.category {
    background: var(--cream);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.reading-time::before {
    content: "⏱️ ";
}

/* Category Sections */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--earth-medium);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cream);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding: 6rem 0 3rem;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header .subtitle {
        font-size: 1rem;
    }
    
    .articles-grid,
    .articles-grid.featured {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
}

/* Article Template Styles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.article-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--cream);
}

.article-header h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.5rem;
    color: var(--earth-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-header .meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.article-content {
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.75rem;
    color: var(--earth-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--earth-medium);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin: 1.25rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content a {
    color: var(--green-primary);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--green-accent);
}

.article-content strong {
    font-weight: 700;
    color: var(--earth-dark);
}

.article-cta {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-accent) 100%);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.article-cta h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.article-cta p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.article-cta .btn {
    display: inline-block;
    background: var(--white);
    color: var(--green-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-cta .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .article-container {
        padding: 3rem 1.5rem;
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}
/* Logo styling */
.logo {
    font-size: 1.5rem;
    text-decoration: none;
}

.logo-elle {
    color: var(--earth-dark);
    font-family: 'Archivo Black', sans-serif;
}

.logo-energie {
    color: var(--green-primary);
    font-family: 'Archivo Black', sans-serif;
}

/* Nav CTA button */
.btn-cta-nav {
    background: var(--green-primary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta-nav:hover {
    background: var(--earth-dark);
    transform: translateY(-2px);
}

/* Footer styling */
.footer {
    background: var(--earth-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.footer .logo-elle {
    color: var(--green-accent);
}

.footer .logo-energie {
    color: var(--white);
}

.footer-col p {
    opacity: 0.8;
    line-height: 1.7;
}

.footer-col h4 {
    font-family: 'Archivo Black', sans-serif;
    margin-bottom: 1.5rem;
    color: var(--green-accent);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--green-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* Nav container fix */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================
   TABLEAUX AMÉLIORÉS
   ============================================ */

.article-content table,
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-content table th,
.table th {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-accent) 100%);
    color: white;
    font-weight: 700;
    text-align: left;
    padding: 1rem;
    font-size: 0.95rem;
}

.article-content table td,
.table td {
    padding: 1rem;
    border-bottom: 1px solid #E8E8E8;
    color: #333;
}

.article-content table tr:last-child td,
.table tr:last-child td {
    border-bottom: none;
}

.article-content table tr:hover,
.table tr:hover {
    background: #F9F9F9;
}

.article-content table strong,
.table strong {
    color: var(--green-primary);
    font-weight: 700;
}

/* Responsive tables */
@media (max-width: 768px) {
    .article-content table,
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .article-content table th,
    .article-content table td,
    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   CTA BUTTONS AMÉLIORÉS
   ============================================ */

.cta-box {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-accent) 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
    box-shadow: 0 8px 24px rgba(45, 80, 22, 0.2);
}

.cta-box h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    color: white;
}

.cta-box .btn-cta {
    display: inline-block;
    background: white;
    color: var(--green-primary);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cta-box .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Inline CTA button */
.btn-cta-inline {
    display: inline-block;
    background: var(--green-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
}

.btn-cta-inline:hover {
    background: var(--earth-dark);
    transform: translateY(-2px);
}

/* ============================================
   LISTES AMÉLIORÉES
   ============================================ */

.article-content ul {
    list-style: none;
    padding-left: 0;
}

.article-content ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.article-content ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-primary);
    font-weight: 700;
}

/* ============================================
   ARTICLE LAYOUT WITH SIDEBAR TOC
   ============================================ */

.article-container.has-toc {
    max-width: 1100px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2.5rem;
    align-items: start;
}

.article-toc {
    position: sticky;
    top: 100px;
    background: var(--white);
    border: 2px solid #E8E1D8;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}

.article-toc .toc-title {
    color: var(--earth-dark);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.article-toc ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
    line-height: 1.6;
}

.article-toc ul li {
    padding-left: 0;
    margin-bottom: 0.5rem;
    position: static;
}

.article-toc ul li::before {
    content: none;
}

.article-toc a {
    color: var(--green-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.article-toc a:hover {
    color: var(--green-accent);
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .article-container.has-toc {
        max-width: 800px;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-toc {
        position: relative;
        top: 0;
        max-height: none;
        order: -1;
        margin-bottom: 2rem;
    }
}


/* Mobile spacing for article title */
@media (max-width: 768px) {
  .article-header h1 {
    font-size: 1.75rem;
    margin-top: 54px;
  }
}
