.elections-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.focus-banner {
    background: linear-gradient(120deg, rgba(15,28,80,0.98) 0%, rgba(0,55,118,0.95) 58%, rgba(220,38,38,0.78) 100%);
    border-radius: 1.25rem;
    color: #fff;
    padding: 1.1rem 1.35rem;
    margin: 1.4rem 0 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.focus-banner__title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.focus-banner__sub {
    font-size: 0.83rem;
    opacity: 0.9;
}
.focus-banner__pill {
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 0.33rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.controls-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(59,130,246,.22);
    border-radius: 1.25rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.filters-map-layout {
    display: grid;
    grid-template-columns: minmax(340px, 1.05fr) minmax(360px, 0.95fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.1rem;
}
.filters-map-layout__left,
.filters-map-layout__right {
    display: flex;
    flex-direction: column;
}
.filters-map-layout__left .controls-card,
.filters-map-layout__right .controls-card {
    margin-bottom: 0;
    height: 100%;
}

.controls-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .9rem;
    padding-bottom: .65rem;
    border-bottom: 1px dashed rgba(148,163,184,.45);
}
.controls-head__title {
    font-size: .92rem;
    font-weight: 800;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.controls-head__hint {
    font-size: .76rem;
    color: #64748b;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem 0.9rem;
    align-items: end;
}
.control {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.control label {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.control select,
.control input[type=text] {
    width: 100%;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--ink);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
}
.control select.form-select,
.control input.form-control {
    border-width: 1px;
    box-shadow: none;
    min-height: 40px;
}
.control select:focus,
.control input[type=text]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.c-round { grid-column: span 3; }
.c-sort { grid-column: span 9; }
.c-dept { grid-column: span 8; }
.c-dept-btn { grid-column: span 4; }
.c-city { grid-column: span 12; position: relative; }
.c-reset { grid-column: span 6; }

.btn-solid,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.58rem 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    min-height: 42px;
}
.btn-solid {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(37,99,235,.28);
}
.btn-solid:hover { filter: brightness(1.05); }
.btn-ghost {
    background: #ffffff;
    color: #475569;
    border: 1px solid rgba(148,163,184,.4);
}
.btn-ghost:hover { border-color: #94a3b8; color: #334155; }

.participation-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-top: -.55rem;
    margin-bottom: 1rem;
    padding: .55rem .8rem;
    border-radius: .85rem;
    background: #f8fafc;
    border: 1px solid rgba(148,163,184,.35);
}
.participation-legend__title {
    font-size: .72rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
}
.participation-legend__item {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    font-size: .75rem;
    color: #334155;
    font-weight: 600;
}
.participation-legend__dot {
    width: .62rem;
    height: .62rem;
    border-radius: 999px;
    display: inline-block;
}
.participation-legend__dot--verylow { background: #111827; }
.participation-legend__dot--low { background: #ef4444; }
.participation-legend__dot--mid { background: #f59e0b; }
.participation-legend__dot--high { background: #22c55e; }
.participation-legend__dot--top { background: #2563eb; }

.france-parti-map {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 420px;
}
.france-parti-map__canvas {
    position: relative;
    flex: 1;
    min-height: 360px;
    border-radius: 0.9rem;
    border: 1px solid rgba(148,163,184,.32);
    background: linear-gradient(180deg, #fbfdff 0%, #f1f5f9 100%);
    overflow: hidden;
}
.france-parti-map__svg {
    width: 100%;
    height: 100%;
    display: block;
}
.france-parti-map__overseas {
    border: 1px solid rgba(148,163,184,.32);
    border-radius: .85rem;
    background: #ffffff;
    padding: .5rem .55rem;
}
.france-parti-map__overseas-title {
    font-size: .67rem;
    color: #64748b;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: .4rem;
}
.france-parti-map__overseas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .3rem .35rem;
}
.france-parti-map__overseas-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    padding: .25rem .35rem;
    border-radius: .5rem;
    background: #f8fafc;
    border: 1px solid rgba(203,213,225,.7);
}
.france-parti-map__overseas-swatch {
    width: .48rem;
    height: .48rem;
    border-radius: 999px;
    flex: 0 0 auto;
    background: #cbd5e1;
}
.france-parti-map__overseas-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .08rem;
}
.france-parti-map__overseas-name {
    font-size: .63rem;
    line-height: 1.1;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.france-parti-map__overseas-meta {
    font-size: .61rem;
    line-height: 1;
    color: #64748b;
    white-space: nowrap;
}
.france-parti-map__tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 25;
    background: rgba(15,23,42,.94);
    color: #f8fafc;
    border-radius: .6rem;
    padding: .48rem .58rem;
    font-size: .72rem;
    line-height: 1.35;
    box-shadow: 0 10px 18px rgba(15,23,42,.24);
    opacity: 0;
    transform: translate(-50%, -110%);
    transition: opacity .14s ease;
    white-space: nowrap;
}

.city-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 60;
    overflow: hidden;
    display: none;
}
.city-dropdown__item {
    display: block;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--ink);
}
.city-dropdown__item:last-child { border-bottom: none; }
.city-dropdown__item:hover { background: #f8fafc; }
.city-dropdown__name { font-size: 0.9rem; font-weight: 700; }
.city-dropdown__meta { font-size: 0.75rem; color: var(--muted); }
.city-dropdown__empty { padding: 0.65rem 0.75rem; color: var(--muted); font-size: 0.82rem; }

.stats-strip {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 1.4rem;
}
.stats-box {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
}
.stats-box__val { font-size: 1.2rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stats-box__lbl { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.panel__head {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}
.panel__title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.panel__body { padding: 0.7rem 1rem 1rem; }

.dept-card {
    --fr-blue: #0a2d63;
    --fr-red: #d8242f;
    --fr-ink: #0f172a;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(130% 120% at 0% 0%, rgba(10, 45, 99, 0.18) 0%, rgba(10, 45, 99, 0) 52%),
        radial-gradient(130% 120% at 100% 100%, rgba(216, 36, 47, 0.16) 0%, rgba(216, 36, 47, 0) 54%),
        linear-gradient(110deg,
            rgba(10, 45, 99, 0.08) 0%,
            rgba(255, 255, 255, 0.96) 32%,
            rgba(255, 255, 255, 0.98) 68%,
            rgba(216, 36, 47, 0.09) 100%);
    border: 1px solid rgba(10, 45, 99, 0.14);
    border-radius: 1.1rem;
    padding: 1.25rem 1.25rem 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    position: relative;
}
.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fr-blue) 0%, #ffffff 50%, var(--fr-red) 100%);
}
.dept-card:hover {
    box-shadow: 0 18px 30px -22px rgba(10, 45, 99, 0.35), 0 12px 26px -20px rgba(216, 36, 47, 0.32), var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(10, 45, 99, 0.32);
    color: inherit;
    text-decoration: none;
}
.dept-card__top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}
.dept-card__code {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fr-blue), #3a5b9a 50%, #ffffff 120%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(10, 45, 99, 0.18);
}
.dept-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fr-ink);
    line-height: 1.3;
}
.dept-card__info {
    font-size: 0.8rem;
    color: #334155;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(10, 45, 99, 0.12);
    border-radius: 0.55rem;
    padding: 0.4rem 0.5rem;
}
.dept-card__info i {
    width: 1.1rem;
    text-align: center;
    margin-right: 0.2rem;
}
.dept-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(15, 23, 42, 0.18);
    font-size: 0.78rem;
    color: #64748b;
}
.dept-card__participation {
    font-weight: 600;
    color: var(--fr-blue);
}
.dept-card__bar-wrap {
    width: 60px;
}
.dept-card__bar {
    height: .34rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.dept-card__bar-fill {
    height: 100%;
    border-radius: 999px;
}
.dept-card__bar-fill--verylow {
    background: linear-gradient(90deg, #111827, #030712);
}
.dept-card__bar-fill--low {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}
.dept-card__bar-fill--mid {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}
.dept-card__bar-fill--high {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}
.dept-card__bar-fill--top {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.city-list {
    display: grid;
    gap: 0.5rem;
}
.city-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
}
.city-item:hover { border-color: var(--accent); }
.city-item__name { font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.city-item__meta { font-size: 0.74rem; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem; }

@media (max-width: 960px) {
    .filters-map-layout {
        grid-template-columns: 1fr;
    }
    .c-round { grid-column: span 4; }
    .c-sort { grid-column: span 8; }
    .c-dept { grid-column: span 12; }
    .c-dept-btn { grid-column: span 6; }
    .c-city { grid-column: span 12; }
    .c-reset { grid-column: span 6; }
}
@media (max-width: 640px) {
    .c-round, .c-sort, .c-dept, .c-dept-btn, .c-city, .c-reset { grid-column: span 12; }
    .france-parti-map__overseas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}