/*
 * JouteTrack — theme-tables-layout.css
 * Tables globales, .teams-table, colonnes actions, footer.
 */

.jt-admin-ct-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 0.5rem;
}

.jt-admin-ct-access-hint {
    margin: 0;
}

.teams-table {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Détail équipe : lisibilité tableau + actions */
.school-section .jt-equipe-membres-table thead th:first-child,
.school-section .jt-equipe-membres-table tbody td:first-child {
    text-align: left;
}

.jt-cell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.jt-cell-actions .jt-inline-form {
    margin: 0;
}

/* Fiche club admin : colonne Participation largeur fixe */
#jt-club-fiche .jt-club-champs-table {
    table-layout: fixed;
    width: 100%;
}

#jt-club-fiche .jt-club-champs-table col.jt-col-date {
    width: 7.5rem;
}

#jt-club-fiche .jt-club-champs-table col.jt-col-phase {
    width: 8.5rem;
}

#jt-club-fiche .jt-club-champs-table col.jt-col-participation {
    width: 180px;
}

#jt-club-fiche .jt-club-champs-table col.jt-col-acces {
    width: 6.5rem;
}

#jt-club-fiche .jt-club-champs-table th.jt-col-participation,
#jt-club-fiche .jt-club-champs-table td.jt-col-participation {
    width: 180px;
    max-width: 180px;
    min-width: 180px;
    box-sizing: border-box;
    vertical-align: top;
    overflow-wrap: anywhere;
}

#jt-club-fiche .jt-club-champs-table td.jt-col-participation .jt-help-text {
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: center;
}

#jt-club-fiche .jt-club-champs-table td.jt-col-participation form {
    display: inline;
    margin: 0;
}

#jt-club-fiche .jt-club-champs-table td.jt-col-participation .btn {
    white-space: nowrap;
}

/* Liste équipes (coach) : tableau comme admin/joutes */
.school-section .jt-equipes-list-table thead th:first-child,
.school-section .jt-equipes-list-table tbody td:first-child {
    text-align: left;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-darker);
}

th {
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

tbody tr:hover {
    background: rgba(0, 184, 212, 0.05);
}

/*
 * Colonnes « actions » : admin comptes / clubs / missions (en-tête dernière cellule vide),
 * sans toucher aux tableaux dont la dernière colonne est du contenu (ex. admin équipes « Équipe »).
 */
.school-section .teams-table:has(thead tr th:last-child:empty) thead th:last-child,
.school-section .teams-table:has(thead tr th:last-child:empty) tbody td:last-child {
    text-align: right;
}

/* Liste joutes (coach) : dernière colonne = Détail ; page sans id sur .school-section */
.school-section:not([id]) > .home-container > .access-section > .teams-table thead th:last-child,
.school-section:not([id]) > .home-container > .access-section > .teams-table tbody td:last-child {
    text-align: right;
}

.jt-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
