/*
 * Gazo, pages de ville et de station (chargé par ces pages seulement, après site.css).
 * Mêmes jetons que site.css : pétrole, vert « moins cher », ambre #f2b33d.
 * Couleurs des courbes validées (daltonisme, contraste) : ville #0a7ea3 / #2f98bb,
 * prix réglementé #b97a06 / #b8800f, moyenne canadienne en pointillé neutre.
 */

:root {
    --series-city: #0a7ea3;
    --series-regulated: #b97a06;
    --series-canada: #7b8a92;
    --series-station: #0a7ea3;
}

@media (prefers-color-scheme: dark) {
    :root {
        --series-city: #2f98bb;
        --series-regulated: #b8800f;
        --series-canada: #8d9ba3;
        --series-station: #2f98bb;
    }
}

.approx { font-weight: 700; opacity: .7; margin-right: .08em; }
.pump-display--estimate { color: #c9d6dc; }
.pump-display--estimate .pump-display__value { text-shadow: none; }
.city-hero__note { margin: 8px 0 0; font-size: .86rem; color: #cfe8ee; max-width: 32em; }

.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.tag--partner { background: var(--amber); color: var(--amber-ink); }
.tag--official { background: var(--petrol-soft); color: var(--petrol-night); }
@media (prefers-color-scheme: dark) { .tag--official { color: #e6f6fb; } }

/* ---------- Les prix en bref ---------- */
.glance { display: grid; gap: 14px; }
@media (min-width: 760px) { .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.glance__card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.glance__card h3 { margin: 0; font-size: 1.2rem; }
.glance__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.glance__fig { padding: 8px 4px; border-radius: 12px; background: var(--canvas); text-align: center; min-width: 0; }
.glance__fig span { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); }
.glance__fig strong { display: block; font-size: clamp(.92rem, 3.6vw, 1.15rem); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.glance__fig--best strong { color: var(--green); }
.glance__count { margin: 0; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.glance__estimate { display: grid; gap: 2px; padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; }
.glance__estimate-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.glance__estimate strong { font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- Liste des stations ---------- */
.st-list { position: relative; }
.st-list__switch { margin-bottom: 14px; }
.st-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; }
.st-row {
    display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "rank who go" "prices prices prices";
    gap: 8px 10px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: start;
}
.js .st-row { animation: rise .35s var(--ease-out) both; }
.st-row:first-child { border-top: 0; }
.st-list:not(.is-expanded) .st-row[data-extra] { display: none; }
.st-row__rank { grid-area: rank; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--canvas); color: var(--ink-2); }
.st-row__rank:empty { background: transparent; border: 1.5px dashed var(--line-strong); }
.st-row--best .st-row__rank { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .st-row--best .st-row__rank { background: #1b8a44; } }
.st-row__who { grid-area: who; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.st-row__name { font-weight: 800; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.st-row__name:hover { color: var(--petrol); text-decoration: underline; }
.st-row__addr { flex-basis: 100%; font-size: .84rem; color: var(--muted); }
.st-row__services { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px; }
.st-row__services span { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--petrol-mist); color: var(--petrol-night); }
@media (prefers-color-scheme: dark) { .st-row__services span { color: var(--ink-2); } }
.st-row__prices { grid-area: prices; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cell { display: grid; gap: 0; padding: 5px 8px; border-radius: 10px; background: var(--canvas); min-width: 0; transition: box-shadow .2s, background-color .2s; }
.cell__fuel { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cell strong { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell small { font-size: .68rem; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.is-active { background: var(--card); box-shadow: inset 0 0 0 2px var(--petrol); }
.cell--estimate strong, .cell--none strong { color: var(--muted); font-weight: 700; }
.cell .src--regie_qc { color: var(--petrol); }
.cell .src--crowd, .cell .src--partner { color: var(--green); }
.st-row--best .cell.is-active strong, .st-row[data-best] .cell.is-active strong { color: var(--green); }
.st-row__go { grid-area: go; justify-self: end; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--petrol-deep); color: #fff; font-weight: 800; font-size: .86rem; text-decoration: none; transition: transform .15s var(--ease-out); }
.st-row__go:hover { transform: translateY(-1px); color: #fff; text-decoration: none; }
.st-row__go::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l7.5 18L12 16.8 4.5 21z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l7.5 18L12 16.8 4.5 21z'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (min-width: 900px) {
    .st-row { grid-template-columns: 32px minmax(0, 1fr) minmax(330px, 380px) auto; grid-template-areas: "rank who prices go"; align-items: center; padding: 12px 18px; }
}
.st-list__more { margin-top: 16px; }

/* ---------- Plan des stations ---------- */
.places-split { display: grid; gap: 28px; align-items: center; }
.places-split--top { align-items: start; }
@media (min-width: 900px) { .places-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.plot-frame { width: min(100%, 520px); margin-inline: auto; padding: 10px; border-radius: 28px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-1); }
.plot-frame--small { width: min(100%, 420px); margin: 0; }
.plot { display: block; width: 100%; height: auto; border-radius: 20px; background: radial-gradient(circle at 50% 50%, var(--petrol-mist), var(--canvas) 72%); }
.plot__rings circle { fill: none; stroke: var(--line-strong); stroke-width: 1.2; stroke-dasharray: 4 5; }
.plot__rings text { font: 700 11px var(--font); fill: var(--muted); }
.plot__north { font-weight: 800 !important; }
.plot__center path { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.plot__dot circle { stroke: var(--card); stroke-width: 2; transition: transform .2s var(--ease-spring); transform-box: fill-box; transform-origin: center; }
.plot__dot:hover circle, .plot__dot:focus-visible circle { transform: scale(1.5); }
.plot__dot--estimate circle { fill: var(--card); stroke: var(--series-canada); stroke-width: 2; }
.plot__dot--price circle { fill: var(--series-city); }
.plot__dot--cheapest circle { fill: var(--green); }
.plot__dot--this circle { fill: var(--amber); stroke: var(--ink); stroke-width: 2.5; }
.js .plot__dot { animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 12ms); }
.plot-legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.plot-legend--row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: .84rem; }
.plot-legend li { display: flex; align-items: center; gap: 10px; }
.plot-legend__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.plot-legend__dot--cheapest { background: var(--green); }
.plot-legend__dot--price { background: var(--series-city); }
.plot-legend__dot--estimate { background: var(--card); box-shadow: inset 0 0 0 2px var(--series-canada); }
.plot-legend__dot--this { background: var(--amber); box-shadow: inset 0 0 0 2px var(--ink); }
.plot-legend__cross { flex: none; width: 14px; height: 14px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 100% no-repeat; }

/* ---------- Courbes ---------- */
.trend-tabs .fuel-switch { margin-bottom: 14px; }
.trend__change { font-weight: 800; color: var(--ink-2); margin-bottom: 10px; }
.trend { margin: 0; padding: 18px 16px 14px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.trend__legend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.trend__key { display: inline-flex; align-items: center; gap: 8px; }
.trend__key i { width: 22px; height: 0; border-top: 3px solid var(--series-city); border-radius: 2px; }
.trend__key--regulated i { border-top-color: var(--series-regulated); }
.trend__key--canada i { border-top: 3px dashed var(--series-canada); }
.trend__plot { position: relative; height: clamp(200px, 34vw, 300px); margin: 6px 52px 30px 46px; touch-action: pan-y; }
.trend__grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.trend__grid b { position: absolute; right: calc(100% + 8px); top: 0; transform: translateY(-50%); font-size: .72rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trend__line { fill: none; stroke: var(--series-city); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trend__line--regulated { stroke: var(--series-regulated); }
.trend__line--canada { stroke: var(--series-canada); stroke-width: 1.6; stroke-dasharray: 5 5; }
.trend__line--station { stroke: var(--series-station); }
.js .trend__svg { opacity: 0; transition: opacity .8s var(--ease-out); }
.js .is-visible .trend__svg, .js .trend.is-drawn .trend__svg { opacity: 1; }
.trend__end { position: absolute; left: calc(100% + 6px); transform: translateY(-50%); font-size: .74rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.trend__x span { position: absolute; top: calc(100% + 8px); transform: translateX(-50%); font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
@media (max-width: 520px) { .trend__x span:nth-child(even) { display: none; } }
.trend__cursor { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--ink-2); pointer-events: none; }
.trend__tip { position: absolute; top: 0; z-index: 2; min-width: 150px; padding: 8px 10px; border-radius: 10px; background: var(--display-bg); color: #eaf3f6; font-size: .78rem; font-weight: 700; line-height: 1.45; pointer-events: none; box-shadow: var(--shadow-2); }
.trend__tip b { display: block; color: var(--digit-amber); font-size: .76rem; }
.trend__tip span { display: flex; justify-content: space-between; gap: 12px; }
.trend__table { margin-top: 6px; font-size: .9rem; }
.trend__table summary { cursor: pointer; font-weight: 800; color: var(--link); min-height: 44px; display: flex; align-items: center; }
.table-scroll { max-height: 320px; overflow: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.table-scroll table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table-scroll th, .table-scroll td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-scroll thead th { position: sticky; top: 0; background: var(--canvas); font-size: .78rem; }

/* ---------- Comparaison, meilleur jour ---------- */
.insight-grid { display: grid; gap: 22px; }
@media (min-width: 960px) { .insight-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; } }
.insight { padding: clamp(20px, 3vw, 28px); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.insight h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.bars { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.bars__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.bars__label { grid-column: 1 / -1; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.bars__track { height: 12px; border-radius: 6px; background: var(--canvas); overflow: hidden; }
.bars__fill { display: block; height: 100%; width: var(--w, 50%); border-radius: 6px; background: var(--series-city); transform-origin: left; }
.bars__row--quebec .bars__fill { background: var(--petrol-deep); }
.bars__row--canada .bars__fill { background: var(--series-canada); }
.js .bars__fill { transform: scaleX(0); transition: transform .9s var(--ease-out); }
.js .is-visible .bars__fill { transform: scaleX(1); }
.bars__value { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.bars__value small { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); }
@media (max-width: 380px) { .st-row__go { padding: 0 11px; font-size: .8rem; } }
.weekdays { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.weekdays li { padding: 10px 0; border-radius: 12px; background: var(--canvas); text-align: center; font-weight: 800; font-size: .86rem; text-transform: capitalize; color: var(--muted); }
.weekdays li.is-best { background: var(--green); color: #fff; }
.weekdays li.is-worst { box-shadow: inset 0 0 0 2px var(--amber-deep); color: var(--ink); }
@media (prefers-color-scheme: dark) { .weekdays li.is-best { background: #1b8a44; } }
.insight .notice { margin: 12px 0 0; font-size: .92rem; }

.faq-city { max-width: 52rem; }
.city-list--near small { font-weight: 600; color: var(--muted); margin-left: 4px; }

/* ---------- Page station ---------- */
.station-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.station-hero__legal { margin: 10px 0 0; font-size: .88rem; color: #bfe0e8; }
.station-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.station-hero__boards { display: grid; gap: 10px; }
@media (max-width: 479px) {
    .station-hero__boards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px; }
    .station-hero__boards .pump-display { padding: 8px 8px 7px; }
    .station-hero__boards .pump-display__value { font-size: 1.12rem; }
    .station-hero__boards .pump-display__label { font-size: .58rem; letter-spacing: .06em; }
    .station-hero__boards .pump-display__unit { display: none; }
}
@media (min-width: 480px) and (max-width: 899px) { .station-hero__boards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .station-hero__boards .pump-display__value { font-size: 1.5rem; } }
.fuel-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); }
.fuel-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 16px 18px; border-top: 1px solid var(--line); align-items: center; }
.fuel-line:first-child { border-top: 0; }
.fuel-line__fuel { font-weight: 800; font-size: 1.08rem; }
.fuel-line__price { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.fuel-line--station .fuel-line__price { color: var(--green); }
.fuel-line--estimate .fuel-line__price { color: var(--muted); }
.fuel-line__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .84rem; font-weight: 600; color: var(--muted); }
@media (min-width: 760px) { .fuel-line { grid-template-columns: 140px minmax(0, 1fr) auto; } .fuel-line__meta { grid-column: 2; grid-row: 1; } .fuel-line__price { grid-column: 3; } }
.near-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.near-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.near-list a { display: grid; gap: 2px; min-width: 0; text-decoration: none; color: var(--ink); }
.near-list a strong { font-weight: 800; }
.near-list a span { font-size: .82rem; color: var(--muted); }
.near-list a:hover strong { color: var(--petrol); text-decoration: underline; }
.near-list__price { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.near-list__price small { display: block; font-size: .74rem; color: var(--muted); }
.service-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.service-chips li { padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: .9rem; }
.hours { margin: 0; display: grid; gap: 0; }
.hours div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours dt { font-weight: 700; text-transform: capitalize; }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .js .bars__fill { transform: none; }
    .js .trend__svg { opacity: 1; }
}
.trend__tip i, .trend__tip em { font-style: normal; }
