:root{
    --bg: #060606;
    --bg-soft: #111111;
    --card: #141414;
    --card-2: #1a1a1a;
    --line: rgba(255,255,255,.08);
    --text: #ffffff;
    --muted: rgba(255,255,255,.72);
    --muted-2: rgba(255,255,255,.52);
    --red: #ff0000;
    --red-2: #ff3b30;
    --gold: #ffb347;
    --green: #31d17c;
    --shadow: 0 18px 40px rgba(0,0,0,.35);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 16px;
}

.page-bornes{
    background:
        radial-gradient(circle at top right, rgba(255,0,0,.12), transparent 28%),
        radial-gradient(circle at left center, rgba(255,180,0,.08), transparent 24%),
        linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 50px;
}

.page-bornes .container,
.page-bornes .main-container,
.page-bornes .content-wrap{
    max-width: 100%;
}

.bornes-hero{
    padding: 26px 20px 10px;
}

.bornes-hero__inner{
    max-width: 1600px;
    margin: 0 auto;
}

.bornes-hero__content{
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.02)),
        linear-gradient(180deg, rgba(255,0,0,.08), rgba(255,0,0,0));
    box-shadow: var(--shadow);
}

.bornes-hero__content::before{
    content:"";
    position:absolute;
    inset:-1px;
    pointer-events:none;
    border-radius:32px;
    background: linear-gradient(120deg, rgba(255,255,255,.10), transparent 30%, transparent 70%, rgba(255,0,0,.12));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    padding:1px;
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.bornes-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 14px;
    border-radius:999px;
    background: rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
    font-size:.9rem;
    margin-bottom:16px;
}

.bornes-hero h1{
    margin:0 0 12px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height:1.02;
    letter-spacing:-.03em;
}

.bornes-hero h1 span{
    color:#ffd1d1;
    text-shadow: 0 0 18px rgba(255,0,0,.15);
}

.bornes-hero p{
    margin:0;
    max-width:900px;
    color:var(--muted);
    font-size:1.03rem;
}

.bornes-toolbar{
    display:grid;
    grid-template-columns: 1.4fr .9fr;
    gap:18px;
    margin-top:28px;
}

.bornes-search{
    display:flex;
    align-items:center;
    gap:12px;
    background: rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 0 16px;
    min-height: 62px;
    backdrop-filter: blur(8px);
}

.bornes-search__icon{
    font-size:1.2rem;
    opacity:.9;
}

.bornes-search input{
    flex:1;
    background:transparent;
    border:none;
    outline:none;
    color:#fff;
    font-size:1rem;
}

.bornes-search input::placeholder{
    color:rgba(255,255,255,.45);
}

.bornes-dept-switch{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:10px;
}

.dept-btn{
    min-height:62px;
    border:none;
    border-radius:18px;
    cursor:pointer;
    background: linear-gradient(180deg, #1a1a1a, #101010);
    color:#fff;
    font-weight:700;
    border:1px solid rgba(255,255,255,.08);
    transition: .2s ease;
}

.dept-btn:hover{
    transform: translateY(-1px);
    border-color: rgba(255,0,0,.35);
}

.dept-btn.is-active{
    background: linear-gradient(180deg, #ff2a2a, #b30000);
    box-shadow: 0 12px 28px rgba(255,0,0,.28);
    border-color: rgba(255,255,255,.18);
}

.bornes-stats{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:14px;
    margin-top:22px;
}

.stat-card{
    display:flex;
    align-items:center;
    gap:14px;
    min-height:92px;
    border-radius:22px;
    padding:18px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border:1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow);
}

.stat-icon{
    width:52px;
    height:52px;
    border-radius:16px;
    display:grid;
    place-items:center;
    font-size:1.35rem;
    background: linear-gradient(180deg, rgba(255,0,0,.16), rgba(255,255,255,.06));
    border:1px solid rgba(255,255,255,.08);
}

.stat-card strong{
    display:block;
    font-size:1.45rem;
    line-height:1;
    margin-bottom:4px;
}

.stat-card small{
    color:var(--muted-2);
    font-size:.92rem;
}

.shimmer{
    position:relative;
    overflow:hidden;
}

.shimmer::after{
    content:"";
    position:absolute;
    inset:0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer{
    100% { transform: translateX(100%); }
}

.bornes-layout{
    max-width:1600px;
    margin: 12px auto 0;
    padding: 0 20px;
    display:grid;
    grid-template-columns: 1.1fr .95fr;
    gap:22px;
}

.section-heading{
    margin: 8px 0 14px;
}

.section-heading h2{
    margin:0 0 6px;
    font-size:1.5rem;
}

.section-heading p{
    margin:0;
    color:var(--muted-2);
}

.section-heading--split{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
}

.results-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 14px;
    border-radius:999px;
    background: rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
    font-weight:700;
    white-space:nowrap;
}

.bornes-map-panel{
    border-radius: 28px;
    overflow: hidden;
    border:1px solid rgba(255,255,255,.08);
    background: #0d0d0d;
    box-shadow: var(--shadow);
    min-height: 780px;
}

#bornesMap{
    width:100%;
    min-height:780px;
}

.leaflet-popup-content-wrapper{
    border-radius:18px;
    background:#111;
    color:#fff;
    border:1px solid rgba(255,255,255,.08);
    box-shadow: 0 20px 44px rgba(0,0,0,.42);
}

.leaflet-popup-tip{
    background:#111;
}

.popup-card{
    min-width:260px;
}

.popup-card__top{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:10px;
}

.popup-card h3{
    margin:0 0 8px;
    font-size:1rem;
    line-height:1.25;
}

.popup-card p{
    margin:0 0 10px;
    color:rgba(255,255,255,.76);
    font-size:.92rem;
}

.popup-tags,
.borne-card__tags{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.tag,
.borne-tag{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:0 10px;
    border-radius:999px;
    background: rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
    font-size:.82rem;
    font-weight:600;
}

.popup-meta{
    display:grid;
    gap:6px;
    margin-top:10px;
    color:rgba(255,255,255,.82);
    font-size:.88rem;
}

.popup-actions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:8px;
    margin-top:12px;
}

.btn-popup{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    border-radius:12px;
    text-decoration:none;
    border:none;
    cursor:pointer;
    font-weight:700;
    padding:0 10px;
}

.btn-center-map{
    background:#fff;
    color:#111;
}

.btn-route{
    background: linear-gradient(180deg, #ff2a2a, #b50000);
    color:#fff;
}

.ev-marker-wrap{
    background:transparent;
    border:none;
}

.ev-marker{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:14px 14px 14px 4px;
    background: linear-gradient(180deg, #ff2f2f, #bd0000);
    border:2px solid rgba(255,255,255,.92);
    color:#fff;
    font-size:1.05rem;
    font-weight:800;
    transform: rotate(45deg);
    box-shadow: 0 10px 24px rgba(255,0,0,.35);
}

.ev-marker span{
    transform: rotate(-45deg);
}

.bornes-highlight{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:12px;
    margin-bottom:18px;
}

.highlight-box{
    display:flex;
    align-items:center;
    gap:12px;
    padding:16px;
    border-radius:18px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
    border:1px solid rgba(255,255,255,.08);
}

.highlight-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background: linear-gradient(180deg, rgba(255,0,0,.18), rgba(255,255,255,.05));
    font-size:1.2rem;
}

.highlight-box strong{
    display:block;
    margin-bottom:4px;
}

.highlight-box small{
    color:var(--muted-2);
}

.bornes-cards{
    display:grid;
    grid-template-columns: 1fr;
    gap:16px;
}

.borne-card{
    position:relative;
    overflow:hidden;
    border-radius:26px;
    padding:22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)),
        linear-gradient(135deg, rgba(255,0,0,.05), transparent 35%);
    border:1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.borne-card:hover{
    transform: translateY(-2px);
    border-color: rgba(255,0,0,.24);
    box-shadow: 0 22px 44px rgba(0,0,0,.44);
}

.borne-card.is-focus{
    border-color: rgba(255,0,0,.45);
    box-shadow: 0 0 0 1px rgba(255,0,0,.25), 0 20px 44px rgba(0,0,0,.45);
}

.borne-card__glow{
    position:absolute;
    top:-60px;
    right:-60px;
    width:180px;
    height:180px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(255,0,0,.16), transparent 60%);
    pointer-events:none;
}

.borne-card__head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}

.borne-card__badges{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.borne-badge,
.dept-pill,
.power-pill{
    display:inline-flex;
    align-items:center;
    min-height:32px;
    padding:0 10px;
    border-radius:999px;
    font-size:.8rem;
    font-weight:700;
    border:1px solid rgba(255,255,255,.08);
}

.borne-badge--power,
.power-pill{
    background: rgba(49,209,124,.12);
    color: #d2ffe8;
}

.dept-67{
    background: rgba(255,0,0,.12);
    color:#ffd6d6;
}

.dept-68{
    background: rgba(255,179,71,.12);
    color:#ffe4c4;
}

.borne-card__power{
    font-size:1.15rem;
    font-weight:800;
    color:#fff;
    white-space:nowrap;
}

.borne-card h3{
    margin:0 0 14px;
    font-size:1.25rem;
    line-height:1.22;
    padding-right:12px;
}

.borne-card__location,
.borne-card__access{
    display:flex;
    gap:10px;
    align-items:flex-start;
    color:var(--muted);
}

.borne-card__location{
    margin-bottom:16px;
}

.borne-card__location p,
.borne-card__access p{
    margin:0;
}

.borne-grid{
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap:12px;
    margin-bottom:16px;
}

.borne-mini{
    display:flex;
    gap:10px;
    align-items:flex-start;
    padding:14px;
    border-radius:18px;
    background: rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.06);
}

.mini-icon{
    width:38px;
    height:38px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background: rgba(255,255,255,.07);
    font-size:1rem;
}

.borne-mini small{
    display:block;
    color:var(--muted-2);
    margin-bottom:4px;
}

.borne-mini strong{
    display:block;
    color:#fff;
    font-size:.95rem;
    line-height:1.25;
}

.borne-card__access{
    margin-top:14px;
    padding:14px;
    border-radius:18px;
    background: rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.06);
}

.borne-card__actions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:12px;
    margin-top:18px;
}

.btn-action{
    min-height:50px;
    border-radius:16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    border:none;
    cursor:pointer;
    padding:0 14px;
    font-weight:800;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn-action:hover{
    transform: translateY(-1px);
}

.btn-localize{
    background: #fff;
    color:#111;
}

.btn-route{
    background: linear-gradient(180deg, #ff2a2a, #b30000);
    color:#fff;
    box-shadow: 0 12px 24px rgba(255,0,0,.2);
}

.empty-state{
    display:grid;
    place-items:center;
    text-align:center;
    min-height:280px;
    border-radius:28px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
    border:1px solid rgba(255,255,255,.08);
    padding:20px;
}

.empty-state h3{
    margin:14px 0 8px;
}

.empty-state p{
    margin:0;
    color:var(--muted);
    max-width:420px;
}

.empty-icon{
    font-size:3rem;
}

.loader-ring{
    width:56px;
    height:56px;
    border-radius:50%;
    border:4px solid rgba(255,255,255,.12);
    border-top-color: var(--red);
    animation: spin 1s linear infinite;
    margin-bottom:14px;
}

@keyframes spin{
    to{ transform: rotate(360deg); }
}

@media (max-width: 1280px){
    .bornes-layout{
        grid-template-columns: 1fr;
    }

    .bornes-map-panel,
    #bornesMap{
        min-height: 620px;
    }
}

@media (max-width: 980px){
    .bornes-toolbar{
        grid-template-columns: 1fr;
    }

    .bornes-stats{
        grid-template-columns: repeat(2, 1fr);
    }

    .bornes-highlight{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px){
    .bornes-hero{
        padding: 16px 12px 8px;
    }

    .bornes-layout{
        padding: 0 12px;
        gap:16px;
    }

    .bornes-hero__content{
        padding:22px 18px;
        border-radius:24px;
    }

    .bornes-dept-switch{
        grid-template-columns: 1fr;
    }

    .bornes-stats{
        grid-template-columns: 1fr;
    }

    .section-heading--split{
        flex-direction:column;
        align-items:flex-start;
    }

    .borne-grid,
    .borne-card__actions,
    .popup-actions{
        grid-template-columns: 1fr;
    }

    .borne-card{
        padding:18px;
        border-radius:22px;
    }

    .borne-card__head{
        flex-direction:column;
        align-items:flex-start;
    }

    .bornes-map-panel,
    #bornesMap{
        min-height: 520px;
    }
}