/* ═══════════════════════════════════════════════════════════════════
   BP ÉLECTIONS — Stylesheet v1.1.0
   Design system BaugéPlus : Navy #1a2b5e · Orange #f47920 · Poppins
   ═══════════════════════════════════════════════════════════════════ */

.bp-elections-wrap,
.bp-elections-wrap * {
    box-sizing: border-box !important;
    font-family: 'Poppins', sans-serif !important;
}

/* ═══ HERO ═══════════════════════════════════════════════════════════ */
.bp-elections-wrap .bpe-hero {
    position: relative !important;
    min-height: 380px !important;
    background: linear-gradient(135deg, #0d1b42 0%, #1a2b5e 60%, #243470 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 60px 24px !important;
}
.bp-elections-wrap .bpe-hero::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(244,121,32,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%) !important;
    z-index: 0 !important;
}
.bp-elections-wrap .bpe-hero__content {
    position: relative !important;
    z-index: 1 !important;
    text-align: center !important;
    max-width: 760px !important;
    width: 100% !important;
}
.bp-elections-wrap .bpe-hero__eyebrow {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    color: #f47920 !important;
    margin-bottom: 12px !important;
}
.bp-elections-wrap .bpe-hero__titre {
    font-size: clamp(28px, 5vw, 48px) !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    letter-spacing: 1px !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.1 !important;
}
.bp-elections-wrap .bpe-hero__texte {
    font-size: 16px !important;
    color: rgba(255,255,255,0.75) !important;
    margin: 0 0 24px 0 !important;
    line-height: 1.6 !important;
}
.bp-elections-wrap .bpe-hero__dates {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 32px !important;
    flex-wrap: wrap !important;
}
.bp-elections-wrap .bpe-hero__date {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.5) !important;
    padding: 6px 16px !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 20px !important;
}
.bp-elections-wrap .bpe-hero__date--active {
    color: #ffffff !important;
    background: rgba(244,121,32,0.25) !important;
    border-color: #f47920 !important;
}
.bp-elections-wrap .bpe-hero__date-sep {
    color: rgba(255,255,255,0.3) !important;
    font-size: 18px !important;
}
.bp-elections-wrap .bpe-hero__status {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 8px 20px !important;
    border-radius: 30px !important;
    margin-top: 8px !important;
}
.bp-elections-wrap .bpe-hero__status--live {
    background: rgba(220,38,38,0.2) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(220,38,38,0.4) !important;
    animation: bpe-pulse 2s infinite !important;
}
.bp-elections-wrap .bpe-hero__status--final {
    background: rgba(34,197,94,0.2) !important;
    color: #86efac !important;
    border: 1px solid rgba(34,197,94,0.4) !important;
}
@keyframes bpe-pulse { 0%,100%{opacity:1}50%{opacity:.6} }

/* ═══ COUNTDOWN ══════════════════════════════════════════════════════ */
.bp-elections-wrap .bpe-countdown {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}
.bp-elections-wrap .bpe-countdown__label {
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: rgba(255,255,255,0.5) !important;
    margin-bottom: 12px !important;
}
.bp-elections-wrap .bpe-countdown__blocks {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.bp-elections-wrap .bpe-countdown__block {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 72px !important;
}
.bp-elections-wrap .bpe-countdown__val {
    font-size: 32px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    line-height: 1 !important;
}
.bp-elections-wrap .bpe-countdown__unit {
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: rgba(255,255,255,0.4) !important;
    margin-top: 4px !important;
}
.bp-elections-wrap .bpe-countdown__sep {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: rgba(255,255,255,0.3) !important;
    line-height: 1 !important;
    margin-bottom: 16px !important;
}
.bp-elections-wrap .bpe-countdown__finished {
    font-size: 14px !important;
    color: #f47920 !important;
    font-weight: 600 !important;
    padding: 12px 20px !important;
    background: rgba(244,121,32,0.15) !important;
    border-radius: 10px !important;
}

/* ═══ COMMUNE ════════════════════════════════════════════════════════ */
.bp-elections-wrap .bpe-commune {
    max-width: 1100px !important;
    margin: 0 auto 60px !important;
    padding: 0 24px !important;
}
.bp-elections-wrap .bpe-commune__header {
    display: flex !important;
    align-items: baseline !important;
    gap: 14px !important;
    padding: 48px 0 20px !important;
    border-bottom: 4px solid #f47920 !important;
    margin-bottom: 32px !important;
}
.bp-elections-wrap .bpe-commune__nom {
    font-size: 28px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #1a2b5e !important;
    margin: 0 !important;
    letter-spacing: 1px !important;
}
.bp-elections-wrap .bpe-commune__insee {
    font-size: 11px !important;
    color: #999 !important;
    font-weight: 600 !important;
    background: #f5f5f5 !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
}

/* ═══ SECTION ════════════════════════════════════════════════════════ */
.bp-elections-wrap .bpe-section {
    margin-bottom: 32px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid #e8e8e8 !important;
    overflow: hidden !important;
    box-shadow: 0 2px 16px rgba(26,43,94,0.07) !important;
}
.bp-elections-wrap .bpe-section__titre {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1a2b5e !important;
    margin: 0 0 16px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 24px 28px 0 !important;
}
.bp-elections-wrap .bpe-section__head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.bp-elections-wrap .bpe-section__head .bpe-section__titre {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.bp-elections-wrap .bpe-section__head {
    padding: 24px 28px 0 !important;
    margin-bottom: 16px !important;
}
.bp-elections-wrap .bpe-section--t2 { border-top: 4px solid #f47920 !important; }
.bp-elections-wrap .bpe-section--t2-wait {
    background: #f7f8fb !important;
    border: 1px dashed #ddd !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
}

/* Badges */
.bp-elections-wrap .bpe-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-right: 28px !important;
}
.bp-elections-wrap .bpe-badge--elected {
    background: rgba(34,197,94,0.1) !important;
    color: #16a34a !important;
    border: 1px solid rgba(34,197,94,0.3) !important;
}
.bp-elections-wrap .bpe-badge--final {
    background: rgba(244,121,32,0.1) !important;
    color: #f47920 !important;
    border: 1px solid rgba(244,121,32,0.3) !important;
}

/* ═══ LISTES CANDIDATS (avant résultats) ═════════════════════════════ */
.bp-elections-wrap .bpe-listes-candidats {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
}

.bp-elections-wrap .bpe-liste-candidat {
    border-right: 1px solid #eee !important;
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    flex-direction: column !important;
}
.bp-elections-wrap .bpe-liste-candidat:last-child { border-right: none !important; }

/* Bande colorée en haut */
.bp-elections-wrap .bpe-liste-candidat__header {
    background: var(--nuance-color, #718096) !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}
.bp-elections-wrap .bpe-liste-candidat__num {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: rgba(255,255,255,0.85) !important;
}
.bp-elections-wrap .bpe-liste-candidat__nuance-pill {
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    background: rgba(0,0,0,0.2) !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
}

/* Corps de la carte */
.bp-elections-wrap .bpe-liste-candidat__body {
    padding: 20px 24px 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}
.bp-elections-wrap .bpe-liste-candidat__label {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #1a2b5e !important;
    line-height: 1.25 !important;
}
.bp-elections-wrap .bpe-liste-candidat__nuance-lib {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--nuance-color, #718096) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
.bp-elections-wrap .bpe-liste-candidat__tete {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}
.bp-elections-wrap .bpe-liste-candidat__tete-icon {
    font-size: 16px !important;
}

/* Toggle liste candidats */
.bp-elections-wrap .bpe-toggle-candidats {
    margin-top: auto !important;
    padding-top: 12px !important;
    background: none !important;
    border: none !important;
    border-top: 1px solid #eee !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1a2b5e !important;
    cursor: pointer !important;
    padding: 12px 0 0 !important;
    font-family: 'Poppins', sans-serif !important;
    transition: color 0.2s !important;
}
.bp-elections-wrap .bpe-toggle-candidats:hover {
    color: #f47920 !important;
}

/* Liste dépliante */
.bp-elections-wrap .bpe-candidats-list {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease !important;
    margin-top: 0 !important;
}
.bp-elections-wrap .bpe-candidats-list--open {
    max-height: 1000px !important;
    margin-top: 8px !important;
}
.bp-elections-wrap .bpe-candidat-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 0 !important;
    border-bottom: 1px solid #f5f5f5 !important;
    font-size: 13px !important;
    color: #444 !important;
}
.bp-elections-wrap .bpe-candidat-item--tete {
    font-weight: 700 !important;
    color: #1a2b5e !important;
}
.bp-elections-wrap .bpe-candidat-item__sexe {
    font-size: 12px !important;
    color: #aaa !important;
    width: 14px !important;
    flex-shrink: 0 !important;
}
.bp-elections-wrap .bpe-candidat-item__badge {
    font-size: 10px !important;
    background: #1a2b5e !important;
    color: #fff !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    margin-left: auto !important;
}

/* ═══ PARTICIPATION ══════════════════════════════════════════════════ */
.bp-elections-wrap .bpe-participation {
    padding: 0 28px 20px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}
.bp-elections-wrap .bpe-participation__stats {
    display: flex !important;
    gap: 32px !important;
    flex-wrap: wrap !important;
    margin-bottom: 14px !important;
}
.bp-elections-wrap .bpe-participation__item {
    display: flex !important;
    flex-direction: column !important;
}
.bp-elections-wrap .bpe-participation__val {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a2b5e !important;
    line-height: 1 !important;
}
.bp-elections-wrap .bpe-participation__item--pct .bpe-participation__val {
    color: #f47920 !important;
    font-size: 28px !important;
}
.bp-elections-wrap .bpe-participation__lbl {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #888 !important;
    margin-top: 4px !important;
}
.bp-elections-wrap .bpe-participation__jauge {
    height: 8px !important;
    background: #f0f0f0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}
.bp-elections-wrap .bpe-participation__jauge-fill {
    height: 100% !important;
    border-radius: 4px !important;
    transition: width 1s ease !important;
}

/* ═══ LISTES RÉSULTATS ═══════════════════════════════════════════════ */
.bp-elections-wrap .bpe-listes {
    padding: 16px 28px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}
.bp-elections-wrap .bpe-liste {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px !important;
    border-radius: 10px !important;
    background: #f9f9f9 !important;
    border-left: 5px solid var(--liste-color, #718096) !important;
}
.bp-elections-wrap .bpe-liste--top {
    background: #fff8f3 !important;
    border-left-width: 7px !important;
}
.bp-elections-wrap .bpe-liste__rank {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #ccc !important;
    min-width: 28px !important;
    text-align: center !important;
}
.bp-elections-wrap .bpe-liste--top .bpe-liste__rank { color: #f47920 !important; }
.bp-elections-wrap .bpe-liste__info { flex: 1 !important; min-width: 0 !important; }
.bp-elections-wrap .bpe-liste__label {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a2b5e !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.bp-elections-wrap .bpe-liste__nuance {
    font-size: 11px !important;
    color: var(--liste-color, #888) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    margin-bottom: 6px !important;
}
.bp-elections-wrap .bpe-liste__bar-wrap {
    height: 6px !important;
    background: #e8e8e8 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    margin-top: 4px !important;
}
.bp-elections-wrap .bpe-liste__bar {
    height: 100% !important;
    border-radius: 3px !important;
    transition: width 1s ease !important;
}
.bp-elections-wrap .bpe-liste__chiffres { text-align: right !important; flex-shrink: 0 !important; }
.bp-elections-wrap .bpe-liste__pct {
    font-size: 22px !important;
    font-weight: 900 !important;
    color: var(--liste-color, #1a2b5e) !important;
    line-height: 1 !important;
}
.bp-elections-wrap .bpe-liste__voix { font-size: 11px !important; color: #888 !important; margin-top: 2px !important; }
.bp-elections-wrap .bpe-liste__sieges {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #f47920 !important;
    margin-top: 2px !important;
}

/* Mini countdown */
.bp-elections-wrap .bpe-countdown-mini {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    color: #888 !important;
}
.bp-elections-wrap .bpe-countdown-mini__label { font-weight: 600 !important; color: #1a2b5e !important; }
.bp-elections-wrap .bpe-countdown-mini__val { font-weight: 700 !important; color: #f47920 !important; }
.bp-elections-wrap .bpe-no-data {
    padding: 40px 28px !important;
    text-align: center !important;
    color: #999 !important;
    font-style: italic !important;
    font-size: 14px !important;
}

/* ═══ COMPACT ════════════════════════════════════════════════════════ */
.bp-elections-wrap.bp-elections-compact {
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid #eee !important;
    padding: 20px !important;
    box-shadow: 0 2px 12px rgba(26,43,94,0.06) !important;
}
.bp-elections-wrap .bpe-compact__header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
    flex-wrap: wrap !important;
}
.bp-elections-wrap .bpe-compact__titre {
    font-size: 14px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #1a2b5e !important;
    letter-spacing: 0.5px !important;
}
.bp-elections-wrap .bpe-compact__commune {
    font-size: 12px !important;
    background: #f0f4ff !important;
    color: #1a2b5e !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
}
.bp-elections-wrap .bpe-compact__lien {
    margin-left: auto !important;
    font-size: 12px !important;
    color: #f47920 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.bp-elections-wrap .bpe-compact__countdown { text-align: center !important; padding: 12px 0 !important; }
.bp-elections-wrap .bpe-compact__countdown-label {
    font-size: 12px !important; color: #888 !important; margin-bottom: 8px !important; display: block !important;
}
.bp-elections-wrap .bpe-countdown--compact {
    display: inline-flex !important; gap: 4px !important; align-items: baseline !important;
}
.bp-elections-wrap .bpe-countdown__val--compact {
    font-size: 24px !important; font-weight: 900 !important; color: #1a2b5e !important;
}
.bp-elections-wrap .bpe-countdown__unit--compact {
    font-size: 11px !important; color: #888 !important; margin-right: 4px !important;
}
.bp-elections-wrap .bpe-compact__dates { font-size: 12px !important; color: #aaa !important; margin-top: 8px !important; }
.bp-elections-wrap .bpe-compact__participation { font-size: 12px !important; color: #555 !important; margin-bottom: 10px !important; }
.bp-elections-wrap .bpe-compact__listes { display: flex !important; flex-direction: column !important; gap: 8px !important; }
.bp-elections-wrap .bpe-compact__liste {
    position: relative !important; overflow: hidden !important;
    border-radius: 8px !important; background: #f5f5f5 !important;
}
.bp-elections-wrap .bpe-compact__liste--top { background: #fff8f3 !important; }
.bp-elections-wrap .bpe-compact__liste-bar {
    position: absolute !important; left: 0 !important; top: 0 !important; bottom: 0 !important;
    opacity: 0.12 !important; border-radius: 8px !important;
}
.bp-elections-wrap .bpe-compact__liste-info {
    position: relative !important; z-index: 1 !important;
    display: flex !important; justify-content: space-between !important;
    align-items: center !important; padding: 8px 12px !important;
}
.bp-elections-wrap .bpe-compact__liste-label {
    font-size: 13px !important; font-weight: 600 !important; color: #1a2b5e !important;
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 70% !important;
}
.bp-elections-wrap .bpe-compact__liste-pct {
    font-size: 15px !important; font-weight: 900 !important; color: var(--liste-color, #1a2b5e) !important;
}
.bp-elections-wrap .bpe-compact__wait {
    text-align: center !important; padding: 16px 0 !important; font-size: 13px !important;
    color: #888 !important; font-style: italic !important;
}

/* ═══ BANDEAU ════════════════════════════════════════════════════════ */
.bp-elections-wrap.bp-elections-bandeau {
    background: var(--bandeau-bg, #1a2b5e) !important;
    width: 100% !important;
    padding: 0 !important;
}
.bp-elections-wrap .bpe-bandeau__inner {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 12px 24px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}
.bp-elections-wrap .bpe-bandeau__icon { font-size: 18px !important; flex-shrink: 0 !important; }
.bp-elections-wrap .bpe-bandeau__label {
    font-size: 13px !important; font-weight: 700 !important;
    text-transform: uppercase !important; letter-spacing: 0.5px !important;
    color: #ffffff !important; white-space: nowrap !important;
}
.bp-elections-wrap .bpe-bandeau__sep { color: rgba(255,255,255,0.3) !important; }
.bp-elections-wrap .bpe-bandeau__sub,
.bp-elections-wrap .bpe-bandeau__voix,
.bp-elections-wrap .bpe-bandeau__sieges,
.bp-elections-wrap .bpe-bandeau__t2-label { font-size: 12px !important; color: rgba(255,255,255,0.7) !important; }
.bp-elections-wrap .bpe-bandeau__top-liste { font-size: 14px !important; font-weight: 700 !important; color: #ffffff !important; }
.bp-elections-wrap .bpe-bandeau__top-pct { font-size: 14px !important; font-weight: 900 !important; color: #f47920 !important; }
.bp-elections-wrap .bpe-countdown--bandeau {
    display: inline-flex !important; align-items: baseline !important; gap: 3px !important;
}
.bp-elections-wrap .bpe-countdown--bandeau .bpe-countdown__val {
    font-size: 14px !important; font-weight: 900 !important; color: #f47920 !important;
}
.bp-elections-wrap .bpe-countdown--bandeau .bpe-countdown__unit {
    font-size: 11px !important; color: rgba(255,255,255,0.5) !important; margin-right: 4px !important;
}
.bp-elections-wrap .bpe-countdown--bandeau .bpe-countdown__sep-mini {
    color: rgba(255,255,255,0.3) !important; font-size: 12px !important; margin: 0 2px !important;
}

/* Elementor reset */
.elementor-widget-container:has(.bp-elections-bandeau) { padding: 0 !important; margin: 0 !important; }

/* ═══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .bp-elections-wrap .bpe-listes-candidats {
        grid-template-columns: 1fr !important;
    }
    .bp-elections-wrap .bpe-liste-candidat { border-right: none !important; }
    .bp-elections-wrap .bpe-countdown__block { min-width: 56px !important; padding: 8px 10px !important; }
    .bp-elections-wrap .bpe-countdown__val  { font-size: 24px !important; }
    .bp-elections-wrap .bpe-liste { flex-wrap: wrap !important; }
    .bp-elections-wrap .bpe-liste__chiffres {
        width: 100% !important; text-align: left !important;
        display: flex !important; gap: 12px !important; align-items: baseline !important;
    }
}
