/* ===========================================
   PAGE ARTICLE - CSS COMPLET
   Couleur dominante : #D32F2F (rouge)
   =========================================== */

:root {
    --primary-color: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #EF5350;
    --primary-bg: rgba(211, 47, 47, 0.1);
    --text-dark: #424242;
    --text-light: #757575;
    --bg-light: #F5F5F5;
    --bg-lighter: #FAFAFA;
    --border-color: #E0E0E0;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
    --shadow-hover: 0 8px 24px rgba(211, 47, 47, 0.2);
}

/* Bannière de l'article */
.article-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.article-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,100 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: #FFEB3B;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb i {
    margin: 0 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.breadcrumb span {
    color: var(--white);
    opacity: 0.8;
}

.banner-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.article-banner-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.meta-item i {
    color: #FFEB3B;
    font-size: 1.1rem;
}

/* Section Article principale */
.article-section {
    padding: 3rem 0;
    background: var(--bg-lighter);
    min-height: 70vh;
}

.article-main {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Image hero de l'article */
.article-hero-image {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.article-main:hover .article-image {
    transform: scale(1.03);
}

.article-date-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--white);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary-light);
    min-width: 80px;
}

.date-day {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

.date-month {
    display: block;
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0.3rem 0;
}

.date-year {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* En-tête de l'article */
.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.article-category-tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 10px rgba(211, 47, 47, 0.3);
}

.article-category-tag i {
    font-size: 0.8rem;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-share span {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

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

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

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

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

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

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

/* Contenu de l'article */
.article-content {
    padding: 2.5rem;
}

.article-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 500;
}

.article-full-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
}

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

.article-full-content h2, .article-full-content h3, .article-full-content h4 {
    color: var(--primary-dark);
    margin: 2rem 0 1rem;
    font-weight: 700;
}

.article-full-content h2 {
    font-size: 1.8rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.article-full-content h3 {
    font-size: 1.5rem;
}

.article-full-content ul, .article-full-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.article-full-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--primary-bg);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.article-full-content code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Tags de l'article */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 0;
    border-top: 2px solid var(--border-color);
    margin-top: 2rem;
}

.article-tags i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.tag {
    background: var(--primary-bg);
    color: var(--primary-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(211, 47, 47, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* Actions de l'article */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-back {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.btn-back:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
    text-decoration: none;
}

.btn-back i {
    font-size: 1rem;
}

.btn-comments {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.btn-comments:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
    border-color: var(--primary-light);
    text-decoration: none;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.8rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.sidebar-title {
    color: var(--primary-dark);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-light);
}

.sidebar-title i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

/* Articles de la sidebar */
.sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-article {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-article:hover {
    transform: translateX(5px);
}

.sidebar-article-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
}

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

.sidebar-article:hover .sidebar-article-image img {
    transform: scale(1.1);
}

.sidebar-article-content {
    flex: 1;
}

.sidebar-article-title {
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.sidebar-article-title a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
    display: block;
}

.sidebar-article-title a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.sidebar-article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.sidebar-article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sidebar-article-meta i {
    font-size: 0.8rem;
}

.no-articles {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}

.no-articles i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
    opacity: 0.5;
}

.no-articles p {
    margin: 0;
    font-size: 0.95rem;
}

/* Widget catégorie */
.category-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-tag {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.category-tag.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(211, 47, 47, 0.3);
}

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

/* Widget newsletter */
.newsletter-widget {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border: 2px solid var(--primary-light);
}

.newsletter-widget p {
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.sidebar-newsletter-form .input-group {
    box-shadow: 0 3px 10px rgba(211, 47, 47, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.sidebar-newsletter-form .form-control {
    border: 2px solid var(--border-color);
    border-right: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.sidebar-newsletter-form .btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.sidebar-newsletter-form .btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.sidebar-newsletter-form .form-text {
    color: var(--text-light) !important;
    font-size: 0.85rem;
    margin: 0;
}

/* Section commentaires */
.comments-section {
    padding: 3rem 0;
    background: var(--bg-lighter);
    border-top: 1px solid var(--border-color);
}

.comments-title {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.comments-title i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.comments-container {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 991px) {
    .banner-title {
        font-size: 2.2rem;
    }
    
    .article-hero-image {
        height: 350px;
    }
    
    .article-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-share {
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .banner-title {
        font-size: 1.8rem;
    }
    
    .article-banner-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-hero-image {
        height: 300px;
    }
    
    .article-date-badge {
        top: 15px;
        right: 15px;
        padding: 0.8rem;
        min-width: 70px;
    }
    
    .date-day {
        font-size: 1.6rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-description {
        font-size: 1.1rem;
    }
    
    .article-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sidebar-article {
        flex-direction: column;
    }
    
    .sidebar-article-image {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 576px) {
    .banner-title {
        font-size: 1.6rem;
    }
    
    .article-hero-image {
        height: 250px;
    }
    
    .article-date-badge {
        top: 10px;
        right: 10px;
        padding: 0.6rem;
        min-width: 60px;
    }
    
    .date-day {
        font-size: 1.4rem;
    }
    
    .date-month {
        font-size: 0.9rem;
    }
    
    .article-full-content h2 {
        font-size: 1.5rem;
    }
}

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

.article-section.loaded .article-main,
.article-section.loaded .sidebar-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.article-section.loaded .sidebar-card:nth-child(1) {
    animation-delay: 0.1s;
}

.article-section.loaded .sidebar-card:nth-child(2) {
    animation-delay: 0.2s;
}

.article-section.loaded .sidebar-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Style pour les liens dans le contenu */
.article-full-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-light);
    transition: all 0.3s ease;
}

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