
/* ====================================================================
    1. STRUCTURE GÉNÉRALE
   ==================================================================== */

.single-article {
    padding-top: 2rem;
    background: var(--bg-light);
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ====================================================================
    2. FIL D'ARIANE
   ==================================================================== */

.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: var(--border-light);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}


/* ====================================================================
    3. EN-TÊTE DE L'ARTICLE
   ==================================================================== */

.article-header {
    margin-bottom: 3rem;
}

.article-category {
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.3;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
}

/* Métadonnées */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--primary);
    font-size: 1rem;
}

/* Image principale */
.article-featured-image {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.article-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-featured-image:hover img {
    transform: scale(1.02);
}


/* ====================================================================
    4. CONTENU PRINCIPAL
   ==================================================================== */

.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    margin: 3rem 0;
}

@media (max-width: 1024px) {
    .article-content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Contenu principal */
.article-main-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Extrait */
.article-excerpt {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--primary-dark);
    font-style: italic;
    padding: 1.5rem;
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    margin-bottom: 3rem;
}

/* Corps de l'article */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Typographie enrichie */
.article-body h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin: 2.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
    font-weight: 700;
}

.article-body h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 1.5rem;
}

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

.article-body li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

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

/* Boîte de mise en valeur */
.callout-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f5e9 100%);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.callout-box h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
    margin-top: 0;
}

.callout-box h4 i {
    color: var(--accent);
}

.callout-box p {
    margin-bottom: 0;
}


/* ====================================================================
    5. TAGS
   ==================================================================== */

.article-tags {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.article-tags h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
}


/* ====================================================================
    6. PARTAGE
   ==================================================================== */

.article-share {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
    text-align: center;
}

.article-share h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--white);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy-link { background: var(--primary); }

.share-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* ====================================================================
    7. SIDEBAR
   ==================================================================== */

.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

/* Carte auteur */
.author-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid var(--border-light);
}

.author-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--primary-light);
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.author-title {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.author-bio {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.btn-author {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

/* Articles similaires */
.related-articles {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
}

.related-articles h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item a {
    display: block;
    text-decoration: none;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.related-item a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(5px);
}

.related-item h4 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
    line-height: 1.4;
}

.related-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* CTA sidebar */
.cta-sidebar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: var(--white);
}

.cta-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--white);
}

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

.cta-sidebar .btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    font-weight: 600;
}

.cta-sidebar .btn:hover {
    background: var(--white);
    color: var(--primary-dark);
}


/* ====================================================================
    8. NAVIGATION ENTRE ARTICLES
   ==================================================================== */

.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.nav-prev, .nav-next, .nav-all {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
}

.nav-prev { justify-content: flex-start; }
.nav-all { justify-content: center; }
.nav-next { justify-content: flex-end; }

.nav-prev, .nav-next {
    padding: 1rem;
    border-radius: 10px;
    color: var(--primary-dark);
}

.nav-prev:hover, .nav-next:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.nav-content {
    margin: 0 15px;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.nav-prev h4, .nav-next h4 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    color: var(--primary);
}

.nav-all {
    flex: 0 0 auto;
    padding: 12px 25px;
    background: var(--primary);
    color: var(--white);
    border-radius: 25px;
    font-weight: 600;
    gap: 10px;
}

.nav-all:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .article-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-prev, .nav-next, .nav-all {
        width: 100%;
        justify-content: center;
    }
    
    .nav-all {
        order: -1;
    }
}


/* ====================================================================
    9. ANIMATIONS
   ==================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-header, .article-main-content, .article-sidebar, .article-navigation {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.article-header { animation-delay: 0.1s; }
.article-main-content { animation-delay: 0.2s; }
.article-sidebar { animation-delay: 0.3s; }
.article-navigation { animation-delay: 0.4s; }


/* ====================================================================
    10. RESPONSIVE
   ==================================================================== */

@media (max-width: 768px) {
    .article-main-content {
        padding: 2rem 1.5rem;
    }
    
    .article-featured-image img {
        height: 300px;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-featured-image img {
        height: 250px;
    }
    
    .article-main-content {
        padding: 1.5rem 1rem;
    }
}

/* Impression */
@media print {
    .article-sidebar, .article-share, .article-navigation {
        display: none;
    }
    
    .article-content-wrapper {
        display: block;
    }
    
    .article-main-content {
        box-shadow: none;
        padding: 0;
    }
}