:root {
    --est-rouge: #ED1C24;
    --est-jaune: #FFF200;
    --est-rouge-leger: rgba(237, 28, 36, 0.1);
    --est-jaune-leger: rgba(255, 242, 0, 0.2);
    --est-rouge-fonce: #c41017;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-light: #eee;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 25px;
}

* {
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    background: #f5f5f7;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Menu Hamburger Mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1100;
}

.score
{
    font-weight:bold;font-size:1.4rem;
}

/* Stats Banner */
.stats-banner {
    background: var(--est-rouge-fonce);
    color: white;
    padding: 0.4rem 0;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat-item i {
    color: var(--est-jaune);
    margin-right: 0.5rem;
}

/* Header */
.main-header {
    background: var(--est-rouge);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-title {
    color: var(--est-jaune);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--est-jaune);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 70%;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-areas: 
        "ai ai ai"
        "comments comments sidebar-top"
        "content content sidebar";
    grid-template-columns: 1fr 1fr 350px;
    gap: 2rem;
}

/* Sections Communes */
.section {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.section-header {
    background: var(--est-rouge);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    color: white;
}

.section-title {
    color: var(--est-jaune);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Comments Section - Enhancement */
.comments-section {
    grid-area: comments;
    padding: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.comments-container {
    padding: 1.5rem;
}

.comments-header {
    background: var(--est-rouge);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.comments-title {
    color: var(--est-jaune);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comments-title i {
    font-size: 1.5rem;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
}

/* Standings (Classement) */
.standings {
    background: white;
    border-radius: var(--radius-md);
    padding: 0;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
}

.standings:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.standings h3 {
    background: var(--est-rouge);
    color: var(--est-jaune);
    padding: 1rem;
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.standings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    margin: 0;
}

.standings-table thead {
    background: var(--est-rouge);
    color: white;
}

.standings-table th {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.standings-table th:first-child {
    text-align: center;
    padding-left: 1rem;
}

.standings-table td {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.9rem;
}

.standings-table td:first-child {
    text-align: center;
    padding-left: 1rem;
    font-weight: bold;
    color: var(--est-rouge);
}

.standings-table td.equipe {
    text-align: left;
    font-weight: 500;
    color: var(--text-dark);
}

.standings-table tr {
    transition: var(--transition);
}

.standings-table tr:hover {
    background-color: var(--est-rouge-leger);
    cursor: pointer;
}

.standings-table tr.est {
    background-color: var(--est-rouge-leger);
}

.standings-table tr.highlighted {
    border-left: 4px solid var(--est-jaune);
}

.standings-table tr:first-child td:first-child {
    color: gold;
}

.standings-table tr:nth-child(2) td:first-child {
    color: silver;
}

.standings-table tr:nth-child(3) td:first-child {
    color: #cd7f32;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-link {
    background: white;
    padding: 1.2rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--est-rouge);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quick-link i {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--est-rouge-leger);
}

/* IA Section */
.ai-section {
    grid-area: ai;
}

.ai-chat {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
}

.ai-input {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.ai-input input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.ai-input button {
    background: var(--est-rouge);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Comments Section */
.comments-section {
    grid-area: comments;
}

/* Match Section */
.match-section {
    grid-area: content;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.match-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
}

.team {
    text-align: center;
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.team-name {
    margin-top: 0.5rem;
    font-weight: 600;
}

.vs {
    font-weight: bold;
    color: var(--est-rouge);
}

/* News Grid */
.news-grid {
    grid-area: content;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    color: var(--est-rouge);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-title {
    margin: 0.5rem 0 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
}

.news-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--est-rouge);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.news-link:hover {
    gap: 0.8rem;
}

/* Article Styles */
.article-header {
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--est-rouge);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-image-container {
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    padding: 0 2rem 2rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding: 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-source-link,
.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--est-rouge);
    text-decoration: none;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    background: white;
    box-shadow: var(--shadow-sm);
}

.article-source-link:hover,
.article-back-link:hover {
    background-color: var(--est-rouge-leger);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Next Match Widget */
.next-match-widget {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-bottom: 2rem;
}

.next-match-widget:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.next-match-widget h3 {
    color: var(--est-rouge);
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.match-competition {
    text-align: center;
    background: var(--est-rouge-leger);
    color: var(--est-rouge);
    font-weight: bold;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
}

.team {
    text-align: center;
    flex: 1;
}

.team-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    padding: 5px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.next-match-widget:hover .team-logo {
    transform: scale(1.1);
}

.team-name {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.vs {
    font-weight: bold;
    color: var(--est-rouge);
    margin: 0 1rem;
    font-size: 1.2rem;
    position: relative;
}

.vs::before,
.vs::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 1px;
    background: var(--border-light);
    top: 50%;
}

.vs::before {
    right: 100%;
    margin-right: 0.5rem;
}

.vs::after {
    left: 100%;
    margin-left: 0.5rem;
}

.match-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.8;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .main-container {
        grid-template-areas:
            "ai"
            "comments"
            "content"
            "sidebar";
        grid-template-columns: 1fr;
    }

    .match-section,
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Navigation Mobile */
    .header-content {
        padding: 0 1rem;
        gap: 1rem;
        position: relative;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--est-rouge);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
        z-index: 1000;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a::after {
        display: none;
    }

    /* Main Container */
    .main-container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    /* Sidebar */
    .quick-links {
        grid-template-columns: 1fr 1fr;
    }

    /* Article */
    .article-title {
        font-size: 1.8rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-header, 
    .article-content, 
    .article-footer {
        padding: 1.5rem;
    }

    /* Pagination */
    .pagination {
        gap: 0.3rem;
    }

    .page-link {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .article-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .article-source-link,
    .article-back-link {
        width: 100%;
        justify-content: center;
    }

    .match-teams {
        flex-direction: column;
        gap: 1.5rem;
    }

    .vs {
        margin: 1rem 0;
    }

    .vs::before,
    .vs::after {
        width: 50px;
        height: 1px;
        top: 50%;
    }

    .vs::before {
        right: 100%;
        margin-right: 0.5rem;
    }

    .vs::after {
        left: 100%;
        margin-left: 0.5rem;
    }
}
