/**
 * SINGLE TEMPLATES - STYLES UNIFIÉS
 * Le Bulletin Économique - Version 2.0
 * Fichier : assets/css/single-templates.css
 */

/* ================================================
   VARIABLES & RESET
   ================================================ */

:root {
    /* Couleurs principales */
    --be-primary: #0A2463;
    --be-primary-light: #3E92CC;
    --be-accent-gold: #D4AF37;
    --be-accent-green: #00A878;
    
    /* Typographie */
    --be-font-heading: 'Sora', sans-serif;
    --be-font-body: 'Inter', sans-serif;
    
    /* Espacements */
    --be-spacing-xs: 0.5rem;
    --be-spacing-sm: 1rem;
    --be-spacing-md: 1.5rem;
    --be-spacing-lg: 2rem;
    --be-spacing-xl: 3rem;
    --be-spacing-2xl: 4rem;
    
    /* Largeurs */
    --be-container-narrow: 720px;
    --be-container-medium: 960px;
    --be-container-wide: 1200px;
    
    /* Rayons & Ombres */
    --be-radius-sm: 0.5rem;
    --be-radius-md: 0.75rem;
    --be-radius-lg: 1rem;
    --be-shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --be-shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --be-shadow-xl: 0 10px 40px rgba(0,0,0,0.12);
}

/* Reset article */
.be-article {
    font-family: var(--be-font-body);
    line-height: 1.7;
    color: var(--be-text-main);
}

/* ================================================
   HERO MODERNE (TOUS TEMPLATES)
   ================================================ */

.be-hero-modern {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: var(--be-spacing-2xl);
    color: white;
    margin-bottom: var(--be-spacing-xl);
}

.be-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(2, 6, 23, 0.95) 0%,
        rgba(2, 6, 23, 0.6) 50%,
        rgba(2, 6, 23, 0.2) 100%
    );
}

.hero-placeholder {
    width: 100%;
    height: 100%;
}

.hero-content-box {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.be-breadcrumb {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--be-spacing-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.be-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.be-breadcrumb a:hover {
    color: var(--be-accent-gold);
}

.be-breadcrumb .current {
    color: white;
}

/* Métadonnées supérieures */
.be-article-meta-top {
    display: flex;
    align-items: center;
    gap: var(--be-spacing-md);
    margin-bottom: var(--be-spacing-md);
    flex-wrap: wrap;
}

.be-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.be-badge-category {
    background: var(--be-accent-gold);
    color: var(--be-primary);
}

.be-reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Titre */
.be-article-title {
    font-family: var(--be-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 var(--be-spacing-lg);
    color: white !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Chapô */
.be-article-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--be-spacing-lg);
    font-weight: 400;
}

/* Métadonnées auteur */
.be-article-meta-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--be-spacing-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: var(--be-spacing-lg);
    flex-wrap: wrap;
    gap: var(--be-spacing-md);
}

.be-author-info {
    display: flex;
    align-items: center;
    gap: var(--be-spacing-md);
}

.be-author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--be-accent-gold);
}

.be-author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.be-author-name {
    font-weight: 600;
    font-size: 1rem;
}

.be-author-name a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.be-author-name a:hover {
    color: var(--be-accent-gold);
}

.be-publish-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ================================================
   BOUTONS DE PARTAGE SOCIAL
   ================================================ */

.be-social-buttons {
    display: flex;
    gap: 0.75rem;
}

.be-social-horizontal {
    flex-wrap: wrap;
}

.be-social-vertical {
    flex-direction: column;
}

.be-social-centered {
    justify-content: center;
    align-items: center;
    padding: var(--be-spacing-lg) 0;
}

.be-share-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.be-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.be-share-twitter { background: #1DA1F2; }
.be-share-facebook { background: #1877F2; }
.be-share-linkedin { background: #0077B5; }
.be-share-whatsapp { background: #25D366; }

/* Partage avec texte */
.be-social-centered .be-share-btn {
    width: auto;
    padding: 0 1.5rem;
    border-radius: var(--be-radius-md);
}

/* ================================================
   LAYOUT GRID (SIDEBAR + CONTENU)
   ================================================ */

.be-content-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--be-spacing-xl);
    align-items: start;
}

/* Sidebar gauche sticky */
.be-sidebar-left {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: var(--be-spacing-lg);
}

.be-share-sticky,
.be-table-of-contents {
    background: var(--be-bg-surface);
    padding: var(--be-spacing-md);
    border-radius: var(--be-radius-lg);
    box-shadow: var(--be-shadow-md);
    border: 1px solid var(--be-border);
}

.be-share-label,
.be-toc-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--be-spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--be-text-main);
}

.be-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.be-toc-list li {
    margin-bottom: 0.75rem;
}

.be-toc-list a {
    font-size: 0.875rem;
    color: var(--be-text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 0.5rem;
    border-radius: var(--be-radius-sm);
}

.be-toc-list a:hover {
    color: var(--be-primary);
    background: rgba(10, 36, 99, 0.05);
}

/* ================================================
   CONTENU PRINCIPAL
   ================================================ */

.be-main-content {
    min-width: 0;
}

/* Points clés */
.be-key-points {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--be-spacing-lg);
    border-radius: var(--be-radius-lg);
    margin-bottom: var(--be-spacing-xl);
}

.be-kp-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--be-spacing-md);
}

.be-kp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.be-kp-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--be-spacing-sm);
    line-height: 1.6;
}

.be-kp-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Contenu de l'article */
.be-article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.be-article-content h2 {
    font-family: var(--be-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin: var(--be-spacing-xl) 0 var(--be-spacing-md);
    color: var(--be-text-main) !important;
}

.be-article-content h3 {
    font-family: var(--be-font-heading);
    font-size: 1.375rem;
    font-weight: 600;
    margin: var(--be-spacing-lg) 0 var(--be-spacing-md);
    color: var(--be-text-main) !important;
}

.be-article-content p {
    margin-bottom: var(--be-spacing-md);
    color: var(--be-text-main);
}

.be-article-content a {
    color: var(--be-primary);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.be-article-content a:hover {
    opacity: 0.8;
}

.be-article-content blockquote {
    border-left: 4px solid var(--be-primary);
    padding-left: var(--be-spacing-md);
    margin: var(--be-spacing-lg) 0;
    font-style: italic;
    color: var(--be-text-muted);
    font-size: 1.2rem;
}

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

.be-article-content ul,
.be-article-content ol {
    margin: var(--be-spacing-md) 0;
    padding-left: 2rem;
}

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

/* Tags */
.be-article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--be-spacing-xl);
    padding-top: var(--be-spacing-lg);
    border-top: 1px solid var(--be-border);
}

.be-tags-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--be-text-main);
}

.be-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--be-bg-surface);
    border: 1px solid var(--be-border);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--be-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.be-tag:hover {
    background: var(--be-primary);
    color: white;
    border-color: var(--be-primary);
}

/* Sources */
.be-sources-box {
    background: var(--be-bg-surface);
    padding: var(--be-spacing-lg);
    border-radius: var(--be-radius-lg);
    margin-top: var(--be-spacing-xl);
    border: 1px solid var(--be-border);
}

.be-sources-box h4 {
    margin-top: 0;
    margin-bottom: var(--be-spacing-md);
    font-size: 1.125rem;
    color: var(--be-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.be-sources-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--be-text-main);
}

.be-sources-content a {
    color: var(--be-primary);
    word-break: break-all;
}

/* ================================================
   FOOTER DE L'ARTICLE
   ================================================ */

.be-article-footer {
    padding: var(--be-spacing-2xl) 0;
    background: var(--be-bg-surface);
    border-top: 1px solid var(--be-border);
}

/* Bio de l'auteur */
.be-author-bio {
    display: flex;
    gap: var(--be-spacing-lg);
    padding: var(--be-spacing-xl);
    background: var(--be-bg-body);
    border-radius: var(--be-radius-lg);
    box-shadow: var(--be-shadow-md);
    margin-bottom: var(--be-spacing-2xl);
    border: 1px solid var(--be-border);
}

.be-bio-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.be-bio-content {
    flex: 1;
}

.be-bio-name {
    margin: 0 0 var(--be-spacing-sm);
    font-size: 1.5rem;
    font-family: var(--be-font-heading);
    color: var(--be-text-main);
}

.be-bio-description {
    color: var(--be-text-muted);
    margin-bottom: var(--be-spacing-md);
    line-height: 1.6;
}

/* Articles connexes */
.be-related-articles {
    margin-bottom: var(--be-spacing-2xl);
}

.be-related-title {
    font-family: var(--be-font-heading);
    font-size: 1.75rem;
    margin-bottom: var(--be-spacing-lg);
    color: var(--be-text-main);
}

.be-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--be-spacing-lg);
}

.be-related-card {
    background: var(--be-bg-body);
    border-radius: var(--be-radius-lg);
    overflow: hidden;
    box-shadow: var(--be-shadow-md);
    transition: all 0.2s;
    border: 1px solid var(--be-border);
}

.be-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--be-shadow-xl);
}

.be-related-image {
    display: block;
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
}

.be-related-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.be-related-content {
    padding: var(--be-spacing-md);
}

.be-related-card-title {
    margin: 0 0 var(--be-spacing-sm);
    font-size: 1.125rem;
    line-height: 1.4;
}

.be-related-card-title a {
    color: var(--be-text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.be-related-card-title a:hover {
    color: var(--be-primary);
}

.be-related-date {
    font-size: 0.875rem;
    color: var(--be-text-muted);
}

/* ================================================
   TEMPLATE REVUE DE PRESSE
   ================================================ */

.be-revue-hero {
    padding: var(--be-spacing-2xl) 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    margin-bottom: var(--be-spacing-xl);
}

.be-revue-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--be-spacing-md);
}

.be-revue-title {
    font-family: var(--be-font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0 0 var(--be-spacing-md);
}

.be-revue-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--be-spacing-md);
    font-size: 0.9375rem;
    opacity: 0.9;
}

.be-revue-body {
    padding: var(--be-spacing-2xl) 0;
}

.be-revue-intro {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: var(--be-spacing-2xl);
    text-align: center;
    color: var(--be-text-muted);
}

.be-press-sources {
    display: flex;
    flex-direction: column;
    gap: var(--be-spacing-xl);
}

.be-source-item {
    background: var(--be-bg-surface);
    border-radius: var(--be-radius-lg);
    padding: var(--be-spacing-lg);
    box-shadow: var(--be-shadow-md);
    border: 1px solid var(--be-border);
}

.be-source-header {
    display: flex;
    align-items: center;
    gap: var(--be-spacing-md);
    margin-bottom: var(--be-spacing-md);
    padding-bottom: var(--be-spacing-md);
    border-bottom: 1px solid var(--be-border);
}

.be-source-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.be-source-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--be-primary);
    color: white;
    border-radius: var(--be-radius-md);
    font-size: 1.5rem;
}

.be-source-name {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    color: var(--be-text-main);
}

.be-source-link {
    font-size: 0.875rem;
    color: var(--be-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.be-source-link:hover {
    text-decoration: underline;
}

.be-source-quote {
    margin: 0;
    padding: 0;
    border: none;
    font-style: normal;
    line-height: 1.7;
    color: var(--be-text-main);
}

/* Analyse éditoriale */
.be-editorial-analysis {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: var(--be-spacing-xl);
    border-radius: var(--be-radius-lg);
    margin: var(--be-spacing-2xl) 0;
}

.be-analysis-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--be-spacing-md);
}

.be-analysis-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white !important;
}

.be-analysis-content {
    line-height: 1.7;
    margin-bottom: var(--be-spacing-md);
}

.be-analysis-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: var(--be-spacing-md);
    border-top: 1px solid rgba(255,255,255,0.2);
}

.be-analysis-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

/* ================================================
   BOUTONS
   ================================================ */

.be-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--be-radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.be-btn-primary {
    background: var(--be-primary);
    color: white;
}

.be-btn-primary:hover {
    background: var(--be-primary-light);
    transform: translateY(-2px);
}

.be-btn-outline {
    background: transparent;
    border: 2px solid var(--be-border);
    color: var(--be-text-main);
}

.be-btn-outline:hover {
    border-color: var(--be-primary);
    color: var(--be-primary);
}

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

@media (max-width: 1024px) {
    .be-content-grid {
        grid-template-columns: 1fr;
    }
    
    .be-sidebar-left {
        display: none;
    }
    
    .be-article-meta-author {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--be-spacing-md);
    }
    
    .be-author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .be-bio-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .be-hero-modern {
        min-height: 50vh;
        padding-bottom: var(--be-spacing-lg);
    }
    
    .be-article-title {
        font-size: 1.75rem;
    }
    
    .be-article-excerpt {
        font-size: 1.125rem;
    }
    
    .be-related-grid {
        grid-template-columns: 1fr;
    }
    
    .be-social-buttons {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .be-share-btn {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

/* ================================================
   DARK MODE
   ================================================ */

[data-theme="dark"] .be-article-content h2,
[data-theme="dark"] .be-article-content h3,
[data-theme="dark"] .be-article-content p,
[data-theme="dark"] .be-sources-content,
[data-theme="dark"] .be-source-quote {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .be-article-content blockquote {
    color: #cbd5e1 !important;
    border-left-color: var(--be-accent-gold);
}
