/*
 * Gazo, pages des bornes de recharge (page centrale, villes, bornes), chargé après site.css et
 * places.css. Mêmes jetons : pétrole, vert, ambre #f2b33d ; l'ambre marque la recharge rapide.
 */

:root {
    --ev-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 2.5L5 13.5h6l-1 8 8.5-11h-6z'/%3E%3C/svg%3E");
    --ev-fast: #f2b33d;
    --ev-fast-ink: #2b1c00;
    --ev-level2: #0a7ea3;
    --ev-free: #13803b;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ev-level2: #2f98bb;
        --ev-free: #5cd68a;
    }
}

/* ---------- Héros « électrique » : pétrole vers vert, éclairs discrets ---------- */
.page-hero--ev {
    background:
        radial-gradient(circle at 92% 12%, rgba(242, 179, 61, .22), transparent 32%),
        linear-gradient(150deg, var(--petrol-night) 0%, #0b5d73 45%, #0d6a30 100%);
    color: #fff;
}
.page-hero--ev::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 2.5L5 13.5h6l-1 8 8.5-11h-6z' fill='%23ffffff'/%3E%3C/svg%3E") 0 0 / 120px 120px;
}
.page-hero--ev .wrap { position: relative; z-index: 1; }
.page-hero--ev h1 { color: #fff; }
.page-hero--ev .lead { color: #d8efe4; }
.page-hero--ev .kicker { display: inline-flex; align-items: center; gap: 6px; color: #fde7b5; }
.page-hero--ev .kicker .icon { width: 18px; height: 18px; color: var(--amber); }
.page-hero--ev .breadcrumb, .page-hero--ev .breadcrumb [aria-current] { color: #cdeed8; }
.page-hero--ev .breadcrumb a { color: #fff; }
/* Panneau translucide, comme sur les héros sombres (site.css ne le prévoit que pour --dark, --green, --plus). */
.page-hero.page-hero--ev:not(.page-hero--dark):not(.page-hero--green):not(.page-hero--plus) .page-hero__panel { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18); }
.page-hero--ev .finder__label, .page-hero--ev .finder__locate { color: #fff; }
.page-hero--ev .finder__results { color: var(--ink); }
.ev-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ev-hero__actions .btn .icon { width: 20px; height: 20px; }
.ev-hero__art { display: none; }
@media (min-width: 900px) {
    .ev-hero__art { display: block; width: 230px; margin-top: 26px; }
}

/* Tableau d'afficheurs du héros (chiffres de la ville, puissance de la borne) */
.ev-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ev-board .pump-display { min-width: 0; padding: 10px 10px 9px; }
.ev-display .pump-display__value { font-size: clamp(1.35rem, 5.4vw, 2rem); white-space: nowrap; }
.ev-display .pump-display__label { font-size: .62rem; letter-spacing: .08em; }
.ev-display--amber { color: var(--digit-amber); }
.ev-board__meta { grid-column: 1 / -1; margin: 6px 0 0; font-size: .88rem; font-weight: 700; color: #d8efe4; }
.ev-board__network { grid-column: 1 / -1; display: grid; gap: 2px; margin: 4px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.ev-board__network span { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #bfe0d2; }
.ev-board__network strong { font-size: 1.1rem; color: #fff; }
.station-hero__tags .tag .icon { width: 13px; height: 13px; margin-right: 3px; }
.tag--fast { background: var(--ev-fast); color: var(--ev-fast-ink); }
.tag--free { background: #ddf5e4; color: #00381a; }
.tag--level { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.tag--warn { background: #fde3e3; color: #7a1216; }
.page-hero--ev .station-hero__boards, .page-hero--ev .ev-board { align-self: center; }
.page-hero--ev .ev-board:has(.ev-board__network) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Liste des bornes d'une ville ---------- */
.ev-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ev-filter {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
    background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); cursor: pointer;
    font: inherit; font-weight: 800; font-size: .9rem; transition: background-color .2s, box-shadow .2s, transform .2s var(--ease-spring);
}
.ev-filter small { font-size: .78rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-filter .icon { width: 16px; height: 16px; color: var(--amber-deep); }
.ev-filter:hover { box-shadow: inset 0 0 0 2px var(--petrol); }
.ev-filter.is-on { background: var(--petrol-deep); color: #fff; box-shadow: none; transform: translateY(-1px); }
.ev-filter.is-on small, .ev-filter.is-on .icon { color: var(--amber); }
.ev-rows { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.ev-row {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "icon name kw" "icon addr addr" "meta meta go";
    gap: 4px 10px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: start;
}
/* Icône d'éclair en CSS (pas de SVG répété mille fois dans les grandes villes). */
.ev-row::before { content: ""; grid-area: icon; align-self: start; width: 34px; height: 34px; border-radius: 10px; background: var(--petrol-mist); }
.ev-row::after {
    content: ""; grid-area: icon; align-self: start; justify-self: center; margin-top: 8px; width: 18px; height: 18px; background: var(--petrol);
    -webkit-mask: var(--ev-bolt) center / contain no-repeat; mask: var(--ev-bolt) center / contain no-repeat;
}
.ev-row--fast::before { background: var(--ev-fast); }
.ev-row--fast::after { background: var(--ev-fast-ink); }
.js .ev-row { animation: rise .35s var(--ease-out) both; }
.ev-row:first-child { border-top: 0; }
.ev-row[hidden] { display: none; }
.ev-list:not(.is-expanded) .ev-row[data-extra] { display: none; }
.ev-row__name { grid-area: name; min-width: 0; align-self: center; font-weight: 800; font-size: 1rem; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ev-row__name:hover { color: var(--petrol); text-decoration: underline; }
.ev-row__addr { grid-area: addr; min-width: 0; font-size: .83rem; color: var(--muted); overflow-wrap: anywhere; }
.ev-row__kw { grid-area: kw; justify-self: end; padding: 4px 10px; border-radius: 10px; background: var(--canvas); color: var(--ink-2); font-weight: 800; font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-row__kw.is-fast { background: var(--ev-fast); color: var(--ev-fast-ink); }
.ev-row__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; margin-top: 6px; }
.ev-row__go { grid-area: go; align-self: end; }
.ev-plug, .ev-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; line-height: 1.3; }
.ev-plug { background: var(--petrol-mist); color: var(--petrol-night); }
@media (prefers-color-scheme: dark) { .ev-plug { color: var(--ink-2); } }
.ev-tag--fast { background: var(--amber-soft); color: var(--amber-ink); }
@media (prefers-color-scheme: dark) { .ev-tag--fast { color: var(--amber); } }
.ev-tag--free { background: var(--green-soft); color: var(--green-ink); }
.ev-tag--price { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ev-tag--paid, .ev-tag--muted { background: var(--canvas); color: var(--muted); }
.ev-tag--warn { background: var(--red-soft); color: var(--red); }
@media (min-width: 900px) {
    .ev-row { grid-template-columns: 36px minmax(0, 1.1fr) minmax(0, 1fr) auto auto; grid-template-areas: "icon name meta kw go" "icon addr meta kw go"; align-items: center; padding: 12px 18px; gap: 2px 16px; }
    .ev-row::before { width: 36px; height: 36px; align-self: center; }
    .ev-row::after { align-self: center; margin-top: 0; }
    .ev-row__meta { margin-top: 0; }
    .ev-row__go, .ev-row__kw { align-self: center; }
}
.ev-empty { margin: 14px 0 0; padding: 18px 20px; border-radius: var(--radius-s); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; }

/* ---------- Plan des bornes ---------- */
.plot__dot--level2 circle { fill: var(--ev-level2); }
.plot__dot--free circle { fill: var(--ev-free); }
.plot__dot--fast circle { fill: var(--ev-fast); stroke: var(--ink); stroke-width: 1.6; }
.plot-legend__dot--level2 { background: var(--ev-level2); }
.plot-legend__dot--free { background: var(--ev-free); }
.plot-legend__dot--fast { background: var(--ev-fast); box-shadow: inset 0 0 0 1.6px var(--ink); }
/* « Cette borne » (page d'une borne) : sombre cerclé d'ambre, pour ne pas la confondre avec une borne rapide. */
.plot-frame--ev .plot__dot--this circle { fill: var(--ink); stroke: var(--amber); stroke-width: 3.5; }
.plot-legend--ev .plot-legend__dot--this { background: var(--ink); box-shadow: inset 0 0 0 3px var(--amber); }
.plot-frame--ev .plot { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--green-soft) 60%, var(--petrol-mist)), var(--canvas) 72%); }

/* ---------- Réseaux, prises ---------- */
.ev-bars .bars__fill { background: linear-gradient(90deg, var(--petrol), var(--green)); }
.ev-bars .bars__row:first-child .bars__fill { background: linear-gradient(90deg, var(--green), var(--amber)); }
.ev-plug-counts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 520px) { .ev-plug-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ev-plug-counts li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--canvas); }
.ev-plug-counts .plug-art { width: 44px; flex: none; }
.ev-plug-counts strong { display: block; font-size: .92rem; }
.ev-plug-counts span { font-size: .86rem; color: var(--muted); font-weight: 700; }

.plug-art { width: 64px; height: auto; overflow: visible; }
.plug-art .f-ink { fill: var(--ill-stroke); }
.js .is-visible .plug-art__pin, .js .ev-plug-lines .plug-art__pin { animation: plug-glow 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .25s); transform-box: fill-box; transform-origin: center; }
@keyframes plug-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---------- Lien croisé essence ↔ recharge ---------- */
.ev-cross { position: relative; padding: clamp(22px, 4vw, 32px); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-1); }
.ev-cross__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px; background: var(--green-soft); color: var(--green-ink); }
.ev-cross__icon .icon { width: 28px; height: 28px; }
.ev-cross h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
@media (prefers-color-scheme: dark) { .ev-cross__icon { color: var(--green); } }

/* ---------- Page centrale ---------- */
.counters--ev .counter__value small { color: var(--amber-deep); }
.ev-provinces .province h3 { margin-bottom: 4px; }
.ev-province__count { margin: 0 0 10px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.ev-city-list a small { min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--petrol-mist); color: var(--petrol-night); font-size: .74rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .ev-city-list a small { color: var(--ink-2); } }
.ev-city-list a:hover small { background: var(--amber); color: var(--amber-ink); }
.ev-plugs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 700px) { .ev-plugs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ev-plugs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ev-plug-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-content: start; padding: 22px 20px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .25s var(--ease-out), box-shadow .25s; }
.ev-plug-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--petrol), var(--shadow-1); }
@media (min-width: 1100px) { .ev-plug-card { grid-template-columns: 1fr; } }
.ev-plug-card .plug-art { width: 72px; }
.ev-plug-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.ev-plug-card p { margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; }
.ev-plug-card__kind { font-size: .72rem !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol) !important; }
.ev-plug-card__count { margin: 0 !important; font-weight: 800; color: var(--green) !important; font-variant-numeric: tabular-nums; }
.ev-levels { display: grid; gap: 18px; }
@media (min-width: 800px) { .ev-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ev-level { padding: clamp(22px, 3.4vw, 32px); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.ev-level h3 { display: flex; align-items: center; gap: 8px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.ev-level h3 .icon { width: 26px; height: 26px; color: var(--amber-deep); }
.ev-level__tag { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--petrol-mist); color: var(--petrol-night); font-weight: 800; font-size: .85rem; }
.ev-level--fast .ev-level__tag { background: var(--amber-soft); color: var(--amber-ink); }
@media (prefers-color-scheme: dark) { .ev-level__tag { color: var(--ink-2); } .ev-level--fast .ev-level__tag { color: var(--amber); } }
.ev-level p { color: var(--ink-2); }
.ev-level__stat { margin: 0; font-weight: 800; color: var(--ink) !important; }
.ev-level__meter { height: 14px; margin-bottom: 18px; border-radius: 7px; background: var(--canvas); overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line); }
.ev-level__meter span { display: block; height: 100%; width: var(--w); border-radius: 7px; background: repeating-linear-gradient(-45deg, var(--ev-level2) 0 10px, color-mix(in srgb, var(--ev-level2) 80%, #fff) 10px 20px); transform-origin: left; }
.ev-level--fast .ev-level__meter span { background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, var(--amber-deep) 10px 20px); }
.js .ev-level__meter span { transform: scaleX(0); transition: transform 1.4s var(--ease-out); }
.js .is-visible .ev-level__meter span { transform: scaleX(1); }
.js .is-visible.ev-level--fast .ev-level__meter span { transition-duration: .7s; }
.ev-truth { display: grid; gap: 18px; }
@media (min-width: 860px) { .ev-truth { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.ev-truth__card { padding: clamp(22px, 3.4vw, 32px); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.ev-truth__card--dark { background: var(--display-bg); color: #e6f1f4; box-shadow: inset 0 0 0 1.5px var(--display-edge); }
.ev-truth__card--dark h2 { color: #fff; }
.ev-truth__card--dark p { color: #cfdde2; }
.ev-truth__card h2 { font-size: clamp(1.3rem, 2.8vw, 1.75rem); }
.ev-truth__icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 14px; border-radius: 15px; background: var(--petrol-mist); color: var(--petrol); }
.ev-truth__card--dark .ev-truth__icon { background: rgba(242, 179, 61, .16); color: var(--amber); }
.ev-truth__icon .icon { width: 26px; height: 26px; }
.ev-networks__art { width: min(100%, 360px); }
.ev-app .perks .icon { color: var(--amber); }
.ev-app__free { margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 700; }
.ev-app .store-badge__soon { background: var(--amber); color: var(--amber-ink); }

/* Résultats de la recherche de bornes (site.js, mode « charging ») */
.station-row__rank--ev { background: var(--amber-soft) !important; color: var(--amber-ink) !important; }
.station-row__rank--ev .icon { width: 16px; height: 16px; }
.station-row--ev .station-row__who a { color: var(--ink); text-decoration: none; }
.station-row--ev .station-row__who a:hover { color: var(--petrol); text-decoration: underline; }
.station-row__kw { font-size: 1rem !important; }
.station-row__kw.is-fast { color: var(--amber-deep); }
.badge.ev-plug { background: var(--petrol-mist); color: var(--petrol-night); }
.badge.ev-free { background: var(--green-soft); color: var(--green-ink); }

/* ---------- Page d'une borne ---------- */
.ev-plug-lines { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.ev-plug-lines li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "art name kw" "art name ports"; gap: 2px 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.ev-plug-lines li:first-child { border-top: 0; }
.ev-plug-lines .plug-art { grid-area: art; width: 52px; }
.ev-plug-lines__name { grid-area: name; min-width: 0; }
.ev-plug-lines__name strong { display: block; }
.ev-plug-lines__name small { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ev-plug-lines__kw { grid-area: kw; justify-self: end; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-plug-lines__ports { grid-area: ports; justify-self: end; font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ev-ports { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.ev-ports div { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--canvas); }
.ev-ports dt { font-size: .82rem; font-weight: 700; color: var(--muted); }
.ev-ports dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-ports__total { background: var(--petrol-mist) !important; }
.ev-facts { display: grid; gap: 14px; }
.ev-fact { padding: 20px 22px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.ev-fact h2 { font-size: 1.25rem; margin-bottom: 8px; }
.ev-fact p { margin: 0 0 8px; }
.ev-fact p:last-child { margin-bottom: 0; }
.ev-fact--status { background: var(--canvas); }
.ev-tariff { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.ev-tariff li { padding: 10px 14px; border-radius: 12px; background: var(--petrol-mist); font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.ev-tariff li.is-free { background: var(--green-soft); color: var(--green-ink); }
.ev-near li { align-items: center; }
.ev-near a { flex: 1; }
.ev-near a span { overflow-wrap: anywhere; }
.ev-sources__title { margin: 26px 0 4px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    .js .ev-level__meter span { transform: none; }
}

/* Prix signalé et coût estimé (page d'une borne) : toujours distingués du tarif publié. */
.ev-reported, .ev-cost { display: grid; gap: 2px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--line-strong); }
.ev-reported strong, .ev-cost strong { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-reported .small, .ev-cost .small { color: var(--muted); }
.ev-reported__label { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.ev-cost .ev-reported__label { color: var(--petrol); }
.ev-reported.is-stale strong { color: var(--muted); }
.ev-tag--reported { background: var(--card); color: var(--green-ink); box-shadow: inset 0 0 0 1.5px var(--green); }
@media (prefers-color-scheme: dark) { .ev-tag--reported { color: var(--green); } }
.ev-tariff li::first-letter { text-transform: uppercase; }
