/* ==========================================================================
   Neoterra Blog Stylesheet - Clean, Sobriety, High-Legibility
   Inherits design tokens from style.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Listing Page (/blog/)
   -------------------------------------------------------------------------- */
.blog-listing-header {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.blog-listing-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--bg-dark-green);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-align: center;
    width: 100%;
}

.blog-listing-subtitle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.blog-tagline-hook {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--bg-dark-green);
    letter-spacing: -0.01em;
}

.blog-tagline-desc {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: #555555;
    line-height: 1.5;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 36px;
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.blog-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-card-image-wrap {
    width: 100%;
    height: 210px;
    background: var(--bg-light);
    overflow: hidden;
    position: relative;
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.03);
}

.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.blog-tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(78, 107, 80, 0.12);
    color: var(--bg-dark-green);
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.blog-card-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #555555;
    line-height: 1.55;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #555555;
    border-top: 1px solid #eeeeee;
    padding-top: 14px;
}

.blog-card-cta {
    font-weight: 600;
    color: var(--bg-dark-green);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --------------------------------------------------------------------------
   2. Article View (/blog/<slug>/)
   -------------------------------------------------------------------------- */
.blog-post-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.blog-post-header {
    margin-bottom: 30px;
}

.blog-post-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1.25;
    color: var(--bg-dark-green);
    margin: 16px 0;
    letter-spacing: -0.02em;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 20px;
}

.blog-post-author {
    font-weight: 600;
    color: var(--text-dark);
}

.blog-post-cover-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-post-cover {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   3. Table of Contents (TOC) - Hiérarchique (H2 -> H3)
   -------------------------------------------------------------------------- */
.toc-card {
    background: #f7f7f5;
    border-left: 4px solid var(--bg-dark-green);
    border-radius: 0 10px 10px 0;
    padding: 18px 22px;
    margin: 24px 0 32px;
}

.toc-header {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-dark-green);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.toc-list {
    margin: 0;
    padding-left: 20px;
}

.toc-item-h2 {
    margin: 6px 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.toc-item-h2 > a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-item-h2 > a:hover {
    color: var(--bg-dark-green);
    text-decoration: underline;
}

.toc-sublist {
    margin: 4px 0 6px 12px;
    padding-left: 14px;
    list-style-type: lower-alpha;
}

.toc-item-h3 {
    margin: 3px 0;
    font-weight: 400;
    font-size: 0.88rem;
}

.toc-item-h3 a {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-item-h3 a:hover {
    color: var(--bg-dark-green);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. Markdown Prose / Content Body
   -------------------------------------------------------------------------- */
.blog-content {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: #2b2b2b;
}

.blog-content p,
.blog-content li {
    font-size: 1rem;
    line-height: 1.75;
    color: #2b2b2b;
}

.blog-content h2 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--bg-dark-green);
    margin: 40px 0 14px;
    scroll-margin-top: 100px;
    line-height: 1.3;
}

.blog-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 28px 0 10px;
    scroll-margin-top: 100px;
    line-height: 1.35;
}

.blog-content p {
    margin-bottom: 20px;
    text-align: left;
}

.blog-content ul,
.blog-content ol {
    margin: 0 0 22px 24px;
    padding: 0;
}

.blog-content li {
    margin-bottom: 8px;
}

.blog-content strong {
    font-weight: 600;
    color: #111111;
}

.blog-content blockquote {
    border-left: 4px solid #1c4a34;
    background: #f2f4f0;
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    color: #283929;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-content blockquote p {
    margin: 0;
}

.blog-content blockquote strong {
    color: #0b291b;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 26px auto;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Tailles d'images responsives contrôlées */
.blog-content img.img-sm {
    width: 100%;
    max-width: 320px;
}

.blog-content img.img-md {
    width: 100%;
    max-width: 450px;
}

.blog-content img.img-lg {
    width: 100%;
    max-width: 600px;
}

.blog-content code {
    background: #e9e9e5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: monospace;
}

.blog-content a {
    color: var(--bg-dark-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-content a:hover {
    color: var(--bg-light-green);
}

/* --------------------------------------------------------------------------
   4b. Tables (Comparatifs & Données) - Compactes, sobres et lisibles
   -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid #dcdfd8;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 0.82rem; /* Typographie fine, compacte et proportionnée (~13px) */
    line-height: 1.45;
    text-align: left;
    margin: 0;
}

.blog-content thead {
    background-color: #f1f4ee;
    border-bottom: 2px solid #ccd2c8;
}

.blog-content th {
    padding: 8px 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--bg-dark-green);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-right: 1px solid #dcdfd8;
    background-color: #f1f4ee;
}

.blog-content th:last-child {
    border-right: none;
}

.blog-content td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8eae4;
    border-right: 1px solid #e8eae4;
    color: #333333;
    font-size: 0.82rem;
    line-height: 1.45;
    vertical-align: top;
}

.blog-content td strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bg-dark-green);
}

.blog-content td:last-child {
    border-right: none;
}

.blog-content tbody tr:last-child td {
    border-bottom: none;
}

.blog-content tbody tr:nth-child(even) {
    background-color: #fafbf9;
}

.blog-content tbody tr:hover {
    background-color: #f2f5ef;
}

@media (max-width: 650px) {
    .blog-content th,
    .blog-content td {
        padding: 7px 10px;
        font-size: 0.78rem;
    }
}

/* --------------------------------------------------------------------------
   5. Social Share Component (Compact & Impactful)
   -------------------------------------------------------------------------- */
.blog-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    margin: 24px 0 18px;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.blog-share-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-right: 6px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    min-height: 40px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.share-btn:hover {
    border-color: var(--bg-dark-green);
    color: var(--bg-dark-green);
    transform: translateY(-2px);
}

.share-btn-linkedin:hover {
    background: #0077b5;
    color: #ffffff;
    border-color: #0077b5;
}

.share-btn-x:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Toast notification */
.toast-copied {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-dark-green);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.toast-copied.show {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   6. Product CTA Encart (Visible above the fold on 14" screens)
   -------------------------------------------------------------------------- */
.blog-product-cta {
    background: linear-gradient(135deg, var(--bg-dark-green) 0%, #202d21 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 24px 24px;
    margin: 18px 0 20px;
    box-shadow: 0 6px 24px rgba(50, 70, 51, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(212, 176, 129, 0.3);
}

.blog-product-cta h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.blog-product-cta p {
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 580px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.btn-cta-product {
    background: var(--bg-tan);
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease;
    display: inline-block;
}

.btn-cta-product:hover {
    background: #e6c59b;
    transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   7. Related Posts Section (À lire également)
   -------------------------------------------------------------------------- */
.blog-related-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0dcd0;
}

.blog-related-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bg-dark-green);
    margin-bottom: 24px;
    text-align: center;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.blog-related-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.blog-related-card .blog-card-title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 8px 0 12px;
}

/* --------------------------------------------------------------------------
   8. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 650px) {
    .blog-listing-title {
        font-size: 2.1rem;
    }
    
    .blog-tagline-hook {
        font-size: 1.15rem;
    }
    
    .blog-tagline-desc {
        font-size: 0.95rem;
    }
    
    .blog-post-title {
        font-size: 1.85rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-related-grid {
        grid-template-columns: 1fr;
    }

    .blog-related-section {
        margin-top: 20px;
        padding-top: 16px;
    }
    
    .blog-product-cta {
        padding: 20px 16px;
    }
    
    .blog-product-cta h3 {
        font-size: 1.25rem;
    }
}
