/* assets/css/article.css */

/* ==================== LAYOUT ==================== */
.article-main {
    background: var(--bg-soft);
    min-height: 100vh;
}

/* ==================== HERO ==================== */
.article-hero {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    background: var(--text);
}

.article-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .55;
    transition: transform 8s ease;
}

.article-hero:hover .article-hero-img {
    transform: scale(1.04);
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(26, 35, 50, .1) 0%,
            rgba(26, 35, 50, .5) 50%,
            rgba(26, 35, 50, .92) 100%);
}

.article-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 0 52px;
}

.article-hero-content .container {
    max-width: 860px;
}

/* No image fallback */
.article-page.no-hero {
    padding-top: 52px;
}

/* ==================== BREADCRUMB ==================== */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .8rem;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.article-hero-content .article-breadcrumb a,
.article-hero-content .article-breadcrumb {
    color: rgba(255, 255, 255, .65) !important;
    text-decoration: none !important;
}

.article-hero-content .article-breadcrumb a:hover {
    color: #fff !important;
}

.article-hero-content .article-breadcrumb i.fa-chevron-right {
    font-size: .6rem;
    opacity: .5;
}

.article-page.no-hero .article-breadcrumb {
    color: var(--text-muted);
}

.article-page.no-hero .article-breadcrumb a {
    color: var(--text-muted) !important;
    text-decoration: none !important;
}

.article-page.no-hero .article-breadcrumb a:hover {
    color: var(--primary) !important;
}

/* ==================== META TOP ==================== */
.article-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #fff;
}

.article-date,
.article-location,
.article-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 500;
}

.article-hero-content .article-date,
.article-hero-content .article-location,
.article-hero-content .article-views {
    color: rgba(255, 255, 255, .7);
}

.article-hero-content .article-date i,
.article-hero-content .article-location i,
.article-hero-content .article-views i {
    color: var(--primary-light);
}

.article-page.no-hero .article-date,
.article-page.no-hero .article-location,
.article-page.no-hero .article-views {
    color: var(--text-muted);
}

.article-page.no-hero .article-date i,
.article-page.no-hero .article-location i,
.article-page.no-hero .article-views i {
    color: var(--secondary);
}

/* ==================== TITLE & CHAPEAU ==================== */
.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
    margin: 0 0 18px;
}

.article-hero-content .article-title {
    color: #fff;
}

.article-page.no-hero .article-title {
    color: var(--text);
}

.article-chapeau {
    font-size: 1.15rem;
    line-height: 1.75;
    font-weight: 400;
    margin: 0;
}

.article-hero-content .article-chapeau {
    color: rgba(255, 255, 255, .8);
}

.article-page.no-hero .article-chapeau {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ==================== AUTHOR BAR ==================== */
.article-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 68px;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.author-info-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.author-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.author-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-light);
    font-weight: 600;
}

.author-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
}

.read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--text-muted);
    background: var(--bg-muted);
    padding: 6px 14px;
    border-radius: 20px;
}

.read-time i {
    color: var(--primary);
}

/* ==================== READ PROGRESS BAR ==================== */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: var(--z-toast);
    opacity: 0;
    transition: opacity .3s;
}

.read-progress.active {
    opacity: 1;
}

.read-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width .1s linear;
    box-shadow: 0 0 8px rgba(255, 107, 53, .5);
}

/* ==================== PAGE LAYOUT ==================== */
.article-page-body {
    padding: 52px 0 100px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 52px;
    align-items: start;
}

/* ==================== CONTENT WRAPPER ==================== */
.article-content-wrapper {
    min-width: 0;
}

.article-card-body {
    background: var(--bg);
    border-radius: var(--radius-xl);
    padding: 52px 56px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 28px;
}

/* ==================== ARTICLE CONTENT ==================== */
.article-content {
    font-size: 1.075rem;
    line-height: 1.92;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 48px;
}

.article-content>*+* {
    margin-top: 1.5em;
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2.5em;
    margin-bottom: .6em;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.article-content h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2em;
    margin-bottom: .5em;
}

.article-content p {
    margin: 0;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5em;
}

.article-content li {
    margin-bottom: .5em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 2em 0;
    box-shadow: var(--shadow-md);
}

.article-content blockquote {
    margin: 2em 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(255, 107, 53, .05), rgba(0, 184, 148, .04));
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-muted);
}

.article-content a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

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

.article-content strong {
    font-weight: 600;
    color: var(--text);
}

/* ==================== VIDEO ==================== */
.article-video {
    margin: 0 0 40px;
    padding: 28px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.video-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-title i {
    color: var(--primary);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--text);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 28px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;
    transition: all .2s;
}

.video-link:hover {
    background: var(--primary-dark);
    color: #fff !important;
    transform: translateY(-2px);
}

/* ==================== TAGS ==================== */
.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.tags-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tags-label i {
    color: var(--primary);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--bg);
    color: var(--text-muted) !important;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all .2s;
    text-decoration: none !important;
}

.tag-item:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: transparent;
    transform: translateY(-1px);
}

/* ==================== SOURCE ==================== */
.article-source {
    padding: 14px 20px;
    background: rgba(0, 119, 204, .06);
    border-left: 3px solid #0077cc;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #0077cc;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== SHARE BAR ==================== */
.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 22px 28px;
    background: linear-gradient(135deg, rgba(255, 107, 53, .04), rgba(0, 184, 148, .04));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 52px;
}

.share-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-right: 4px;
}

.share-label i {
    color: var(--primary);
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    font-size: .9rem;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all .25s var(--ease-spring);
    flex-shrink: 0;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.copy {
    background: var(--text-muted);
}

.share-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

/* ==================== COMMENTS ==================== */
.comments-section {
    border-top: 1px solid var(--border-light);
    padding-top: 48px;
}

.comments-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 36px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comments-title i {
    color: var(--primary);
    font-size: 1.4rem;
}

/* Comment Form */
.comment-form {
    padding: 32px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 44px;
}

.form-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: .9rem;
    font-weight: 400;
    outline: none;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, .1);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: .9rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .25s var(--ease-spring);
    box-shadow: 0 4px 14px rgba(255, 107, 53, .25);
    margin-top: 4px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, .35);
}

.btn-submit:disabled {
    opacity: .6;
    transform: none;
    cursor: not-allowed;
}

/* Comment Items */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 22px 24px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: border-color .2s, box-shadow .2s;
}

.comment-item:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-light);
}

.comment-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
}

.comment-date {
    font-size: .78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-date i {
    color: var(--secondary);
    font-size: .72rem;
}

.comment-text {
    font-size: .9rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

.no-comments {
    text-align: center;
    padding: 52px 24px;
    color: var(--text-muted);
    font-size: .95rem;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    border: 1.5px dashed var(--border);
}

/* ==================== SIDEBAR ==================== */
.article-sidebar {
    position: sticky;
    top: 130px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Pub sidebar */
.pub-sidebar-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    transition: box-shadow .3s;
}

.pub-sidebar-wrap:hover {
    box-shadow: var(--shadow-md);
}

.pub-sidebar-wrap img {
    width: 100%;
    display: block;
    transition: transform .4s;
}

.pub-sidebar-wrap:hover img {
    transform: scale(1.02);
}

.pub-sidebar-label {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-light);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 4px;
}

.pub-sidebar-wrap a {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

/* Banner ad (article_haut) */
.act-banner-ad {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    max-height: 100px;
    margin-bottom: 28px;
}

.act-banner-ad a {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

.act-banner-ad img {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    display: block;
}

.pub-banner-label {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-light);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(4px);
    padding: 2px 7px;
    border-radius: 3px;
}

.pub-placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    color: var(--text-muted);
    font-size: .8rem;
}

/* Sidebar widgets */
.sidebar-widget {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 9px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.widget-title i {
    color: var(--primary);
    font-size: .9rem;
}

.region-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    background: rgba(255, 107, 53, .06);
    color: var(--primary) !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: .875rem;
    border: 1.5px solid rgba(255, 107, 53, .2);
    text-decoration: none !important;
    transition: all .22s;
}

.region-link:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
    transform: translateX(3px);
}

/* Similar Articles */
.similar-articles {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.similar-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    text-decoration: none !important;
    color: inherit !important;
    transition: all .22s;
}

.similar-item:hover {
    background: var(--bg);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
    transform: translateX(3px);
}

.similar-image {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-muted);
    flex-shrink: 0;
}

.similar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.similar-item:hover .similar-image img {
    transform: scale(1.08);
}

.similar-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.similar-category {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    align-self: flex-start;
}

.similar-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text) !important;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-item:hover .similar-title {
    color: var(--primary) !important;
}

.similar-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    color: var(--text-light);
    font-weight: 400;
}

.similar-date i {
    color: var(--secondary);
    font-size: .7rem;
}

/* ==================== RELATED SECTION ==================== */
.related-section {
    padding: 72px 0 96px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border-light);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1199px) {
    .article-layout {
        grid-template-columns: 1fr 300px;
        gap: 40px;
    }

    .article-card-body {
        padding: 44px 44px;
    }
}

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

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .article-hero {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .article-hero {
        height: 340px;
    }

    .article-hero-content {
        padding: 36px 0 40px;
    }

    .article-card-body {
        padding: 30px 24px;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-chapeau {
        font-size: 1rem;
    }

    .article-author-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .article-share {
        gap: 10px;
    }

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

    .article-page-body {
        padding: 36px 0 72px;
    }
}

@media (max-width: 576px) {
    .article-hero {
        height: 280px;
    }

    .article-card-body {
        padding: 24px 18px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .comment-item {
        flex-direction: column;
    }

    .comment-form {
        padding: 22px 18px;
    }
}