/* --- TABLEAU E5 - STYLE EXCEL ADAPTÉ À LA CHARTE LÉANDRE --- */

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    background: white;
}

.custom-table {
    width: 100%;
    min-width: 1300px;
    border-collapse: collapse;
    font-family: var(--font-body);
    background: white;
    color: var(--color-text);
}

.custom-table th,
.custom-table td {
    border: 1px solid var(--color-border);
    padding: 0.85rem;
    font-size: 0.85rem;
    line-height: 1.4;
    vertical-align: middle;
    color: var(--color-text);
}

/* Lignes du haut : BTS / Session */
.custom-table .top-row td {
    background: var(--color-primary);
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

/* Titre principal du tableau */
.custom-table .title-row td {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
    font-size: 1.15rem;
    padding: 1.2rem;
}

/* Informations candidat / centre */
.custom-table tr.info-row td,
.custom-table td.info-cell {
    background: white;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* En-tête des compétences */
.custom-table .competences-header th {
    background: var(--color-primary);
    color: white;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 1rem 0.7rem;
    vertical-align: middle;
}

.custom-table .competences-header th:first-child {
    width: 28%;
    text-align: left;
}

.custom-table .competences-header th:nth-child(2) {
    width: 12%;
}

.custom-table .competences-header th:not(:first-child):not(:nth-child(2)) {
    width: 10%; 
}

.custom-table .competences-header span {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Détails des compétences */
.custom-table .competences-details td {
    background: var(--color-bg-alt);
    color: var(--color-text);
    font-size: 0.78rem;
    text-align: left;
    vertical-align: bottom;
    padding: 0;
    height: 380px;
    min-width: 50px;
    position: relative;
}

.custom-table .competences-details td .vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    height: 360px;
    width: 100%;
    padding: 1rem 0.6rem;
    box-sizing: border-box;
    line-height: 1.4;
    white-space: normal;
}


.custom-table .competences-details td:hover {
    background: var(--color-primary-light);
}

/* Lignes de séparation : Réalisation en formation / entreprise */
.custom-table .section-row td {
    background: linear-gradient(90deg,
            var(--color-primary),
            var(--color-primary-light));
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
    padding: 1rem;
}

/* Lignes des projets */
.custom-table .project-row td {
    background: white;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.custom-table .project-row:nth-child(even) td {
    background: var(--color-bg-alt);
}

.custom-table .project-row:hover td {
    background: var(--color-primary-light);
    color: var(--color-text);
}

.custom-table .project-title {
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
}

.custom-table .project-period {
    text-align: center;
    font-weight: 500;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Cases cochées */
.custom-table .check-cell {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Pour garder un style propre si tu utilises encore des tags */
.custom-table .tag {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .table-responsive-wrapper {
        border-radius: 14px;
    }

    .custom-table {
        min-width: 1100px;
    }

    .custom-table th,
    .custom-table td {
        padding: 0.65rem;
        font-size: 0.75rem;
    }

    .custom-table .title-row td {
        font-size: 1rem;
    }

    .custom-table .competences-header th {
        font-size: 0.72rem;
    }

    .custom-table .competences-details td {
        font-size: 0.65rem;
    }
}