:root {
    --bg: #efefef;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #333;
    --muted: #6b7280;

    --green: #16a34a;
    --green-bg: #dcfce7;

    --red: #dc2626;
    --red-bg: #fee2e2;

    --grey: #333;
    --grey-bg: #e7e7e7;

    --orange: #d97706;
    --orange-bg: #fef3c7;

    --header-bg: #f8fafc;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./data/Montserrat-Medium.ttf');
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.page {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 32px;
}

/* =========================
   Header
   ========================= */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 5px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.session-count {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* =========================
   Tableau
   ========================= */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.sessions-table {
    width: 100%;
    min-width: 1250px;
    border-collapse: separate;
    border-spacing: 0;
}

/* En-tête */

.sessions-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;

    height: 48px;
    padding: 0 6px;

    border-bottom: 1px solid var(--border);

    background: var(--header-bg);

    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.sessions-table thead th:first-child {
    text-align: left;
    padding-left: 16px;
}

.session-column {
    width: 160px;
    min-width: 160px;
}

.score-column {
    width: 90px;
    min-width: 90px;
}

.question-column {
    width: 38px;
    min-width: 38px;
}

/* Cellules */

.sessions-table tbody td {
    height: 64px;
    padding: 8px 6px;

    border-bottom: 1px solid var(--border);

    text-align: center;
    font-size: 13px;
}

.sessions-table tbody tr:last-child td {
    border-bottom: 0;
}

.sessions-table tbody tr {
    transition: background-color 0.15s ease;
}

.sessions-table tbody tr:hover {
    background: #f8fafc;
}

/* Première colonne */

.sessions-table tbody td:first-child {
    padding-left: 16px;
    text-align: left;
}

.session-date {
    white-space: nowrap;
}

.session-date strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.session-date span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

/* =========================
   Score
   ========================= */

.score {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 56px;
    padding: 5px 8px;

    border-radius: 6px;

    font-size: 12px;
    font-weight: 700;
}

.score-good {
    background: var(--green-bg);
    color: var(--green);
}

.score-average {
    background: var(--orange-bg);
    color: var(--orange);
}

.score-bad {
    background: var(--red-bg);
    color: var(--red);
}

/* =========================
   Réponses
   ========================= */

.answer {
    display: inline-flex;

    width: 26px;
    height: 26px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 13px;
    font-weight: 800;
}

.answer.correct {
    background: var(--green-bg);
    color: var(--green);
}

.answer.wrong {
    background: var(--red-bg);
    color: var(--red);
}

.answer.neutral {
    background: var(--grey-bg);
    color: var(--grey);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 700px) {

    .page {
        padding: 20px 12px;
    }

    .page-header {
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 1.8em;
    }

    .session-count {
        display: none;
    }

    .table-container {
        border-radius: 10px;
    }
}
