/* ===================================
   ONGLETS
=================================== */
.cours-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.cours-tab-btn {
    padding: 8px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

/* ===================================
   CONTENU ONGLETS
=================================== */
.cours-tab-content {
    display: none;
}

.cours-tab-content.active {
    display: block;
}

/* ===================================
   TABLEAU — VERSION DESKTOP
=================================== */
.cours-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.cours-table td {
    border: 1px solid #e0e0e0;
    vertical-align: middle;
    padding: 12px 16px;
}

.col-horaire {
    text-align: center;
    width: 120px;
}

.cours-horaire {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.cours-horaire .separateur {
    font-size: 12px;
}

.cours-titre {
    font-weight: 700;
    margin-bottom: 4px;
}

.cours-prof {
    margin-bottom: 4px;
}

.cours-duree {
    font-style: italic;
}

.cours-empty {
    padding: 20px 0;
    color: #888;
    text-align: center;
}

/* ===================================
   RESPONSIVE — MOBILE
   Breakpoint à ajuster selon ton thème
=================================== */
@media screen and (max-width: 767px) {

    /* Les onglets prennent toute la largeur */
    .cours-tabs {
        gap: 6px;
    }

    .cours-tab-btn {
        flex: 1 1 calc(33% - 6px); /* 3 par ligne sur mobile */
        text-align: center;
        padding: 8px 4px;
        font-size: 13px;
    }

    /* Le tableau disparaît, on empile les lignes en "cards" */
    .cours-table,
    .cours-table tbody,
    .cours-table tr,
    .cours-table td {
        display: block;
        width: 100%;
    }

    /* Chaque ligne devient une card */
    .cours-table tr {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    /* La cellule horaire devient un bandeau en haut de la card */
    .cours-table .col-horaire {
        background-color: #f5f5f5;
        width: 100%;
        padding: 8px 16px;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Horaire en ligne sur mobile (14h30 → 17h30) */
    .cours-horaire {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .cours-horaire .separateur {
        transform: rotate(-90deg); /* La flèche ↓ devient → */
        display: inline-block;
    }

    /* La cellule infos en dessous */
    .cours-table .col-infos {
        padding: 12px 16px;
        border-bottom: none;
    }

    /* Pas de bordure entre les cellules sur mobile */
    .cours-table td {
        border: none;
    }
}

/* ===================================
   RESPONSIVE — TABLETTE
=================================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    .cours-tab-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .col-horaire {
        width: 100px;
    }
}

