/* ═══════════════════════════════════════════════════════════════════
   BP ÉLECTIONS — Explorer (style resultats-municipales-2026.fr)
   Charte BaugéPlus : #1a2b5e navy · #f47920 orange · Poppins
   ═══════════════════════════════════════════════════════════════════ */

.bpe-explorer,
.bpe-explorer * { box-sizing: border-box !important; font-family: 'Poppins', sans-serif !important; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.bpe-ex__hero {
    padding: 80px 24px 64px !important;
    max-width: 820px !important;
    margin: 0 auto !important;
}
.bpe-ex__hero-eyebrow {
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .12em !important;
    color: #6c757d !important;
    margin-bottom: 16px !important;
}
.bpe-ex__hero-titre {
    font-size: clamp(36px, 5vw, 62px) !important;
    font-weight: 800 !important;
    color: #1a1a2e !important;
    line-height: 1.1 !important;
    margin: 0 0 20px !important;
    letter-spacing: -.5px !important;
}
.bpe-ex__hero-accent { color: #f47920 !important; }
.bpe-ex__hero-desc {
    font-size: 16px !important;
    color: #495057 !important;
    max-width: 520px !important;
    line-height: 1.65 !important;
    margin: 0 0 32px !important;
}

/* ── Barre de recherche ──────────────────────────────────────────── */
.bpe-ex__search-wrap {
    position: relative !important;
    max-width: 520px !important;
    margin-bottom: 14px !important;
}
.bpe-ex__search-box {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #fff !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.06) !important;
    transition: border-color .2s, box-shadow .2s !important;
}
.bpe-ex__search-box:focus-within {
    border-color: #1a2b5e !important;
    box-shadow: 0 0 0 3px rgba(26,43,94,.1) !important;
}
.bpe-ex__search-icon { color: #adb5bd !important; flex-shrink: 0 !important; }
.bpe-ex__search-input {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    font-size: 15px !important;
    color: #1a1a2e !important;
    background: transparent !important;
    font-family: 'Poppins', sans-serif !important;
}
.bpe-ex__search-input::placeholder { color: #adb5bd !important; }

/* Dropdown */
.bpe-ex__search-dropdown {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important; right: 0 !important;
    background: #fff !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.12) !important;
    overflow: hidden !important;
    z-index: 999 !important;
}
.bpe-ex__search-dropdown.open { display: block !important; }
.bpe-ex__dd-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 18px !important;
    text-decoration: none !important;
    color: #1a1a2e !important;
    font-size: 14px !important;
    transition: background .12s !important;
    border-bottom: 1px solid #f8f9fa !important;
}
.bpe-ex__dd-item:last-child { border-bottom: none !important; }
.bpe-ex__dd-item:hover, .bpe-ex__dd-item.active {
    background: #f8f9fa !important;
}
.bpe-ex__dd-nom { flex: 1 !important; font-weight: 500 !important; }
.bpe-ex__dd-cp { font-size: 12px !important; color: #6c757d !important; }
.bpe-ex__dd-dept {
    font-size: 11px !important;
    font-weight: 700 !important;
    background: #e9ecef !important;
    color: #495057 !important;
    padding: 2px 7px !important;
    border-radius: 20px !important;
}
.bpe-ex__search-hint {
    font-size: 13px !important;
    color: #6c757d !important;
}
.bpe-ex__search-hint-link {
    color: #1a2b5e !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    margin: 0 3px !important;
}
.bpe-ex__search-hint-link:hover { text-decoration: underline !important; }

/* ── Grille communes accueil ─────────────────────────────────────── */
.bpe-ex__communes-section {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 24px 60px !important;
}
.bpe-ex__communes-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a2b5e !important;
    margin: 0 0 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #f47920 !important;
    display: inline-block !important;
}
.bpe-ex__communes-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
}
.bpe-ex__commune-card {
    background: #fff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color .2s, box-shadow .2s, transform .15s !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    position: relative !important;
}
.bpe-ex__commune-card:hover {
    border-color: #1a2b5e !important;
    box-shadow: 0 4px 20px rgba(26,43,94,.1) !important;
    transform: translateY(-2px) !important;
}
.bpe-ex__cc-nom {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a2b5e !important;
}
.bpe-ex__cc-dept {
    font-size: 12px !important;
    color: #6c757d !important;
    margin-top: 2px !important;
}
.bpe-ex__cc-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 9px !important;
    border-radius: 20px !important;
    display: inline-block !important;
    margin-bottom: 4px !important;
}
.bpe-ex__cc-badge--elu { background: #d1fae5 !important; color: #065f46 !important; }
.bpe-ex__cc-badge--t2  { background: #fef3c7 !important; color: #92400e !important; }
.bpe-ex__cc-liste-top {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1a1a2e !important;
    line-height: 1.3 !important;
}
.bpe-ex__cc-score {
    font-size: 13px !important;
    color: #495057 !important;
    margin-top: 2px !important;
}
.bpe-ex__cc-participation { color: #6c757d !important; }

/* Mini barre proportionnelle */
.bpe-ex__cc-minibar-wrap {
    display: flex !important;
    height: 5px !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    background: #f1f3f5 !important;
    margin-top: 6px !important;
}
.bpe-ex__cc-minibar-seg {
    height: 100% !important;
    transition: width .3s !important;
}
.bpe-ex__cc-pending {
    font-size: 13px !important;
    color: #adb5bd !important;
    font-style: italic !important;
}
.bpe-ex__cc-arrow {
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #dee2e6 !important;
    font-size: 18px !important;
    transition: color .2s, right .15s !important;
}
.bpe-ex__commune-card:hover .bpe-ex__cc-arrow {
    color: #f47920 !important;
    right: 14px !important;
}

/* ── Fiche commune : nav ────────────────────────────────────────── */
.bpe-ex__nav {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 24px 24px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}
.bpe-ex__back {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    color: #495057 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color .15s !important;
}
.bpe-ex__back:hover { color: #1a2b5e !important; }
.bpe-ex__breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: #6c757d !important;
}
.bpe-ex__breadcrumb a {
    color: #1a2b5e !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}
.bpe-ex__breadcrumb a:hover { text-decoration: underline !important; }

/* ── Fiche commune : header ─────────────────────────────────────── */
.bpe-ex__header {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 28px 24px 24px !important;
    border-bottom: 1px solid #e9ecef !important;
}
.bpe-ex__commune-titre {
    font-size: clamp(20px, 3vw, 30px) !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 12px !important;
    line-height: 1.25 !important;
}
.bpe-ex__commune-nom { color: #f47920 !important; }
.bpe-ex__commune-meta {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.bpe-ex__meta-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #e9ecef !important;
}
.bpe-ex__meta-chip--dept { background: #e8f0fe !important; color: #1a2b5e !important; border-color: #c5d5f7 !important; }
.bpe-ex__meta-chip--elected { background: #d1fae5 !important; color: #065f46 !important; border-color: #a7f3d0 !important; }
.bpe-ex__meta-chip--t2 { background: #fef3c7 !important; color: #92400e !important; border-color: #fde68a !important; }
.bpe-ex__meta-chip--final { background: #1a2b5e !important; color: #fff !important; border-color: #1a2b5e !important; }

/* ── Sections ───────────────────────────────────────────────────── */
.bpe-ex__section {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 28px 24px !important;
    border-bottom: 1px solid #f1f3f5 !important;
}
.bpe-ex__section-head {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.bpe-ex__section-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a2b5e !important;
    margin: 0 0 20px !important;
}
.bpe-ex__section-head .bpe-ex__section-title { margin: 0 !important; }
.bpe-ex__maj { font-size: 12px !important; color: #adb5bd !important; }

/* ── Participation ──────────────────────────────────────────────── */
.bpe-ex__participation {
    display: flex !important;
    align-items: center !important;
    gap: 32px !important;
    flex-wrap: wrap !important;
    background: #f8f9fa !important;
    border-radius: 14px !important;
    padding: 24px 28px !important;
    border: 1px solid #e9ecef !important;
}
.bpe-ex__donut-wrap { flex-shrink: 0 !important; }
.bpe-ex__donut { display: block !important; }
.bpe-ex__part-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 20px !important;
    flex: 1 !important;
}
.bpe-ex__part-stat {}
.bpe-ex__part-label {
    font-size: 12px !important;
    color: #6c757d !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
    margin-bottom: 4px !important;
}
.bpe-ex__part-val {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    line-height: 1.1 !important;
}
.bpe-ex__part-stat--highlight .bpe-ex__part-val { color: #1a2b5e !important; }
.bpe-ex__part-sub { font-size: 12px !important; color: #6c757d !important; margin-top: 2px !important; }

/* ── Listes résultats ───────────────────────────────────────────── */
.bpe-ex__listes { display: flex !important; flex-direction: column !important; gap: 12px !important; }

.bpe-ex__liste {
    background: #fff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    transition: border-color .15s !important;
}
.bpe-ex__liste--elected {
    border-color: #10b981 !important;
    border-width: 1.5px !important;
    background: #f0fdf4 !important;
}
.bpe-ex__liste--top {
    box-shadow: 0 2px 10px rgba(0,0,0,.05) !important;
}
.bpe-ex__liste-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    gap: 12px !important;
}
.bpe-ex__liste-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}
.bpe-ex__liste-nuance {
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-top: 3px !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}
.bpe-ex__badge-elu {
    font-size: 11px !important;
    font-weight: 700 !important;
    background: #10b981 !important;
    color: #fff !important;
    padding: 3px 9px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
}
.bpe-ex__badge-sieges {
    font-size: 11px !important;
    font-weight: 700 !important;
    background: #e9ecef !important;
    color: #495057 !important;
    padding: 3px 9px !important;
    border-radius: 20px !important;
}
.bpe-ex__liste-score {
    text-align: right !important;
    flex-shrink: 0 !important;
}
.bpe-ex__pct {
    font-size: 22px !important;
    font-weight: 700 !important;
    display: block !important;
    line-height: 1.1 !important;
}
.bpe-ex__voix {
    font-size: 12px !important;
    color: #6c757d !important;
    white-space: nowrap !important;
}
.bpe-ex__barre-wrap {
    height: 7px !important;
    background: #f1f3f5 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}
.bpe-ex__barre {
    height: 100% !important;
    border-radius: 4px !important;
    transition: width .6s ease !important;
    min-width: 4px !important;
}
.bpe-ex__note-second-tour {
    font-size: 12px !important;
    color: #6c757d !important;
    margin-top: 14px !important;
    line-height: 1.6 !important;
    background: #f8f9fa !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    border-left: 3px solid #dee2e6 !important;
}

/* ── Autres communes ────────────────────────────────────────────── */
.bpe-ex__section--autres { border-bottom: none !important; }
.bpe-ex__autres-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 10px !important;
}
.bpe-ex__autre-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    text-decoration: none !important;
    color: #1a1a2e !important;
    font-size: 14px !important;
    transition: background .15s, border-color .15s !important;
}
.bpe-ex__autre-card:hover {
    background: #fff !important;
    border-color: #1a2b5e !important;
}
.bpe-ex__autre-nom { font-weight: 600 !important; flex: 1 !important; }
.bpe-ex__autre-cp { font-size: 11px !important; color: #6c757d !important; }
.bpe-ex__autre-maj {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #10b981 !important;
    text-transform: uppercase !important;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bpe-ex__hero { padding: 48px 16px 36px !important; }
    .bpe-ex__participation { flex-direction: column !important; align-items: flex-start !important; }
    .bpe-ex__part-grid { grid-template-columns: 1fr 1fr !important; }
    .bpe-ex__liste-head { flex-direction: column !important; gap: 8px !important; }
    .bpe-ex__liste-score { text-align: left !important; }
    .bpe-ex__nav { flex-direction: column !important; align-items: flex-start !important; }
}

/* ── Intro ────────────────────────────────────────────────────────── */
.bpe-ex__intro {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 20px 24px 0 !important;
}
.bpe-ex__intro p {
    font-size: 15px !important;
    color: #495057 !important;
    line-height: 1.75 !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
    border-left: 3px solid #1a2b5e !important;
    margin: 0 !important;
}
.bpe-ex__intro strong { color: #1a2b5e !important; }

/* ── Maire sortant ────────────────────────────────────────────────── */
.bpe-ex__maire-card {
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}
.bpe-ex__maire-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 20px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
}
.bpe-ex__maire-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #f47920 !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
}
.bpe-ex__maire-mandat {
    font-size: 12px !important;
    color: #6c757d !important;
    background: #e9ecef !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
}
.bpe-ex__maire-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
}
.bpe-ex__maire-col {
    padding: 18px 20px !important;
    border-right: 1px solid #f1f3f5 !important;
}
.bpe-ex__maire-col:last-child { border-right: none !important; }
.bpe-ex__maire-field-label {
    font-size: 11px !important;
    color: #adb5bd !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    margin-bottom: 5px !important;
}
.bpe-ex__maire-name {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 8px !important;
}
.bpe-ex__maire-meta {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.bpe-ex__maire-nuance-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    background: #e9ecef !important;
    color: #495057 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-family: monospace !important;
}
.bpe-ex__maire-nuance-lib {
    font-size: 12px !important;
    color: #6c757d !important;
}
.bpe-ex__maire-age-wrap { margin-top: 8px !important; }

@media (max-width: 540px) {
    .bpe-ex__maire-body { grid-template-columns: 1fr !important; }
    .bpe-ex__maire-col { border-right: none !important; border-bottom: 1px solid #f1f3f5 !important; }
}

/* ── Badges statut T2 ─────────────────────────────────────────────── */
.bpe-ex__badge-statut {
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
}
.bpe-ex__badge-statut--qualif {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
}
.bpe-ex__badge-statut--fusion {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}
.bpe-ex__badge-statut--elim {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

/* ── Badge nuance abrégé (style pill compact) ─────────────────────── */
.bpe-ex__badge-nuance {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 3px !important;
    border: 1px solid !important;
    font-family: 'Poppins', sans-serif !important;
    letter-spacing: .02em !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    line-height: 1.6 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* ── Dropdown amélioré ───────────────────────────────────────────── */
.bpe-ex__dd-loading {
    padding: 14px 18px !important;
    font-size: 13px !important;
    color: #adb5bd !important;
    font-style: italic !important;
}
.bpe-ex__dd-score {
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-right: 4px !important;
}

/* ── Bannière "toutes communes" ──────────────────────────────────── */
.bpe-ex__all-banner {
    margin-top: 40px !important;
    background: linear-gradient(135deg, #1a2b5e 0%, #243470 100%) !important;
    border-radius: 14px !important;
    padding: 28px 32px !important;
}
.bpe-ex__all-banner-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    flex-wrap: wrap !important;
}
.bpe-ex__all-banner-titre {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 6px !important;
}
.bpe-ex__all-banner-desc {
    font-size: 14px !important;
    color: rgba(255,255,255,.7) !important;
    line-height: 1.5 !important;
    max-width: 500px !important;
}
.bpe-ex__all-banner-btn {
    background: #f47920 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    font-family: 'Poppins', sans-serif !important;
    transition: background .15s !important;
    flex-shrink: 0 !important;
}
.bpe-ex__all-banner-btn:hover { background: #d4661a !important; }

/* ── Layout liste — alignement nom + badges ──────────────────────── */
.bpe-ex__liste-name {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    line-height: 1.3 !important;
}
.bpe-ex__liste-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
}
.bpe-ex__liste--elected .bpe-ex__liste-label {
    color: #065f46 !important;
}
