/**
 * Actualite Page Styles
 * News/Articles listing page for siteweb
 * Madagascar flag colors: White, Red (#ED2024), Green (#0E8040)
 */

/* ===========================
   General Page Styles
   =========================== */
.actualite-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Roboto', Arial, sans-serif;
}

.section-title {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* ===========================
   Featured Articles Section
   =========================== */
.featured-articles-section {
    margin-bottom: 40px;
}

.featured-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.msn-featured-card {
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.msn-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.msn-featured-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.msn-featured-card:hover .msn-featured-image img {
    transform: scale(1.05);
}

.article-views-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(14, 128, 64, 0.9);
    /* Vert du drapeau */
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.msn-featured-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.msn-featured-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
}

.msn-featured-title a {
    color: #000;
    text-decoration: none;
}

.msn-featured-title a:hover {
    color: #0E8040;
}

.msn-featured-excerpt {
    color: #4d5156;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    color: #ED2024;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    gap: 4px;
}

.read-more-link:hover {
    color: #c61a1d;
}

.read-more-link i {
    font-size: 0.7rem;
}

/* ===========================
   Main Content Area
   =========================== */
.main-content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.articles-main {
    width: 100%;
}

/* ===========================
   Article Cards Grid
   =========================== */
.msn-style-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.msn-article-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.msn-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.msn-article-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

.msn-article-card:hover .msn-article-image img {
    transform: scale(1.05);
}

.msn-article-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.msn-article-source {
    margin-bottom: 8px;
}

.source-name {
    font-weight: 600;
    color: #ED2024;
    /* Rouge du drapeau */
    font-size: 0.8rem;
    text-transform: uppercase;
}

.source-link {
    text-decoration: none;
    color: inherit;
}

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

.msn-article-title {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 600;
}

.msn-article-title a {
    color: #000;
    text-decoration: none;
}

.msn-article-title a:hover {
    color: #0E8040;
}

/* Article Meta */
.msn-article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #767676;
    margin-bottom: 12px;
    margin-top: auto;
}

.msn-article-meta.new-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-date-time {
    display: flex;
    gap: 15px;
    color: #333;
    font-size: 0.85rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.meta-item i {
    color: #ED2024;
    font-size: 1rem;
}

.meta-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 400;
}

.share-icons {
    display: flex;
    gap: 8px;
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: #ED2024;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-icon:hover {
    background-color: #c61a1d;
    color: white;
    transform: translateY(-2px);
}

.share-icon i {
    font-size: 0.9rem;
}

.article-time {
    color: #767676;
}

.article-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-views i {
    color: #666666;
}

.msn-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag-pill {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f2f2f2;
    color: #444;
    border-radius: 12px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.tag-pill:hover {
    background-color: #e0e0e0;
}

.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* ===========================
   Sidebar Styles
   =========================== */
.articles-sidebar {
    width: 100%;
    position: sticky;
    top: 60px;
    z-index: 10;
}

.sidebar-section {
    background-color: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

/* Sidebar Section Title with Flag Underline */
.sidebar-section h3 {
    font-size: 1rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.sidebar-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #FFFFFF 33.33%, #ED2024 33.33%, #ED2024 66.66%, #0E8040 66.66%);
    border-radius: 2px;
}

.sidebar-section h3 i {
    color: #0E8040;
    /* Vert du drapeau */
    font-size: 1rem;
}

.sidebar-title {
    font-size: 1rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    font-weight: 600;
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #FFFFFF 33.33%, #ED2024 33.33%, #ED2024 66.66%, #0E8040 66.66%);
    border-radius: 2px;
}

/* Sticky sidebar style */
.articles-sidebar.is-sticky .sidebar-section:first-child {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-top: 2px solid #0E8040;
}

/* ===========================
   Sidebar List Styles
   =========================== */
.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Categories List */
.categories-list li {
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.categories-list li:hover {
    background-color: #e6f7ed;
}

.categories-list li.active {
    background-color: #e6f7ed;
    font-weight: 500;
}

.categories-list li a {
    color: #444;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.categories-list li a:hover,
.categories-list li.active a {
    color: #0E8040;
    /* Vert du drapeau */
}

/* ===========================
   Year Filter Styles
   =========================== */
.years-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.year-item {
    display: inline-block;
    padding: 6px 12px;
    background-color: #fff;
    color: #444;
    border-radius: 16px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    line-height: 1.4;
}

.year-item:hover {
    background-color: #e6f7ed;
    border-color: #0E8040;
}

.year-item.active {
    background-color: #0E8040;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #0E8040;
}

/* ===========================
   Filter / Display Options
   =========================== */
.filter-group {
    margin-bottom: 10px;
}

.filter-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.sidebar-list.display-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    display: inline-block;
    padding: 4px 10px;
    background-color: #fff;
    color: #444;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.filter-pill:hover {
    background-color: #e6f7ed;
    border-color: #0E8040;
}

.filter-pill.active {
    background-color: #e6f7ed;
    color: #0E8040;
    border-color: #0E8040;
    font-weight: 500;
}

/* ===========================
   Tags Filter Styles
   =========================== */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 6px 12px;
    background-color: #fff;
    color: #444;
    border-radius: 16px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.4;
    border: 1px solid #e0e0e0;
}

.tag-item:hover {
    background-color: #e6f7ed;
    border-color: #0E8040;
}

.tag-item.active {
    background-color: #0E8040;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #0E8040;
}

/* ===========================
   Pagination Styles
   =========================== */
.actualite-page .pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination-link {
    display: inline-block;
    padding: 8px 14px;
    background-color: #fff;
    color: #444;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
}

.pagination-link:hover {
    background-color: #e6f7ed;
    border-color: #0E8040;
    color: #0E8040;
}

.pagination-link.active {
    background-color: #0E8040;
    color: white;
    font-weight: 500;
    border-color: #0E8040;
}

/* ===========================
   Responsive Styles
   =========================== */
@media (max-width: 992px) {
    .featured-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content-area {
        grid-template-columns: 1fr;
    }

    .articles-sidebar {
        order: -1;
        margin-bottom: 30px;
        position: static;
        max-height: none;
        overflow-y: visible;
        top: auto;
    }
}

@media (max-width: 768px) {
    .featured-articles-grid {
        grid-template-columns: 1fr;
    }

    .msn-style-articles {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .actualite-page {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .sidebar-list.display-options {
        gap: 5px;
    }

    .filter-pill {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    .pagination-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}