/* Élections 2026 – Détails commune */

.elec2026-details {
    font-family: inherit;
    max-width: 900px;
    margin: 0 auto;
}

/* En-tête commune */
.elec2026-commune-header {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-left: 5px solid #2563eb;
}

.elec2026-commune-nom {
    margin: 0 0 .25rem;
    font-size: 1.4rem;
    color: #1e3a5f;
}

.elec2026-commune-dep {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

.elec2026-commune-geo {
    font-size: .85rem;
    color: #6b7280;
    margin-bottom: .25rem;
}

.elec2026-phase-label {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    background: #2563eb;
    color: #fff;
    border-radius: 4px;
    padding: .15rem .5rem;
    margin-top: .25rem;
}

/* Barre mentions */
.elec2026-mentions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: #edf2f7;
    border-radius: 8px;
    padding: .6rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .82rem;
    color: #4a5568;
}

.elec2026-mentions strong { color: #2d3748; }
.elec2026-mentions em     { color: #718096; font-style: normal; }
.elec2026-sieges          { font-weight: 700; color: #2d3748; }

/* Grille listes */
.elec2026-listes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Carte liste */
.elec2026-liste-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: .9rem 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}

.elec2026-liste-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

.elec2026-liste-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .4rem;
}

.elec2026-liste-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}

.elec2026-liste-nom {
    font-weight: 600;
    font-size: .9rem;
    color: #1e293b;
    line-height: 1.3;
}

.elec2026-nuance {
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

/* Barre résultats */
.elec2026-res-bar-wrap {
    margin: .5rem 0;
}

.elec2026-res-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: .3rem;
}

.elec2026-res-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.elec2026-res-stats {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .8rem;
}

.elec2026-res-stats strong { color: #1e293b; }

.elec2026-pct {
    color: #718096;
}

.elec2026-sieges-badge {
    background: #2d3748;
    color: #fff;
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .7rem;
    font-weight: 700;
}

/* Tête de liste */
.elec2026-tete-liste {
    font-size: .8rem;
    color: #4a5568;
    margin: .4rem 0;
}

/* Candidats */
.elec2026-candidats-toggle {
    margin-top: .5rem;
}

.elec2026-candidats-toggle summary {
    cursor: pointer;
    font-size: .78rem;
    color: #2563eb;
    font-weight: 600;
    user-select: none;
}

.elec2026-candidats {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
}

.elec2026-candidat {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    padding: .2rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.elec2026-candidat:last-child { border-bottom: none; }

.elec2026-cand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Badges élu */
.elec2026-badge {
    font-size: .65rem;
    font-weight: 700;
    border-radius: 3px;
    padding: .1rem .3rem;
    white-space: nowrap;
    margin-left: .2rem;
}

.elec2026-badge-elu   { background: #c6f6d5; color: #276749; }
.elec2026-badge-qualif { background: #bee3f8; color: #2a69ac; }
.elec2026-badge-non   { background: #e2e8f0; color: #718096; }
.elec2026-badge-cc    { background: #e0e7ff; color: #3730a3; }

/* Légende badges dans l'en-tête commune */
.elec2026-legende {
    margin-top: .5rem;
    font-size: .78rem;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* Notices / erreurs */
.elec2026-notice {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: .75rem 1rem;
    color: #92400e;
    font-size: .9rem;
}

.elec2026-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: .75rem 1rem;
    color: #991b1b;
    font-size: .9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .elec2026-listes {
        grid-template-columns: 1fr;
    }
    .elec2026-mentions {
        gap: .5rem;
    }
}
