/**
 * Blog Single Article Styles
 * Normandie Séminaire Theme
 *
 * @package NormandieSeminaire
 * @since 1.0.0
 */

/* ==========================================================================
   ARTICLE HERO
   ========================================================================== */

.single-article .article-hero {
    background: linear-gradient(180deg, var(--ns-light) 0%, var(--ns-white) 100%);
    padding: 40px 0 60px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--ns-text-muted);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.breadcrumb a {
    color: var(--ns-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--ns-red);
}

.breadcrumb .separator {
    margin: 0 4px;
    color: var(--ns-text-muted);
}

.breadcrumb .current {
    color: var(--ns-text-muted);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero Meta */
.article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    align-items: center;
}

.category-badge {
    background: var(--ns-red);
    color: var(--ns-white);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.category-badge:hover {
    background: var(--ns-red-dark);
    color: var(--ns-white);
}

.single-article .reading-time,
.single-article .publish-date {
    color: var(--ns-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Hero Title */
.single-article .article-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 24px;
    max-width: 900px;
    color: var(--ns-text);
}

.single-article .article-hero h1 .highlight {
    color: var(--ns-red);
}

/* Lead */
.article-lead {
    font-size: 1.25rem;
    color: var(--ns-text-light);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Author Box in Hero */
.article-author-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.article-author-box img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ns-gold);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.95rem;
    color: var(--ns-text);
}

.author-name strong {
    color: var(--ns-text);
}

.author-title {
    font-size: 0.85rem;
    color: var(--ns-text-muted);
}

/* ==========================================================================
   FEATURED IMAGE
   ========================================================================== */

.article-featured-image {
    margin-bottom: 40px;
}

.article-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 0;
}

.article-featured-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ns-text-muted);
    margin-top: 12px;
    padding: 0 16px;
}

/* ==========================================================================
   READING PROGRESS BAR
   ========================================================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--ns-red) 0%, var(--ns-gold) 100%);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ==========================================================================
   ARTICLE LAYOUT
   ========================================================================== */

.article-layout {
    padding: 40px 0 60px;
}

.article-grid {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 60px;
    align-items: start;
}

@media (max-width: 1200px) {
    .article-grid {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }

    .article-toc {
        display: none;
    }
}

@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        order: 2;
    }

    .article-content {
        order: 1;
    }
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

.article-toc {
    position: sticky;
    top: 100px;
}

.toc-wrapper {
    background: var(--ns-white);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.toc-wrapper h4 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--ns-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-nav {
    max-height: 60vh;
    overflow-y: auto;
}

.toc-nav ol {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.toc-nav > ol > li {
    margin-bottom: 12px;
}

.toc-nav ol ol {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid var(--ns-light);
}

.toc-nav ol ol li {
    margin-bottom: 6px;
}

.toc-nav a {
    color: var(--ns-text-light);
    text-decoration: none;
    line-height: 1.4;
    display: block;
    padding: 4px 0;
    transition: color var(--transition-fast);
}

.toc-nav a:hover {
    color: var(--ns-red);
}

.toc-nav a.active {
    color: var(--ns-red);
    font-weight: 600;
}

/* TOC CTA */
.toc-cta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.toc-cta p {
    font-size: 0.8rem;
    color: var(--ns-text-muted);
    margin-bottom: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ==========================================================================
   ARTICLE CONTENT
   ========================================================================== */

.article-content {
    max-width: 100%;
    min-width: 0;
}

/* Intro paragraph */
.article-content .intro {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--ns-text);
    margin-bottom: 40px;
    padding-left: 20px;
    border-left: 4px solid var(--ns-gold);
}

/* Headings */
.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-top: 48px;
    margin-bottom: 24px;
    color: var(--ns-text);
    scroll-margin-top: 100px;
}

.article-content h3 {
    font-size: 1.35rem;
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--ns-text);
    scroll-margin-top: 100px;
}

.article-content h4 {
    font-size: 1.15rem;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--ns-text);
    scroll-margin-top: 100px;
}

/* Paragraphs */
.article-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--ns-text);
}

/* Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.article-content li::marker {
    color: var(--ns-red);
}

/* Links */
.article-content a {
    color: var(--ns-red);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: var(--ns-red-dark);
}

/* Images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 32px 0;
}

.article-content figure {
    margin: 32px 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--ns-text-muted);
    margin-top: 12px;
}

/* ==========================================================================
   CONTENT BLOCKS
   ========================================================================== */

/* Tip Box */
.content-tip {
    display: flex;
    gap: 16px;
    background: #FEF3C7;
    border-left: 4px solid var(--ns-gold);
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.tip-content strong {
    color: var(--ns-text);
}

/* Warning Box */
.content-warning {
    display: flex;
    gap: 16px;
    background: #FEE2E2;
    border-left: 4px solid #EF4444;
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
}

/* Info Box */
.content-info {
    display: flex;
    gap: 16px;
    background: #DBEAFE;
    border-left: 4px solid var(--ns-blue);
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
}

/* Pull Quote */
.pull-quote,
.article-content blockquote {
    background: var(--ns-light);
    border: none;
    padding: 40px;
    margin: 40px 0;
    position: relative;
    border-radius: 12px;
}

.pull-quote::before,
.article-content blockquote::before {
    content: """;
    position: absolute;
    top: 16px;
    left: 24px;
    font-size: 4rem;
    color: var(--ns-red);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.pull-quote p,
.article-content blockquote p {
    font-family: var(--font-accent);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--ns-text);
    margin-bottom: 16px;
    padding-left: 40px;
}

.pull-quote cite,
.article-content blockquote cite {
    display: block;
    color: var(--ns-red);
    font-weight: 600;
    font-style: normal;
    padding-left: 40px;
}

/* Activity Card */
.activity-card {
    display: flex;
    gap: 20px;
    background: var(--ns-white);
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    transition: box-shadow var(--transition-base);
}

.activity-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.activity-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ns-gold);
    line-height: 1;
    flex-shrink: 0;
}

.activity-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.activity-content p {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--ns-text-muted);
}

@media (max-width: 640px) {
    .activity-card {
        flex-direction: column;
        gap: 12px;
    }

    .activity-number {
        font-size: 2rem;
    }
}

/* Content CTA */
.content-cta {
    background: linear-gradient(135deg, var(--ns-red) 0%, var(--ns-red-dark) 100%);
    border-radius: 16px;
    padding: 40px;
    margin: 48px 0;
    text-align: center;
}

.content-cta h3 {
    color: var(--ns-white);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.content-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
    font-size: 1rem;
}

.content-cta .btn-primary {
    background: var(--ns-gold);
    color: var(--ns-dark);
    padding: 14px 28px;
    font-weight: 700;
    border: none;
}

.content-cta .btn-primary:hover {
    background: var(--ns-gold-dark);
}

/* ==========================================================================
   TAGS & SHARE
   ========================================================================== */

.article-tags,
.article-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.article-tags > span,
.article-share > span {
    font-weight: 600;
    color: var(--ns-text);
}

.article-tags a {
    background: var(--ns-light);
    color: var(--ns-text);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.article-tags a:hover {
    background: var(--ns-red);
    color: var(--ns-white);
}

.article-share a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.share-linkedin {
    background: #0077B5;
    color: white;
}

.share-twitter {
    background: #1DA1F2;
    color: white;
}

.share-copy {
    background: var(--ns-light);
    color: var(--ns-text);
}

.share-copy.copied {
    background: var(--ns-success);
    color: white;
}

/* ==========================================================================
   AUTHOR FULL BOX
   ========================================================================== */

.article-author-full {
    background: var(--ns-light);
    padding: 60px 0;
}

.author-full-box {
    display: flex;
    gap: 32px;
    background: var(--ns-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.author-full-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--ns-gold);
    flex-shrink: 0;
}

.author-full-content h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ns-text-muted);
    margin-bottom: 4px;
}

.author-full-content h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--ns-text);
}

.author-full-title {
    color: var(--ns-red);
    font-weight: 600;
    margin-bottom: 16px;
}

.author-full-content p {
    color: var(--ns-text-light);
    line-height: 1.6;
}

.author-full-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.author-full-links a {
    color: var(--ns-red);
    text-decoration: none;
    font-weight: 600;
}

.author-full-links a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .author-full-box {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .author-full-avatar {
        margin: 0 auto;
    }

    .author-full-links {
        justify-content: center;
    }
}

/* ==========================================================================
   RELATED ARTICLES
   ========================================================================== */

.related-articles {
    padding: 60px 0;
    background: var(--ns-white);
}

.related-articles h2 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.75rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   CTA FINAL
   ========================================================================== */

.article-cta-final {
    background: linear-gradient(135deg, var(--ns-dark) 0%, #0d0d1a 100%);
    padding: 80px 0;
}

.cta-final-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cta-final-content h2 {
    color: var(--ns-white);
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.cta-final-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

.cta-final-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-final-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
    .cta-final-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-final-buttons {
        justify-content: center;
    }

    .cta-final-image {
        display: none;
    }
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 640px) {
    .single-article .article-hero {
        padding: 30px 0 40px;
    }

    .article-hero-meta {
        gap: 12px;
    }

    .article-lead {
        font-size: 1.1rem;
    }

    .article-layout {
        padding: 30px 0 40px;
    }

    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 36px;
    }

    .article-content h3 {
        font-size: 1.2rem;
        margin-top: 28px;
    }

    .article-content p {
        font-size: 1rem;
    }

    .pull-quote,
    .article-content blockquote {
        padding: 24px;
    }

    .pull-quote p,
    .article-content blockquote p {
        font-size: 1.1rem;
        padding-left: 20px;
    }

    .content-cta {
        padding: 30px 20px;
    }

    .article-cta-final {
        padding: 60px 0;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .reading-progress,
    .article-toc,
    .article-sidebar,
    .article-share,
    .content-cta,
    .article-author-full,
    .related-articles,
    .article-cta-final {
        display: none;
    }

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

    .article-content a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .pull-quote,
    .article-content blockquote {
        border: 1px solid #ddd;
    }
}
