/* ===== WRAPPER ===== */
.news-section-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ===== HEADER ===== */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 20px 0 10px;
}

.news-main-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffe066;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.news-subtitle { color: #aaa; font-size: 0.85rem; margin-top: 4px; }

.news-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(231,76,60,0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.news-live-badge.flash { animation: flashBadge 0.5s ease; }
@keyframes flashBadge {
    0%,100% { background: rgba(231,76,60,0.2); }
    50%      { background: rgba(231,76,60,0.6); }
}

.live-dot {
    width: 7px; height: 7px;
    background: #e74c3c;
    border-radius: 50%;
    animation: livePulse 1.2s infinite;
}
@keyframes livePulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

.news-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.news-count-badge {
    background: rgba(255,224,102,0.15);
    border: 1px solid rgba(255,224,102,0.3);
    color: #ffe066;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-refresh-btn {
    background: linear-gradient(135deg, #d72660, #a01d45);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.news-refresh-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(215,38,96,0.4);
}
.news-refresh-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.news-last-update { color: #777; font-size: 0.75rem; }

/* ===== AUTO-BAR ===== */
.news-auto-bar {
    background: rgba(39,174,96,0.1);
    border: 1px solid rgba(39,174,96,0.3);
    color: #2ecc71;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.news-countdown { color: #aaa; font-size: 0.78rem; margin-left: 4px; }

/* ===== FILTRES ===== */
.news-filters-bar {
    display: flex;
    flex-direction: row;      /* horizontal */
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.news-filter-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ccc;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.news-filter-btn:hover { border-color: #ffe066; color: #ffe066; }
.news-filter-btn.active {
    background: linear-gradient(135deg, #d72660, #a01d45);
    border-color: #d72660;
    color: #fff;
    font-weight: 700;
}
.news-filter-count {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.72rem;
}

/* ===== FILTRES ACTUALITÉS — HORIZONTAL ===== */
.news-filters-bar,
#newsFilters,
.filter-tabs,
.news-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 20px;
}

.news-filter-btn,
.filter-tab-btn {
    display: inline-flex !important;
    white-space: nowrap !important;
}

/* ===== GRILLE ARTICLES ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ===== CARTE ARTICLE ===== */
.news-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
    border-color: rgba(255,224,102,0.3);
}
.news-card-important {
    border-color: rgba(215,38,96,0.4);
    background: rgba(215,38,96,0.06);
}
.news-card-important:hover { box-shadow: 0 8px 28px rgba(215,38,96,0.25); }

.news-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-source-badge {
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.news-category-tag {
    background: rgba(255,255,255,0.1);
    color: #ccc;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.news-important-dot {
    color: #e74c3c;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: auto;
    animation: livePulse 1.5s infinite;
}

.news-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: #f0f0f0;
}
.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.news-title a:hover { color: #ffe066; }

.news-desc {
    color: #aaa;
    font-size: 0.82rem;
    line-height: 1.5;
    flex: 1;
}

.news-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 10px;
    margin-top: auto;
}

.news-date { color: #777; font-size: 0.75rem; }
.news-date-abs { color: #555; font-size: 0.72rem; margin-left: auto; }

.news-read-more {
    background: rgba(215,38,96,0.2);
    border: 1px solid rgba(215,38,96,0.4);
    color: #d72660;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.news-read-more:hover {
    background: #d72660;
    color: #fff;
}

/* ===== SKELETON ===== */
.news-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.news-skeleton-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: shimmer 1.5s infinite;
}
.skeleton-line.short  { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long   { width: 95%; height: 16px; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== ÉTATS ===== */
.news-empty, .news-error {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: #888;
}
.news-retry-btn {
    background: rgba(231,76,60,0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.news-retry-btn:hover { background: #e74c3c; color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .news-grid, .news-skeleton-grid {
        grid-template-columns: 1fr;
    }
    .news-header { flex-direction: column; }
    .news-header-right { width: 100%; justify-content: space-between; }
}

/* ===== PRÉ-MATCH — COMPOSITIONS OFFICIELLES ===== */
#prematchSection {
    margin-bottom: 28px;
}
.prematch-section-header {
    font-size: .75rem;
    font-weight: 700;
    color: #5B7FA6;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prematch-card {
    background: #0D1B2A;
    border: 1px solid #1A3255;
    border-top: 3px solid #FFB703;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}
.prematch-header {
    background: linear-gradient(135deg, #1A3255 0%, #0D1B2A 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #1A3255;
}
.prematch-badge-official {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,183,3,0.15);
    border: 1px solid rgba(255,183,3,0.4);
    color: #FFB703;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.prematch-match-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #EEF2FF;
    margin: 6px 0 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pm-vs {
    color: #5B7FA6;
    font-weight: 400;
    font-size: .9rem;
    margin: 0 2px;
}
.prematch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: .78rem;
    color: #5B7FA6;
    margin-top: 4px;
}
.prematch-round  { color: #7A9CC8; }
.prematch-time   { color: #5B7FA6; }
.prematch-countdown {
    background: rgba(76,201,240,0.12);
    color: #4CC9F0;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .72rem;
}
/* Two-column team layout */
.prematch-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    padding: 0;
}
.prematch-team {
    padding: 16px 18px;
}
.prematch-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    color: #2A4060;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: .05em;
    border-left: 1px solid #1A3255;
    border-right: 1px solid #1A3255;
}
.prematch-team-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    font-weight: 800;
    color: #EEF2FF;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1A3255;
}
/* Lineup table */
.prematch-lineup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.prematch-lineup-table thead tr {
    background: #060d18;
}
.prematch-lineup-table th {
    padding: 5px 8px;
    color: #3A5070;
    font-size: .65rem;
    text-transform: uppercase;
    font-weight: 600;
    text-align: left;
}
.prematch-lineup-table tbody tr:nth-child(odd)  { background: #0D1B2A; }
.prematch-lineup-table tbody tr:nth-child(even) { background: #091626; }
.prematch-lineup-table td { padding: 5px 8px; }
.pm-num  { color: #3A5070; font-size: .78rem; width: 24px; text-align: center; }
.pm-name { color: #CBD5E1; font-weight: 600; }
/* Position badges */
.pos-badge {
    display: inline-block;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.pos-gk  { background: rgba(255,183,3,0.2);   color: #FFB703; }
.pos-def { background: rgba(30,136,229,0.2);   color: #4CC9F0; }
.pos-mid { background: rgba(46,204,113,0.2);   color: #2ecc71; }
.pos-att { background: rgba(231,76,60,0.2);    color: #e74c3c; }
/* Bench */
.prematch-bench {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #1A3255;
    font-size: .77rem;
}
.pm-bench-label { color: #5B7FA6; font-weight: 700; margin-right: 4px; }
.pm-bench-player {
    display: inline-block;
    background: rgba(91,127,166,0.1);
    color: #7A9CC8;
    border-radius: 4px;
    padding: 1px 6px;
    margin: 2px 2px;
    font-size: .73rem;
}
/* Referees bar */
.prematch-referees {
    padding: 10px 18px;
    border-top: 1px solid #1A3255;
    background: #091626;
    font-size: .8rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.pm-ref-item { display: inline-flex; align-items: center; gap: 5px; }
.pm-ref-type {
    background: rgba(91,127,166,0.15);
    color: #5B7FA6;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}
.pm-ref-nat { color: #3A5070; }
/* Pending placeholder */
.prematch-pending {
    padding: 20px 20px;
    color: #5B7FA6;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #1A3255;
}
.prematch-pending i { color: #FFB703; }

/* ===== PRÉ-MATCH RESPONSIVE ===== */
@media (max-width: 700px) {
    .prematch-body {
        grid-template-columns: 1fr;
    }
    .prematch-vs-divider {
        border: none;
        border-top: 1px solid #1A3255;
        border-bottom: 1px solid #1A3255;
        padding: 8px;
        font-size: .85rem;
    }
    .prematch-team { padding: 12px 14px; }
}