/* =====================
   GLOBAL
===================== */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-color: #f5f6fa;
    color: #1f2937;
}

#main-content {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

/* =====================
   TABLEAU
===================== */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

thead {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: #fff;
}

thead th {
    font-weight: 600;
    text-align: left;
    padding: 15px 20px;
}

tbody td, tbody th {
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* =====================
   LIGNES
===================== */
tbody tr:hover {
    background-color: #f0f9ff;
    transition: background 0.3s ease;
}

/* =====================
   SCORE
===================== */
td:nth-child(7) {
    font-weight: 600;
    text-align: center;
}

/* =====================
   STATUT
===================== */
td:nth-child(8) {
    text-align: center;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    color: #fff;
}

td:nth-child(8):contains('a_venir'), td:nth-child(8):contains('à venir') {
    background-color: #facc15; /* jaune pour à venir */
}

td:nth-child(8):contains('termine') {
    background-color: #10b981; /* vert pour terminé */
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    #main-content {
        padding: 0 10px;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        margin-bottom: 20px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.05);
        padding: 15px;
    }

    tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        border-bottom: 1px solid #e5e7eb;
    }

    tbody td:last-child {
        border-bottom: none;
    }

    tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
    }
}
