/* Reset / base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f6f7fb;
    color: #0f172a
}

/* === HOME: cacher l'app tant qu'il n'y a pas eu de recherche === */
body.home {
    min-height: 100svh;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #d97828, #fad74e)
}

/* 🧼 Masquer tout ce qui n'est pas le hero quand on est sur la home */
body.home .neo-header,
/* <-- c'était .header */
body.home .main-container,
body.home .mobile-tabbar,
/* évite la barre du bas en mobile */
body.home #filtersPanel {
    /* si jamais ouvert par mégarde */
    display: none !important;
}

/* Hero */
.hero-wrap {
    width: min(1080px, 100%);
    padding: 16px
}

.hero-title {
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    text-align: center
}

.hero-title .hl {
    color: #ffd166
}

.hero-sub {
    color: #f3f4f6;
    text-align: center;
    margin: 6px 0 16px
}

.hero-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 18px 45px rgba(17, 24, 39, .25)
}

.hero-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.hero-input {
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    background: #f7f7fb;
    border: 2px solid #e9e9f6;
    border-radius: 14px;
    padding: 10px 12px
}

.hero-input input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 18px;
    padding: 6px 8px
}

.btn-hero {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer
}

.btn-hero.primary {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    box-shadow: 0 6px 16px rgba(124, 58, 237, .35)
}

.btn-hero.ghost {
    background: #f8fafc;
    border: 1px solid #e5e7eb
}

.pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px
}

.pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #e5e7eb;
    color: 0f172a;
    font-weight: 700;
    cursor: pointer
}

.pill.active {
    background: #4f46e5;
    color: #fff;
    border-color: transparent
}

.view-toggle {
    display: flex;
    gap: 8px;
    margin-top: 12px
}

.seg {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-weight: 700;
    cursor: pointer
}

.seg.active {
    background: #111827;
    color: #fff;
    border-color: #111827
}

.hero-banner {
    margin-top: 12px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-align: center
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 12px
}

.header__row {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.header__brand {
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px
}

.header__brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: #F7B500
}

.header__input {
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 10px
}

.header__input input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer
}

.btn.primary {
    background: #4f46e5;
    color: #fff
}

.btn.ghost {
    background: #f8fafc;
    border: 1px solid #e5e7eb
}

.header__filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%
}

.header__pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.header__pills .pill {
    padding: 6px 10px;
    font-size: 12px
}

.header__views .seg {
    padding: 8px 12px;
    font-size: 12px
}

.header-subtitle {
    font-size: 12px;
    opacity: .75
}

/* Filtres popover */
.filters-panel {
    position: absolute;
    right: 12px;
    top: 64px;
    width: 280px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    z-index: 1200
}

.filter-item {
    margin-bottom: 12px
}

.filter-item label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 13px
}

.filter-value {
    font-size: 12px;
    color: #555
}

/* App layout */
:root {
    --header-h: 72px
}

:root {
    /* couleurs des marqueurs carte (#1, #2, #3) */
    --pin-r1: linear-gradient(135deg, #FFD700, #FFA500);
    --pin-r2: linear-gradient(135deg, #C0C0C0, #B8B8B8);
    --pin-r3: linear-gradient(135deg, #CD7F32, #B87333);
    /* 1 */
    /* 3 */
}

/* Pastille ronde à côté du prix (DOM : .rank-icon rank-gold/silver/bronze) */
.rank-icon.rank-gold {
    background: var(--pin-r1) !important;
    border-color: var(--pin-r1) !important;
    color: #fff !important;
}

.rank-icon.rank-silver {
    background: var(--pin-r2) !important;
    border-color: var(--pin-r2) !important;
    color: #fff !important;
}

.rank-icon.rank-bronze {
    background: var(--pin-r3) !important;
    border-color: var(--pin-r3) !important;
    color: #fff !important;
}

/* (optionnel) si tu utilises encore .station-rank.rank-1/2/3 ailleurs */
.station-rank.rank-1 {
    background: var(--pin-r1) !important;
    color: #fff !important;
}

.station-rank.rank-2 {
    background: var(--pin-r2) !important;
    color: #fff !important;
}

.station-rank.rank-3 {
    background: var(--pin-r3) !important;
    color: #fff !important;
}

.main-container {
    height: calc(100svh - var(--header-h));
    display: flex
}

.map-view {
    width: 50%;
    display: block;
    border-right: 1px solid #e5e7eb
}

.list-view {
    width: 50%;
    background: #fff;
    overflow: auto
}

.view-mode-list .map-view {
    display: none;
    width: 0
}

.view-mode-list .list-view {
    width: 100%
}

.view-mode-carte .map-view {
    width: 100%
}

.view-mode-carte .list-view {
    display: none
}

/* Map */
#map {
    position: relative;
    width: 100%;
    height: 100%
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-weight: 700;
    color: #666;
    z-index: 900
}

.refresh-area {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 12px;
    z-index: 950;
    background: #111827;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700
}

/* List */
.list-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10
}

.list-header h2 {
    font-size: 18px;
    margin-bottom: 6px
}

.list-stats {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.stations-container {
    padding: 10px
}

.skel-card {
    height: 84px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(100deg, #eee 40%, #f5f5f5 50%, #eee 60%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite
}

@keyframes shimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

.station-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: .25s;
    cursor: pointer
}

.station-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, .1)
}

.station-header {
    padding: 12px 15px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.station-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0
}

.rank-1 {
    background: #FACC15;
    color: #333
}

.rank-2 {
    background: #C0C0C0;
    color: #333
}

.rank-3 {
    background: #CD7F32
}

.rank-top {
    background: #4CAF50
}

.rank-average {
    background: #FF9800
}

.rank-poor {
    background: #F44336
}

.station-info {
    flex: 1;
    margin: 0 8px
}

.station-name {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 3px
}

.station-location {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.distance-chip {
    background: #eef2ff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700
}

.competitiveness-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px
}

.badge-excellent {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50
}

.badge-good {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ff9800
}

.badge-average {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336
}

.station-details {
    padding: 15px;
    display: none;
    background: #fafafa
}

.station-card.expanded .station-details {
    display: block
}

.station-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px
}

.price-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    min-width: 70px
}

.fuel-type {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    margin-bottom: 3px
}

.fuel-price {
    font-size: 13px;
    font-weight: 800;
    color: #111
}

.station-services {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px
}

.service-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600
}

.list-loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 700
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin .8s linear infinite
}

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

/* Mobile */
@media (max-width:768px) {
    .hero-title {
        font-size: 32px
    }

    .hero-input,
    .btn-hero {
        flex: 1 1 100%
    }

    .header__input,
    .btn,
    .header__filters {
        flex: 1 1 100%
    }

    .filters-panel {
        right: 10px;
        left: 10px;
        width: auto
    }
}

/* --- Boutons d'action dans les cartes station --- */
.station-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-btn {
    flex: 1;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .12s ease, background-color .15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

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

/* 🧭 Y aller */
.btn-navigate {
    background: #10B981;
    color: #fff;
}

.btn-navigate:hover {
    background: #0EA371;
}

/* 🎯 Voir carte */
.btn-map {
    background: #111827;
    color: #fff;
}

.btn-map:hover {
    background: #0b1220;
}

/* Petite pastille service (comme avant) */
.service-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin: 2px 4px 0 0;
}

/* --- Loader: toujours honoré par l'attribut hidden --- */
[hidden] {
    display: none !important;
}

.list-loading-inline {
    display: inline-flex;
    /* visible quand hidden est retiré */
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

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

/* ===== Responsive vues ===== */

/* Mise en page de base */
.main-container {
    display: flex;
    height: calc(100svh - var(--header-h, 72px));
}

.map-view {
    width: 100%;
}

.list-view {
    width: 100%;
    display: none;
}

/* Vue liste seule */
.view-mode-list .list-view {
    display: block;
}

.view-mode-list .map-view {
    display: none;
}

/* Vue carte — par défaut la carte prend tout */
.view-mode-carte .map-view {
    display: block;
}

/* --- Desktop >= 1024px : vue hybride automatique --- */
@media (min-width:1024px) {
    .view-mode-carte .map-view {
        width: 50%;
        display: block;
    }

    .view-mode-carte .list-view {
        width: 50%;
        display: block;
        border-left: 1px solid #e5e7eb;
    }
}

/* --- Mobile : carte seule forcée --- */
@media (max-width:1023px) {
    .view-mode-carte .map-view {
        display: block;
    }

    .view-mode-carte .list-view {
        display: none;
    }

    .view-mode-list .map-view {
        display: none;
    }

    .view-mode-list .list-view {
        display: block;
    }
}

/* ===== MOBILE NAV BAR ===== */
.mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: none;
    /* visible seulement sur mobile via media query */
    align-items: center;
    justify-content: space-around;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mbtab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    color: #111827;
}

.mbtab-btn span {
    font-size: 11px;
}

.mbtab-btn.active {
    color: #4f46e5;
}

/* La carte/liste ne doivent pas être masquées par la tabbar */
@media (max-width: 1023px) {
    .header {
        display: none;
    }

    /* masque le gros header sur mobile */
    .mobile-tabbar {
        display: flex;
    }

    .map-view #map {
        padding-bottom: 70px;
    }

    /* petit espace sous la carte */
}

/* ===== SHEET (recherche mobile) ===== */
.sheet[hidden] {
    display: none !important;
}

.sheet__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.sheet.open .sheet__backdrop {
    opacity: 1;
    pointer-events: auto;
}

.sheet__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .15);
    transform: translateY(105%);
    transition: transform .25s ease;
    padding: 12px 14px 16px calc(14px + env(safe-area-inset-bottom, 0));
    z-index: 2100;
}

.sheet.open .sheet__panel {
    transform: translateY(0);
}

.sheet__grab {
    width: 38px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    margin: 6px auto 10px;
}

.sheet__title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

.sheet__row {
    display: flex;
    gap: 8px;
}

.sheet__row input {

    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 16px;
    width: 95%;
    margin: 0 auto;
}

.sheet__btn {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    background: #f8fafc;
    color: #0f172a;
}

.sheet__btn.primary {
    background: #0f172b;
    color: #fff;
    border-color: transparent;
    margin-bottom: 10px;
}

.sheet__pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.sheet__pills .pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.sheet__pills .pill.active {
    background: #4f46e5;
    color: #fff;
    border-color: transparent;
}

.sheet__actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Desktop : pas de tabbar/sheet */
@media (min-width: 1024px) {
    .mobile-tabbar {
        display: none;
    }

    .sheet {
        display: none;
    }
}

/* Bouton localisation, compact sur mobile */
.locate-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--border, #E5E7EB);
    background: #fff;
    font-weight: 600;
}

.locate-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .locate-btn .txt {
        display: none;
    }

    /* icône seule sur petit écran */
}

.mb-filters {
    margin-top: .75rem;
    display: grid;
    gap: .75rem;
}

.mb-filter label {
    font-weight: 600;
    display: block;
    margin-bottom: .25rem;
}

.mb-filter-row {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.mb-filter-row input[type="range"] {
    flex: 1;
    margin-bottom: 16px;
}

#mbPriceMaxValue,
#mbDistanceMaxValue {
    min-width: 3.5ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.only-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .only-mobile {
        display: inline-flex;
    }
}

.sheet {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: flex;
    align-items: flex-end;
    z-index: 60;
}

.sheet[hidden] {
    display: none;
}

.sheet-inner {
    background: #fff;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    overflow: auto;
}

.sheet-header,
.sheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.sheet-footer {
    border-top: 1px solid #eee;
    border-bottom: 0;
    gap: 8px;
}

.sheet-content {
    padding: 12px 16px;
    display: grid;
    gap: 14px;
}

.sheet-close {
    font-size: 24px;
    line-height: 1;
    background: none;
    border: 0;
}

.block-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    padding: .45rem .7rem;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
}

.pill.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-light {
    padding: .6rem .9rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f8f8f8;
}

.btn-primary {
    padding: .6rem .9rem;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-weight: 700;
}

/* ===== Mobile home tuning ===== */
@media (max-width: 768px) {
    :root {
        --tabbar-h: 64px;
        /* hauteur de la barre du bas */
    }

    /* Évite que la tabbar recouvre le contenu */
    body {
        padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--tabbar-h);
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 50;
    }

    /* Le hero occupe bien l’écran sans “forcer” sous Safari iOS */
    .hero-wrap {
        min-height: 100svh;
        /* mieux que 100vh sur mobile */
        padding: 16px;
    }

    /* Titres + sous-titre plus compacts */
    .hero-title {
        font-size: clamp(1.4rem, 3.5vw + 1rem, 1.9rem);
        line-height: 1.15;
        margin-bottom: .5rem;
        text-align: left;
    }

    .hero-sub {
        font-size: .95rem;
        margin-bottom: 1rem;
        text-align: left;
    }

    /* Carte du hero plus compacte */
    .hero-card {
        border-radius: 16px;
        padding: 14px;
    }

    /* Zone de recherche : champs et boutons sur une colonne */
    .hero-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 12px;
    }

    .hero-input input {
        height: 48px;
        font-size: 16px;
        /* évite le zoom iOS */
    }

    .btn-hero {
        width: 100%;
        height: 48px;
        font-weight: 600;
    }

    /* Pills carburants : meilleure lisibilité + wrap/scroll */
    .pills {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 10px 0 6px;
    }

    .pills .pill {
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 14px;
    }

    /* Toggle Liste/Carte : 2 gros boutons respirants */
    .view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 8px 0 12px;
    }

    .view-toggle .seg {
        height: 44px;
        border-radius: 12px;
        font-weight: 600;
    }

    /* Bandeau d’info compact */
    .hero-banner {
        font-size: .9rem;
        padding: 10px 12px;
    }
}

/* ===== HOME ONLY: masquer la tabbar + padding adapté ===== */
@media (max-width: 768px) {
    :root {
        --tabbar-h: 64px;
    }

    /* La tabbar est visible partout SAUF sur la home */
    body:not(.home) {
        padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--tabbar-h);
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 50;
    }

    /* Sur la home, on cache la tabbar et on supprime le padding bas inutile */
    .home .mobile-tabbar {
        display: none !important;
    }

    .home {
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
}

/* ===== MOBILE UNIQUEMENT (<= 1023px) ===== */
@media (max-width: 1023px) {

    /* Masquer la tabbar uniquement sur la home */
    .home .mobile-tabbar {
        display: none !important;
    }

    /* Partout ailleurs en mobile, on réserve la place pour la tabbar */
    body:not(.home) {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 64px;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 50;
    }

    /* HOME: tailles fluides (ne s'appliquent que sur mobile + home) */
    .home .hero-wrap {
        min-height: 100svh;
        padding: clamp(12px, 4vw, 24px);
        display: grid;
        align-content: start;
        gap: clamp(10px, 2.5vw, 20px);
    }

    .home .hero-title {
        font-size: clamp(24px, 5.6vw, 36px);
        line-height: 1.12;
        margin: 0 0 .5rem;
        text-align: left;
    }

    .home .hero-sub {
        font-size: clamp(14px, 3.2vw, 18px);
        margin-bottom: 1rem;
        text-align: left;
        opacity: .9;
    }

    .home .hero-card {
        width: min(100%, 720px);
        margin-inline: auto;
        padding: clamp(12px, 4vw, 24px);
        border-radius: clamp(12px, 3vw, 20px);
    }

    .home .hero-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: clamp(10px, 2.5vw, 20px);
        margin-bottom: 12px;
    }

    .home .hero-input input {
        height: clamp(44px, 6.2vw, 52px);
        font-size: clamp(16px, 3.8vw, 18px);
        /* évite le zoom iOS */
    }

    .home .btn-hero {
        height: clamp(44px, 6.2vw, 52px);
        width: 100%;
        font-weight: 600;
    }

    .home .pills {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 10px 0 6px;
    }

    .home .pills .pill {
        padding: 8px 12px;
        border-radius: 999px;
        font-size: clamp(13px, 3.2vw, 15px);
    }

    .home .view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 8px 0 12px;
    }

    .home .view-toggle .seg {
        height: clamp(40px, 6.5vw, 48px);
        border-radius: 12px;
        font-weight: 600;
    }
}

/* ===== HOME / MOBILE ONLY (<=1023px) ===== */
@media (max-width: 1023px) {

    /* hide bottom tabbar only on the home */
    .home .mobile-tabbar {
        display: none !important;
    }

    /* use full safe viewport and remove horizontal scroll */
    body.home {
        overflow-x: hidden;
    }

    .home .hero-wrap {
        min-height: 100svh;
        padding: clamp(12px, 4vw, 24px);
        display: grid;
        align-content: stretch;
        /* let the card grow */
    }

    /* stretch the white card to fill the screen and space CTAs nicely */
    .home .hero-card {
        width: min(100%, 720px);
        margin-inline: auto;
        padding: clamp(12px, 4vw, 24px);
        border-radius: clamp(12px, 3vw, 20px);

        /* This is the key: create vertical rhythm and push the banner to the bottom */
        display: grid;
        grid-template-rows: auto auto auto auto 1fr auto;
        /* input, search, locate, pills, spacer, toggles/banner */
        row-gap: clamp(10px, 2.2vh, 18px);
        min-height: calc(100svh - 2 * clamp(12px, 4vw, 24px));
    }

    /* input + buttons full width; nicer touch targets */
    .home .hero-row {
        display: grid;
        grid-template-columns: 1fr;
        /* stack */
        gap: clamp(8px, 1.8vh, 12px);
    }

    .home .hero-input input {
        height: clamp(44px, 6.2vw, 52px);
        font-size: clamp(16px, 3.8vw, 18px);
    }

    .home .btn-hero {
        width: 100%;
        height: clamp(44px, 6.2vw, 52px);
        font-weight: 600;
    }

    /* fuel pills tighter on small screens */
    .home .pills {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 6px 0 2px;
    }

    .home .pills .pill {
        padding: 8px 12px;
        border-radius: 999px;
        font-size: clamp(13px, 3.2vw, 15px);
    }

    /* list/carte CTAs: bigger hit area + spacing */
    .home .view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 6px;
    }

    .home .view-toggle .seg {
        padding-block: clamp(10px, 2.2vh, 14px);
        height: auto;
        /* let padding define height */
        border-radius: 12px;
        font-weight: 600;
    }

    /* pin the green banner to the bottom of the card */
    .home .hero-banner {
        margin-top: auto;
    }
}

/* === HOME MOBILE — remplir l'écran sans scroll vide, sans impacter desktop === */
/* ===== HOME (mobile) — remplir l’espace utile, centrer la carte ===== */
@media (max-width: 900px) {

    /* Section violette */
    .home .hero-wrap {
        min-height: 100svh;
        /* tient compte de la barre d’URL mobile */
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom) + 12px);
        display: grid;
        grid-template-rows: auto 1fr auto;
        /* titre+sub / carte / bandeau astuce */
        align-content: stretch;
    }

    /* Titre + sous-titre : pas de gros marge en haut */
    .home .hero-title {
        margin: 0 0 8px;
    }

    .home .hero-sub {
        margin: 0 0 16px;
    }

    /* La carte blanche : occupe la “partie principale” (la rangée 1fr) */
    .home .hero-card {
        margin: 0 auto;
        /* centrée horizontalement */
        width: min(100%, 720px);
        align-self: stretch;
        /* prend toute la largeur de sa rangée */
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* contenu centré verticalement */
        min-height: clamp(420px, 72svh, 760px);
        /* remplit bien l’écran sans dépasser */
        gap: 14px;
        /* espacement interne doux */
    }

    /* Un peu d’air entre les lignes/CTA à l’intérieur de la carte */
    .home .hero-card .hero-row+.hero-row {
        margin-top: 12px;
    }

    /* Footer mobile masqué uniquement sur la home (déjà en place normalement) */
    .home .mobile-tabbar {
        display: none !important;
    }
}

/* ==== FIX HOME MOBILE ==== */
@media (max-width: 1023px) {

    /* 1) Ne plus centrer verticalement le hero sur mobile */
    body.home {
        display: block !important;
        /* au lieu de grid */
        min-height: 100svh;
    }

    /* 2) La zone violette occupe l’écran, avec une rangée centrale extensible */
    .home .hero-wrap {
        min-height: 100svh !important;
        display: grid !important;
        grid-template-rows: auto 1fr auto;
        /* titre+sub / carte / bandeau */
    }

    /* 3) La carte blanche remplit la rangée centrale, sans min-height rigide */
    .home .hero-card {
        min-height: auto !important;
        /* écrase les min-height/clamp précédents */
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* CTA bien centrés, sans “trou” en haut */
    }

    /* 4) Le bandeau vert reste plaqué en bas du bloc blanc */
    .home .hero-banner {
        margin-top: auto !important;
    }

    /* 5) Masquer la tabbar seulement sur la home */
    .home .mobile-tabbar {
        display: none !important;
    }
}

/* === HOTFIX HOME MOBILE : supprimer le grand vide et remplir l'écran === */
@media (max-width:1023px) {

    /* ne plus centrer le body en grid sur la home */
    body.home {
        display: block !important;
    }

    /* la section violette devient un flux vertical simple */
    .home .hero-wrap {
        min-height: 100svh !important;
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    /* la carte blanche ne s'étire plus artificiellement */
    .home .hero-card {
        width: min(100%, 720px);
        margin-inline: auto;
        min-height: auto !important;
        /* écrase les clamp/72svh précédents */
        flex: 0 0 auto;
        /* n’occupe pas l’espace restant */
    }

    /* le bandeau vert reste plaqué en bas de l’écran */
    .home .hero-banner {
        margin-top: auto !important;
    }

    /* footer mobile masqué uniquement sur la home */
    .home .mobile-tabbar {
        display: none !important;
    }
}

/* === FIX empilement au-dessus de Leaflet (mobile) === */
/* La carte ne doit JAMAIS passer devant les overlays UI */
.map-view,
#map,
.leaflet-container {
    position: relative;
    z-index: 0 !important;
}

/* Les contrôles Leaflet restent au-dessus de la carte, mais sous notre UI */
.leaflet-top,
.leaflet-bottom {
    z-index: 1000 !important;
}

/* Barre mobile (bas d’écran) au-dessus de Leaflet */
.mobile-tabbar {
    z-index: 3000 !important;
}

/* Sheet "Rechercher" (fond + panneau) tout en haut */
.sheet {
    z-index: 4000 !important;
}

.sheet__backdrop {
    z-index: 4001 !important;
}

.sheet__panel {
    z-index: 4002 !important;
}

/* (optionnel) filtres et header au-dessus de Leaflet aussi */
#filtersPanel {
    z-index: 3500 !important;
}

.header {
    z-index: 3200 !important;
}

/* === Compacter "stationCount" + "sortInfo" en une seule phrase === */
.list-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Ordre sur desktop : boutons (tri/filtre) puis la phrase */
#sortToggle {
    order: 1;
}

#stationCount {
    order: 2;
}

#sortInfo {
    order: 3;
}

#listLoading {
    order: 4;
}

/* Ajoute un séparateur entre le nombre et l’info de tri → "12 stations — Triées par prix" */
#stationCount::after {
    content: "—";
}

/* Sur mobile : la phrase passe SOUS les boutons */
@media (max-width: 768px) {

    /* force les boutons à prendre toute la ligne */
    #sortToggle {
        order: 1;
        flex-basis: 100%;
    }

    /* la phrase vient ensuite, sur la ligne d’après */
    #stationCount {
        order: 2;
    }

    #sortInfo {
        order: 3;
    }

    /* le loader ensuite */
    #listLoading {
        order: 4;
    }
}

/* Corrige l'écart entre #stationCount et #sortInfo */
.list-stats {
    --stats-gap: 8px;
    gap: var(--stats-gap);
}

#stationCount {
    /* on neutralise le gap entre #stationCount et #sortInfo */
    margin-right: calc(-1 * var(--stats-gap));
}

#stationCount::after {
    content: "—";
    /* em-dash sans espaces "fantômes" */
    margin: 0 .35ch;
    /* espace typographique de part et d'autre */
}

/* Optionnel: si tu veux un poil moins d'air encore */
@supports (gap: 1px) {
    #stationCount::after {
        margin: 0 .25ch;
    }
}

/* 1) La barre de stats de la liste doit coller sous le header global sur desktop */
.list-header {
    top: var(--header-h);
    /* au lieu de 0 */
    z-index: 11;
    /* passe au-dessus du contenu de la liste */
}

/* 2) Sur desktop (vue carte hybride), pousse le bouton "Rechercher dans cette zone"
      sous le header global pour qu’il reste visible */
@media (min-width: 1024px) {
    .view-mode-carte .refresh-area {
        top: calc(var(--header-h) + 12px);
        /* header (72px) + marge habituelle */
    }
}

/* Sur mobile le header est masqué ⇒ on garde le top habituel */
@media (max-width: 1023px) {
    .refresh-area {
        top: 12px;
    }

    .list-header {
        top: 0;
    }

    /* pas de header global sur mobile */
}

/* === FIX bande invisible sous le header + bouton Map masqué === */
.list-header {
    top: 0 !important;
    /* colle la barre de stats en haut de la LISTE (sous le header) */
    z-index: 10 !important;
    /* passe devant le contenu de la liste */
}

/* le bouton "Rechercher dans cette zone" n'a pas besoin d'offset header */
.refresh-area {
    top: 12px !important;
}

/* par sécurité : sur desktop comme mobile, même règle */
@media (min-width:1024px) {
    .filters-panel {
        position: fixed !important;
        /* évite de passer derrière le header */
        top: 76px !important;
        /* juste sous la barre */
        right: 16px;
        width: 300px;
        z-index: 4000;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
        padding: 12px;
    }

    .filters-panel[hidden] {
        display: none !important;
    }

    .view-mode-carte .refresh-area {
        top: 12px !important;
    }
}

/* ===== Header v2 (desktop) ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 3200;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.header__toolbar,
.header__sub {
    max-width: 1200px;
    margin: 0 auto;
}

.header__toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
}

.searchbar {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 6px 8px;
    background: #fff;
}

.searchbar input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 15px;
}

.icon-btn {
    border: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.icon-btn.primary {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.seg-group {
    display: inline-flex;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.seg-group .seg {
    border: 0;
    background: #fff;
    padding: 8px 12px;
    font-weight: 700;
}

.seg-group .seg.active {
    background: #111827;
    color: #fff;
}

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: #4f46e5;
}

.header__sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px 10px;
}

.header__pills .pill {
    padding: 6px 10px;
    font-size: 12px;
}

.header__summary .summary {
    font-size: 12px;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Popover un poil plus bas sous la barre */
@media (min-width:1024px) {
    .filters-panel {
        top: 74px;
        right: 12px;
    }
}

/* Mobile : ne rien changer (header déjà masqué) */
@media (max-width:1023px) {
    .header {
        display: none;
    }
}

:root {
    --bg: #0B0D12;
    /* si tu as déjà, garde tes variables */
    --panel: #ffffff;
    --muted: #6b7280;
    --text: #0f172a;
    --accent: #4f46e5;
    /* indigo */
    --ring: rgba(79, 70, 229, .35);
    --glass: rgba(255, 255, 255, .75);
    --border: rgba(0, 0, 0, .08);
}

.neo-header {
    position: sticky;
    top: 0;
    z-index: 3200;
    backdrop-filter: saturate(1.2) blur(10px);
    background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .65));
    border-bottom: 1px solid #eef2f7;
}

.neo-header.scrolled {
    box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
}

.neo-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.neo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.neo-logo {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: conic-gradient(from 180deg, #22d3ee, #4f46e5, #f472b6, #22d3ee);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9), 0 4px 12px rgba(79, 70, 229, .35);
}

.neo-title {
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--text);
}

.neo-search {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 10px;
}

.neo-fuel select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
}

.neo-search input {
    border: 0;
    outline: 0;
    padding: 10px 6px;
    font-size: 15px;
    background: transparent;
}

.icon-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}

.icon-btn:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.icon-btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.neo-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.seg-group {
    display: inline-flex;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.seg-group .seg {
    border: 0;
    padding: 8px 12px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.seg-group .seg.active {
    background: #111827;
    color: #fff;
}

.seg-group .seg:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.btn.ghost {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: var(--accent);
}

.neo-sub {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.neo-summary {
    color: #111827bf;
    font-size: 13px;
}

.neo-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.chip[aria-pressed="true"] {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

/* Accessibilité (screen readers only) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive : en dessous de 1024px, on empile proprement */
@media (max-width: 1024px) {
    .neo-bar {
        grid-template-columns: 1fr;
    }

    .neo-actions {
        justify-content: space-between;
    }

    .neo-sub {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Panneau filtres (desktop) au-dessus du header */
@media (min-width: 1024px) {
    .filters-panel {
        position: fixed;
        /* était absolute -> peut passer derrière */
        top: 76px;
        /* juste sous la barre */
        right: 16px;
        width: 300px;
        z-index: 4000;
        /* > header */
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
        padding: 12px;
    }

    .filters-panel[hidden] {
        display: none !important;
    }
}

/* — Cartes toujours ouvertes — */
.station-card .station-details {
    display: block !important;
}

/* — Fin du zébrage / segmentation — */
#stationsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#stationsContainer .station-card:nth-child(2n) {
    background: #fff !important;
}

/* — Style de carte plus léger — */
.station-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 12px;
}

.station-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.station-details {
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.station-services {
    max-height: 24px;
    overflow: hidden;
}

/* — Flash visuel quand une carte est ciblée depuis la carte — */
.station-card.focus {
    outline: 2px solid #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .15);
}

/* Cartes toujours ouvertes */
.station-card .station-details {
    display: block !important;
}

/* Layout liste moderne */
#stationsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#stationsContainer .station-card:nth-child(2n) {
    background: #fff !important;
}

/* Carte */
.station-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 12px;
    transition: transform .06s ease, box-shadow .18s ease;
    font-variant-numeric: tabular-nums;
}

.station-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}

.station-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 10px;
}

.station-details {
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.station-name {
    font-weight: 600;
}

.station-location {
    font-size: 12.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-price-star .price-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.station-price-star .fuel-type {
    font-size: 12px;
    opacity: .8;
}

.station-price-star .fuel-price {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .2px;
}

.station-prices {
    margin-top: 2px;
}

.station-price-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.station-prices-all {
    display: block;
    margin-top: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
}

.price-item.small .fuel-type {
    font-size: 12px;
    opacity: .8;
}

.price-item.small .fuel-price {
    font-size: 12px;
}

.link-btn {
    border: 0;
    background: transparent;
    padding: 4px 8px;
    cursor: pointer;
    color: #4f46e5;
    font-weight: 700;
    text-decoration: underline;
    font-size: 13px;
}

.link-btn:hover {
    text-decoration: none;
}

.service-tag.muted {
    opacity: .7;
    border-style: dashed;
}

.distance-chip {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    color: #0f172a;
}

/* Focus visuel quand on vient de la carte */
.station-card.focus {
    outline: 2px solid #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .15);
}

/* Panneau filtres (desktop) au-dessus du header) – pour éviter tout conflit */
@media (min-width: 1024px) {
    .filters-panel {
        position: fixed !important;
        top: 76px !important;
        right: 16px;
        width: 300px;
        z-index: 4000;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
        padding: 12px;
    }

    .filters-panel[hidden] {
        display: none !important;
    }
}

/* ===== Prix star typographié ===== */
.station-card {
    font-variant-numeric: tabular-nums;
}

.price-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fuel-type {
    font-size: 12px;
    color: #475569;
}

.fuel-price {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.price-int {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #0f172a;
}

.price-dec {
    font-size: 16px;
    font-weight: 700;
    opacity: .9;
    transform: translateY(.5px);
}

.price-eur {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-left: 2px;
}

.price-miss {
    color: #94a3b8;
}

/* ===== Lien toggle “tous carburants” (chevron) ===== */
.link-btn {
    border: 0;
    background: transparent;
    padding: 4px 0;
    cursor: pointer;
    color: #4f46e5;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-btn .chev {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
    transition: transform .18s ease;
    opacity: .9;
}

.link-btn.open .chev {
    transform: rotate(45deg);
}

/* ===== CTA allégés ===== */
.station-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.action-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.action-btn.btn-navigate {
    background: #2b3037;
    color: #fff;
    border: 0;
    border-radius: 9999px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, .3); */
}

.action-btn.btn-map {
    background: #fff;
    color: #0f172a;
    border-color: #e5e7eb;
}

.action-btn:hover {
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

/* ===== Chips services plus neutres ===== */
.service-tag {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
}

.service-tag.muted {
    opacity: .7;
    border-style: solid;
}

/* enlève le pointillé */

/* ===== Badges plus subtils ===== */
.competitiveness-badge {
    background: #0f172a0d;
    color: #0f172a;
    border: 1px solid #e5e7eb;
}

.station-rank {
    background: #0f172a0d;
    color: #0f172a;
}

/* Détails & séparations */
.station-details {
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.station-location {
    color: #64748b;
    font-size: 12.5px;
}

.distance-chip {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    color: #0f172a;
}

/* =========================
   Palette sémantique rang / qualité
   ========================= */
:root {
    /* Médailles */
    --medal-gold-1: #f59e0b;
    --medal-gold-2: #fbbf24;
    --medal-gold-text: #7c5800;
    --medal-silver-1: #cbd5e1;
    --medal-silver-2: #94a3b8;
    --medal-silver-text: #334155;
    --medal-bronze-1: #f59e0b;
    --medal-bronze-2: #b45309;
    --medal-bronze-text: #6b3d05;

    /* Pills qualité */
    --q-best: #16a34a;
    /* Meilleur (vert) */
    --q-excellent: #22c55e;
    /* Excellent (vert clair) */
    --q-verygood: #06b6d4;
    /* Très bon (cyan) */
    --q-good: #3b82f6;
    /* Bon (bleu) */
    --q-average: #94a3b8;
    /* Moyen (slate) */
}

/* =========================
   Rang (médailles)
   ========================= */
.station-rank {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 1px 2px rgba(15, 23, 42, .08);
    font-variant-numeric: tabular-nums;
}

.station-rank.rank-1 {
    color: var(--medal-gold-text);
    background: linear-gradient(180deg, var(--medal-gold-1), var(--medal-gold-2));
}

.station-rank.rank-2 {
    color: var(--medal-silver-text);
    background: linear-gradient(180deg, var(--medal-silver-1), var(--medal-silver-2));
}

.station-rank.rank-3 {
    color: var(--medal-bronze-text);
    background: linear-gradient(180deg, #f2a15a, var(--medal-bronze-2));
}

.station-rank.rank-top {
    color: #0f172a;
    background: #e0f2fe;
    /* bleu très doux */
    box-shadow: inset 0 0 0 1px #bae6fd;
}

.station-rank.rank-average {
    color: #334155;
    background: #e2e8f0;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

/* =========================
   Pills de compétitivité
   ========================= */
.competitiveness-badge {
    height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
    font-size: 11px;
    border: 1px solid transparent;
}

.competitiveness-badge.badge-best {
    color: #065f46;
    background: color-mix(in srgb, var(--q-best) 10%, #fff);
    border-color: color-mix(in srgb, var(--q-best) 30%, #fff);
}

.competitiveness-badge.badge-excellent {
    color: #065f46;
    background: color-mix(in srgb, var(--q-excellent) 10%, #fff);
    border-color: color-mix(in srgb, var(--q-excellent) 30%, #fff);
}

.competitiveness-badge.badge-verygood {
    color: #0e7490;
    background: color-mix(in srgb, var(--q-verygood) 10%, #fff);
    border-color: color-mix(in srgb, var(--q-verygood) 30%, #fff);
}

.competitiveness-badge.badge-good {
    color: #1e3a8a;
    background: color-mix(in srgb, var(--q-good) 10%, #fff);
    border-color: color-mix(in srgb, var(--q-good) 30%, #fff);
}

.competitiveness-badge.badge-average {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* ===== Header en 3 colonnes : Prix | Info | Badge ===== */
.station-header--price-first {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    /* largeur fixe pour aligner les prix */
    grid-column-gap: 14px;
    align-items: center;
}

/* Prix = point focal */
.station-price-star {
    justify-self: start;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.station-price-star .price-int {
    font-size: 22px;
    font-weight: 800;
}

.station-price-star .price-dec {
    font-size: 16px;
    font-weight: 700;
}

.station-price-star .price-eur {
    font-size: 12px;
    font-weight: 700;
}

/* Info = secondaire */
.station-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.station-location {
    font-size: 12.5px;
    color: #64748b;
}

/* Badge & distance = tertiaires (petits, à droite) */
.station-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.competitiveness-badge {
    transform: translateY(-1px);
}

.price-delta {
    margin-top: 4px;
    font-size: 11.5px;
    color: #64748b;
}

.price-delta.neg {
    color: #059669;
}

/* bon signe = vert doux */
.price-delta.pos {
    color: #b91c1c;
}

/* moins bon = rouge doux */

/* ===== Aération générale ===== */
.station-card.price-first {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

@media (min-width: 1024px) {
    .station-card.price-first {
        padding: 20px;
    }
}

.station-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* ===== Header "price-first" : Prix | Infos | Décor ===== */
.station-header--price-first {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    /* colonne prix stable */
    gap: 14px;
    align-items: center;
}

/* Prix = principal (24–28px) + delta dessous */
.price-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fuel-type {
    font-size: 12px;
    color: #475569;
}

.fuel-price {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.price-int {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #0f172a;
}

.price-dec {
    font-size: 18px;
    font-weight: 700;
    opacity: .9;
    transform: translateY(.5px);
}

.price-eur {
    font-size: 12px;
    font-weight: 700;
    margin-left: 2px;
    color: #0f172a;
}

@media (min-width:1280px) {
    .price-int {
        font-size: 26px;
    }

    .price-dec {
        font-size: 18px;
    }
}

.price-delta {
    font-size: 12.5px;
    color: #64748b;
}

.price-delta.neg {
    color: #059669;
}

/* mieux que médiane */
.price-delta.pos {
    color: #b91c1c;
}

/* pire que médiane */
.price-miss {
    color: #94a3b8;
}

/* Infos = secondaire (16–18 / 12–14) */
.station-name {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

@media (min-width:1280px) {
    .station-name {
        font-size: 17px;
    }
}

.station-location {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Distance chip */
.distance-chip {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    color: #0f172a;
}

/* ===== Rang : médailles top-3 uniquement ===== */
.station-deco {
    display: flex;
    align-items: center;
    gap: 8px;
}

.station-rank {
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 800;
    color: #111827;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 1px 2px rgba(15, 23, 42, .08);
}

.station-rank.rank-1 {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
    color: #7c5800;
}

.station-rank.rank-2 {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    color: #334155;
}

.station-rank.rank-3 {
    background: linear-gradient(180deg, #f2a15a, #b45309);
    color: #6b3d05;
}

/* ===== Lien "tous carburants" (toggle chevron) ===== */
.link-btn {
    border: 0;
    background: transparent;
    padding: 4px 0;
    cursor: pointer;
    color: #4f46e5;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-btn .chev {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
    transition: transform .18s ease;
    opacity: .9;
}

.link-btn.open .chev {
    transform: rotate(45deg);
}

/* ===== Chips services neutres ===== */
.service-tag {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
}

.service-tag.muted {
    opacity: .7;
}

/* ===== Actions : CTA principal (filled) / secondaire (outline) ===== */
.station-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    height: 40px;
    /* desktop */
}

@media (max-width: 640px) {
    .action-btn {
        height: 44px;
    }
}

/* 44px mini mobile */

.action-btn[data-variant="primary"] {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 6px 14px rgba(16, 185, 129, .18);
}

.action-btn[data-variant="primary"]:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.action-btn[data-variant="outline"] {
    background: #fff;
    color: #0f172a;
    border-color: #e5e7eb;
}

.action-btn[data-variant="outline"]:hover {
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

/* Petits raffinements */
.station-card.price-first:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}

/* ===== Aération & structure ===== */
.station-card.price-first {
    padding: 20px;
    /* 16–20px min */
    border-radius: 14px;
    border: 1px solid #eef2f7;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.station-details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

/* 12–16px */

/* ===== Header price-first : Prix | Infos ; la médaille ne prend plus de colonne ===== */
.station-header--price-first {
    position: relative;
    /* pour positionner la médaille en absolu */
    display: grid;
    grid-template-columns: 180px 1fr;
    /* 2 colonnes : prix fixe + infos */
    gap: 14px;
    align-items: center;
}

/* ===== Prix : point focal (24–28 px) ===== */
.price-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fuel-type {
    font-size: 12px;
    color: #475569;
}

.fuel-price {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.price-int {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #0f172a;
}

/* 24–28px */
.price-dec {
    font-size: 18px;
    font-weight: 700;
    opacity: .95;
    transform: translateY(.5px);
}

.price-eur {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-left: 2px;
}

.price-miss {
    color: #94a3b8;
}

/* Delta juste sous le prix */
.price-delta {
    font-size: 12.5px;
}

.price-delta.neg {
    color: #059669;
}

/* mieux que médiane */
.price-delta.neutral {
    color: #64748b;
}

/* ~ pareil */
.price-delta.pos {
    color: #b91c1c;
}

/* moins bien */

/* ===== Infos station (secondaire) ===== */
.station-name {
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
}

/* 16–18px */
.station-location {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Distance chip */
.distance-chip {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    color: #0f172a;
}

/* ===== Médailles top 3 : ne prennent pas de place dans la grille ===== */
.station-deco {
    position: absolute;
    top: 8px;
    right: 12px;
}

/* flotte dans le coin */
.station-rank {
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 800;
    color: #111827;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 1px 2px rgba(15, 23, 42, .08);
}

.station-rank.rank-1 {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
    color: #7c5800;
}

.station-rank.rank-2 {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    color: #334155;
}

.station-rank.rank-3 {
    background: linear-gradient(180deg, #f2a15a, #b45309);
    color: #6b3d05;
}

/* ===== Lien “Voir tous les carburants” (toggle) ===== */
.link-btn {
    border: 0;
    background: transparent;
    padding: 4px 0;
    cursor: pointer;
    color: #4f46e5;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-btn .chev {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
    transition: transform .18s ease;
    opacity: .9;
}

.link-btn.open .chev {
    transform: rotate(45deg);
}

/* ===== CTA : principal filled, secondaire outline, sans s’étirer sur desktop ===== */
.station-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.station-actions .action-btn {
    flex: 0 0 auto !important;
}

/* ⬅️ empêche l’étirement vu sur la capture */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    height: 40px;
    /* desktop */
}

@media (max-width:640px) {
    .station-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        height: 44px;
    }

    /* 44px touch target mobile */
}

.action-btn[data-variant="primary"] {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 6px 14px rgba(16, 185, 129, .18);
}

.action-btn[data-variant="primary"]:hover {
    filter: brightness(.98);
    transform: translateY(-1px);
}

.action-btn[data-variant="outline"] {
    background: #fff;
    color: #0f172a;
    border-color: #e5e7eb;
}

.action-btn[data-variant="outline"]:hover {
    box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

@media (min-width:1440px) {
    .price-int {
        font-size: 28px;
    }

    .price-dec {
        font-size: 20px;
    }
}

/* =======================
   Mobile Zen-park style
   ======================= */
@media (max-width:1023px) {
    .map-view {
        position: relative;
    }

    /* Overlay top : barre + bouton "rechercher dans cette zone" */
    .mb-topbar {
        position: absolute;
        z-index: 400;
        top: 8px;
        left: 8px;
        right: 8px;
        display: grid;
        gap: 8px;
    }

    .mb-searchbar {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 6px 8px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
    }

    .mb-searchbar input {
        flex: 1 1 auto;
        height: 34px;
        border: 0;
        outline: 0;
        font-size: 14px;
    }

    .sb-btn {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #fff;
        color: #111827;
    }

    .sb-btn:active {
        transform: translateY(1px);
    }

    /* Le bouton "rechercher dans cette zone" est juste sous la barre */
    .mb-topbar .refresh-area {
        position: static;
        /* enlève le positionnement absolu par défaut */
        justify-self: center;
        height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
    }

    /* Bouton “Vue liste” en bas de la carte */
    .mb-list-overlay {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 12px;
        z-index: 400;
        height: 38px;
        padding: 0 14px;
        border: 0;
        border-radius: 999px;
        background: #111827;
        color: #fff;
        font-weight: 800;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    }

    /* On masque ce bouton quand on est déjà en mode liste */
    .main-container.view-mode-list .mb-list-overlay {
        display: none;
    }

    /* Sécurise la carte : hauteur minimale stable */
    #map {
        min-height: 360px;
    }
}

/* =======================
   Mobile : header masqué + hauteurs corrigées
   ======================= */
:root {
    --tabbar-h: 58px;
}

@media (max-width:1023px) {

    /* 1) Cacher le header */
    .neo-header {
        display: none !important;
    }

    /* 2) Le conteneur principal prend tout l'écran (moins la tabbar) */
    .main-container {
        /* on ne soustrait plus --header-h */
        height: calc(100svh - var(--tabbar-h));
        padding: 0;
        /* pas d’espace inutile en haut */
    }

    /* 3) Carte : pleine hauteur sous la topbar + au-dessus de la tabbar */
    .map-view {
        height: calc(100svh - var(--tabbar-h) - env(safe-area-inset-bottom));
    }

    #map {
        height: 100%;
        min-height: 360px;
        /* filet pour petits écrans */
    }

    /* 4) Positionnement “Zenpark” de la topbar (respecte l’encoche) */
    .mb-topbar {
        top: calc(8px + env(safe-area-inset-top));
    }

    /* 5) Mode liste : pleine hauteur sous la topbar et au-dessus de la tabbar */
    .main-container.view-mode-list .list-view {
        height: calc(100svh - var(--tabbar-h) - env(safe-area-inset-bottom));
        overflow: auto;
    }

    /* 6) Option recommandé : masquer le panneau filtres desktop en mobile */
    #filtersPanel {
        display: none !important;
    }
}

/* Mobile : centrer "Rechercher dans cette zone" sous la barre */
@media (max-width:1023px) {

    /* La topbar mobile devient une grille 1 colonne qui centre ses enfants */
    .mb-topbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        justify-items: center;
        /* centre horizontalement */
    }

    /* Le bouton se comporte comme un bloc centré (plus d'absolu ici) */
    .mb-topbar .refresh-area {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;

        justify-self: center;
        margin: 0 auto;
        height: 34px;
        /* match la barre au-dessus */
        padding: 0 12px;
        border-radius: 999px;
    }
}

@media (max-width:1023px) {
    .map-view>.refresh-area {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 56px;
        /* ajuste pour qu’il soit juste sous la barre */
    }
}

/* =======================
   Mobile : topbar large, zoom +/- caché, pas de menu bas
   ======================= */
@media (max-width:1023px) {

    /* Barre de recherche : bord à bord (gauche/droite) et un peu plus haute */
    .mb-topbar {
        left: 12px;
        right: 12px;
        gap: 10px;
        /* un peu d'air entre barre et bouton */
    }

    .mb-searchbar {
        padding: 8px 10px;
        border-radius: 16px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
    }

    .mb-searchbar input {
        font-size: 15px;
        /* meilleure lisibilité */
    }

    .sb-btn {
        /* icônes réglages + locate compactes mais cliquables */
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    /* Centrer le bouton "Rechercher dans cette zone" sous la barre */
    .mb-topbar {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .mb-topbar .refresh-area {
        position: static !important;
        transform: none !important;
        height: 34px;
        padding: 0 14px;
        border-radius: 999px;
        margin: 0 auto;
    }

    /* Cacher les contrôles de zoom +/- de Leaflet */
    .leaflet-control-zoom {
        display: none !important;
    }

    /* Cacher le menu bas (tabbar mobile) */
    .mobile-tabbar {
        display: none !important;
    }
}

/* =======================
   Mobile : liste visible en mode "liste"
   ======================= */
@media (max-width:1023px) {

    /* Montre la liste et masque la carte quand on est en vue liste */
    .main-container.view-mode-list .list-view {
        display: block !important;
        height: calc(100svh - env(safe-area-inset-bottom));
        overflow: auto;
    }

    .main-container.view-mode-list .map-view {
        display: none !important;
    }

    /* Ceinture + bretelles : si un vieux "display:none !important" traîne */
    .list-view {
        display: block;
    }
}

/* ================
   Mobile : vue liste visible et carte cachée
   ================ */
@media (max-width:1023px) {

    /* Affiche la liste quand on est en vue liste… */
    .main-container.view-mode-list .list-view {
        display: block !important;
        height: calc(100svh - env(safe-area-inset-bottom));
        overflow: auto;
        background: #fff;
    }

    /* …et cache la carte */
    .main-container.view-mode-list .map-view {
        display: none !important;
    }

    /* Ceinture + bretelles : si une règle globale masquait la liste */
    .list-view {
        display: block;
    }
}

/* ——— Mobile: bouton flottant pour basculer Liste/Carte ——— */
.view-toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    z-index: 960;
    background: #0f172a;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
}

.view-toggle:active {
    transform: translateX(-50%) scale(.98);
}

/* Cache le bouton sur desktop */
@media (min-width:1024px) {
    .view-toggle {
        display: none;
    }
}

/* Sécurité : en vue liste, la colonne liste doit s'afficher */
.view-mode-list .list-view {
    display: block;
}

.view-mode-list .map-view {
    display: none;
}

/* Bouton bascule : pas sur la home */
.home .view-toggle {
    display: none !important;
}

/* Supprimer le menu bas "Rechercher / Liste / Carte" partout */
.mobile-tabbar {
    display: none !important;
}

/* Sécurité : en vue liste on voit la liste, la carte est cachée (mobile & desktop) */
.view-mode-list .list-view {
    display: block !important;
}

.view-mode-list .map-view {
    display: none !important;
}

/* =========================
   LISTE — Responsive mobile
   ========================= */
@media (max-width: 480px) {

    /* Conteneur liste : marge basse pour laisser respirer le bas d’écran */
    .stations-container {
        padding: 12px 10px 80px;
        gap: 10px;
    }

    /* Carte station : compacter un peu */
    .station-card.price-first {
        padding: 14px;
        border-radius: 14px;
    }

    /* Header de carte : passer d'un 2-col à un empilement vertical */
    .station-header--price-first {
        display: grid;
        grid-template-columns: 1fr !important;
        /* override largeur fixe desktop */
        grid-template-areas:
            "price"
            "info"
            "badge";
        gap: 10px;
        align-items: start;
    }

    .station-header--price-first .station-price-star {
        grid-area: price;
    }

    .station-header--price-first .station-info {
        grid-area: info;
    }

    .station-header--price-first .station-badges {
        grid-area: badge;
        position: static !important;
        justify-self: end;
    }

    /* Typo du prix + compacité */
    .price-int {
        font-size: 22px;
    }

    .price-dec {
        font-size: 14px;
    }

    .price-eur {
        font-size: 11px;
    }

    /* Titre + méta */
    .station-name {
        font-size: 16px;
    }

    .station-location {
        font-size: 12.5px;
        white-space: normal;
        /* autoriser wrap sur plusieurs lignes */
    }

    .distance-chip {
        font-size: 12px;
    }

    /* Détails */
    .station-details {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--soft);
    }

    /* Pills carburant : compactes et wrap correct */
    .station-fuels {
        gap: 6px;
    }

    .fuel-pill {
        padding: 5px 8px;
        font-size: 12px;
    }

    /* Actions : empilées et plein largeur (44px mini) */
    .station-actions {
        flex-direction: column;
        gap: 8px;
    }

    .station-actions .action-btn {
        width: 100%;
        height: 44px;
    }

    /* En-tête de liste un peu plus compact */
    .list-header {
        padding: 10px;
    }

    .list-header h2 {
        font-size: 18px;
        margin: 0;
    }

    .list-header .list-stats,
    .list-sub {
        font-size: 12.5px;
    }
}

/* Sécurité : si une règle ailleurs force le layout desktop,
   ces deux lignes garantissent le bon affichage en vue liste */
.view-mode-list .list-view {
    display: block !important;
}

.view-mode-list .map-view {
    display: none !important;
}

/* ==========
   Boutons flottants mobile
   ========== */
@media (max-width:1023px) {

    /* Fab générique */
    .mb-fab {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 12px;
        z-index: 960;
        height: 38px;
        padding: 0 14px;
        border: 0;
        border-radius: 999px;
        background: #0f172a;
        color: #fff;
        font-weight: 800;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    }

    /* Vue CARTE : on montre le bouton "Vue liste" (existant) et on cache "Vue carte" */
    .main-container.view-mode-carte #mbToggleView {
        display: inline-flex !important;
    }

    .main-container.view-mode-carte #mbToggleViewList {
        display: none !important;
    }

    /* Vue LISTE : on montre "Vue carte" et on cache "Vue liste" */
    .main-container.view-mode-list #mbToggleView {
        display: none !important;
    }

    .main-container.view-mode-list #mbToggleViewList {
        display: inline-flex !important;
    }

    /* Pas de bouton sur la Home */
    .home #mbToggleView,
    .home #mbToggleViewList {
        display: none !important;
    }

    /* Espace pour ne pas chevaucher le bouton en bas de la liste */
    .main-container.view-mode-list .stations-container {
        padding-bottom: 84px;
        /* laisse passer le FAB */
    }
}

/* Ceinture+bretelles : s'assurer que la liste s'affiche bien en vue liste */
.view-mode-list .list-view {
    display: block !important;
}

.view-mode-list .map-view {
    display: none !important;
}


/* ——— FAB mobile “Vue carte” quand on est dans la liste ——— */
.view-toggle--list {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(16px, env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 960;
    background: #0f172a;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
}

/* Le bouton ne vit que sur mobile */
@media (min-width: 1024px) {
    .view-toggle--list {
        display: none !important;
    }
}

/* Sécurité : on montre/masque bien les vues selon l’état */
.view-mode-list .list-view {
    display: block;
}

.view-mode-list .map-view {
    display: none;
}

/* ======= FIX VUE LISTE ======= */
/* 1) En vue liste, on neutralise totalement la grille */
.main-container.view-mode-list {
    display: block !important;
    /* au lieu de grid */
    grid-template-columns: none !important;
    padding: 0;
    /* pas de padding parasite */
}

/* 2) La liste prend toute la largeur ; la carte est cachée */
.main-container.view-mode-list .list-view {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    border-left: 0;
    /* évite un “décalage” à gauche */
}

.main-container.view-mode-list .map-view {
    display: none !important;
}

/* 3) Pas de débordement horizontal en liste */
.view-mode-list,
.view-mode-list .list-view,
.view-mode-list .stations-container {
    overflow-x: hidden;
}

/* 4) Le header de la liste occupe bien 100% */
.view-mode-list .list-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* 5) Mobile : on s'assure de la hauteur et d’un espace pour le FAB "Vue carte" */
@media (max-width:1023px) {
    .main-container.view-mode-list {
        height: 100svh;
        /* plein écran */
    }

    .main-container.view-mode-list .stations-container {
        padding-bottom: 84px;
        /* pour le bouton flottant */
    }
}

/* === Helpers visibilité === */
.only-mobile {
    display: none;
}

.only-desktop {
    display: block;
}

@media (max-width:1023px) {
    .only-mobile {
        display: block;
    }

    .only-desktop {
        display: none !important;
    }
}

/* === Topbar mobile pour la LISTE (collée en haut, non overlay) === */
@media (max-width:1023px) {
    /* Existing rules from previous @media (max-width:1023px) blocks */

    .list-view {
        background: #fff;
    }

    .mb-topbar-list {
        position: sticky;
        top: env(safe-area-inset-top, 0px);
        z-index: 60;
        padding: 8px 12px;
        background: #ffffff;
        border-bottom: 1px solid #eef2f7;
    }

    .mb-topbar-list .mb-searchbar {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid var(--border, #eef2f7);
        border-radius: 14px;
        padding: 8px 10px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .10);
    }

    .mb-topbar-list .mb-searchbar input {
        flex: 1 1 auto;
        height: 36px;
        border: 0;
        outline: 0;
        font-size: 15px;
    }

    .mb-topbar-list .sb-btn {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        border: 1px solid var(--border, #eef2f7);
        border-radius: 12px;
        background: #fff;
        color: #111827;
    }

    /* un peu d'air sous la topbar avant la liste */
    .stations-container {
        padding-top: 8px;
    }

    /* All other rules from previous @media (max-width:1023px) blocks go here, in order, without loss */
}

/* =========================
   Panneau inline (mobile)
   ========================= */
@media (max-width:1023px) {
    .mb-inline-panel {
        background: #fff;
        border: 1px solid var(--border, #eef2f7);
        border-radius: 14px;
        padding: 10px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
        display: block;
        opacity: 0;
        transform: scale(0.98);
        transition: opacity .15s ease, transform .15s ease;
    }

    .mb-inline-panel.open {
        opacity: 1;
        transform: scale(1);
    }

    .panel-row {
        margin-bottom: 10px;
    }

    .panel-row:last-child {
        margin-bottom: 0;
    }

    .row-label {
        font: 600 12px/1.2 Inter, system-ui;
        color: #475569;
        margin-bottom: 6px;
    }

    .svc-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        font-size: 13px;
    }

    .slider-line {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .slider-line input[type="range"] {
        flex: 1 1 auto;
    }

    .slider-line .slider-val {
        width: 52px;
        text-align: right;
        font-weight: 700;
    }

    .btn-block {
        width: 100%;
        height: 44px;
    }
}

/* === Mobile topbars / searchbars === */
.only-mobile {
    display: none;
}

.only-desktop {
    display: block;
}

@media (max-width: 1023px) {
    .only-mobile {
        display: block;
    }

    .only-desktop {
        display: none;
    }

    .mb-topbar,
    .mb-searchbar {
        position: relative;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        align-items: center;
        padding: 8px 12px;
        margin: 10px 10px 0;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 6px 20px rgba(18, 38, 63, .12);
        z-index: 30;
    }

    .mb-topbar input,
    .mb-searchbar input {
        width: 100%;
        border: none;
        outline: none;
        height: 40px;
        border-radius: 10px;
        padding: 0 10px;
        background: #f5f7fb;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        border: 0;
        background: #f1f3f9;
    }

    /* Panneau inline sous la barre (LISTE) */
    .mb-inline-panel {
        position: relative;
        margin: 8px 10px 0;
        padding: 12px;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 10px 30px rgba(18, 38, 63, .14);
        z-index: 29;
    }

    .mb-panel-row {
        margin-bottom: 12px;
    }

    .mb-panel-row label {
        display: block;
        font-size: 13px;
        color: #5a6;
        margin-bottom: 6px;
    }

    .mb-panel-actions {
        display: flex;
        justify-content: flex-end;
    }

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

    .pill {
        padding: 6px 10px;
        border-radius: 999px;
        background: #eef1f7;
        font-size: 13px;
        cursor: pointer;
    }

    .pill.active {
        background: #1f53ff;
        color: #fff;
    }

    .chip {
        padding: 6px 10px;
        border-radius: 999px;
        background: #f3f5fa;
        font-size: 12px;
    }

    .chips.muted {
        display: flex;
        gap: 8px;
    }

    .inline-value {
        font-size: 12px;
        color: #667;
        margin-top: 4px;
    }

    /* FAB */
    .mb-fab {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
        min-width: 140px;
        height: 44px;
        padding: 0 14px;
        border: 0;
        border-radius: 999px;
        background: #0b122b;
        color: #fff;
        font-weight: 600;
        box-shadow: 0 10px 30px rgba(18, 38, 63, .28);
        z-index: 40;
    }
}

/* Map – masque les contrôles +/- sur mobile */
@media (max-width: 1023px) {
    .leaflet-control-zoom {
        display: none !important;
    }
}

/* Conteneur liste responsive plein écran sur mobile */
@media (max-width: 1023px) {
    .main-container.view-mode-list .list-view {
        display: block;
        width: 100%;
    }

    .stations-container {
        padding: 8px 10px 80px;
    }

    /* marge basse pour la FAB */
}

/* Mobile : carte par défaut, header global masqué */
@media (max-width: 768px) {
    body:not(.home) .neo-header {
        display: none;
    }

    .main-container {
        display: block;
    }

    .map-view,
    .list-view {
        width: 100%;
    }

    .view-mode-carte .list-view {
        display: none;
    }

    .view-mode-list .map-view {
        display: none;
    }

    /* Barre recherche mobile + panneau */
    .mb-topbar {
        padding: 12px;
    }

    .mb-searchbar {
        display: flex;
        gap: 8px;
        align-items: center;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 6px 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    }

    .mb-searchbar input {
        flex: 1;
        border: none;
        outline: none;
        font-size: 15px;
        min-width: 0;
        background: transparent;
    }

    .sb-btn {
        min-width: 36px;
        height: 36px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        background: #fff
    }

    .sb-settings {
        font-weight: 700
    }

    .mb-inline-panel[hidden] {
        display: none
    }

    .mb-inline-panel {
        margin-top: 10px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 12px;
        box-shadow: 0 8px 30px rgba(16, 24, 40, .08);
    }

    .panel-row {
        display: grid;

        gap: 8px;
        align-items: center;
        margin: 10px 0
    }

    .row-label {
        font-size: 12px;
        color: #64748b
    }

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

    .pills .pill {
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        padding: 6px 10px;
        font-size: 13px;
        background: #fff
    }

    .pills .pill.active {
        background: #000000;
        border-color: #000000
    }

    .svc-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        font-size: 13px
    }

    .slider-line {
        display: flex;
        align-items: center;
        gap: 10px
    }

    .slider-line input[type=range] {
        flex: 1
    }

    .slider-val {
        font-variant-numeric: tabular-nums
    }

    /* Boutons Vue liste / Vue carte */
    .view-toggle {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: 30px;
        z-index: 500;
        padding: 10px 14px;
        border-radius: 16px;
        border: 1px solid #0f172a;
        background: #0b1324;
        color: #fff;
        box-shadow: 0 10px 24px rgba(2, 6, 23, .2);
        min-width: 50%;
    }

    /* “Rechercher dans cette zone” centré */
    #btnRefreshArea {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 12px;
    }

    /* Cache les +/− leaflet */
    .leaflet-control-zoom {
        display: none !important;
    }
}

/* === HOME – RESET SIMPLE & STABLE (override final) ======================= */
body.home {
    /* on évite les centres/grid agressifs qui cassent selon device */
    display: block !important;
    min-height: 100svh;
    background: linear-gradient(160deg, #d97828, #fad74e);
}

/* conteneur violet */
.home .hero-wrap {
    width: min(1080px, 100%);
    margin-inline: auto;
    padding: 16px;
}

/* Titre + sous-titre basés sur ta structure actuelle */
.home .hero h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(28px, 3.2vw + 14px, 42px);
    line-height: 1.1;
    text-align: center;
    margin-bottom: 8px;
}

.home .hero-sub {
    color: #f3f4f6;
    text-align: center;
    margin: 6px 0 16px;
}

/* Bloc recherche de la home */
.home .hero-search {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 18px 45px rgba(17, 24, 39, .18);
    display: grid;
    gap: 12px;
}

/* Pills carburants */
.home .hero-search .pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Barre de recherche */
.home .hero-searchbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.home .hero-searchbar input[type="search"] {
    flex: 1 1 auto;
    height: 46px;
    border: 2px solid #e9e9f6;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 16px;
    background: #f7f7fb;
    outline: none;
}

/* Boutons de la barre */
.home .hero-searchbar .pill,
.home .hero-searchbar .btn.primary {
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 12px;
    font-weight: 700;
}

/* Toggle Liste/Carte */
.home .seg-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.home .seg-toggle .seg {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    background: #fff;
}

.home .seg-toggle .seg.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

/* Mobile : occuper l’écran proprement sans vides */
@media (max-width: 1023px) {
    .home .hero-wrap {
        min-height: 100svh;
    }

    .home .hero-search {
        border-radius: 14px;
        gap: 10px;
    }

    .home .hero-searchbar {
        flex-direction: column;
        align-items: stretch;
    }

    .home .hero-searchbar .pill,
    .home .hero-searchbar .btn.primary {
        width: 100%;
    }
}

/* Sécurité : ne PAS afficher l’app tant qu’on est sur la home */
body.home .main-container,
body.home #filtersPanel,
body.home .mobile-tabbar {
    display: none !important;
}

/* ====== Centrer VRAIMENT la barre de recherche ====== */

/* 1) Home : carte blanche sous le titre */
.home .hero-search {
    max-width: 640px;
    /* ajuste si tu la veux plus large/étroite */
    margin-inline: auto;
    /* centre horizontalement */
}

/* 2) Carte (mobile) : barre flottante au-dessus de la map */
@media (max-width: 1023px) {
    .map-view {
        position: relative;
    }

    /* ancre locale pour l'absolu */

    .mb-topbar {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        /* centrage parfait */
        width: min(640px, calc(100% - 24px));
        /* bord à bord mais respirant */
        top: max(8px, env(safe-area-inset-top));
        /* gère l'encoche iOS */
    }

    .mb-searchbar {
        width: 100%;
    }

    /* la barre prend toute la largeur dispo */
}

/* ====== Centrer VRAIMENT la barre de recherche ====== */

/* 1) Home : carte blanche sous le titre */
.home .hero-search {
    max-width: 640px;
    /* ajuste si tu la veux plus large/étroite */
    margin-inline: auto;
    /* centre horizontalement */
}

/* 2) Carte (mobile) : barre flottante au-dessus de la map */
@media (max-width: 1023px) {
    .map-view {
        position: relative;
    }

    /* ancre locale pour l'absolu */

    .mb-topbar {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        /* centrage parfait */
        width: min(640px, calc(100% - 24px));
        /* bord à bord mais respirant */
        top: max(8px, env(safe-area-inset-top));
        /* gère l'encoche iOS */
    }

    .mb-searchbar {
        width: 100%;
    }

    /* la barre prend toute la largeur dispo */
}

/* ===== Vue CARTE mobile : topbar en VRAI overlay (sans fond derrière) ===== */
@media (max-width:1023px) {
    .main-container.view-mode-carte .mb-topbar {
        position: fixed !important;
        z-index: 3000 !important;
        top: max(8px, env(safe-area-inset-top));
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        width: min(640px, calc(100% - 24px));
        /* on neutralise le style "carte blanche" hérité */
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    /* la barre elle-même reste blanche, c'est elle qui fait la carte "flottante" */
    .main-container.view-mode-carte .mb-topbar .mb-searchbar {
        width: 100%;
        background: #fff;
    }

    /* par sécurité : pas de panneau inline sous la barre en vue carte */
    .main-container.view-mode-carte .mb-inline-panel {
        display: none !important;
    }
}

/* ===== Barre de recherche : fixe, centrée, identique en Liste/Carte ===== */
:root {
    --mbTopbarMaxW: 640px;
    /* largeur cible de la barre */
    --mbTopbarSide: 12px;
    /* marge latérale */
    --mbTopbarTop: max(8px, env(safe-area-inset-top));
}

/* Le conteneur de la barre est un OVERLAY fixe, sans fond */
.mb-topbar {
    position: fixed !important;
    z-index: 3000 !important;
    top: var(--mbTopbarTop);
    left: 50% !important;
    transform: translateX(-50%);
    width: min(var(--mbTopbarMaxW), calc(100% - var(--mbTopbarSide)*2));
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: none;
    /* laisse la page/map interagir */
}

/* La carte blanche est portée par la barre elle-même, pas par le conteneur */
.mb-topbar .mb-searchbar {
    width: 100%;
    pointer-events: auto;
    /* clics autorisés sur la barre */
    /* garde tes styles existants (fond blanc, radius, shadow) */
}

/* En vue carte : pas de panneau inline sous la barre (évite “bloc blanc”) */
.main-container.view-mode-carte .mb-inline-panel {
    display: none !important;
}

/* En vue liste : on ajoute un espace en haut pour ne rien masquer */
.main-container.view-mode-list {
    padding-top: calc(var(--mbTopbarH, 76px) + 12px + var(--mbTopbarTop)) !important;
}

/* En vue carte : aucun espace supplémentaire */
.main-container.view-mode-carte {
    padding-top: 0 !important;
}

/* Desktop : tu peux élargir si tu veux */
@media (min-width:1024px) {
    :root {
        --mbTopbarMaxW: 720px;
    }
}

/* ===== MOBILE – VUE CARTE : carte plein écran, plus d'espace dessous ===== */
@media (max-width:1023px) {
    .main-container.view-mode-carte {
        height: 100svh !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .main-container.view-mode-carte .map-view {
        position: fixed !important;
        inset: 0 !important;
        /* top/right/bottom/left = 0 */
        height: 100svh !important;
        border: 0 !important;
        background: transparent !important;
    }

    .main-container.view-mode-carte #map {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    /* (option iOS moderne) */
    @supports (height: 100dvh) {

        .main-container.view-mode-carte,
        .main-container.view-mode-carte .map-view {
            height: 100dvh !important;
        }
    }
}

/* ===== Bouton "Rechercher dans cette zone" sous la barre, en tous temps ==== */
@media (max-width:1023px) {
    .main-container.view-mode-carte #btnRefreshArea.refresh-area {
        position: fixed !important;
        top: calc(var(--mbTopbarTop, 8px) + var(--mbTopbarH, 76px) + 8px) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 2990 !important;
        /* sous la topbar (z 3000), au-dessus de la map */
        min-width: 70%;
    }
}

/* === Barre mobile fixe : centrée au pixel près, marges symétriques === */
.mb-topbar {
    position: fixed !important;
    z-index: 3000 !important;
    top: max(8px, env(safe-area-inset-top));
    /* marges symétriques gauche/droite (gère aussi les safe areas iOS) */
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    transform: none !important;
    /* on neutralise le left:50%/translate */
    margin: 0 auto !important;
    width: min(640px, calc(100% - (max(12px, env(safe-area-inset-left)) + max(12px, env(safe-area-inset-right)))));
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: none;
    /* la map reste scrollable sous la barre */
}

.mb-topbar .mb-searchbar {
    width: 100%;
    pointer-events: auto;
    /* clics OK sur la barre */
}

/* === FIX barre de recherche : fixe + centrée, mêmes marges à gauche/droite === */
:root {
    --mbTopbarMaxW: 640px;
    --mbTopbarSide: 12px;
    /* marge latérale égale à gauche/droite */
    --mbTopbarTop: max(8px, env(safe-area-inset-top));
}

@media (max-width:1023px) {
    .mb-topbar {
        position: fixed !important;
        /* écrase l’ancienne règle "relative" */
        z-index: 3000 !important;
        top: var(--mbTopbarTop);
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: min(var(--mbTopbarMaxW), calc(100% - var(--mbTopbarSide)*2));
        margin: 0 !important;
        /* supprime les marges parasites */
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        pointer-events: none;
        /* la map reste interactive */
    }

    .mb-topbar .mb-searchbar {
        width: 100%;
        margin: 0 !important;
        pointer-events: auto;
        /* clics OK sur la barre */
    }

    /* (Option sécurité) Pas de panneau inline sous la barre en vue carte */
    .main-container.view-mode-carte .mb-inline-panel {
        display: none !important;
    }
}

/* === FIX boutons de bascule : contenu centré === */
.view-toggle,
.view-toggle--list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* centre le texte (et l’emoji) dans le bouton */
    gap: 8px;
    text-align: center;
}

/* === Barre mobile : fixe, centrée, largeur % + marges symétriques === */
@media (max-width:1023px) {
    .mb-topbar {
        position: fixed !important;
        z-index: 3000 !important;
        top: max(8px, env(safe-area-inset-top));
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        /* centrage "vrai" : le conteneur prend toute la largeur, on centre son contenu */
        display: flex !important;
        justify-content: center !important;
        /* marges identiques à gauche/droite + prise en compte des safe areas */
        padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
        background: transparent !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        pointer-events: none;
        /* la map reste manipulable */
    }

    .mb-topbar .mb-searchbar {
        /* largeur responsive en %, mais bornée pour rester élégante */
        width: 92% !important;
        /* ← ta demande: largeur en % */
        max-width: 640px !important;
        /* borne haute (desktop/tablette) */
        min-width: 280px;
        /* borne basse de confort */
        pointer-events: auto;
        /* clics OK sur la barre */
    }
}

/* === Barre de recherche : centrée comme le bouton "Rechercher" et le toggle === */
@media (max-width:1023px) {
    .mb-topbar {
        position: fixed !important;
        z-index: 3000 !important;
        top: max(8px, env(safe-area-inset-top));
        left: 50% !important;
        right: auto !important;
        /* neutralise d'éventuels right */
        transform: translateX(-50%) !important;
        /* centrage géométrique */
        width: min(640px, calc(100vw - 24px)) !important;
        /* marges 12px de chaque côté */
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        /* pas de “bloc blanc” derrière */
        border: 0 !important;
        box-shadow: none !important;
        display: block !important;
        pointer-events: none;
        /* la map reste manipulable */
    }

    .mb-topbar .mb-searchbar {
        width: 100% !important;
        margin: 0 !important;
        pointer-events: auto;
        /* clics OK sur la barre */
    }

    /* Aligne aussi le bouton "Rechercher dans cette zone" sous la barre */
    #btnRefreshArea.refresh-area {
        position: fixed !important;
        top: calc(max(8px, env(safe-area-inset-top)) + var(--mbTopbarH, 76px) + 8px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        z-index: 2990 !important;
    }
}

/* Désactive l'ancien panneau inline sous la topbar en vue carte (on passe en "module") */
@media (max-width:1023px) {
    .main-container.view-mode-carte #mbTopPanel {
        display: none !important;
    }
}

/* Encart de recherche (inline) sous la barre, centré comme les overlays */
@media (max-width:1023px) {
    .mb-inline-panel {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        width: min(640px, calc(100vw - 24px));
        z-index: 2995;
    }

    .view-mode-carte #mbTopPanel {
        top: calc(max(8px, env(safe-area-inset-top)) + var(--mbTopbarH, 76px) + 8px);
    }

    .view-mode-list #mbListPanel {
        top: calc(max(8px, env(safe-area-inset-top)) + var(--mbTopbarH, 76px) + 8px);
    }
}

/* === FIX encart de recherche (Top) : visible + positionné sous la barre === */
@media (max-width:1023px) {
    .main-container.view-mode-carte #mbTopPanel:not([hidden]) {
        display: block !important;
    }

    .main-container.view-mode-carte #mbTopPanel {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: calc(max(8px, env(safe-area-inset-top)) + var(--mbTopbarH, 76px) + 8px);
        width: min(640px, calc(100vw - 24px));
        z-index: 2995;
    }
}

/* === SEARCH HOTFIX PACK — encart visible et positionné sous la barre === */
@media (max-width:1023px) {

    /* En vue CARTE */
    .main-container.view-mode-carte #mbTopPanel:not([hidden]) {
        display: block !important;
    }

    .main-container.view-mode-carte #mbTopPanel {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: calc(max(8px, env(safe-area-inset-top)) + var(--mbTopbarH, 76px) + 8px);
        width: min(640px, calc(100vw - 24px));
        z-index: 2995;
    }

    /* En vue LISTE (si tu as un panneau équivalent) */
    .main-container.view-mode-list #mbListPanel:not([hidden]) {
        display: block !important;
    }

    .main-container.view-mode-list #mbListPanel {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: calc(max(8px, env(safe-area-inset-top)) + var(--mbTopbarH, 76px) + 8px);
        width: min(640px, calc(100vw - 24px));
        z-index: 2995;
    }
}

/* Affiche les encarts inline quand [hidden] est retiré */
.main-container.view-mode-carte #mbTopPanel:not([hidden]),
.main-container.view-mode-list #mbListPanel:not([hidden]) {
    display: block !important;
}

/* ===== Sheet ancrée à la barre (popover) ===== */
.sheet.sheet--anchored .sheet__backdrop {
    /* on garde le clic extérieur pour fermer, mais sans assombrir */
    background: transparent;
}

.sheet.sheet--anchored .sheet__panel {
    position: fixed;
    inset: auto;
    /* on gère la position en JS via variables */
    left: var(--anch-l, 16px);
    width: var(--anch-w, 360px);
    /* Au-dessus de la barre : bottom = (viewportHeight - topBarTop) + marge */
    bottom: calc(100vh - var(--anch-t, 200px) + 8px);

    max-height: min(70vh, 520px);
    overflow: auto;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .25);
    z-index: 3000;
    /* au-dessus de Leaflet */
}

/* petit “caret” pour relier visuellement à la barre */
.sheet.sheet--anchored .sheet__panel::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 24px;
    /* option : tu peux le centrer ou le calculer en JS */
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.sheet.sheet--anchored .sheet__backdrop {
    background: transparent;
}

.sheet.sheet--anchored .sheet__panel {
    position: fixed;
    inset: auto;
    left: var(--anch-l, 16px);
    width: var(--anch-w, 360px);
    bottom: calc(100vh - var(--anch-t, 200px) + 8px);
    max-height: min(70vh, 520px);
    overflow: auto;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .25);
    z-index: 3000;
}

.sheet.sheet--anchored .sheet__panel::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 24px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

/* Popover ancré à la barre (desktop) */
#searchSheet.sheet--anchored .sheet__backdrop {
    display: none;
}

#searchSheet.sheet--anchored .sheet__panel {
    position: fixed;
    left: var(--anch-l);
    top: calc(var(--anch-t) + 8px);
    width: min(var(--anch-w), calc(100vw - 16px));
    max-height: min(80vh, 720px);
    overflow: auto;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22), 0 6px 18px rgba(0, 0, 0, .16);
}

/* === FORCE HYBRIDE DESKTOP (carte + liste 50/50) === */
@media (min-width:1024px) {
    .main-container.view-mode-carte {
        display: flex !important;
    }

    .main-container.view-mode-carte .map-view {
        width: 50% !important;
        display: block !important;
        border-right: 1px solid #e5e7eb;
    }

    .main-container.view-mode-carte .list-view {
        width: 50% !important;
        display: block !important;
        border-left: 1px solid #e5e7eb;
    }
}

/* === 1) Desktop : ré-afficher le header, masquer la barre mobile === */
@media (min-width:1024px) {
    body:not(.home) .neo-header {
        display: flex !important;
        /* remet le header en desktop */
        align-items: center;
        /* safe pour l'alignement */
    }

    .mobile-tabbar {
        display: none !important;
    }

    /* aucune réserve en bas en desktop */
}

/* === 2) Normaliser la hauteur de header pour le calcul de hauteur === */
/* --> 72px en desktop (header visible), 0 en mobile et sur la Home */
:root {
    --header-h: 72px;
}

@media (max-width:1023px) {
    :root {
        --header-h: 0px;
    }
}

body.home {
    --header-h: 0px;
}

/* === 3) S'assurer que l'app occupe exactement (100vh - header) === */
@media (min-width:1024px) {
    .main-container {
        height: calc(100dvh - var(--header-h, 72px));
        min-height: calc(100dvh - var(--header-h, 72px));
    }
}

/* === 4) (rappel) Hybride carte + liste en desktop === */
@media (min-width:1024px) {
    .main-container.view-mode-carte {
        display: flex !important;
    }

    .main-container.view-mode-carte .map-view {
        width: 50% !important;
        display: block !important;
        border-right: 1px solid #e5e7eb;
    }

    .main-container.view-mode-carte .list-view {
        width: 50% !important;
        display: block !important;
        border-left: 1px solid #e5e7eb;
    }
}

/* === 5) La carte prend toute la hauteur dispo (pas de bande vide) === */
.map-view,
.list-view {
    height: 100%;
}

.leaflet-container {
    height: 100% !important;
}

/* ===== Header desktop premium ========================================== */
:root {
    --header-h: 72px;
}

/* Cacher le header uniquement sur la Home (tu l’as déjà, je répète ici pour clarté) */
body.home .neo-header {
    display: none !important;
}

/* Desktop : header visible, sticky, esthétique */
@media (min-width:1024px) {
    .neo-header {
        display: block !important;
        position: sticky;
        top: 0;
        z-index: 60;
        background: color-mix(in oklab, white 88%, transparent);
        backdrop-filter: saturate(150%) blur(8px);
        border-bottom: 1px solid rgba(0, 0, 0, .06);
        height: var(--header-h);
    }

    .neo-header.scrolled {
        box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    }

    /* tu as déjà le toggle JS */

    .neo-header .hdr-inner {
        max-width: 1280px;
        margin: 0 auto;
        height: var(--header-h);
        display: grid;
        grid-template-columns: 220px 1fr auto;
        align-items: center;
        gap: 16px;
        padding: 0 20px;
    }

    /* Marque */
    .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        user-select: none;
        color: #0f172a;
        font-weight: 700;
        letter-spacing: .2px;
    }

    .brand-mark {
        font-size: 22px;
    }

    .brand-name {
        font-size: 18px;
    }

    /* Barre de recherche */
    .hdr-search {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 9999px;
        padding: 8px 8px 8px 12px;
        box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
    }

    .hdr-search:focus-within {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
    }

    .hdr-search input {
        flex: 1;
        min-width: 220px;
        border: none;
        outline: none;
        background: transparent;
        font-size: 14px;
        line-height: 20px;
        color: #0f172a;
    }

    .hdr-search input::placeholder {
        color: #94a3b8;
    }

    .icon-btn {
        appearance: none;
        border: none;
        background: #f1f5f9;
        border-radius: 999px;
        padding: 8px 10px;
        cursor: pointer;
        line-height: 1;
    }

    .icon-btn:hover {
        background: #e2e8f0;
    }

    .btn {
        appearance: none;
        border: 1px solid #e5e7eb;
        background: #fff;
        color: #0f172a;
        border-radius: 9999px;
        padding: 8px 14px;
        cursor: pointer;
        font-weight: 600;
    }

    .btn.primary {
        background: #4f46e6;
        border-color: #4f46e6;
        color: white;
    }

    .btn.primary:hover {
        filter: brightness(0.98);
    }

    .btn.ghost {
        background: transparent;
    }

    /* Actions droites */
    .hdr-actions {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    /* Pills carburant */
    #hdrFuelPills {
        display: flex;
        gap: 6px;
        align-items: center;
        white-space: nowrap;
        padding: 4px;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 9999px;
    }

    #hdrFuelPills .pill {
        border: none;
        background: transparent;
        padding: 6px 10px;
        border-radius: 9999px;
        cursor: pointer;
        font-size: 13px;
        color: #0f172a;
    }

    #hdrFuelPills .pill.active {
        background: #fff;
        box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
    }

    /* Segmented toggle Liste/Carte */
    .seg-toggle {
        display: inline-flex;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 4px;
    }

    .seg-toggle .seg {
        background: transparent;
        border: none;
        border-radius: 8px;
        padding: 6px 10px;
        cursor: pointer;
        font-size: 13px;
        color: #0f172a;
    }

    .seg-toggle .seg.active {
        background: #fff;
        box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
    }

    /* Badge filtres */
    .badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 6px;
        border-radius: 999px;
        background: #0ea5e9;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        margin-left: 6px;
    }

    /* Masquer la barre mobile en desktop */
    .mobile-tabbar {
        display: none !important;
    }
}

/* Hauteur de la zone appli : exactement la fenêtre - header */
@media (min-width:1024px) {
    .main-container {
        height: calc(100dvh - var(--header-h, 72px));
        min-height: calc(100dvh - var(--header-h, 72px));
    }

    .map-view,
    .list-view {
        height: 100%;
    }

    .leaflet-container {
        height: 100% !important;
    }
}

/* Accessibilité : focus visible partout */
.pill:focus,
.seg:focus,
.btn:focus,
.icon-btn:focus,
.brand:focus,
#hdrQ:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Utilitaire : screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Header polish =================================================== */
:root {
    --header-h: 64px;
}

/* + compact */

@media (min-width:1024px) {
    .neo-header {
        position: sticky;
        top: 0;
        z-index: 60;
        height: var(--header-h);
        background: rgba(255, 255, 255, .92);
        backdrop-filter: saturate(140%) blur(6px);
        border-bottom: 1px solid #eef2f7;
    }

    .neo-header.scrolled {
        box-shadow: 0 6px 18px rgba(16, 24, 40, .06);
    }

    .neo-header .hdr-inner {
        max-width: 1280px;
        margin: 0 auto;
        height: var(--header-h);
        display: grid;
        grid-template-columns: 220px 1fr auto;
        align-items: center;
        gap: 12px;
        /* -4px vs avant */
        padding: 0 16px;
        /* -4px vs avant */
    }

    /* Marque */
    .brand-name {
        font-size: 17px;
        letter-spacing: .2px;
    }

    /* Barre de recherche (plus nette, plus compacte) */
    .hdr-search {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid #e6eaf0;
        border-radius: 9999px;
        padding: 6px 6px 6px 12px;
        /* -2px vertical */
        box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
    }

    .hdr-search:focus-within {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, .10);
    }

    .hdr-search input {
        flex: 1;
        min-width: 280px;
        border: none;
        outline: none;
        background: transparent;
        font-size: 14px;
        line-height: 20px;
        color: #0f172a;
    }

    .hdr-search input::placeholder {
        color: #9aa7b5;
    }

    /* placeholder moins “noir” */
    .icon-btn {
        border: none;
        background: #f3f6f9;
        border-radius: 999px;
        padding: 6px 8px;
        cursor: pointer;
        line-height: 1;
    }

    .icon-btn:hover {
        background: #e9eef4;
    }

    .btn {
        border: 1px solid #e6eaf0;
        border-radius: 9999px;
        padding: 6px 12px;
        font-weight: 600;
    }

    .btn.primary {
        background: #0ea5e9;
        border-color: #0ea5e9;
        color: #fff;
    }

    .btn.primary:hover {
        filter: brightness(.98);
    }

    /* Actions droites */
    .hdr-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Pills carburant — plus lisibles + scroll si overflow */
    #hdrFuelPills {
        display: flex;
        gap: 6px;
        align-items: center;
        white-space: nowrap;
        padding: 3px;
        background: #f8fafc;
        border: 1px solid #e6eaf0;
        border-radius: 9999px;
        max-width: 38vw;
        overflow: auto;
        scrollbar-width: thin;
    }

    #hdrFuelPills .pill {
        border: none;
        background: transparent;
        padding: 6px 10px;
        border-radius: 9999px;
        cursor: pointer;
        font-size: 13px;
        color: #0f172a;
    }

    #hdrFuelPills .pill:hover {
        background: #eef3f8;
    }

    #hdrFuelPills .pill.active {
        background: #fff;
        box-shadow: 0 1px 0 rgba(16, 24, 40, .05), inset 0 0 0 1px #e6eaf0;
    }

    /* Segmented toggle — contraste + hit area */
    .seg-toggle {
        display: inline-flex;
        background: #f8fafc;
        border: 1px solid #e6eaf0;
        border-radius: 12px;
        padding: 4px;
    }

    .seg-toggle .seg {
        background: transparent;
        border: none;
        border-radius: 8px;
        padding: 7px 12px;
        cursor: pointer;
        font-size: 13px;
        color: #0f172a;
    }

    .seg-toggle .seg:hover {
        background: #eef3f8;
    }

    .seg-toggle .seg.active {
        background: #fff;
        box-shadow: 0 1px 0 rgba(16, 24, 40, .05), inset 0 0 0 1px #e6eaf0;
    }

    /* Filtres : état actif visible si badge > 0 */
    #btnToggleFilters {
        position: relative;
        border-radius: 12px;
    }

    #filtersBadge:not([hidden])+* {
        /* rien, garde compat */
    }

    #btnToggleFilters .badge {
        margin-left: 6px;
        background: #64748b;
        color: #fff;
    }

    /* style du bouton quand actif (badge visible) */
    #btnToggleFilters:has(#filtersBadge:not([hidden])) {
        background: #11182714;
        border-color: #0f172a;
    }

    /* Layout app : pile hauteur écran, pas de trou */
    .main-container {
        height: calc(100dvh - var(--header-h, 64px));
        min-height: calc(100dvh - var(--header-h, 64px));
    }

    .map-view,
    .list-view {
        height: 100%;
    }

    .leaflet-container {
        height: 100% !important;
    }

    /* Z-index: header au-dessus des contrôles carte flottants */
    .neo-header {
        z-index: 500;
    }
}

/* Safe-area iOS (notch) */
@supports (padding-top: env(safe-area-inset-top)) {
    .neo-header {
        padding-top: env(safe-area-inset-top);
    }

    .neo-header .hdr-inner {
        height: calc(var(--header-h) - env(safe-area-inset-top));
    }
}

/* Focus visibles et réguliers */
.pill:focus,
.seg:focus,
.btn:focus,
.icon-btn:focus,
.brand:focus,
#hdrQ:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* === Select carburant intégré à la barre ================================ */
.hdr-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 9999px;
    padding: 6px 6px 6px 10px;
}

.fuel-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #f8fafc;
    border: 1px solid #e6eaf0;
    border-radius: 9999px;
}

.fuel-select:focus-within {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.fuel-select .fuel-ico {
    font-size: 14px;
    line-height: 1;
}

.fuel-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    padding: 0 14px 0 2px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
}

.fuel-select select:focus {
    outline: none;
}

.hdr-search input {
    flex: 1;
    min-width: 240px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    line-height: 20px;
    color: #0f172a;
}

.hdr-search input::placeholder {
    color: #9aa7b5;
}

.icon-btn {
    border: none;
    background: #f3f6f9;
    border-radius: 999px;
    padding: 6px 8px;
    cursor: pointer;
}

.icon-btn:hover {
    background: #e9eef4;
}

.btn {
    border: 1px solid #e6eaf0;
    border-radius: 9999px;
    padding: 6px 12px;
    font-weight: 600;
}

.btn.primary {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

/* Masque les anciennes pills si elles restent dans le DOM par erreur */
#hdrFuelPills {
    display: none !important;
}

/* ===== Cards v2 – minimal, responsive, accessible ===================== */
.station-card {
    --r: 14px;
    background: #fff;
    border: 1px solid #e8eef4;
    border-radius: var(--r);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    grid-column-gap: 12px;
    grid-row-gap: 10px;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.station-card+.station-card {
    margin-top: 12px;
}

.station-card:hover {
    border-color: #dbe4ee;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .06);
    transform: translateY(-1px);
}

/* --- Header compact --------------------------------------------------- */
.station-header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

.station-header--price-first {
    /* conserve ton hook */
}

/* Prix vedette */
.station-price-star {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 130px;
}

.price-item {
    display: grid;
    grid-auto-flow: row;
    gap: 4px;
}

.price-item .fuel-type {
    font-size: 12px;
    line-height: 1;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e6eaf0;
    border-radius: 999px;
    padding: 4px 8px;
    width: max-content;
}

.price-item .fuel-price {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    font-weight: 800;
}

.price-int {
    font-size: 22px;
    line-height: 1;
}

.price-dec {
    font-size: 16px;
    line-height: 1;
    opacity: .9;
}

.price-eur {
    font-size: 12px;
    margin-left: 2px;
    opacity: .8;
}

/* Rang / delta prix */
.rank-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 13px;
}

.rank-1 {
    background: #fef3c7;
}

.rank-2 {
    background: #e0e7ff;
}

.rank-3 {
    background: #dcfce7;
}

.rank-top {
    background: #eef2f7;
}

.price-delta {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 999px;
    width: max-content;
}

.price-delta.neg {
    color: #047857;
    background: #ecfdf5;
}

.price-delta.pos {
    color: #b91c1c;
    background: #fef2f2;
}

/* Info station */
.station-info {
    min-width: 0;
}

.station-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-location {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}

.distance-chip {
    background: #eef2f7;
    color: #0f172a;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 18px;
}

/* Badge compétitivité (plus discret) */
.competitiveness-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 9999px;
    color: #065f46;
    background: #ecfdf5;
}

.badge-excellent {
    background: #e6f7ff;
    color: #075985;
}

.badge-verygood {
    background: #eef2ff;
    color: #3730a3;
}

.badge-good {
    background: #f1f5f9;
    color: #0f172a;
}

.badge-average {
    background: #f8fafc;
    color: #475569;
}

.badge-best {
    background: #fef3c7;
    color: #92400e;
}

/* --- Details ---------------------------------------------------------- */
.station-details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
}

.station-prices {
    display: block;
}

.btn-show-all {
    background: transparent;
    border: none;
    color: #0ea5e9;
    font-weight: 600;
    font-size: 13px;
    padding: 0;
    cursor: pointer;
}

.btn-show-all .chev {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-right: 6px;
    transition: transform .15s ease;
}

.btn-show-all.open .chev {
    transform: rotate(-135deg);
}

.station-prices-all {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.price-item.small .fuel-type {
    font-size: 11px;
    padding: 4px 6px;
}

.price-item.small .fuel-price .price-int {
    font-size: 16px;
}

.price-item.small .price-dec {
    font-size: 16px;
}

/* Services → jetons sobres, 1 ligne max + "+n" */
.station-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tag {
    font-size: 12px;
    line-height: 1;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e6eaf0;
    border-radius: 9999px;
    padding: 4px 8px;
}

.service-tag.muted {
    color: #64748b;
    background: #f8fafc;
}

/* Actions */
.station-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    border: 1px solid #e6eaf0;
    background: #fff;
    color: #0f172a;
    border-radius: 9999px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
}

.action-btn.btn-navigate {
    background: #fff;
    border-color: #e5e7eb;
    color: #0f172b;
    border: 1px solid #e6eaf0;
}

.action-btn:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* --- Mobile layout ---------------------------------------------------- */
@media (max-width:1023px) {
    .station-card {
        grid-template-columns: 1fr;
        grid-row-gap: 8px;
        padding: 12px;
    }

    .station-header {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .station-price-star {
        order: 2;
    }

    .station-info {
        order: 1;
    }

    .station-badges {
        order: 3;
    }

    .station-details {
        order: 4;
        grid-template-columns: 1fr;
    }

    .station-actions {
        order: 5;
        width: 100%;
    }

    .station-actions .action-btn {
        flex: 1;
    }

    .price-int {
        font-size: 20px;
    }

    .price-dec {
        font-size: 14px;
    }
}

/* Focus clair pour accessibilité */
.station-card :is(button, a):focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* ===== Mobile cards – layout épuré ===================================== */
@media (max-width:1023px) {
    .station-card {
        padding: 12px;
        border-radius: 14px;
    }

    .station-header {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .station-info .station-name {
        font-size: 15px;
        font-weight: 700;
    }

    .station-location {
        font-size: 13px;
        color: #64748b;
        gap: 8px;
    }

    /* Prix mis en avant + chip carburant */
    .station-price-star {
        order: 2;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .price-item .fuel-type {
        font-size: 12px;
        background: #f1f5f9;
        border: 1px solid #e6eaf0;
        border-radius: 999px;
        padding: 4px 8px;
    }

    .price-int {
        font-size: 22px;
    }

    .price-dec {
        font-size: 14px;
    }

    /* Actions – CTA primaire plein large + “Plus d’infos” */
    .station-details {
        order: 4;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .station-actions {
        order: 5;
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .station-actions .action-btn {
        flex: 1;
        padding: 12px;
        border-radius: 999px;
    }

    .station-actions .btn-navigate {
        background: #10b981;
        border-color: #10b981;
        color: #fff;
    }

    .station-actions .btn-more {
        display: inline-flex;
    }

    /* visible mobile */
    .station-actions .btn-map {
        display: none;
    }

    /* masqué mobile */

    /* Services : jetons sobres, 1 ligne max */
    .station-services {
        gap: 6px;
    }

    .service-tag {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* ===== Sheet “Station” (mobile) ======================================== */
.station-sheet[hidden] {
    display: none;
}

.station-sheet {
    position: fixed;
    inset: 0;
    z-index: 70;
}

.station-sheet .sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .32);
    opacity: 0;
    transition: opacity .18s ease;
}

.station-sheet.open .sheet__backdrop {
    opacity: 1;
}

.station-sheet .sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -16px 40px rgba(16, 24, 40, .22);
    transform: translateY(100%);
    transition: transform .2s ease;
    padding: 14px 16px 16px;
}

.station-sheet.open .sheet__panel {
    transform: translateY(0);
}

.sheet__grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #e5e7eb;
    margin: 6px auto 10px;
}

.st-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.st-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.st-close {
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    padding: 6px;
    cursor: pointer;
}

.st-sub {
    display: flex;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    margin: 4px 0 10px;
}

.st-dot {
    opacity: .6;
}

.st-addr {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.st-fuels {
    display: grid;
    gap: 8px;
    margin: 6px 0 6px;
}

.st-fuels .price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 12px;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    background: #f9fbfd;
}

.st-fuels .f {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
}

.st-fuels .p {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    font-weight: 800;
}

.st-fuels .p .price-int {
    font-size: 18px;
}

.st-fuels .p .price-dec {
    font-size: 13px;
}

.st-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.st-services .chip {
    font-size: 12px;
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #e6eaf0;
    border-radius: 9999px;
    color: #334155;
}

.st-services .muted {
    color: #94a3b8;
    font-size: 12px;
}

.st-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.st-actions .btn {
    flex: 1;
    border: 1px solid #e6eaf0;
    border-radius: 9999px;
    padding: 10px 12px;
    font-weight: 700;
    background: #fff;
}

.st-actions .btn.primary {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Desktop : on garde l'existant (cache "Plus d'infos") */
@media (min-width:1024px) {
    .station-actions .btn-more {
        display: none;
    }
}

/* ============================================================
   MOBILE — Cartes stations (téléphones ≤ 480px uniquement)
   ============================================================ */
@media (max-width: 480px) {

    /* 0) Liste : enlever le double padding du container (la tabbar est déjà gérée côté <body>) */
    .main-container.view-mode-list .stations-container {
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }

    /* 1) Carte : gabarit minimaliste, tactile, clair */
    .main-container.view-mode-list .station-card {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 10px;
        padding: 12px;
        border: 1px solid var(--border, #eef2f7);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    }

    /* 2) Header compact : titre + meta à gauche, badge à droite */
    .main-container.view-mode-list .station-header {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        column-gap: 8px;
    }

    .main-container.view-mode-list .station-info .station-name {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
    }

    .main-container.view-mode-list .station-location {
        font-size: 13px;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* 3) Bloc prix mis en avant */
    .main-container.view-mode-list .station-price-star {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .main-container.view-mode-list .price-int {
        font-size: 22px;
    }

    .main-container.view-mode-list .price-dec {
        font-size: 14px;
    }

    .main-container.view-mode-list .price-item .fuel-type {
        font-size: 12px;
        background: #f1f5f9;
        border: 1px solid #e6eaf0;
        border-radius: 999px;
        padding: 4px 8px;
    }

    /* 4) Badge compacité */
    .main-container.view-mode-list .station-badges .competitiveness-badge {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 9999px;
    }

    /* 5) Détails + services (une seule ligne, coupe propre) */
    .main-container.view-mode-list .station-details {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .main-container.view-mode-list .station-services {
        display: flex;
        gap: 6px;
        overflow: hidden;
        /* évite le retour à la ligne */
        white-space: nowrap;
    }

    .main-container.view-mode-list .station-services .service-tag {
        font-size: 12px;
        padding: 4px 8px;
    }

    /* Effet de fondu en bout de ligne (si supporté) */
    @supports (mask-image: linear-gradient(black, transparent)) {
        .main-container.view-mode-list .station-services {
            mask-image: linear-gradient(to right, black 85%, transparent);
        }
    }

    /* 6) Actions : 2 gros boutons tactiles ; on cache “Voir carte” sur téléphone */
    .main-container.view-mode-list .station-actions {
        display: flex;
        gap: 10px;
    }

    .main-container.view-mode-list .station-actions .action-btn {
        flex: 1;
        padding: 12px;
        border-radius: 9999px;
        font-weight: 700;
    }

    .main-container.view-mode-list .station-actions .btn-more {
        display: inline-flex;
    }

    .main-container.view-mode-list .station-actions .btn-map {
        display: none !important;
    }
}

/* ============================================================
   MOBILE — Cards optimisées (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

    /* 0) Liste : pas d'espace blanc fantôme en bas */
    .main-container.view-mode-list .stations-container {
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }

    /* 1) Carte compacte, lisible, tactile */
    .station-card {
        border-radius: 14px;
        padding: 12px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    }

    /* 2) En-tête : prix (gros) + carburant, nom, badge à droite */
    .station-header--price-first {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "price info badge";
        align-items: center;
        column-gap: 10px;
    }

    .station-price-star {
        grid-area: price;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .station-badges {
        grid-area: badge;
        justify-self: end;
    }

    .station-info {
        grid-area: info;
        min-width: 0;
    }

    .fuel-price .price-int {
        font-size: 24px;
        line-height: 1;
        letter-spacing: -.3px;
    }

    .fuel-price .price-dec {
        font-size: 14px;
    }

    .price-item .fuel-type {
        font-size: 12px;
        padding: 4px 8px;
        border-radius: 999px;
        background: #f1f5f9;
        border: 1px solid #e6eaf0;
        color: #334155;
    }

    .station-name {
        font-size: 15px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-location {
        font-size: 13px;
        color: #64748b;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .distance-chip {
        font-size: 12px;
        padding: 2px 8px;
        border-radius: 999px;
        background: #f1f5f9;
        border: 1px solid #e6eaf0;
        color: #334155;
    }

    .competitiveness-badge {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 9999px;
    }

    /* 3) Détails de la carte fermée : pas d’avalanche d’infos */
    .station-prices .btn-show-all,
    .station-prices .station-prices-all {
        display: none !important;
    }

    /* la granularité passe par la sheet */
    .station-services {
        display: flex;
        gap: 6px;
        overflow: hidden;
        white-space: nowrap;
    }

    .station-services .service-tag {
        font-size: 12px;
        padding: 4px 8px;
    }

    @supports (mask-image: linear-gradient(black, transparent)) {
        .station-services {
            mask-image: linear-gradient(to right, black 85%, transparent);
        }
    }

    /* 4) Actions : "Y aller" prioritaire plein-large ; "Plus d'infos" fantôme */
    .station-actions {
        display: flex;
        gap: 10px;
    }

    .station-actions .action-btn {
        flex: 1;
        height: 46px;
        border-radius: 9999px;
        font-weight: 700;
    }

    .station-actions .btn-map {
        display: none !important;
    }

    /* on bascule vers la sheet */
    .station-actions .btn-more {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 5) État prix manquant = visuel grisé mais CTA disponible */
    .fuel-price .price-miss,
    .price-miss {
        color: #94a3b8;
    }

    /* ============================================================
     BOTTOM-SHEET (Plus d'infos)
     ============================================================ */
    .station-sheet[hidden] {
        display: none;
    }

    .station-sheet {
        position: fixed;
        inset: 0;
        z-index: 70;
    }

    .station-sheet .sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, .32);
        opacity: 0;
        transition: opacity .18s ease;
    }

    .station-sheet.open .sheet__backdrop {
        opacity: 1;
    }

    .station-sheet .sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -16px 40px rgba(16, 24, 40, .22);
        transform: translateY(100%);
        transition: transform .2s ease;
        padding: 14px 16px 16px;
    }

    .station-sheet.open .sheet__panel {
        transform: translateY(0);
    }

    .sheet__grab {
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: #e5e7eb;
        margin: 6px auto 10px;
    }

    .st-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .st-title {
        font-size: 16px;
        font-weight: 800;
        color: #0f172a;
        margin: 0;
    }

    .st-close {
        border: none;
        background: transparent;
        font-size: 18px;
        line-height: 1;
        padding: 6px;
        cursor: pointer;
    }

    .st-sub {
        display: flex;
        gap: 8px;
        color: #64748b;
        font-size: 13px;
        margin: 4px 0 10px;
        align-items: center;
    }

    .st-dot {
        opacity: .6;
    }

    .st-addr {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .st-dist {
        padding: 2px 8px;
        border-radius: 999px;
        background: #f1f5f9;
        border: 1px solid #e6eaf0;
        color: #334155;
        font-size: 12px;
    }

    .st-fuels {
        display: grid;
        gap: 8px;
        margin: 6px 0 8px;
    }

    .st-fuels .price-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: 10px 12px;
        border: 1px solid #e6eaf0;
        border-radius: 12px;
        background: #f9fbfd;
    }

    .st-fuels .f {
        font-size: 12px;
        color: #334155;
        font-weight: 600;
    }

    .st-fuels .p {
        display: flex;
        gap: 4px;
        align-items: flex-end;
        font-weight: 800;
    }

    .st-fuels .p .price-int {
        font-size: 18px;
    }

    .st-fuels .p .price-dec {
        font-size: 13px;
    }

    .st-services {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 4px;
    }

    .st-services .chip {
        font-size: 12px;
        padding: 4px 8px;
        background: #f1f5f9;
        border: 1px solid #e6eaf0;
        border-radius: 9999px;
        color: #334155;
    }

    .st-actions {
        display: flex;
        gap: 10px;
        margin-top: 12px;
    }

    .st-actions .btn {
        flex: 1;
        border: 1px solid #e6eaf0;
        border-radius: 9999px;
        padding: 12px;
        font-weight: 700;
        background: #fff;
    }

    .st-actions .btn.primary {
        background: #0f172a;
        border-color: #0f172a;
        color: #fff;

    }
}

/* =========================================================
   CARTES STATIONS — COMPACT MOBILE
   ========================================================= */
@media (max-width: 480px) {

    /* Conteneur liste : pas de "trou" en bas */
    .stations-container {
        padding: 8px 10px 16px;
        /* bas = petit pour éviter l'espace blanc */
    }

    .stations-container>.station-card:last-child {
        margin-bottom: 8px;
    }

    /* Carte */
    .station-card {
        border-radius: 14px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        padding: 12px;
        margin: 10px 6px;
    }

    .station-card:active {
        transform: translateY(1px);
    }

    /* Header = grille 3 zones : Prix | Infos | Badge */
    .station-card .station-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    /* Bloc prix (gros) */
    .station-card .station-price-star {
        display: grid;
        grid-auto-flow: row;
        align-items: center;
        justify-items: start;
        min-width: 88px;
    }

    .station-card .price-item {
        display: grid;
        grid-auto-flow: row;
        gap: 4px;
    }

    .station-card .price-item .fuel-type {
        display: inline-block;
        font-size: 12px;
        line-height: 1;
        padding: 6px 8px;
        border-radius: 999px;
        background: #F2F5F8;
        color: #334155;
        font-weight: 600;
    }

    .station-card .price-item .fuel-price {
        white-space: nowrap;
    }

    .station-card .price-item .fuel-price .price-int {
        font-size: 22px;
        font-weight: 800;
    }

    .station-card .price-item .fuel-price .price-dec {
        font-size: 14px;
        font-weight: 700;
    }

    .station-card .price-item .fuel-price .price-eur {
        font-size: 12px;
        margin-left: 2px;
    }

    /* Rang très discret */
    .station-card .rank-icon {
        font-size: 12px;
        opacity: .7;
        margin-bottom: 2px;
    }

    /* Infos station (nom + adresse courte + distance) */
    .station-card .station-info {
        min-width: 0;
    }

    .station-card .station-name {
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 4px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card .station-location {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #475569;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card .distance-chip {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 600;
        font-size: 12px;
    }

    /* Badge qualité à droite */
    .station-card .station-badges .competitiveness-badge {
        font-size: 11px;
        padding: 6px 8px;
        border-radius: 999px;
        white-space: nowrap;
    }

    /* Détails : en mode compact on cache les listes pour alléger */
    .station-card .station-details .station-prices,
    .station-card .station-details .station-services {
        display: none !important;
    }

    /* Actions : 1 CTA large + 1 lien fantôme
     (on retire "Voir carte" de la carte fermée) */
    .station-card .station-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 8px;
    }

    .station-card .station-actions .btn-navigate {
        height: 48px;
        border-radius: 999px;
        font-weight: 700;
    }

    .station-card .station-actions .btn-more {
        height: 44px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        color: #0F172A;
        font-weight: 600;
    }

    .station-card .station-actions .btn-map {
        display: none !important;
    }

    /* action déplacée dans la sheet */

    /* Micro-interactions */
    .station-card .action-btn:active {
        transform: translateY(1px);
    }
}

/* =========================================================
   CARTES STATIONS — MINIMAL MOBILE
   ========================================================= */
@media (max-width: 480px) {

    /* Liste : pas de "trou" en bas */
    .stations-container {
        padding: 8px 10px 16px;
    }

    .stations-container>.station-card:last-child {
        margin-bottom: 8px;
    }

    /* Carte : surface plate, sobre */
    .station-card {
        margin: 10px 6px;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid #E6E8EB;
        box-shadow: none;
        background: #fff;
    }

    .station-card:active {
        transform: translateY(1px);
    }

    /* En-tête compact en 3 colonnes : Prix | Infos | Badge */
    .station-card .station-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    /* Prix à plat (gros), chip carburant claire */
    .station-card .station-price-star {
        display: grid;
        gap: 4px;
        min-width: 84px;
    }

    .station-card .price-item {
        display: grid;
        gap: 4px;
    }

    .station-card .price-item .fuel-type {
        display: inline-block;
        padding: 6px 8px;
        border-radius: 999px;
        background: #F4F6F8;
        color: #334155;
        font-weight: 600;
        font-size: 11px;
        line-height: 1;
    }

    .station-card .price-item .fuel-price {
        white-space: nowrap;
    }

    .station-card .price-item .fuel-price .price-int {
        font-size: 22px;
        font-weight: 800;
    }

    .station-card .price-item .fuel-price .price-dec {
        font-size: 14px;
        font-weight: 700;
    }

    .station-card .price-item .fuel-price .price-eur {
        font-size: 11px;
        margin-left: 2px;
        color: #334155;
    }

    /* On enlève le bruit visuel */
    .station-card .rank-icon,
    .station-card .price-delta {
        display: none !important;
    }

    /* Nom + adresse courte + distance en chip */
    .station-card .station-info {
        min-width: 0;
    }

    .station-card .station-name {
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 2px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card .station-location {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: #475569;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card .distance-chip {
        display: inline-block;
        padding: 3px 8px;
        border-radius: 999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 600;
        font-size: 12px;
    }

    /* Badge qualité discret à droite */
    .station-card .station-badges .competitiveness-badge {
        background: transparent;
        border: 1px solid #E6E8EB;
        color: #0F172A;
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 999px;
        white-space: nowrap;
    }

    /* On allège totalement la carte fermée */
    .station-card .station-details,
    .station-card .station-prices,
    .station-card .station-services {
        display: none !important;
    }

    /* Actions : 1 CTA fort + lien "Plus d'infos" très léger */
    .station-card .station-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 8px;
    }

    .station-card .station-actions .btn-navigate {
        height: 46px;
        border-radius: 999px;
        font-weight: 700;
    }

    /* On retire le bouton carte de la carte "fermée" (il ira dans la bottom-sheet) */
    .station-card .station-actions .btn-map {
        display: none !important;
    }

    /* "Plus d'infos" = lien minimal (si le 2e bouton existe) */
    .station-card .station-actions .btn-more,
    .station-card .station-actions .action-btn+.action-btn {
        height: auto;
        padding: 0;
        border: none;
        background: transparent;
        color: #0F172A;
        opacity: .7;
        text-decoration: underline;
        font-weight: 600;
        border-radius: 0;
        justify-self: start;
    }
}

/* =======================================================
   CARTES — POLISH MOBILE (lisibilité + hiérarchie)
   ======================================================= */
@media (max-width: 480px) {

    /* Carte : surface sobre mais pas "vide" */
    .station-card {
        margin: 10px 8px;
        padding: 12px;
        border-radius: 14px;
        border: 1px solid #E6E8EB;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    }

    /* En-tête compact : Prix | Infos | Badge */
    .station-card .station-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    /* --- PRIX : déboxé + dominant --- */
    /* on retire tout "cartouche" autour du prix (vu sur ton screenshot) */
    .station-card .price-item,
    .station-card .price-item * {
        box-shadow: none !important;
        background: transparent !important;
        border: 0 !important;
    }

    .station-card .station-price-star {
        min-width: 90px;
    }

    .station-card .fuel-type {
        display: inline-block;
        padding: 6px 8px;
        border-radius: 999px;
        background: #F3F5F7 !important;
        color: #334155;
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
        margin-bottom: 2px;
    }

    .station-card .fuel-price {
        white-space: nowrap;
    }

    .station-card .fuel-price .price-int {
        font-size: 23px;
        font-weight: 800;
    }

    .station-card .fuel-price .price-dec {
        font-size: 14px;
        font-weight: 700;
    }

    .station-card .fuel-price .price-eur {
        font-size: 12px;
        color: #334155;
        margin-left: 2px;
    }

    /* On coupe le bruit visuel non essentiel */
    .station-card .rank-icon,
    .station-card .price-delta {
        display: none !important;
    }

    /* --- INFOS --- */
    .station-card .station-info {
        min-width: 0;
    }

    .station-card .station-name {
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 3px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #0F172A;
        /* plus sombre = meilleure lisibilité */
    }

    .station-card .station-location {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 14px;
        /* ↑ lisibilité adresse */
        color: #334155;
        /* plus sombre que #475569 */
    }

    .station-card .distance-chip {
        display: inline-block;
        padding: 3px 8px;
        border-radius: 999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 600;
        font-size: 12px;
    }

    /* --- BADGE : présent mais discret (ne doit pas voler la vedette) --- */
    .station-card .station-badges .competitiveness-badge {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid #E6E8EB;
        color: #475569;
        /* gris neutre */
        letter-spacing: .2px;
        line-height: 1;
    }

    /* --- Détails masqués en carte fermée (on garde la sheet pour ça) --- */
    .station-card .station-details,
    .station-card .station-prices,
    .station-card .station-services {
        display: none !important;
    }

    /* --- Actions --- */
    .station-card .station-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 6px;
    }

    .station-card .btn-navigate {
        height: 48px;
        border-radius: 999px;
        font-weight: 700;
    }

    /* "Plus d'infos" = lien bouton fantôme */
    .station-card .btn-more {
        height: 44px;
        border-radius: 999px;
        border: 1px solid #E6E8EB;
        background: #fff;
        font-weight: 600;
        color: #0F172A;
    }

    /* On retire "Voir carte" de la carte fermée (présent dans la sheet) */
    .station-card .btn-map {
        display: none !important;
    }
}

/* ===================================================================
   CARTES MOBILE = maquette demandée
   ===================================================================*/
@media (max-width: 480px) {

    /* Conteneur liste : pas de trou en bas */
    #stationsContainer {
        padding: 8px 8px 16px;
        gap: 1px;
    }

    #stationsContainer>.station-card:last-child {
        margin-bottom: 10px;
    }

    /* Carte */
    .station-card.minimal {
        border: 1px solid #E6E8EB;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
        padding: 14px;
        margin: 10px 8px;
    }

    /* Header : Prix | Infos | Rang */
    .station-card.minimal .station-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    /* Prix (gros) + chip carburant */
    .station-card.minimal .price-item {
        display: grid;
        gap: 4px;
    }

    .station-card.minimal .fuel-price {
        white-space: nowrap;
    }

    .station-card.minimal .fuel-price .price-int {
        font-size: 26px;
        font-weight: 800;
    }

    .station-card.minimal .fuel-price .price-dec {
        font-size: 16px;
        font-weight: 700;
    }

    .station-card.minimal .fuel-price .price-eur {
        font-size: 13px;
        margin-left: 3px;
    }

    .station-card.minimal .fuel-type {
        display: inline-block;
        padding: 6px 8px;
        border-radius: 9999px;
        background: #EFF3F6;
        color: #334155;
        font-weight: 600;
        font-size: 12px;
        line-height: 1;
        width: max-content;
    }

    /* Infos (nom + ville + distance) */
    .station-card.minimal .station-info {
        min-width: 0;
    }

    .station-card.minimal .station-name {
        font-size: 16px;
        font-weight: 700;
        color: #0F172A;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 0 4px 0;
    }

    .station-card.minimal .station-location {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: #475569;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card.minimal .station-location .city {
        letter-spacing: .2px;
    }

    .station-card.minimal .distance-chip {
        padding: 4px 8px;
        border-radius: 9999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 600;
        font-size: 12px;
    }

    /* Rang (1,2,3 pastille ronde à droite) */
    .station-card.minimal .rank-icon {
        width: 28px;
        height: 28px;
        border-radius: 9999px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 13px;
        color: #111827;
        border: 1px solid #E5E7EB;
        background: #fff;
    }

    .station-card.minimal .rank-gold {
        background: #FACC15;
        border-color: #FACC15;
    }

    .station-card.minimal .rank-silver {
        background: #D1D5DB;
        border-color: #D1D5DB;
    }

    .station-card.minimal .rank-bronze {
        background: #F59E0B;
        border-color: #F59E0B;
    }

    .station-card.minimal .rank-muted {
        color: #6B7280;
        background: #fff;
    }

    /* Actions : "Y aller" + "Voir" */
    .station-card.minimal .station-actions {
        display: grid;
        grid-template-columns: 1fr 96px;
        gap: 12px;
    }

    .station-card.minimal .action-btn {
        height: 46px;
        border-radius: 12px;
        font-weight: 700;
    }

    .station-card.minimal .btn-navigate {
        background: #10B981;
        color: #fff;
        border: none;
    }

    .station-card.minimal .btn-navigate:active {
        transform: translateY(1px);
    }

    .station-card.minimal .btn-map {
        background: #fff;
        color: #0F172A;
        border: 1px solid #E6E8EB;
    }

    /* On neutralise tout ce qui surcharge en mobile */
    .station-card.minimal .price-delta,
    .station-card.minimal .competitiveness-badge,
    .station-card.minimal .station-details,
    .station-card.minimal .station-prices,
    .station-card.minimal .station-services {
        display: none !important;
    }
}

/* =========================================================
   CARTES MOBILE — MAQUETTE "PRIX / NOM / VILLE + km / Y aller + Voir"
   ========================================================= */
@media (max-width: 480px) {

    .station-card.minimal {
        border: 1px solid #E6E8EB;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
        padding: 14px;
        margin: 10px 8px;
    }

    /* Header : Prix | Infos | Rang à droite */
    .station-card.minimal .station-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    /* Prix XXL + chip carburant — on supprime tout encart/ombre autour */
    .station-card.minimal .price-item {
        display: grid;
        gap: 4px;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .station-card.minimal .fuel-price {
        white-space: nowrap;
    }

    .station-card.minimal .fuel-price .price-int {
        font-size: 26px;
        font-weight: 800;
    }

    .station-card.minimal .fuel-price .price-dec {
        font-size: 16px;
        font-weight: 700;
    }

    .station-card.minimal .fuel-price .price-eur {
        font-size: 13px;
        margin-left: 3px;
    }

    .station-card.minimal .fuel-type {
        display: inline-block;
        width: max-content;
        padding: 6px 8px;
        border-radius: 9999px;
        background: #EFF3F6;
        color: #334155;
        font-weight: 600;
        font-size: 12px;
        line-height: 1;
    }

    /* Nom + VILLE + distance chip (pas la rue) */
    .station-card.minimal .station-info {
        min-width: 0;
    }

    .station-card.minimal .station-name {
        font-size: 16px;
        font-weight: 700;
        color: #0F172A;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 0 4px 0;
    }

    .station-card.minimal .station-location {
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        color: #475569;
    }

    .station-card.minimal .station-location .city {
        letter-spacing: .2px;
    }

    .station-card.minimal .distance-chip {
        padding: 4px 8px;
        border-radius: 9999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 600;
        font-size: 12px;
    }

    /* Pastille de classement (réactivée) */
    .station-card.minimal .rank-icon {
        display: flex !important;
        /* override d’anciens hides */
        width: 28px;
        height: 28px;
        border-radius: 9999px;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 13px;
        color: #111827;
        border: 1px solid #E5E7EB;
        background: #fff;
    }

    .station-card.minimal .rank-gold {
        background: #FACC15;
        border-color: #FACC15;
    }

    .station-card.minimal .rank-silver {
        background: #D1D5DB;
        border-color: #D1D5DB;
    }

    .station-card.minimal .rank-bronze {
        background: #F59E0B;
        border-color: #F59E0B;
    }

    .station-card.minimal .rank-muted {
        color: #6B7280;
        background: #fff;
    }

    /* Actions : “Y aller” (plein vert) + “Voir” (clair) */
    .station-card.minimal .station-actions {
        display: grid;
        grid-template-columns: 1fr 96px;
        gap: 12px;
    }

    .station-card.minimal .action-btn {
        height: 46px;
        border-radius: 999px;
        font-weight: 700;
    }

    .station-card.minimal .btn-navigate {
        background: #10B981;
        color: #fff;
        border: none;
    }

    .station-card.minimal .btn-map {
        display: inline-flex !important;
        /* override d’anciens hides */
        align-items: center;
        justify-content: center;
        background: #fff;
        color: #0F172A;
        border: 1px solid #E6E8EB;
    }

    /* On neutralise le reste en carte "fermée" */
    .station-card.minimal .price-delta,
    .station-card.minimal .competitiveness-badge,
    .station-card.minimal .station-details,
    .station-card.minimal .station-prices,
    .station-card.minimal .station-services {
        display: none !important;
    }
}

/* =======================
   MOBILE cards (<=480px)
   ======================= */
@media (max-width: 480px) {

    /* Carte : base */
    .station-card.minimal {
        position: relative;
        /* pour la pastille de rang en absolu */
        border: 1px solid #E6E8EB;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
        padding: 14px;
        margin: 10px 8px;
    }

    /* En-tête : prix + infos (rang en absolu, pas dans la grille) */
    .station-card.minimal .station-header {
        display: grid;
        grid-template-columns: auto 1fr;
        /* 2 colonnes : prix | infos  */
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    /* 🔥 Supprimer le "petit cartouche" autour du prix (héritage) */
    .station-card.minimal .station-price-star,
    .station-card.minimal .station-price-star .price-item {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    /* Prix XXL + chip carburant */
    .station-card.minimal .price-item {
        display: grid;
        gap: 4px;
    }

    .station-card.minimal .fuel-price {
        white-space: nowrap;
    }

    .station-card.minimal .fuel-price .price-int {
        font-size: 26px;
        font-weight: 800;
    }

    .station-card.minimal .fuel-price .price-dec {
        font-size: 16px;
        font-weight: 700;
    }

    .station-card.minimal .fuel-price .price-eur {
        font-size: 13px;
        margin-left: 3px;
    }

    .station-card.minimal .fuel-type {
        display: inline-block;
        width: max-content;
        padding: 6px 8px;
        border-radius: 9999px;
        background: #EFF3F6;
        color: #334155;
        font-weight: 600;
        font-size: 12px;
        line-height: 1;
    }

    /* Nom + VILLE + distance (pas la rue) */
    .station-card.minimal .station-info {
        min-width: 0;
    }

    .station-card.minimal .station-name {
        font-size: 16px;
        font-weight: 700;
        color: #0F172A;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 0 4px 0;
    }

    .station-card.minimal .station-location {
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        color: #475569;
    }

    .station-card.minimal .station-location .city {
        letter-spacing: .2px;
    }

    .station-card.minimal .distance-chip {
        padding: 4px 8px;
        border-radius: 9999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 600;
        font-size: 12px;
    }

    /* 🎯 Pastille de classement en haut-droite (comme la maquette) */
    .station-card.minimal .rank-icon {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        border-radius: 9999px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 13px;
        color: #111827;
        border: 1px solid #E5E7EB;
        background: #fff;
    }

    .station-card.minimal .rank-gold {
        background: #FACC15;
        border-color: #FACC15;
    }

    .station-card.minimal .rank-silver {
        background: #D1D5DB;
        border-color: #D1D5DB;
    }

    .station-card.minimal .rank-bronze {
        background: #F59E0B;
        border-color: #F59E0B;
    }

    .station-card.minimal .rank-muted {
        color: #6B7280;
        background: #fff;
    }

    /* Ligne d’actions : "Y aller" + "Voir" alignés */
    .station-card.minimal .station-actions {
        display: grid !important;
        /* force grid si flex/héritage ailleurs */
        grid-template-columns: 1fr 96px;
        /* Y aller large + Voir étroit */
        gap: 12px;
    }

    .station-card.minimal .action-btn {
        height: 46px;
        border-radius: 12px;
        font-weight: 700;
    }

    .station-card.minimal .btn-navigate {
        background: #10B981;
        color: #fff;
        border: none;
    }

    .station-card.minimal .btn-navigate:active {
        transform: translateY(1px);
    }

    /* "Voir" bien visible (certains styles le masquaient) */
    .station-card.minimal .btn-map {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: #fff;
        color: #0F172A;
        border: 1px solid #E6E8EB;
    }

    /* On masque toute la "surcharge" en vue compacte */
    .station-card.minimal .price-delta,
    .station-card.minimal .competitiveness-badge,
    .station-card.minimal .station-details,
    .station-card.minimal .station-prices,
    .station-card.minimal .station-services {
        display: none !important;
    }
}

/* ===== Mobile — alignement propre des cartes (≤480px) ===== */
@media (max-width: 480px) {

    /* Grille du header : prix à gauche, infos à droite */
    .station-card.minimal .station-header {
        position: relative;
        display: grid;
        grid-template-columns: minmax(88px, auto) 1fr;
        /* largeur mini pour stabiliser la colonne prix */
        column-gap: 12px;
        align-items: start;
        /* top-align pour que le nom démarre au même niveau que le prix */
        padding: 12px 14px 10px;
    }

    /* Bloc prix : aligner les décimales et la chip carburant sur la ligne de base */
    .station-card.minimal .station-price-star {
        display: flex;
    }

    .station-card.minimal .station-price-star .price-item {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .station-card.minimal .fuel-type {
        font-size: 12px;
        line-height: 1;
        padding: 4px 8px;
        border-radius: 999px;
        background: #F1F5F9;
        /* gris très clair */
        color: #0F172A;
        /* gris-ardoise foncé */
    }

    /* Colonne info : 2 lignes bien compactes */
    .station-card.minimal .station-info {
        display: grid;
        grid-template-rows: auto auto;
        row-gap: 4px;
        min-width: 0;
        /* permet la troncature */
    }

    .station-card.minimal .station-name {
        font-size: 16px;
        line-height: 1.15;
        font-weight: 600;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 38px;
        /* réserve la place de la pastille de rang */
    }

    .station-card.minimal .station-location {
        display: flex;
        align-items: center;
        /* ville et distance bien alignées */
        gap: 8px;
        font-size: 12.5px;
        line-height: 1.2;
        color: #64748B;
        /* texte secondaire */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card.minimal .station-location .city {
        letter-spacing: .02em;
    }

    /* Chip distance : plus douce et lisible */
    .station-card.minimal .distance-chip {
        background: #EEF2F7;
        color: #0F172A;
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 1;
    }

    /* Pastille de classement bien ancrée en haut-droite du header */
    .station-card.minimal .rank-icon {
        position: absolute;
        right: 12px;
        top: 10px;
        transform: none;
    }

    /* Nettoyage : pas de badge "MEILLEUR/EXCELLENT" dans le mode minimal */
    .station-card.minimal .station-badges {
        display: none;
    }

    /* Espace interne du bloc détails/CTA inchangé, mais on garde une base confortable */
    .station-card.minimal .station-actions {
        padding: 8px 12px 14px;
        gap: 10px;
    }
}

/* ===========================================================
   MOBILE (≤480px) — Carte minimaliste : 
   Prix (gros) → Nom/Ville/Distance → Boutons
   =========================================================== */
@media (max-width: 480px) {

    /* Structure générale du header : vertical */
    .station-card.minimal .station-header {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 14px 10px;
        gap: 8px;
        /* espace prix ↔ texte */
    }

    /* Prix : très lisible, bloc compact */
    .station-card.minimal .station-price-star {
        display: inline-flex;
        align-items: baseline;
        gap: 8px;
    }

    .station-card.minimal .station-price-star .fuel-price {
        display: inline-flex;
        align-items: baseline;
        gap: 2px;
    }

    .station-card.minimal .station-price-star .fuel-price .price-int {
        font-size: 28px;
        /* ← taille principale du prix */
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.5px;
        color: #0F172A;
        /* slate-900 */
    }

    .station-card.minimal .station-price-star .fuel-price .price-dec {
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
        color: #0F172A;
    }

    .station-card.minimal .station-price-star .fuel-price .price-eur {
        font-size: 14px;
        font-weight: 700;
        color: #334155;
        /* slate-700 */
        margin-left: 2px;
    }

    .station-card.minimal .station-price-star .fuel-type {
        font-size: 12px;
        line-height: 1;
        padding: 4px 8px;
        border-radius: 999px;
        background: #F1F5F9;
        /* gris clair */
        color: #0F172A;
    }

    /* Bloc nom / ville / distance sous le prix */
    .station-card.minimal .station-info {
        display: grid;
        grid-template-rows: auto auto;
        row-gap: 4px;
        min-width: 0;
        /* permet la troncature */
        width: 100%;
    }

    .station-card.minimal .station-name {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.15;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 42px;
        /* réserve la place de la pastille de rang */
    }

    .station-card.minimal .station-location {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        line-height: 1.2;
        color: #64748B;
        /* texte secondaire */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card.minimal .distance-chip {
        background: #EEF2F7;
        color: #0F172A;
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 1;
    }

    /* Pastille de classement en haut-droite */
    .station-card.minimal .rank-icon {
        position: absolute;
        right: 12px;
        top: 10px;
    }

    /* On ne montre pas les listes carburants/services en mode minimal */
    .station-card.minimal .station-prices,
    .station-card.minimal .station-services {
        display: none !important;
    }

    /* Zone actions sous le texte : 2 boutons côte-à-côte */
    .station-card.minimal .station-details {
        padding: 0 12px 14px;
    }

    .station-card.minimal .station-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        margin-top: 6px;
    }

    .station-card.minimal .action-btn {
        height: 46px;
        /* tap target ≥ 44px */
        border-radius: 12px;
        font-weight: 700;
        font-size: 14px;
    }

    /* Primaire = vert plein (Y aller) */
    .station-card.minimal .btn-navigate {
        background: #10B981;
        /* emerald-500 */
        color: #FFFFFF;
        border: none;
    }

    .station-card.minimal .btn-navigate:active {
        filter: brightness(.95);
    }

    /* Secondaire = contour (Voir) */
    .station-card.minimal .btn-map {
        background: #FFFFFF;
        color: #0F172A;
        border: 2px solid #E2E8F0;
        /* slate-200 */
    }

    /* On masque le badge "MEILLEUR/EXCELLENT" dans ce mode */
    .station-card.minimal .station-badges {
        display: none;
    }
}

/* ===========================================================
   MOBILE (≤480px) — Cartes : 
   Prix (gros) AU-DESSUS → Nom/ville/distance → Boutons
   =========================================================== */
@media (max-width: 480px) {

    /* HEADER en pile verticale (écrase toute mise en page précédente) */
    .station-card .station-header {
        position: relative;
        display: flex !important;
        /* casse l'ancien grid/row */
        flex-direction: column !important;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 14px 10px;
    }

    /* 1) PRIX — tout en haut, très lisible */
    .station-card .station-price-star {
        order: 1;
        /* au-dessus du nom */
        display: inline-flex;
        align-items: baseline;
        gap: 8px;
    }

    .station-card .station-price-star .fuel-price {
        display: inline-flex;
        align-items: baseline;
        gap: 2px;
    }

    .station-card .station-price-star .fuel-price .price-int {
        font-size: 28px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.4px;
        color: #0F172A;
    }

    .station-card .station-price-star .fuel-price .price-dec {
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
        color: #0F172A;
    }

    .station-card .station-price-star .fuel-price .price-eur {
        font-size: 14px;
        font-weight: 700;
        color: #334155;
        margin-left: 2px;
    }

    .station-card .station-price-star .fuel-type {
        font-size: 12px;
        line-height: 1;
        padding: 4px 8px;
        border-radius: 999px;
        background: #F1F5F9;
        color: #0F172A;
    }

    /* 2) NOM / VILLE / DISTANCE — juste sous le prix */
    .station-card .station-info {
        order: 2;
        display: grid;
        grid-template-rows: auto auto;
        row-gap: 4px;
        min-width: 0;
        /* autorise la troncature */
        width: 100%;
    }

    .station-card .station-name {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.15;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 42px;
        /* espace pour la pastille de rang */
    }

    .station-card .station-location {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        line-height: 1.2;
        color: #64748B;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .station-card .distance-chip {
        background: #EEF2F7;
        color: #0F172A;
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 1;
    }

    /* Pastille de classement (1/2/3/…) en haut-droite du header */
    .station-card .rank-icon {
        position: absolute;
        right: 12px;
        top: 10px;
    }

    /* On allège : pas de listes carburants/services en liste mobile */
    .station-card .station-prices,
    .station-card .station-services {
        display: none !important;
    }

    /* 3) BOUTONS — sous le bloc texte, 2 colonnes */
    .station-card .station-details {
        padding: 0 12px 14px;
    }

    .station-card .station-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        margin-top: 6px;
    }

    .station-card .action-btn {
        height: 46px;
        /* cible tactile ≥ 44px */
        border-radius: 12px;
        font-weight: 700;
        font-size: 14px;
    }

    /* Primaire (Y aller) */
    .station-card .btn-navigate {
        background: #10B981;
        color: #fff;
        border: none;
    }

    .station-card .btn-navigate:active {
        filter: brightness(.95);
    }

    /* Secondaire (Voir) */
    .station-card .btn-map {
        background: #fff;
        color: #0F172A;
        border: 2px solid #E2E8F0;
    }

    /* On masque le badge compétitivité en mode minimal */
    .station-card .station-badges {
        display: none;
    }
}

/* ============================
   Mobile ≤ 480px : actions en bas
   ============================ */
@media (max-width: 480px) {

    /* La carte devient une colonne, le footer remonte en bas */
    .station-card {
        display: flex;
        flex-direction: column;
        min-height: 150px;
        /* respirations + place pour les boutons */
    }

    /* Le bloc boutons est un "footer" interne */
    .station-card .station-details {
        margin-top: auto;
        /* pousse en bas de la carte */
        padding: 10px 12px 14px;
        border-top: 1px solid #EEF2F7;
        /* séparation subtile */
        background: #fff;
        border-bottom-left-radius: inherit;
        border-bottom-right-radius: inherit;
    }

    /* Deux boutons côte-à-côte, même largeur */
    .station-card .station-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .station-card .action-btn {
        height: 48px;
        /* cible tactile */
        border-radius: 12px;
        font-weight: 700;
        font-size: 14px;
    }

    /* Primaire : Y aller */
    .station-card .btn-navigate {
        background: #10B981;
        /* emerald-500 */
        color: #fff;
        border: none;
    }

    .station-card .btn-navigate:active {
        filter: brightness(.95);
    }

    /* Secondaire : Voir station */
    .station-card .btn-map {
        background: #fff;
        color: #0F172A;
        border: 2px solid #E2E8F0;
    }
}

/* ============================
   MOBILE (≤480px) — Boutons visibles en bas de la carte
   ============================ */
@media (max-width: 480px) {

    /* La carte devient une colonne pour pouvoir "pousser" le footer en bas */
    .station-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: 150px;
    }

    /* Contenu du bas = visible, et poussé au bas de la carte */
    .station-card .station-details {
        display: block !important;
        /* si ça avait été masqué ailleurs */
        margin-top: auto;
        /* colle le bloc en bas de la carte */
        padding: 10px 12px 14px;
        border-top: 1px solid #EEF2F7;
        background: #fff;
        border-bottom-left-radius: inherit;
        border-bottom-right-radius: inherit;
    }

    /* Cache uniquement les listes (prix détaillés + services), pas les actions */
    .station-card .station-prices,
    .station-card .station-services {
        display: none !important;
    }

    /* Deux boutons côte à côte, même largeur */
    .station-card .station-actions {
        display: grid !important;
        /* force l’affichage */
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .station-card .action-btn {
        height: 48px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 14px;
    }

    /* Primaire : Y aller */
    .station-card .btn-navigate {
        background: #10B981;
        color: #fff;
        border: none;
    }

    .station-card .btn-navigate:active {
        filter: brightness(.95);
    }

    /* Secondaire : Voir station */
    .station-card .btn-map {
        background: #fff;
        color: #0F172A;
        border: 2px solid #E2E8F0;
    }
}

/* ============================================================
   FINAL MOBILE CARDS (≤ 480px) — prix AU-DESSUS + 2 boutons
   ============================================================ */
@media (max-width:480px) {

    /* Carte = colonne ; on pourra pousser les actions en bas */
    #stationsContainer .station-card {
        display: flex !important;
        flex-direction: column !important;
        padding: 12px;
        border: 1px solid #e8eef4;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
        padding-bottom: 0 !important;
    }

    /* Header empilé : price (top) -> info -> badge (droite) */
    #stationsContainer .station-header {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "price"
            "info"
            "badge" !important;
        row-gap: 8px;
        align-items: start;
    }

    #stationsContainer .station-price-star {
        grid-area: price;
    }

    #stationsContainer .station-info {
        grid-area: info;
    }

    #stationsContainer .station-badges {
        grid-area: badge;
        justify-self: end;
    }

    /* Typos/espaces clés */
    #stationsContainer .fuel-price .price-int {
        font-size: 35px !important;
    }

    #stationsContainer .fuel-price .price-dec {
        font-size: 35px !important;
    }

    #stationsContainer .station-name {
        font-size: 15px;
        font-weight: 700;
    }

    #stationsContainer .station-location {
        font-size: 13px;
        gap: 6px;
    }

    /* Détails + Actions en BAS de la carte */
    #stationsContainer .station-details {
        display: block !important;
        margin-top: auto;
        /* pousse tout le bloc au bas de la carte */
        padding-top: 10px;
        border-top: 1px solid #f1f5f9;
        background: #fff;
    }

    /* 2 boutons visibles : Y aller (primaire) + Voir station (secondaire) */
    #stationsContainer .station-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    #stationsContainer .station-actions .action-btn {
        height: 46px;
        border-radius: 9999px;
        font-weight: 700;
    }

    #stationsContainer .station-actions .btn-navigate {
        background: #0f172a;
        color: #fff;
        border: 0;
    }

    #stationsContainer .station-actions .btn-map {
        display: inline-flex !important;
        /* annule tout display:none précédent */
        background: #fff;
        color: #0f172a;
        border: 1px solid #e6eaf0;
    }

    /* Allègement : pas de liste “tous carburants” dans l’état fermé */
    #stationsContainer .station-prices-all,
    #stationsContainer .btn-show-all {
        display: none !important;
    }

    /* Services : 1 ligne max + fondu */
    #stationsContainer .station-services {
        white-space: nowrap;
        overflow: hidden;
        gap: 6px;
    }

    @supports (mask-image: linear-gradient(black, transparent)) {
        #stationsContainer .station-services {
            mask-image: linear-gradient(to right, black 85%, transparent);
        }
    }

    /* Zéro bande blanche en bas de liste */
    .main-container.view-mode-list .stations-container {
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
}

/* === Mobile ≤480px : pas de ligne entre infos et CTA + rapproché === */
@media (max-width:480px) {

    /* Le bloc infos (prix/services) ne crée plus de séparation visuelle */
    #stationsContainer .station-details {
        border-top: 0 !important;
        padding-top: 0 !important;
        margin-top: 8px !important;
        /* au lieu de margin-top:auto */
        background: transparent !important;
    }

    /* Boutons tout de suite sous les infos, sans “trou” */
    #stationsContainer .station-actions {
        margin-top: 6px !important;
    }

    /* Optionnel : resserrer légèrement les chips services si présents */
    #stationsContainer .station-services {
        margin-bottom: 0 !important;
    }
}

/* === Mobile ≤480px : carte = un seul bloc (pas de sous-carte) === */
@media (max-width:480px) {

    /* Carte : padding unique, pas d'effet de sous-carte */
    #stationsContainer .station-card {
        padding: 12px;
        background: #fff;
        border: 1px solid #e8eef4;
        box-shadow: 0 1px 4px rgba(2, 6, 23, .06);
    }

    /* Header : pas de fond, pas de ligne, pas de rayon/ombre internes */
    #stationsContainer .station-card .station-header {
        background: transparent !important;
        border-bottom: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Détails sous le header : pas de ligne de séparation, faible écart */
    #stationsContainer .station-card .station-details {
        background: transparent !important;
        border-top: 0 !important;
        padding-top: 0 !important;
        margin-top: 8px !important;
    }

    /* CTA rapprochés du contenu */
    #stationsContainer .station-card .station-actions {
        margin-top: 6px !important;
    }
}

/* Mobile : pousser la liste sous la barre de recherche fixe */
@media (max-width:1023px) {

    /* espace au-dessus de la liste = hauteur de la topbar + petit gap */
    .main-container.view-mode-list .stations-container {
        margin-top: calc(var(--mbTopbarH, 76px) + 10px) !important;
    }

    /* la barre de stats collée sous la topbar si elle est sticky */
    .main-container.view-mode-list .list-header {
        top: calc(var(--mbTopbarH, 76px) + 6px) !important;
    }
}

/* Mobile : faire passer la liste sous la barre de recherche fixe */
@media (max-width:1023px) {
    .main-container.view-mode-list .list-view {
        /* on repousse TOUTE la liste : la 1ʳᵉ carte apparaît
       entièrement, bordures incluses, sous la topbar */
        padding-top: calc(var(--mbTopbarH, 76px) + 18px) !important;
    }
}

/* Sheet : transition douce et blocage du scroll lorsqu'ouverte */
.station-sheet .sheet__panel {
    will-change: transform;
}

.station-sheet.open {
    overflow: hidden;
}

body:has(.station-sheet.open) {
    overflow: hidden;
}

/* Force : la fiche STATION n’existe qu’en mobile */
@media (min-width:1024px) {

    #stationSheet,
    .sheet.station-sheet {
        display: none !important;
    }
}

/* === Carburant — Search Sheet (mobile) === */
#searchSheet .sheet__pills {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 10px;
    padding-left: 8px;
}

#mbCloseSearchSheet {
    margin-right: 10px;
    border: none;
    background: none;
}

#searchSheetTitle {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-left: 14px;

}

#searchSheet .sheet__pills .pill {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

/* État sélectionné */
#searchSheet .sheet__pills .pill.active {
    background: #0f172a;
    color: #fff;
    border-color: transparent;
}

/* ===== Prix dans la fiche station ===== */
.st-fuels .p {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 2px;
    font-variant-numeric: tabular-nums;
    /* colonnes bien alignées */
}

.st-fuels .price-int {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.st-fuels .price-dec {
    font-size: 12px;
    opacity: .9;
    line-height: 1;
}

.st-fuels .price-eur {
    margin-left: 4px;
    font-size: 12px;
    opacity: .8;
}

.st-fuels .price-miss {
    opacity: .6;
}

/* (optionnel) légère grille pour chaque ligne de prix */
.st-fuels .price-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.st-fuels .price-row:last-child {
    border-bottom: none;
}

/* accessibilité */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ======= Desktop: cartes homogènes ======= */

/* 1) Enlever les backgrounds gris des cartes */
.station-card {
    background: #fff;
}

.station-header,
.station-details {
    background: #fff !important;
    /* était #fafafa */
    border: 0 !important;
    /* on retire les bordures grises */
}

/* 2) Enlever les bordures/boîtes autour du prix */
.price-item {
    background: transparent !important;
    /* était #fff */
    border: 0 !important;
    /* était 1px solid #ddd */
    padding: 0 !important;
    min-width: auto !important;
}

.station-price-star {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3) Prix plus gros + décimales = mêmes tailles */
.fuel-price {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.fuel-price .price-int,
.fuel-price .price-dec {
    font-size: 22px;
    /* mobile/base */
    font-weight: 800;
}

.fuel-price .price-eur {
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
    opacity: .75;
}

@media (min-width:1024px) {

    .fuel-price .price-int,
    .fuel-price .price-dec {
        font-size: 28px;
    }
}

/* 4) Couleur du badge 1-2-3 (pastille numérotée) */
.rank-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.rank-gold {
    background: #16a34a;
    color: #fff;
}

/* 1 = vert */
.rank-silver {
    background: #3b82f6;
    color: #fff;
}

/* 2 = bleu */
.rank-bronze {
    background: #a855f7;
    color: #fff;
}

/* 3 = violet */

/* (optionnel) petite pastille distance reste sobre */
.distance-chip {
    background: #f3f4f6;
}

/* (optionnel) header de carte axé “prix d’abord” */
.station-header--price-first {
    align-items: center;
}

.list-stats #sortToggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.list-stats .sort-label {
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
}

/* === CTA stations : layout mobile sans toucher le JS === */

/* 1) Mobile medium: 1 ligne (Y aller large, secondaires compacts) */
@media (min-width: 481px) and (max-width: 1023px) {
    .station-actions {
        display: grid;
        /* override du flex par défaut */
        grid-template-columns: 1fr auto auto;
        gap: 8px;
        align-items: stretch;
    }

    .station-actions .btn-more,
    .station-actions .btn-map {
        /* compacts : largeur au contenu */
        padding-inline: 12px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
        background: #fff;
        color: #111827;
        border: 1px solid #e5e7eb;
    }

    .station-actions .btn-more:hover,
    .station-actions .btn-map:hover {
        background: #f9fafb;
    }
}

/* 2) Petit mobile: primaire pleine largeur + 2 secondaires dessous */
@media (max-width: 480px) {
    .station-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .station-actions .btn-navigate {
        grid-column: 1 / -1;
        /* prend toute la rangée */
    }

    .station-actions .btn-more,
    .station-actions .btn-map {
        padding-inline: 12px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
        background: #fff;
        color: #111827;
        border: 1px solid #e5e7eb;
    }
}

/* 3) Très petit écran: secondaires en icône seule pour garder de la place */
@media (max-width: 340px) {

    .station-actions .btn-more span,
    .station-actions .btn-map span {
        display: none;
    }

    .station-actions .btn-more,
    .station-actions .btn-map {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    /* Pense à donner un aria-label côté markup si tu masques le texte */
}

/* === Mobile view-toggle — single source of truth (keep this at the very end) === */
.only-mobile {
    display: none;
}

@media (max-width:1023px) {

    /* helpers */
    .only-mobile {
        display: inline-flex !important;
    }

    /* boutons, etc. */
    .only-desktop {
        display: none !important;
    }

    /* pas de bouton sur la home */
    .home #mbToggleView,
    .home #mbToggleViewList {
        display: none !important;
    }

    /* affichage conditionné par la vue */
    .main-container.view-mode-carte #mbToggleView {
        display: inline-flex !important;
    }

    .main-container.view-mode-list #mbToggleViewList {
        display: inline-flex !important;
    }

    /* position/z-index cohérents par-dessus la carte */
    .view-toggle {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: max(16px, env(safe-area-inset-bottom, 0) + 12px);
        z-index: 2500;
        /* au-dessus de Leaflet & de la carte */
    }
}

/* === [FIX] FAB "Vue liste / Vue carte" — overrides de fin === */
@media (max-width:1023px) {

    /* Masquer sur la home uniquement */
    body.home #mbToggleView,
    body.home #mbToggleViewList {
        display: none !important;
    }

    /* Affichage conditionné par la vue */
    .main-container.view-mode-carte #mbToggleView {
        display: inline-flex !important;
    }

    .main-container.view-mode-carte #mbToggleViewList {
        display: none !important;
    }

    .main-container.view-mode-list #mbToggleView {
        display: none !important;
    }

    .main-container.view-mode-list #mbToggleViewList {
        display: inline-flex !important;
    }

    /* Position + superposition au-dessus de la carte/liste */
    #mbToggleView,
    #mbToggleViewList {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: max(16px, env(safe-area-inset-bottom) + 12px) !important;
        z-index: 3000 !important;

        min-width: 52%;
        justify-content: center;
        padding: 10px 14px;
        border: 0;
        border-radius: 999px;
        background: #0f172a;
        color: #fff;
        font-weight: 700;
        box-shadow: 0 10px 24px rgba(2, 6, 23, .25);
    }
}

/* === [FINAL OVERRIDE] FAB Vue liste / Vue carte (mobile) ================== */
@media (max-width:1023px) {

    /* Ne jamais afficher sur la Home */
    body.home #mbToggleView,
    body.home #mbToggleViewList {
        display: none !important;
    }

    /* Affichage conditionné par la vue, dès que l'app est visible */
    body:not(.home) .main-container.view-mode-carte #mbToggleView {
        display: inline-flex !important;
    }

    body:not(.home) .main-container.view-mode-carte #mbToggleViewList {
        display: none !important;
    }

    body:not(.home) .main-container.view-mode-list #mbToggleView {
        display: none !important;
    }

    body:not(.home) .main-container.view-mode-list #mbToggleViewList {
        display: inline-flex !important;
    }

    /* Style + superposition (au-dessus de Leaflet & co) */
    #mbToggleView,
    #mbToggleViewList {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: max(16px, env(safe-area-inset-bottom, 0) + 12px) !important;
        z-index: 4000 !important;
        /* > carte, > overlays (refresh-area ~950) */
        min-width: 52%;
        justify-content: center;
        padding: 10px 14px;
        border: 0;
        border-radius: 999px;
        background: #0f172a;
        color: #fff;
        font-weight: 700;
        box-shadow: 0 10px 24px rgba(2, 6, 23, .25);
    }
}

/* ===== Services (pills) ===== */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 768px) {
    .svc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.svc-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
    cursor: pointer;
    user-select: none;
    margin: 0px 14px 0px 10px;
}

.svc-grid label:hover {
    border-color: #cbd5e1;
}

.svc-grid label:focus-within {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* case à cocher “native” mais propre */
.svc-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    /* support moderne, sinon fallback = border */
}

/* état actif (si le navigateur supporte :has) */
.svc-grid label:has(input:checked) {
    background: #eef6ff;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .10) inset;
}

/* 🎨 Autocomplétion élégante */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestions[hidden] {
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 8px;
    font-size: 16px;
}

.suggestion-text {
    flex: 1;
    min-width: 0;
}

.suggestion-label {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-context {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* ==== Map Pins (CSS / DivIcon) ========================================= */
:root {
    --pin-violet: #4F46E5;
    --pin-violet-dark: #3c37b8;
    --pin-shadow: 0 2px 10px rgba(3, 7, 18, .18);
    --halo-gold: #F6C945;
    --halo-violet: #8B5CF6;
}

/* Conteneur du pin (DivIcon) */
.pin {
    position: relative;
    width: 34px;
    height: 40px;
    border-radius: 16px 16px 16px 0;
    /* goutte arrondie */
    transform: rotate(45deg);
    /* crée la pointe */
    background: var(--pin-violet);
    box-shadow: var(--pin-shadow);
    display: grid;
    place-items: center;
}

/* Pastille lisible (dé-rotée) pour le prix */
.pin__label {
    transform: rotate(-45deg);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    padding: 0 2px;
}

/* Halo sélection (focus) */
.pin.is-selected {
    outline: 6px solid color-mix(in oklab, var(--halo-violet) 28%, transparent);
    outline-offset: 2px;
}

/* “Meilleur prix” de la zone : anneau doré léger */
.pin.is-best {
    border: 2px solid #fff;
    /* liseré blanc propre */
    box-shadow:
        0 2px 10px rgba(3, 7, 18, .18),
        0 0 0 6px color-mix(in oklab, var(--halo-gold) 28%, transparent);
}

/* Hover/click feedback */
.leaflet-marker-icon .pin {
    transition: transform .15s ease, box-shadow .15s ease;
}

.leaflet-marker-icon:hover .pin {
    transform: rotate(45deg) translateY(-2px);
}

/* Rendre les pills explicitement cliquables */
.pills .pill {
    cursor: pointer;
}

/* ==== HOTFIX HOME FUEL PILLS ==== */
#heroFuelPills,
#heroFuelPills * {
    pointer-events: auto;
}

#heroFuelPills {
    position: relative;
    z-index: 5;
}

#heroFuelPills .pill,
#heroFuelPills [data-fuel] {
    cursor: pointer;
}

#sortToggle.is-locked .seg.disabled {
    opacity: .45;
    cursor: not-allowed;
}

.station-card .station-header .station-price-star.is-empty {
    min-width: 56px;
    /* au lieu de 130px */
    width: auto;
    /* laisse la largeur s’ajuster au contenu (rang + delta) */
}

/* Quand il n'y a PAS de prix vedette (Tous carburants) */
.station-card .station-header .station-price-star.is-empty {
    min-width: 56px;
    /* déjà demandé */
    width: auto;
}

/* Dés-encadrer totalement le numéro de rang */
/* Cas "Tous carburants" : la zone prix est vide */
.station-card .station-header .station-price-star.is-empty {
    min-width: 56px;
    width: auto;
    border: 0 !important;
    /* si un contour était posé sur le conteneur */
    box-shadow: none !important;
}

.station-card .station-header .station-price-star.is-empty,
.station-card .station-header .station-price-star.is-empty .price-item,
.station-card .station-header .station-price-star.is-empty .price-miss {
    border: none !important;
    box-shadow: none !important;
}

/* Badge pour la meilleure station (#1) : cohérent avec le marqueur blanc de la carte */
.station-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #d99828;
    background: #FFFFFF;
    border: 2px solid #d99428;
    border-radius: 9999px;
    padding: 4px 8px;
    box-shadow: 0 0 8px rgb(217 99 40 / 45%), 0 2px 4px rgba(0, 0, 0, .4);
    /* glow violet + petite ombre */
}

/* Chip rang pour #2 / #3 : discret, pas podium "or/argent/bronze" */
.station-rank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 9999px;
    background: #E5E7EB;
    /* gris clair */
    color: #111827;
    /* gris très foncé (presque noir) */
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

:root {
    --accent: #5B21B6;
    /* Violet marque */
    --text-main: #0F172A;
    /* Gris très foncé quasi noir */
    --text-muted: #64748B;
    /* Gris moyen (infos secondaires) */

    --bg-card: #FFFFFF;
    --bg-soft: #F8FAFC;
    /* Gris très clair (pills neutres) */
    --border-soft: #E2E8F0;
    /* Gris clair pour bordures/pills */

    --radius-pill: 999px;
}

:root {
    /* Couleur d'action / identité (CTA "Y aller", badge #1) */
    --accent: #B45309;
    /* ambre/orangé chaud, pas fluo */

    /* Texte */
    --text-main: #0F172A;
    /* gris très foncé quasi noir */
    --text-muted: #64748B;
    /* gris moyen pour infos secondaires */

    /* Fonds */
    --bg-page: #F1F5F9;
    /* fond global derrière les cartes */
    --bg-card: #FFFFFF;
    /* fond carte station / encarts */
    --bg-soft: #F8FAFC;
    /* fond des petites pills neutres */

    /* Bordures / séparateurs / contours neutres */
    --border-soft: #E2E8F0;

    /* Rayons communs */
    --radius-pill: 999px;
    --radius-card: 12px;
}

.hdr-search .fuel-select::after {
    content: none;
}

/* Restaure la flèche native du <select> */
.hdr-search .fuel-select select {
    -webkit-appearance: auto;
    -moz-appearance: auto;
    appearance: auto;
    padding-right: 16px;
}

.hdr-search .fuel-select {
    padding-right: 16px;
}

body.mb-search-open .hdr-search {
    display: none !important;
}

@media (max-width: 1023px) {
    .hdr-search {
        display: none !important;
    }
}

/* === SearchSheet ancrée à la barre (mobile) === */
#searchSheet.sheet--anchored .sheet__backdrop {
    background: rgba(0, 0, 0, .25);
    backdrop-filter: blur(2px);
}

#searchSheet.sheet--anchored .sheet__panel {
    position: fixed;
    left: var(--anch-l);
    top: var(--anch-t);
    /* pile sur la barre */
    width: var(--anch-w);
    max-width: 680px;
    max-height: min(82vh, 620px);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    transform-origin: top center;
}

#searchSheet.sheet--anchored:not(.open) .sheet__panel {
    transform: scale(.98);
    opacity: 0;
}

#searchSheet.sheet--anchored.open .sheet__panel {
    transform: scale(1);
    opacity: 1;
}

/* La barre “téléportée” en haut de la sheet */
#searchSheet .sheet-search-host {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 12px;
    background: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

/* Empêche l’effet visuel de “deux barres” */
html.searchsheet-mounted .mb-topbar .mb-searchbar {
    visibility: hidden;
}

/* === Popover ancré à la barre === */
#searchSheet.sheet--anchored .sheet__backdrop {
    background: rgba(0, 0, 0, .25);
    backdrop-filter: blur(2px);
}

#searchSheet.sheet--anchored .sheet__panel {
    position: fixed;
    left: var(--anch-l);
    top: var(--anch-t);
    width: var(--anch-w);
    max-width: 680px;
    max-height: min(82vh, 620px);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    transform-origin: top center;
}

#searchSheet.sheet--anchored:not(.open) .sheet__panel {
    transform: scale(.98);
    opacity: 0;
}

#searchSheet.sheet--anchored.open .sheet__panel {
    transform: scale(1);
    opacity: 1;
}

/* Hôte sticky pour la barre téléportée */
#searchSheet .sheet-search-host {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 12px;
    background: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

/* Cache la barre originale quand elle est téléportée */
html.searchsheet-mounted .mb-topbar .mb-searchbar {
    visibility: hidden;
}

/* === Mode popover ancré sur la barre ===================================== */
#searchSheet.sheet--anchored .sheet__panel {
    position: fixed !important;
    top: var(--anch-t) !important;
    left: var(--anch-l) !important;
    width: var(--anch-w) !important;

    bottom: auto !important;
    right: auto !important;
    margin: 0 !important;

    max-width: 680px;
    max-height: min(82vh, 620px);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    transform-origin: top center;
}

#searchSheet.sheet--anchored:not(.open) .sheet__panel {
    transform: scale(.98);
    opacity: 0;
}

#searchSheet.sheet--anchored.open .sheet__panel {
    transform: scale(1);
    opacity: 1;
}

/* Hôte sticky pour la barre téléportée */
#searchSheet .sheet-search-host {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 12px;
    background: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

/* Cache la barre d'origine pendant la téléportation */
html.searchsheet-mounted .mb-topbar .mb-searchbar {
    visibility: hidden !important;
}

/* Doit être chargé APRES les styles bottom-sheet */
#searchSheet.sheet--anchored .sheet__panel {
    position: fixed !important;
    top: var(--anch-t) !important;
    left: var(--anch-l) !important;
    width: var(--anch-w) !important;
    bottom: auto !important;
    right: auto !important;
    margin: 0 !important;
    max-width: 680px;
    max-height: min(82vh, 620px);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}

html.searchsheet-mounted .mb-topbar .mb-searchbar {
    visibility: hidden !important;
}

/* === ANCRAGE SEARCHSHEET : overrides forts (doivent être en DERNIER) === */
#searchSheet.sheet--anchored .sheet__panel {
    position: fixed !important;
    top: var(--anch-t) !important;
    left: var(--anch-l) !important;
    width: var(--anch-w) !important;
    right: auto !important;
    bottom: auto !important;
    max-width: 680px !important;
    max-height: min(82vh, 620px) !important;
    margin: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25) !important;
    transform: none !important;
    /* ⛔ neutralise le slide-up */
}

#searchSheet.sheet--anchored.open .sheet__panel {
    transform: none !important;
    /* ce sélecteur bat souvent l’état .open */
}

/* Pas de grand backdrop en mode popover */
#searchSheet.sheet--anchored .sheet__backdrop {
    background: transparent !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === FIX POUR LE POPOVER ZENPARK-STYLE === */

/* Simplification: on n'a plus besoin de la classe .searchsheet-mounted sur <html> */
/* On gère tout via visibility sur l'élément directement en JS */

/* Assure que le popover est bien au-dessus de tout */
#searchSheet.sheet--anchored {
    z-index: 9999 !important;
}

#searchSheet.sheet--anchored .sheet__backdrop {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(3px) !important;
}

/* Panel du popover - DOIT OVERRIDE tous les autres styles */
#searchSheet.sheet--anchored .sheet__panel {
    position: fixed !important;
    top: var(--anch-t) !important;
    left: var(--anch-l) !important;
    width: var(--anch-w) !important;
    right: auto !important;
    bottom: auto !important;
    max-width: 680px !important;
    max-height: min(82vh, 620px) !important;
    margin: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3) !important;
    transform-origin: top center !important;

    /* Transitions douces */
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* État fermé */
#searchSheet.sheet--anchored:not(.open) .sheet__panel {
    transform: scale(0.95) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* État ouvert */
#searchSheet.sheet--anchored.open .sheet__panel {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* Conteneur pour la barre de recherche dans le popover */
#searchSheet .sheet-search-host {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px 16px 0 0;
}

/* Le clone de la searchbar dans le popover doit avoir le même style */
#searchSheet .sheet-search-host .mb-searchbar {
    margin: 0;
    box-shadow: none;
    /* Pas de double ombre */
}

/* On assure que le contenu en dessous est scrollable */
#searchSheet.sheet--anchored .sheet__content {
    max-height: calc(82vh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Fix pour éviter les problèmes de scroll sur iOS */
@supports (-webkit-touch-callout: none) {
    #searchSheet.sheet--anchored .sheet__content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Animation d'entrée plus fluide */
@media (prefers-reduced-motion: no-preference) {
    #searchSheet.sheet--anchored .sheet__panel {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
            opacity 0.2s ease-out !important;
    }
}

/* Desktop: désactive le popover (comportement normal) */
@media (min-width: 1024px) {
    #searchSheet.sheet--anchored .sheet__panel {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }


}

/* ============================================================================
   OPTION NUCLÉAIRE : CSS POPOVER ZENPARK
   
   À copier/coller APRÈS avoir supprimé TOUTES les autres règles 
   #searchSheet.sheet--anchored dans app.css (lignes 9368-9643)
   ============================================================================ */

@media (max-width: 1023px) {

    /* 1. Z-index max pour être au-dessus de tout */
    body #searchSheet.sheet.sheet--anchored {
        z-index: 99999 !important;
    }

    /* 2. Le panel : ancré à la position de la barre */
    body #searchSheet.sheet.sheet--anchored .sheet__panel {
        /* Position */
        position: fixed !important;
        top: var(--anch-t, 70px) !important;
        left: var(--anch-l, 12px) !important;
        bottom: auto !important;
        right: auto !important;

        /* Taille */
        width: var(--anch-w, calc(100vw - 24px)) !important;
        height: auto !important;
        max-width: 680px !important;
        max-height: min(82vh, 680px) !important;
        min-height: auto !important;

        /* Apparence */
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 16px !important;
        background: #fff !important;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4) !important;

        /* Transform */
        transform-origin: top center !important;
        transition: transform 0.22s ease-out, opacity 0.18s ease-out !important;
    }

    /* 3. État fermé */
    body #searchSheet.sheet.sheet--anchored:not(.open) .sheet__panel {
        transform: scale(0.94) translateY(-12px) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* 4. État ouvert */
    body #searchSheet.sheet.sheet--anchored.open .sheet__panel {
        transform: scale(1) translateY(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* 5. Backdrop */
    body #searchSheet.sheet.sheet--anchored .sheet__backdrop {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 1 !important;
    }

    /* 6. Container pour la searchbar clonée */
    body #searchSheet .sheet-search-host {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 12px;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 16px 16px 0 0;
    }

    /* 7. Searchbar clonée sans ombre redondante */
    body #searchSheet .sheet-search-host .mb-searchbar {
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* 8. Content scrollable */
    body #searchSheet.sheet--anchored .sheet__content {
        max-height: calc(82vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* 9. Pas de handle de drag en mode popover */
    body #searchSheet.sheet--anchored .sheet__handle,
    body #searchSheet.sheet--anchored [class*="handle"],
    body #searchSheet.sheet--anchored [class*="drag"] {
        display: none !important;
    }

    /* 10. IMPORTANT : Cache la barre originale pendant que le popover est ouvert */
    body #searchSheet.sheet--anchored.open~* .mb-searchbar,
    body.has-searchsheet-open .mb-topbar .mb-searchbar:not(#searchSheet .mb-searchbar) {
        visibility: hidden !important;
    }
}

/* Desktop : comportement normal */
@media (min-width: 1024px) {
    body #searchSheet.sheet.sheet--anchored .sheet__panel {
        position: static !important;
        transform: none !important;
    }
}

/* === Patch espacement SearchSheet ancrée (mobile) === */
@media (max-width: 1023px) {

    /* Conteneur principal du popover */
    #searchSheet.sheet--anchored .sheet__panel {
        padding: 16px 18px 18px;
        /* ↑ espace intérieur global */
        gap: 14px;
        /* ↑ espace vertical entre blocs (titre, pills, services, bouton) */
    }

    /* Titre (« Où cherchez-vous… ») */
    #searchSheet.sheet--anchored .sheet__title {
        padding: 6px 0 2px;
        /* titre un poil plus aéré */
        margin-bottom: 4px;
    }

    /* Barre de recherche interne à la sheet (si présente) */
    #searchSheet.sheet--anchored .sheet-search-host {
        margin: -4px -4px 8px;
        /* décale moins, ajoute de l’air sous la barre */
    }

    /* Pills carburants */
    #searchSheet.sheet--anchored .sheet__pills {
        gap: 8px;
        /* ↑ espace entre pills */
    }

    #searchSheet.sheet--anchored .sheet__pills .pill {
        padding: 10px 14px;
        /* pills un peu plus “respirantes” */
    }

    /* Grille des services (2 colonnes) */
    #searchSheet .svc-grid {
        gap: 12px 14px;
        /* ↑ espacement lignes/colonnes */
    }

    #searchSheet .svc-grid label {
        padding: 14px;
        /* ↑ padding de chaque case service */
    }

    /* Bouton Rechercher */
    #searchSheet.sheet--anchored .btn.primary {
        height: 46px;
        /* touch target confortable */
        padding: 0 18px;
        margin-top: 8px;
        /* espace au-dessus du bouton */
    }
}

/* On ne veut plus de la barre clonée dans la sheet */
#searchSheet .sheet-search-host {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Gouttières internes du popover de recherche */
:root {
    --sheet-gutter: 20px;
}

/* ajuste 18–24px selon ton goût */

.sheet-header,
.sheet-footer {
    padding: calc(var(--sheet-gutter) - 4px) var(--sheet-gutter) !important;
}

.sheet-content {
    padding: var(--sheet-gutter) !important;
}

/* --- Lien “+ d’infos” discret à droite du header --- */
.station-card .station-badges .more-link {
    margin-left: 8px;
    background: none;
    border: 0;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    opacity: .75;
}

.station-card .station-badges .more-link::after {
    content: "›";
    margin-left: 6px;
    opacity: .6;
}

.station-card .station-badges .more-link:active {
    transform: translateY(1px);
}

/* --- Liste mobile : on n’affiche plus le footer d’actions (tout passe en sheet) --- */
@media (max-width: 1023px) {
    .station-card .station-details {
        display: none !important;
    }
}

/* Mobile: header positionné pour ancrer le lien */
@media (max-width:480px) {
    .station-card .station-header {
        position: relative;
    }

    .station-card .more-link {
        position: absolute;
        right: 12px;
        top: 12px;
        display: inline-block;
        background: none;
        border: 0;
        padding: 6px 0;
        font-size: 13px;
        font-weight: 600;
        color: #0F172A;
        opacity: .75;
    }

    .station-card .more-link::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* On cache les boutons sur mobile (la sheet prend le relais) */
    .station-card .station-actions {
        display: none !important;
    }
}

/* Desktop: pas de lien “+ d’infos”, on garde les boutons */
@media (min-width:481px) {
    .station-card .more-link {
        display: none !important;
    }
}

/* Tap affordance (mobile) */
@media (max-width:480px) {
    .station-card {
        cursor: pointer;
    }

    .station-card button,
    .station-card a {
        cursor: default;
    }

    /* évite le curseur main sur les petits liens/boutons internes */
}

/* FIX: Mobile ≤480px — retire l'espace mort des cartes */
@media (max-width:480px) {

    /* 1) Carte = block, pas de hauteur minimale artificielle */
    #stationsContainer .station-card {
        display: block !important;
        min-height: auto !important;
    }

    /* 2) Les "détails" n'occupent plus d'espace */
    #stationsContainer .station-card .station-details {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* 3) Par sécurité, on coupe aussi les sous-blocs si présents */
    #stationsContainer .station-prices,
    #stationsContainer .station-services,
    #stationsContainer .station-actions {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* 4) En-tête compact: pas d'écart résiduel */
    #stationsContainer .station-header {
        margin-bottom: 6px !important;
    }
}

/* Mobile: pile rang + "+ d’infos" en haut-droite */
@media (max-width:480px) {
    .station-card .station-header {
        position: relative;
        padding-right: 92px;
    }

    /* réserve la place à droite */

    .station-card .header-right {
        position: absolute;
        right: 12px;
        top: 10px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    /* Rang compact */
    .station-card .header-right .station-top-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 2px 8px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, .08);
        font-weight: 700;
        font-size: 12px;
        line-height: 1;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    }

    .station-card .header-right .station-top-badge .emoji {
        font-size: 14px;
    }

    .station-card .header-right .station-rank-chip {
        padding: 2px 8px;
        border-radius: 999px;
        background: #EEF2F6;
        color: #0F172A;
        font-weight: 700;
        font-size: 12px;
        line-height: 1;
    }

    /* Lien "+ d’infos" discret */
    .station-card .header-right .more-link {
        background: none;
        border: 0;
        padding: 6px 0;
        font-size: 13px;
        font-weight: 600;
        color: #0F172A;
        opacity: .75;
    }

    .station-card .header-right .more-link::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* Cache l’ancien conteneur rang en mobile pour éviter le doublon */
    .station-card .station-badges {
        display: none !important;
    }
}

/* Desktop: on garde le comportement existant */
@media (min-width:481px) {
    .station-card .header-right {
        display: none !important;
    }
}

/* === Mobile: header en 2 colonnes + textes stables === */
@media (max-width:480px) {

    /* Header en grille: gauche = infos, droite = rang + +d'infos */
    .station-card .station-header {
        display: grid !important;
        grid-template-columns: 1fr auto;
        column-gap: 12px;
        align-items: start;
        padding-right: 12px;
        /* évite les collisions sur bords */
    }

    /* Tout le bloc infos à gauche */
    .station-card .station-price-star,
    .station-card .station-info {
        grid-column: 1 / 2;
        min-width: 0;
    }

    /* Colonne droite: rang au-dessus, + d’infos dessous */
    .station-card .header-right {
        grid-column: 2 / 3;
        position: static !important;
        /* annule l'absolu précédent */
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
        min-width: max-content;
        /* tient sur une ligne */
    }

    /* Empêche la casse du “+ d’infos” et harmonise la taille */
    .station-card .header-right .more-link {
        background: none;
        border: 0;
        padding: 4px 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        word-break: keep-all;
        /* pas de retour à la ligne sur le + */
        color: #0F172A;
        opacity: .75;
    }

    .station-card .header-right .more-link::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* Rang compact */
    .station-card .header-right .station-top-badge,
    .station-card .header-right .station-rank-chip {
        padding: 2px 8px;
        border-radius: 999px;
        font-weight: 700;
        font-size: 12px;
        line-height: 1;
        background: #EEF2F6;
        color: #0F172A;
        border: 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    }

    .station-card .header-right .station-top-badge .emoji {
        font-size: 14px;
    }

    /* Cache l'ancien conteneur rang en mobile (évite doublon) */
    .station-card .station-badges {
        display: none !important;
    }

    /* Prix responsif et stable */
    .station-card .station-price-star .fuel-price {
        font-size: clamp(26px, 8vw, 34px);
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.3px;
    }

    /* Nom qui ne déborde jamais la colonne gauche */
    .station-card .station-name {
        font-size: clamp(16px, 4.2vw, 18px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Mobile : colonne droite rang + "+ d'infos" bien espacée et alignée à droite */
@media (max-width:480px) {
    .station-card .station-header {
        display: grid !important;
        grid-template-columns: 1fr auto;
        column-gap: 12px;
        align-items: start;
    }

    .station-card .header-right {
        display: grid !important;
        grid-auto-rows: min-content;
        justify-items: end;
        /* aligne les deux éléments sur le même bord droit */
        row-gap: 10px;
        /* ↑ espace entre rang et "+ d'infos" (ajuste à 8/12 si besoin) */
        padding-right: 2px;
        /* micro-alignement visuel avec le rayon de la carte */
    }

    .station-card .header-right .more-link {
        display: inline-flex;
        /* évite les décalages de glyphe */
        align-items: center;
        gap: 6px;
        /* espace entre “+ d’infos” et le chevron */
        white-space: nowrap;
        line-height: 1;
    }

    .station-card .header-right .more-link::after {
        content: "›";
    }
}

@media (max-width:480px) {
    .station-card {
        position: relative;
        padding-bottom: 38px !important;
    }

    .station-card .station-header {
        display: grid !important;
        grid-template-columns: 1fr auto;
        column-gap: 12px;
        align-items: start;
    }

    .station-card .header-right {
        justify-self: end;
    }

    /* rang en haut-droite */

    .station-card .more-link.more-bottom {
        position: absolute;
        right: 12px;
        bottom: 10px;
        background: none;
        border: 0;
        padding: 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        color: #0F172A;
        opacity: .85;
    }

    .station-card .more-link.more-bottom::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }
}

/* Mobile : "+ d'infos" aligné sur la ligne Ville • Distance */
@media (max-width:480px) {
    .station-card .station-header {
        display: grid !important;
        grid-template-columns: 1fr auto;
        /* gauche: infos, droite: rang */
        column-gap: 12px;
        align-items: start;
    }

    .station-card .header-right {
        justify-self: end;
    }

    /* rang en haut-droite */

    .station-card .station-loc-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .station-card .station-location {
        flex: 1;
        min-width: 0;
        /* prend toute la largeur dispo */
    }

    .station-card .more-link.more-inline {
        background: none;
        border: 0;
        padding: 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        color: #0F172A;
        opacity: .85;
    }

    .station-card .more-link.more-inline::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* Si l'ancienne version .more-bottom existe encore, on la cache */
    .station-card .more-link.more-bottom {
        display: none !important;
    }
}

/* === FIX mobile: "+ d'infos" sur la même ligne que ville + distance === */
@media (max-width:480px) {

    /* on neutralise toutes les anciennes variantes */
    .station-card .header-right .more-link,
    .station-card .more-link.more-bottom,
    .station-card .more-link:not(.more-inline) {
        display: none !important;
    }

    /* la ligne "ville • distance  …  + d'infos" */
    .station-card .station-loc-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .station-card .station-location {
        flex: 1;
        min-width: 0;
    }

    /* le lien inline à droite */
    .station-card .more-link.more-inline {
        display: inline-flex !important;
        background: none;
        border: 0;
        padding: 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        color: #0F172A;
        opacity: .85;
    }

    .station-card .more-link.more-inline::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* sécurité : pas de padding réservé à droite par d'anciennes règles */
    .station-card .station-header {
        padding-right: 0 !important;
        position: static !important;
    }

    .station-card .header-right {
        position: static !important;
    }
}

/* Desktop: on ne montre pas le lien inline */
@media (min-width:481px) {
    .station-card .more-link.more-inline {
        display: none !important;
    }
}

/* MOBILE ≤480px — Colonne droite figée (rang en haut, + d'infos en bas) */
/* MOBILE ≤480px — colonne droite fixe + "+ d'infos" sur la ligne Ville/Distance */
@media (max-width:480px) {
    .station-card {
        --side-col: 96px;
    }

    /* largeur de la colonne droite */

    /* Header: infos à gauche | rang à droite (pas de position absolue) */
    .station-card .station-header {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 12px;
        align-items: start;
    }

    .station-card .header-right {
        justify-self: end;
    }

    /* Ligne "Ville • Distance … + d'infos" en 2 colonnes : 1fr | --side-col */
    .station-card .station-loc-row {
        display: grid;
        grid-template-columns: 1fr var(--side-col);
        align-items: center;
        column-gap: 8px;
    }

    .station-card .station-location {
        min-width: 0;
    }

    /* évite le débordement */

    /* "+ d'infos" à droite, position stable */
    .station-card .more-link.more-inline {
        position: static !important;
        /* neutralise toute règle absolue héritée */
        justify-self: end;
        /* colle au bord droit de la colonne */
        display: inline-flex;
        background: none;
        border: 0;
        padding: 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        color: #0F172A;
        opacity: .85;
    }

    .station-card .more-link.more-inline::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* On masque les autres variantes éventuelles pour éviter les collisions */
    .station-card .header-right .more-link,
    .station-card .more-link.more-bottom {
        display: none !important;
    }
}

/* ==== MOBILE ≤480px : header en grille + unique bouton "+ d'infos" ==== */
@media (max-width: 480px) {
    .station-card .station-header--mbgrid {
        display: grid;
        grid-template-columns: 1fr auto;
        /* gauche = infos, droite = badge/bouton */
        grid-template-rows: auto auto;
        /* ligne 1 = prix+badge, ligne 2 = ville+distance + bouton */
        column-gap: 12px;
        align-items: center;
        background: #fafafa;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }

    .station-card .station-price-star {
        grid-column: 1;
        grid-row: 1;
    }

    .station-card .header-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .station-card .station-info {
        grid-column: 1;
        grid-row: 2;
    }

    .station-card .more-link.more-grid {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    /* Ligne ville • distance */
    .station-card .station-loc-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .station-card .station-location {
        min-width: 0;
    }

    /* Désactive les anciennes variantes mobile */
    .station-card .more-link.more-inline,
    .station-card .more-link.more-bottom {
        display: none !important;
    }
}

/* ==== MOBILE ≤680px : "+ d'infos" en bas-droite de la grille ==== */
@media (max-width:680px) {
    .station-card .station-header--mbgrid {
        display: grid;
        grid-template-columns: 1fr auto;
        /* gauche: infos | droite: badge/bouton */
        grid-template-rows: auto auto;
        /* 1: prix+badge | 2: ville+distance + bouton */
        column-gap: 12px;
        row-gap: 6px;
        align-items: center;
        padding: 12px 15px;
    }

    .station-card .station-price-star {
        grid-column: 1;
        grid-row: 1;
    }

    .station-card .header-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .station-card .station-info {
        grid-column: 1;
        grid-row: 2;
    }

    /* Le seul bouton à garder et afficher */
    .station-card .station-header--mbgrid .more-link.more-grid {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;

        display: inline-flex !important;
        /* remet visible même si masqué ailleurs */
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    .station-card .station-header--mbgrid .more-link.more-grid::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* On neutralise toutes les anciennes variantes */
    .station-card .more-link.more-inline,
    .station-card .more-link.more-bottom,
    .station-card .header-right .more-link {
        display: none !important;
    }
}

/* === FINAL MOBILE ≤680px — grille 2×2 et ancrage bas-droite === */
@media (max-width:680px) {

    /* Grille mobile dédiée */
    .station-card .station-header.station-header--mbgrid {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        /* gauche = infos, droite = badge/+d'infos */
        grid-template-rows: auto auto !important;
        /* 1: prix+badge | 2: ville+distance + bouton */
        column-gap: 12px;
        row-gap: 6px;
        align-items: start;
    }

    /* Placements explicites */
    .station-card .station-header.station-header--mbgrid .station-price-star {
        grid-column: 1;
        grid-row: 1;
    }

    .station-card .station-header.station-header--mbgrid .header-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        display: block !important;
        position: static !important;
        z-index: 1;
    }

    .station-card .station-header.station-header--mbgrid .station-info {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
    }

    .station-card .station-header.station-header--mbgrid .more-link.more-grid {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        display: inline-flex !important;
        /* force l’affichage */
        padding: 6px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    /* Ligne ville • distance sur une seule ligne */
    .station-card .station-header.station-header--mbgrid .station-loc-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .station-card .station-header.station-header--mbgrid .station-location {
        min-width: 0;
    }

    /* Neutralise toutes les variantes historiques qui provoquent les collisions */
    .station-card .station-badges {
        display: none !important;
    }

    /* vieux conteneur badge */
    .station-card .header-right .more-link,
    .station-card .more-link.more-bottom,
    .station-card .more-link.more-inline {
        display: none !important;
    }

    /* ancien +d'infos */
}

/* === MOBILE ≤680px — Badge en haut-droite, “+ d’infos” en bas-droite, quoi qu’il arrive === */
@media (max-width:680px) {

    /* Le header devient une grille 2×2 */
    .station-card .station-header {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        /* gauche = infos, droite = rang/bouton */
        grid-template-rows: auto auto !important;
        /* 1: prix+badge | 2: ville•distance + bouton */
        column-gap: 12px;
        row-gap: 6px;
        align-items: start;
    }

    /* On "déwrappe" le conteneur desktop pour placer ses enfants dans la grille */
    .station-card .station-badges {
        display: contents !important;
    }

    /* Et on neutralise l'ancien positionnement absolu éventuel */
    .station-card .header-right {
        display: contents !important;
        position: static !important;
    }

    /* Placements explicites */
    .station-card .station-price-star {
        grid-column: 1;
        grid-row: 1;
    }

    .station-card .station-info {
        grid-column: 1;
        grid-row: 2;
    }

    /* Rang (#2/#3) ou TOP 1 = en haut-droite */
    .station-card .station-top-badge,
    .station-card .station-rank-chip {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    /* Bouton “+ d’infos” = en bas-droite (et on force son style) */
    .station-card .station-header .more-link {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #E5E7EB;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    .station-card .station-header .more-link::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }

    /* On masque les vieilles variantes si elles existent encore */
    .station-card .more-link.more-inline,
    .station-card .more-link.more-bottom {
        display: none !important;
    }
}

/* === FIX FINAL MOBILE CARDS (≤680px) — rang en haut-droite, "+ d'infos" en bas-droite === */
@media (max-width:680px) {

    /* 0) Neutralise les anciennes variantes qui forçaient le haut-droite */
    .station-card .more-link {
        position: static !important;
    }

    .station-card .header-right {
        position: static !important;
    }

    .station-card .more-link.more-bottom,
    .station-card .more-link.more-inline,
    .station-card .header-right .more-link {
        display: none !important;
    }

    /* 1) Grille du header mobile */
    .station-card .station-header--mbgrid {
        display: grid !important;
        grid-template-columns: 1fr auto;
        /* gauche: infos | droite: rang/bouton */
        grid-template-rows: auto auto;
        /* L1: prix+rang | L2: ville+distance + bouton */
        column-gap: 12px;
        row-gap: 6px;
        align-items: center;
    }

    /* 2) Rang en haut-droite */
    .station-card .station-header--mbgrid .header-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    /* 3) Ville • Distance + "+ d'infos" sur une même ligne */
    .station-card .station-header--mbgrid .station-info {
        grid-column: 1;
        grid-row: 2;
    }

    .station-card .station-header--mbgrid .station-loc-row {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 8px;
        align-items: center;
    }

    .station-card .station-header--mbgrid .station-location {
        min-width: 0;
    }

    /* 4) "+ d'infos" en bas-droite, aligné sous le rang */
    .station-card .station-header--mbgrid .more-link.more-grid {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    .station-card .station-header--mbgrid .more-link.more-grid::after {
        content: "›";
        margin-left: 6px;
        opacity: .6;
    }
}

/* Alignement parfait : badge en haut-droite, + d'infos juste dessous, même axe */
@media (max-width:680px) {
    .station-card .station-header--mbgrid {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        /* une seule cellule "badge" à droite, qui occupe les 2 lignes */
        grid-template-areas:
            "price badge"
            "info  badge";
        column-gap: 12px;
        row-gap: 6px;
        align-items: center;
    }

    /* placements à gauche */
    .station-card .station-header--mbgrid .station-price-star {
        grid-area: price;
    }

    .station-card .station-header--mbgrid .station-info {
        grid-area: info;
        min-width: 0;
    }

    /* cellule de droite partagée par le badge (haut) et le bouton (bas) */
    .station-card .station-header--mbgrid .header-right {
        grid-area: badge;
        justify-self: end;
        align-self: start;
        position: static !important;
        display: block !important;
        margin: 0 !important;
    }

    .station-card .station-header--mbgrid .more-link {
        position: static !important;
        /* on neutralise les anciens absolus */
    }

    .station-card .station-header--mbgrid .more-link.more-grid {
        grid-area: badge;
        justify-self: end;
        align-self: end;
        display: inline-flex !important;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    /* on désactive les anciennes variantes au cas où */
    .station-card .station-header--mbgrid .header-right .more-link,
    .station-card .more-link.more-inline,
    .station-card .more-link.more-bottom {
        display: none !important;
    }
}

/* Alignement parfait : badge en haut-droite, + d'infos juste dessous, même axe */
@media (max-width:680px) {
    .station-card .station-header--mbgrid {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        /* une seule cellule "badge" à droite, qui occupe les 2 lignes */
        grid-template-areas:
            "price badge"
            "info  badge";
        column-gap: 12px;
        row-gap: 6px;
        align-items: center;
    }

    /* placements à gauche */
    .station-card .station-header--mbgrid .station-price-star {
        grid-area: price;
    }

    .station-card .station-header--mbgrid .station-info {
        grid-area: info;
        min-width: 0;
    }

    /* cellule de droite partagée par le badge (haut) et le bouton (bas) */
    .station-card .station-header--mbgrid .header-right {
        grid-area: badge;
        justify-self: end;
        align-self: start;
        position: static !important;
        display: block !important;
        margin: 0 !important;
    }

    .station-card .station-header--mbgrid .more-link {
        position: static !important;
        /* on neutralise les anciens absolus */
    }

    .station-card .station-header--mbgrid .more-link.more-grid {
        grid-area: badge;
        justify-self: end;
        align-self: end;
        display: inline-flex !important;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    /* on désactive les anciennes variantes au cas où */
    .station-card .station-header--mbgrid .header-right .more-link,
    .station-card .more-link.more-inline,
    .station-card .more-link.more-bottom {
        display: none !important;
    }
}

/* === Ligne "Ville • distance" ↔︎ "+ d’infos" alignées en BAS (≤680px) === */
@media (max-width:680px) {
    .station-card .station-header--mbgrid {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        /* L1: prix+rang | L2: ville+distance + bouton */
        column-gap: 12px;
        row-gap: 6px;
        align-items: stretch !important;
        /* on arrête le centrage global */
        grid-template-areas: none !important;
        /* override d'éventuels "areas" précédents */
    }

    /* L1 : rang en haut-droite (inchangé) */
    .station-card .station-header--mbgrid .header-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        position: static !important;
        display: block !important;
    }

    .station-card .station-header--mbgrid .station-price-star {
        grid-column: 1;
        grid-row: 1;
    }

    /* L2 : alignement BAS des deux côtés */
    .station-card .station-header--mbgrid .station-info {
        grid-column: 1;
        grid-row: 2;
        align-self: end !important;
        min-width: 0;
    }

    .station-card .station-header--mbgrid .station-loc-row {
        display: flex;
        align-items: flex-end;
        gap: 8px;
        /* le contenu gauche se cale en bas */
    }

    .station-card .station-header--mbgrid .more-link {
        position: static !important;
    }

    .station-card .station-header--mbgrid .more-link.more-grid {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: end !important;
        /* le bouton se cale aussi en bas */
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        height: 32px;
        padding: 0 12px;
        /* même hauteur que la ligne */
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }

    /* Optionnel : harmonise la puce distance pour que ses bords bas coïncident */
    .station-card .station-header--mbgrid .distance-chip {
        height: 32px;
        line-height: 32px;
    }
}

/* Retour à la taille native de la puce + alignement BAS commun avec le bouton */
@media (max-width:680px) {

    /* 1) La puce reprend sa hauteur naturelle */
    .station-card .station-header--mbgrid .distance-chip {
        height: auto !important;
        line-height: normal !important;
    }

    /* 2) Même ligne calée en BAS des deux côtés */
    .station-card .station-header--mbgrid {
        align-items: end !important;
        /* items des lignes collés en bas */
    }

    .station-card .station-header--mbgrid .station-info {
        align-self: end !important;
    }

    .station-card .station-header--mbgrid .more-link.more-grid {
        align-self: end !important;
        /* le bouton se cale aussi en bas */
        height: auto;
        /* pas de hauteur forcée */
        padding: 6px 12px;
        /* garde son look de pill */
    }

    /* 3) À gauche, on s'assure que "Ville • distance" se cale en bas */
    .station-card .station-header--mbgrid .station-loc-row {
        display: flex;
        align-items: flex-end;
        gap: 8px;
    }
}

@media (max-width:480px) {
    .station-card .header-right .station-top-badge {
        background: #fff !important;
        color: #d99828 !important;
        border: 2px solid #d99428 !important;
        box-shadow: 0 0 8px rgb(217 99 40 / 45%), 0 2px 4px rgba(0, 0, 0, .4) !important;
    }
}

:root {
    --brand: #d99828;
}

@media (max-width:480px) {
    .station-card {
        position: relative;
        border: 1px solid rgba(0, 0, 0, .06);
    }

    .station-card:before {
        content: "";
        position: absolute;
        left: 0;
        top: 10px;
        bottom: 10px;
        width: 3px;
        background: transparent;
        border-radius: 3px;
    }

    .station-card:has(.station-top-badge):before {
        background: var(--brand);
    }

    .station-card.is-selected:before {
        background: var(--brand);
        box-shadow: 0 0 0 4px rgba(217, 152, 40, .12) inset;
    }
}


/* Empêcher toute interaction et garder le look normal quand disabled */
.mb-topbar .mb-searchbar input:disabled {
    pointer-events: none;
    opacity: 1;
    /* pas d'effet grisé */
    color: inherit;
    /* texte normal */
    -webkit-text-fill-color: currentColor;
    /* Safari iOS */
    caret-color: transparent;
    /* pas de caret */
}

/* Mobile : quand la sheet de recherche est ouverte, on neutralise l'input d'ancrage */
@media (max-width:1023px) {
    body:has(#searchSheet.open) .mb-topbar .mb-searchbar input {
        pointer-events: none;
        caret-color: transparent;
        /* pas de curseur texte */
    }

    /* Si jamais on ajoute .locked en JS, on neutralise pareil */
    .mb-topbar .mb-searchbar.locked input {
        pointer-events: none;
        caret-color: transparent;
    }

    /* Au cas où on utilise aria-disabled/readonly */
    .mb-topbar .mb-searchbar input[aria-disabled="true"],
    .mb-topbar .mb-searchbar input[readonly] {
        pointer-events: none;
        caret-color: transparent;
    }
}

/* Footer du popover : 2 boutons côte à côte + marge interne */
#searchSheet .sheet-footer,
#searchSheet .sheet__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0));
    /* espace gauche/droite + bas */
    box-sizing: border-box;
}

/* Même taille/forme pour les 2 boutons */
#searchSheet #mbDoSearch,
#searchSheet #mbSheetRefreshArea {
    height: 48px;
    padding: 0 18px;
    border-radius: var(--radius-lg, 12px);
    /* force le même arrondi */
    width: 100%;
    box-sizing: border-box;
}

/* Empêche le retour à la ligne du bouton "zone" → même hauteur que "Rechercher" */
#searchSheet #mbSheetRefreshArea {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* (si tu veux qu'il reste en style "outline") */
#searchSheet #mbSheetRefreshArea {
    background: #fff;
    color: var(--primary, #0f172a);
    border: 1px solid currentColor;
}

#searchSheet #mbSheetRefreshArea:hover {
    background: rgba(0, 0, 0, .05);
}

/* Popover ancré sur la barre */
#searchSheet.sheet--anchored {
    position: fixed;
    left: var(--anch-l, 8px);
    top: calc(var(--anch-t, 8px) + var(--mbTopbarH, 0px));
    width: min(var(--anch-w, 560px), 94vw);
    transform: translateY(8px);
    opacity: 0;
    transition: transform .16s ease, opacity .16s ease;
}

#searchSheet.sheet--anchored.open {
    transform: translateY(0);
    opacity: 1;
}

/* Petit groupe de segments (Distance | Prix) */
.seg-group,
.seg-toggle {
    display: inline-flex;
    gap: 6px;
}

.seg-group .seg,
.seg-toggle .seg {

    padding: 6px 10px;
}

#mbSortToggle {
    margin-bottom: 12px;
}


.seg-group .seg.active {
    border-color: #d97828;
}

/* === [FIX] POPOVER ANCRÉ ZENPARK — bloc unique final === */
@media (max-width:1023px) {
    #searchSheet.sheet--anchored {
        z-index: 4000 !important;
    }

    #searchSheet.sheet--anchored .sheet__backdrop {
        background: rgba(0, 0, 0, .35) !important;
        backdrop-filter: blur(4px) !important;
        pointer-events: auto !important;
    }

    #searchSheet.sheet--anchored .sheet__panel {
        position: fixed !important;
        /* ancrage exact sur la barre */
        left: var(--anch-l) !important;
        top: calc(var(--anch-t) + var(--anch-h) + 8px) !important;
        /* sous la barre */
        width: var(--anch-w) !important;

        /* limites et style */
        max-width: 680px !important;
        max-height: min(82vh, 620px) !important;
        margin: 0 !important;
        border-radius: 16px !important;
        box-shadow: 0 16px 48px rgba(0, 0, 0, .3) !important;
        transform-origin: top center !important;
    }

    #searchSheet.sheet--anchored:not(.open) .sheet__panel {
        transform: scale(.98) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #searchSheet.sheet--anchored.open .sheet__panel {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Desktop : pas d’ancrage spécial */
@media (min-width:1024px) {
    #searchSheet.sheet--anchored .sheet__panel {
        position: static !important;
        transform: none !important;
    }
}

/* === MODE SOMMET MOBILE — override ultime (ancrage tout en haut) ========== */
@media (max-width: 1023px) {
    body #searchSheet.sheet.sheet--anchored {
        z-index: 99999 !important;
    }

    body #searchSheet.sheet.sheet--anchored .sheet__backdrop {
        background: rgba(0, 0, 0, .30) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        /* réactive le click extérieur */
    }

    body #searchSheet.sheet.sheet--anchored .sheet__panel {
        position: fixed !important;

        /* ⬇︎ ancré en haut de la fenêtre */
        top: max(0px, env(safe-area-inset-top)) !important;
        left: 0 !important;
        right: 0 !important;

        /* pleine largeur de la fenêtre */
        width: 100vw !important;
        max-width: 100vw !important;

        /* on neutralise tous les styles hérités */
        bottom: auto !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: none !important;
        transform-origin: initial !important;
    }

    /* contenu scrollable sous le haut de l’écran */
    body #searchSheet.sheet.sheet--anchored .sheet__content {
        max-height: calc(100vh - max(0px, env(safe-area-inset-top))) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* === SEARCH SHEET : top-of-window en mobile quand NON ancré === */
@media (max-width: 768px) {

    /* Panneau en haut de la fenêtre */
    #searchSheet:not(.sheet--anchored) .sheet__panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        /* pleine largeur */
        bottom: auto;
        /* on annule le bottom-sheet */
        border-radius: 0 0 16px 16px;
        transform: translateY(calc(-100% - env(safe-area-inset-top, 0px)));
        /* z-index hérite de .sheet (déjà élevé), sinon dé-commente : */
        /* z-index: 500; */
    }

    /* Ouverte */
    #searchSheet.open:not(.sheet--anchored) .sheet__panel {
        transform: translateY(0);
    }

    /* Backdrop qui part bien du haut */
    #searchSheet:not(.sheet--anchored) .sheet__backdrop {
        top: 0;
    }
}

/* SearchSheet plein écran, ancré en haut, quand il N'EST PAS en mode anchored */
@media (max-width: 480px) {
    #searchSheet:not(.sheet--anchored) .sheet__panel {
        position: fixed !important;
        top: max(env(safe-area-inset-top), 0px) !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Header du block "Trier par" */
.block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* La croix ne doit plus être en position absolue */
.sheet__panel .sheet-close {
    position: static !important;
    margin: 0;
    transform: none;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 10px;
    font-size: 20px;
}

/* Sécurité si l'ancien header traîne encore dans le DOM */
.sheet-header {
    display: none !important;
}

/* ===== CTA PWA (Home) ===== */
.hero-cta {
    margin-top: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.cta-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.cta-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.cta-text {
    font-size: 15px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-install {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, .45);
}

.btn-install:active {
    transform: translateY(0);
}

.install-icon {
    font-size: 20px;
}

.cta-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* Mobile CTA */
@media (max-width: 768px) {
    .hero-cta {
        padding: 20px 16px;
        margin-top: 20px;
    }

    .cta-icon {
        font-size: 40px;
    }

    .cta-title {
        font-size: 19px;
    }

    .cta-text {
        font-size: 14px;
    }

    .btn-install {
        width: 100%;
        justify-content: center;
        padding: 16px 20px;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #e2e8f0;
    padding: 48px 20px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.footer-tagline {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 280px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color .15s ease;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-credit,
.footer-copy {
    font-size: 13px;
    color: #64748b;
}

.footer-credit a {
    color: #94a3b8;
    text-decoration: underline;
}

.footer-credit a:hover {
    color: #fff;
}

/* Mobile footer */
@media (max-width: 768px) {
    .footer {
        padding: 32px 16px 20px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .footer-tagline {
        max-width: 100%;
    }
}

/* Cacher le footer sur la home en mode app */


/************ THEME TOKENS ************/
:root {
    --brand1: #d97828;
    /* orange */
    --brand2: #fad74e;
    /* jaune */
    --brand-grad: linear-gradient(160deg, var(--brand1), var(--brand2));
    --ink: #0f172a;
    --muted: #64748b;
    --panel: #ffffff;
    --border: rgba(15, 23, 42, .08);
}

/************ CTA PWA — relooking v3 (garde ton HTML .hero-cta.v2) ************/
.hero-cta.v2 {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 20px;
    background: color-mix(in oklab, var(--panel) 92%, transparent);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 18px 50px rgba(2, 6, 23, .16);
    backdrop-filter: saturate(120%) blur(10px);
}

/* Illus téléphone (déjà en place) — on accentue la cohérence brand */
.hero-cta.v2 .phone {
    width: 260px;
    height: 520px;
    border-radius: 32px;
    padding: 14px;
    background: #0b1220;
    position: relative;
    box-shadow: 0 18px 40px rgba(2, 6, 23, .35), inset 0 0 0 2px rgba(255, 255, 255, .06);
}

.hero-cta.v2 .phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 8px;
    border-radius: 999px;
    background: #121a2e;
}

.hero-cta.v2 .phone-screen {
    height: 100%;
    border-radius: 24px;
    padding: 22px;
    background: radial-gradient(120% 100% at 10% 0%, #182233 0%, #0b1220 55%), var(--brand-grad);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    gap: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.hero-cta.v2 .app-badge {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 30px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.hero-cta.v2 .screen-title {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .2px;
    opacity: .95;
}

.hero-cta.v2 .screen-sub {
    opacity: .85;
    font-size: 13px;
}

/* Contenu */
.hero-cta.v2 .cta-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 6px;
    letter-spacing: .2px;
}

.hero-cta.v2 .cta-text {
    font-size: 15px;
    color: #475569;
    margin: 0 0 16px;
    line-height: 1.6;
}

.hero-cta.v2 .cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Bouton install : passe en dégradé brand (remplace l’ancien violet) */
.hero-cta.v2 .btn-install {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    background: var(--brand-grad);
    color: #0a0a0a;
    font-weight: 800;
    box-shadow: 0 10px 24px color-mix(in oklab, var(--brand1) 25%, black 0%);
    transition: transform .15s ease, box-shadow .2s ease;
}

.hero-cta.v2 .btn-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px color-mix(in oklab, var(--brand1) 30%, black 0%);
}

.hero-cta.v2 .btn-install:active {
    transform: none;
}

.hero-cta.v2 .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    text-decoration: none;
}

.hero-cta.v2 .btn-ghost:hover {
    background: #f8fafc;
}

.hero-cta.v2 .cta-perks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 25px;
    font-size: 13px;
    color: #334155;
    font-weight: 700;
    list-style-type: none;
}

.hero-cta.v2 .cta-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #7b8ca4;
    font-weight: 600
}

/* Responsive CTA */
@media (max-width: 900px) {
    .hero-cta.v2 {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }

    .hero-cta.v2 .cta-illus {
        order: 2;
        display: grid;
        place-items: center;
    }

    .hero-cta.v2 .phone {
        width: 220px;
        height: 440px;
    }

    .hero-cta.v2 .cta-title {
        font-size: 19px;
    }

    .hero-cta.v2 .btn-install {
        width: 100%;
        justify-content: center;
    }
}

/************ FOOTER — relooking v3 (sans changer le HTML) ************/
.footer {
    --d1: #0b1220;
    --d2: #0f172a;
    background:
        radial-gradient(110% 100% at 0% 0%, color-mix(in oklab, var(--brand2) 10%, transparent) 0%, transparent 45%),
        linear-gradient(180deg, var(--d2), var(--d1));
    color: #e2e8f0;
    padding: 48px 20px 26px;
    margin-top: auto;
    position: relative;
}

.footer::before {
    /* liseré lumineux en haut */
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
    top: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-logo {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-tagline {
    font-size: 14px;
    color: #9fb3c8;
    line-height: 1.6;
    max-width: 360px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    opacity: .95;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    position: relative;
    color: #b7c7da;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color .15s ease, transform .15s ease;
}

.footer-col a:hover {
    color: #fff;
    transform: translateX(2px);
}

.footer-col a::after {
    /* petit chevron discret */
    content: "›";
    margin-left: .4ch;
    opacity: .55;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-credit,
.footer-copy {
    font-size: 13px;
    color: #7b8ca4;
}

.footer-credit a {
    color: #b7c7da;
    text-decoration: underline;
}

.footer-credit a:hover {
    color: #fff;
}

/* Footer: mobile */
@media (max-width: 900px) {
    .footer {
        padding: 32px 16px 22px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .footer-tagline {
        max-width: 100%;
    }
}

/* Rappel : tu caches déjà le footer en mode app (pages non-home). On garde la règle existante. */


/* ====== CTA PWA v2 & Footer v3 (drop-in) ====== */
:root {
    --brand1: #d97828;
    --brand2: #fad74e;
    --brand-grad: linear-gradient(160deg, var(--brand1), var(--brand2));
}

/* CTA PWA v2 (sans illustration) */
.hero-cta.v2 {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
    align-items: center;
    padding: 20px 22px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 10px 24px rgba(2, 6, 23, .12);
    max-width: 780px;
    margin: 24px auto 0;
}

.hero-cta.v2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    background: linear-gradient(90deg, var(--brand1), var(--brand2));
    opacity: .45;
}

.cta-illus {
    display: none;
}

.cta-title {
    font-size: 21px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: .2px;
}

.cta-text {
    font-size: 15px;
    color: #334155;
    margin: 0 0 10px;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-install {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    background: var(--brand-grad);
    color: #0a0a0a;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(217, 120, 40, .25);
}

.btn-install:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    background: #fff;
    border: 1px solid #dfe3ea;
    color: #0f172a;
    text-decoration: none;
}

.btn-ghost:hover {
    background: #f8fafc;
}

.cta-perks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
    font-size: 12.5px;
    color: #475569;
    font-weight: 800;
}

.cta-hint {
    text-align: center;
    margin-top: 6px;
    font-size: 12.5px;
    color: #7b8ca4;
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero-cta.v2 {
        padding: 16px 14px;
        max-width: none;
        margin-top: 16px;
    }

    .btn-install {
        width: 100%;
        justify-content: center;
    }
}

/* Footer v3 (dark premium) */
.footer {
    --d1: #0b1220;
    --d2: #0f172a;
    background: radial-gradient(110% 100% at 0% 0%, color-mix(in oklab, var(--brand2) 10%, transparent) 0%, transparent 45%),
        linear-gradient(180deg, var(--d2), var(--d1));
    color: #e2e8f0;
    padding: 48px 20px 26px;
    margin-top: 52px;
    position: relative;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
    top: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-logo {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-tagline {
    font-size: 14px;
    color: #9fb3c8;
    line-height: 1.6;
    max-width: 360px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    opacity: .95;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    position: relative;
    color: #b7c7da;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color .15s ease, transform .15s ease;
}

.footer-col a:hover {
    color: #fff;
    transform: translateX(2px);
}

.footer-col a::after {
    content: "›";
    margin-left: .4ch;
    opacity: .55;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-credit,
.footer-copy {
    font-size: 13px;
    color: #7b8ca4;
}

.footer-credit a {
    color: #b7c7da;
    text-decoration: underline;
}

.footer-credit a:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .footer {
        padding: 32px 16px 22px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .footer-tagline {
        max-width: 100%;
    }
}


/* ====== End CTA PWA v2 & Footer v3 ====== */
:root {
    --brand1: #d97828;
    --brand2: #fad74e;
    --brand-grad: linear-gradient(160deg, var(--brand1), var(--brand2));
}

/* Bouton d’install : orange garanti */
.btn-install {
    background: var(--brand-grad) !important;
    color: #0a0a0a !important;
    box-shadow: 0 12px 26px rgba(217, 120, 40, .25) !important;
}

/* Footer full-width sur la home (annule le grid centré du body) */
body.home {
    display: block !important;
}

body.home>.footer {
    width: 100% !important;
    justify-self: stretch !important;
    grid-column: 1 / -1 !important;
}

/* === HOME — fuel pills: noir en toute circonstance, sans effet hover mobile === */
.home #heroFuelPills {
    /* couleurs locales uniquement pour les pills du hero */
    --pill-bg: #ffffff;
    /* fond par défaut (non active) */
    --pill-fg: #0f172a;
    /* texte par défaut */
    --pill-selected-bg: #111827;
    /* fond quand active => NOIR */
}

.home #heroFuelPills .pill {
    background: var(--pill-bg);
    color: var(--pill-fg);
    border: 1px solid #e5e7eb;
    -webkit-tap-highlight-color: transparent;
}

.home #heroFuelPills .pill.active,
.home #heroFuelPills .pill[aria-pressed="true"] {
    background: var(--pill-selected-bg) !important;
    border-color: var(--pill-selected-bg) !important;
    color: #fff !important;
}

/* Header "glass" discret + accent de marque */
.neo-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* En scroll: fond plein + ombre douce pour la lisibilité de la liste */
.neo-header.is-scrolled {
    background: #fff;
    border-bottom-color: transparent;
    box-shadow: 0 6px 24px rgba(2, 6, 23, .08);
}

/* Accent de marque (barre fine en haut) */
.neo-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #ff8a00, #ffd000);
    opacity: .9;
    pointer-events: none;
}

/* ==== Home : titre avec logo (centré) ==== */
.home .hero-title {
    display: flex;
    justify-content: center;
    /* centre le contenu dans le H1 */
    align-items: center;
    gap: .5em;
    margin: 0 auto;
    /* s'il a une largeur propre, garde-le centré */
    width: 100%;
    /* garantit le centrage même si le conteneur n'a pas text-align:center */
    font-weight: 800;
    font-size: clamp(28px, 3.2vw + 14px, 42px);
    line-height: 1.05;
    text-align: center;
    /* fallback */
}

.home .hero-logo {
    width: 1.15em;
    height: 1.15em;
    /* scale avec le H1 */
    flex: 0 0 auto;
    filter:
        drop-shadow(0 0 1px rgba(255, 255, 255, .9)) drop-shadow(0 6px 18px rgba(0, 0, 0, .18));
}

/* on masque l’ancienne pastille si présente */
.home .brand-dot {
    display: none !important;
}

/* Brand-dot : visible uniquement sur le H1 de la home */
.home .hero-title .brand-dot {
    display: inline !important;
    margin-left: .2em;
    font-size: .7em;
    /* un peu plus petit que le texte */
    line-height: 0;
    font-weight: 900;
    background: linear-gradient(180deg, #ffd000 0%, #ff8a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* dot en dégradé */
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7));
    /* légère séparation sur fond orangé */
}

/* Évite le retour à la ligne entre le nom et le dot */
.home .hero-wordmark {
    white-space: nowrap;
}

/* On masque le dot dans le header et le footer */
.neo-header .brand-dot,
.footer .brand-dot {
    display: none;
}

/* Bouton primaire (global) -> dégradé marque */
.btn.primary {
    background: linear-gradient(180deg, #ffd000 0%, #ff8a00 100%);
    color: #111;
    border: 0;
    box-shadow: 0 6px 18px rgba(255, 138, 0, .25);
}

.btn.primary:hover {
    filter: brightness(.98);
}

/* Bouton d'install PWA plus sobre (ghost fort) */
.hero-cta .btn-install {
    background: #fff;
    color: #111;
    border: 1px solid rgba(2, 6, 23, .12);
    box-shadow: 0 4px 14px rgba(2, 6, 23, .06);
}

/* Cartes blanches de la home */
.hero .panel,
.hero-cta.v2 {
    border: 1px solid rgba(2, 6, 23, .06) !important;
    box-shadow: 0 10px 30px rgba(2, 6, 23, .10) !important;
    border-radius: 18px !important;
}

.hero-wrap {
    padding-top: 12px;
}

.hero .hero-search {
    margin-top: 16px;
}

.hero-cta.v2 {
    margin-top: 22px;
    padding: 22px 24px;
}

.pills .pill {
    transition: transform .08s ease, box-shadow .12s ease, background-color .12s;
}

.pills .pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2, 6, 23, .08);
}

.pills .pill:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
    border-radius: 999px;
}

.home .hero-title {
    gap: .4em;
}

.home .hero-logo {
    width: 1.1em;
    height: 1.1em;
    filter:
        drop-shadow(0 0 1px rgba(255, 255, 255, .9)) drop-shadow(0 8px 20px rgba(0, 0, 0, .18));
}

/* halo très léger derrière le titre */
.hero {
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    top: -20px;
    height: 160px;
    background: radial-gradient(60% 80% at 50% 0%,
            rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

:root {
    --ctl-h: 44px;
}

.hero-searchbar input,
.hero-searchbar .pill,
#btnHeroLocate,
#btnHeroSearch {
    height: var(--ctl-h);
    line-height: calc(var(--ctl-h) - 2px);
}

/* anneau de focus commun */
input:focus-visible,
button:focus-visible,
.pill:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px rgba(255, 208, 0, .9),
        0 0 0 6px rgba(255, 138, 0, .55);
    border-radius: 999px;
}

.pills .pill,
.btn {
    transition: transform .08s ease, box-shadow .12s ease, filter .12s;
}

.pills .pill:active,
.btn:active {
    transform: translateY(1px);
    filter: brightness(.98);
}

.hero-cta.v2 .cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.hero-cta.v2 .btn-install {
    min-width: 300px;
}

@media (max-width: 480px) {
    .hero-cta.v2 .btn-install {
        min-width: 100%;
    }
}

/* Hôte d'ancrage = largeur de l'input uniquement */
.search-host {
    position: relative;
    flex: 1 1 auto;
}

.search-host>input {
    width: 100%;
}

/* Le panel prend 100% de la largeur de l'hôte */
.search-host>.search-suggestions {
    left: 0;
    right: auto;
    width: 100%;
}

/* Rendu item + état actif */
.search-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: 0;
}

.search-suggestions .suggestion-item:hover,
.search-suggestions .suggestion-item.is-active {
    background: #f8fafc;
}

.search-suggestions .suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    font-size: 16px;
}

.search-suggestions .suggestion-text {
    min-width: 0;
    flex: 1;
}

.search-suggestions .suggestion-label {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestions .suggestion-context {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Mise en valeur du match */
.search-suggestions mark {
    background: #fff3bf;
    color: inherit;
    padding: 0 .1em;
    border-radius: 3px;
}

/* 1) Jamais 100vw pour les sections plein écran */
.footer,
.footer-wrap,
.footer-strip {
    width: 100% !important;
    /* au lieu de 100vw */
    margin: 0;
    overflow-x: clip;
    /* évite le débordement visuel */
}

/* 2) Sécurité globale en cas d’autres éléments fautifs */
html,
body {
    overflow-x: hidden;
}

/* 3) Padding sûr avec les safe areas iOS */
@supports (padding-bottom: max(0px)) {
    .footer {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* 4) Si un box-shadow du footer/le bandeau blanc est externe, on le clippe */
.footer,
.footer-strip {
    overflow: hidden;
}

/* garde les coins arrondis sans déborder */

/* === FIX: bande blanche sous le footer (mobile / home) === */
@media (max-width:1023px) {

    /* Pas de réserve pour la tabbar sur la home */
    body.home {
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    body.home .mobile-tabbar {
        display: none !important;
    }

    /* Ceinture & bretelles : empêcher tout débordement horizontal */
    html,
    body {
        overflow-x: hidden;
    }
}

/* Optionnel: s'assurer que le bouton flottant ne crée pas de largeur fantôme */
@media (max-width:1023px) {
    .view-toggle.only-mobile {
        max-width: calc(100% - 24px);
    }
}

/* === FIX mobile : pas d'espace réservé sous la home ===================== */
@media (max-width:1023px) {
    body.home {
        padding-bottom: 0 !important;
        /* annule la réserve tabbar */
    }

    .home .mobile-tabbar {
        display: none !important;
        /* ceinture et bretelles */
    }

    /* place correctement le FAB “Vue carte / Vue liste” */
    #mbToggleView,
    #mbToggleViewList {
        bottom: max(16px, env(safe-area-inset-bottom, 0) + 12px) !important;
    }
}

/* === FIX mobile : pas d'espace réservé sous la home ===================== */
@media (max-width:1023px) {
    body.home {
        padding-bottom: 0 !important;
        /* annule la réserve tabbar */
    }

    .home .mobile-tabbar {
        display: none !important;
        /* ceinture et bretelles */
    }

    /* place correctement le FAB “Vue carte / Vue liste” */
    #mbToggleView,
    #mbToggleViewList {
        bottom: max(16px, env(safe-area-inset-bottom, 0) + 12px) !important;
    }
}

/* === FIX mobile : pas de réserve de tabbar en vue app === */
@media (max-width:1023px) {

    /* 1) N'ajoute pas d'espace sous le footer quand on n'est plus sur la home */
    body:not(.home) {
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    /* 2) Rends l'app pleine hauteur (on ne soustrait plus une tabbar fantôme) */
    .main-container {
        height: 100svh !important;
        min-height: 100svh !important;
    }

    /* 3) En vue liste, laisse un peu d’air pour le bouton flottant (si présent) */
    .main-container.view-mode-list .list-view {
        height: calc(100svh - env(safe-area-inset-bottom)) !important;
    }
}

/* Fix largeur bouton "Télécharger" sur la home */
.hero-cta.v2 .btn-install {
    min-width: auto !important;
    width: auto !important;
    padding: 12px 16px;
    /* même padding que "Comment faire ?" */
}

/* Même comportement sur mobile : pas plein écran */
@media (max-width: 900px) {
    .hero-cta.v2 .btn-install {
        width: auto !important;
    }
}