/* === Layout plein écran (page récapitulatif uniquement) === */
body:has(.recap-tabs) {
    height: 100vh;
    overflow: hidden;
}

body:has(.recap-tabs) footer {
    display: none;
}

body:has(.recap-tabs) .container {
    overflow: hidden;
}

body:has(.recap-tabs) .content {
    padding: 10px 15px;
    overflow-y: auto;
    overflow-x: hidden;
}

body:has(.recap-tabs) .table-scroll {
    overflow: visible;
}

body:has(.recap-tabs) .recap-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 0.75rem;
}

body:has(.recap-tabs) .recap-table th,
body:has(.recap-tabs) .recap-table td {
    padding: 4px 6px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

body:has(.recap-tabs) .recap-table td:first-child,
body:has(.recap-tabs) .recap-table th:first-child {
    width: 110px;
}

body:has(.recap-tabs) .recap-tabs,
body:has(.recap-tabs) .recap-tour-selector {
    margin-bottom: 8px;
}

body:has(.recap-tabs) .card {
    margin-bottom: 10px;
    padding: 10px 15px;
}

body:has(.recap-tabs) .card-title {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

body:has(.recap-tabs) h3 {
    font-size: 0.85rem;
    margin: 8px 0 4px;
}

/* === Page recapitulative === */

.recap-tabs,
.recap-tour-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.recap-tab {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.recap-tab:hover {
    color: var(--purple-mid);
    border-color: var(--purple-mid);
}

.recap-tab.active {
    background: var(--purple-dark);
    color: var(--white);
    border-color: var(--purple-dark);
}



.table-scroll {
    overflow-x: auto;
    margin-top: 10px;
}

.recap-table {
    min-width: 600px;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.recap-table th,
.recap-table td {
    padding: 8px 14px;
    text-align: center;
    white-space: nowrap;
}

.recap-table th {
    font-size: 0.78rem;
    border-radius: 0 !important;
}

.recap-table th small {
    font-weight: 400;
    opacity: 0.85;
    display: block;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0;
}

/* Première colonne sticky */
.recap-table td:first-child,
.recap-table th:first-child {
    text-align: center;
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 1;
}

.recap-table thead th:first-child {
    background: var(--purple-dark);
    z-index: 2;
}

/* Ligne séparatrice "Nombre de votants" */
.recap-table .row-subheader td {
    background: var(--purple-dark);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    border-top: 2px solid var(--purple-dark);
}

.recap-table .row-subheader td:first-child {
    background: var(--purple-dark);
}

/* Ligne inscrits / exprimés */
.recap-table .row-inscrits td {
    background: #ede7f6;
    font-weight: 600;
}

.recap-table .row-inscrits td:first-child {
    background: #ede7f6;
}

/* === Séparation visuelle entre bureaux === */

/* Bordure gauche épaisse sur la colonne Total */
.recap-table .col-total {
    border-left: 3px solid var(--purple-dark);
}

/* Bordure gauche entre chaque bureau */
.recap-table .col-bureau-start {
    border-left: 2px solid rgba(45, 27, 105, 0.3);
}

/* En-tête de groupe bureau */
.recap-table th.th-bureau-group {
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

.recap-table th.th-total-group {
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    font-size: 0.82rem;
}

/* Alternance de fond sur les lignes */
.recap-table tbody tr:nth-child(even) td {
    background-color: #f8f7fc;
}

.recap-table tbody tr:nth-child(even) td:first-child {
    background-color: #f8f7fc;
}


/* Colonne Total en gras */
.recap-table .col-total {
    font-weight: 600;
}
