/* ═══════════════════════════════════════════════════════════════
   AppEssence — Styles de la page géolocalisation (index.php)
   ═══════════════════════════════════════════════════════════════ */

/* ── Bloc d'invite géolocalisation ─────────────────────────────── */
.geo-card{
    background:white;border-radius:16px;
    padding:28px 24px;
    box-shadow:0 2px 12px rgba(0,0,0,0.08);
    text-align:center;margin-bottom:20px
}
.geo-card .big-icon{font-size:3rem;margin-bottom:12px}
.geo-card h2{font-size:1.15rem;font-weight:700;color:#1a1a1a;margin-bottom:6px}
.geo-card .sub{font-size:0.85rem;color:#888;margin-bottom:20px;line-height:1.5}

/* Bouton principal de localisation */
.btn-geo{
    display:inline-flex;align-items:center;gap:10px;
    background:#1565c0;color:white;border:none;
    border-radius:50px;padding:14px 32px;
    font-size:1rem;font-weight:700;cursor:pointer;
    transition:background 0.2s;
    box-shadow:0 4px 14px rgba(21,101,192,0.35)
}
.btn-geo:hover{background:#0d47a1}
.btn-geo:disabled{background:#90a4ae;cursor:not-allowed;box-shadow:none}
.btn-geo .spinner{
    width:18px;height:18px;
    border:2.5px solid rgba(255,255,255,0.4);
    border-top-color:white;border-radius:50%;
    animation:spin 0.7s linear infinite;display:none
}
.btn-geo.loading .spinner{display:block}
.btn-geo.loading .btn-text{display:none}

/* Message d'erreur géolocalisation */
.geo-error{
    background:#ffebee;border-left:4px solid #f44336;
    border-radius:8px;padding:12px 16px;
    font-size:0.85rem;color:#c62828;
    margin-top:16px;display:none;text-align:left
}

/* ── Barre de filtres (carburant + rayon) ───────────────────────── */
.filters{
    background:white;border-radius:14px;
    padding:14px 16px;
    box-shadow:0 2px 8px rgba(0,0,0,0.06);
    margin-bottom:16px;display:none
}
.filters-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.filter-label{
    font-size:0.72rem;font-weight:700;
    color:#999;text-transform:uppercase;
    letter-spacing:0.5px;white-space:nowrap
}
.filter-sep{width:1px;background:#eee;height:28px;flex-shrink:0}

/* Chips sélecteur (carburant et rayon — même style) */
.carb-chips,
.rayon-chips{display:flex;gap:6px;flex-wrap:wrap}
.carb-chips button,
.rayon-chips button{
    padding:5px 13px;border-radius:20px;
    border:2px solid #ddd;background:white;
    color:#666;font-size:0.8rem;font-weight:600;
    cursor:pointer;transition:all 0.15s
}
.carb-chips button:hover,
.rayon-chips button:hover{border-color:#1565c0;color:#1565c0}
.carb-chips button.active,
.rayon-chips button.active{background:#1565c0;color:white;border-color:#1565c0}

/* ── Barre de résultats ────────────────────────────────────────── */
.results-bar{
    display:none;align-items:center;
    justify-content:space-between;flex-wrap:wrap;gap:10px;
    background:white;border-radius:10px;
    padding:10px 16px;
    box-shadow:0 1px 4px rgba(0,0,0,0.06);margin-bottom:14px
}
.results-bar .info{font-size:0.85rem;color:#666}
.results-bar .info strong{color:#222}

/* Boutons tri distance/prix */
.tri-links{display:flex;gap:6px;align-items:center}
.tri-links span{font-size:0.78rem;color:#aaa}
.tri-links button{
    font-size:0.8rem;padding:4px 10px;
    border-radius:6px;border:1px solid #ddd;
    background:white;color:#555;font-weight:600;
    cursor:pointer;transition:all 0.15s
}
.tri-links button.active{background:#1565c0;color:white;border-color:#1565c0}

/* Bascule liste / carte */
.vue-toggle{display:flex;gap:6px}
.vue-toggle button{
    padding:5px 14px;border:2px solid #1565c0;
    border-radius:8px;font-size:0.8rem;font-weight:700;
    cursor:pointer;background:white;color:#1565c0;transition:all 0.15s
}
.vue-toggle button.active{background:#1565c0;color:white}

/* ── Carte Leaflet ─────────────────────────────────────────────── */
#map{
    height:400px;border-radius:14px;
    overflow:hidden;
    box-shadow:0 2px 10px rgba(0,0,0,0.07);
    margin-bottom:16px;display:none
}

/* ── Tableau desktop ───────────────────────────────────────────── */
/* La colonne prix est masquée quand aucun carburant n'est sélectionné */
.table-wrap{display:none}
.hide-prix-col #th-prix,
.hide-prix-col .col-prix{display:none}

/* ── Cartes station (vue mobile) ───────────────────────────────── */
.station-card-header{display:flex;align-items:flex-start;gap:12px;margin-bottom:8px}
/* Numéro de rang avec médailles pour les 3 premières */
.station-card-rang{font-size:1.4rem;font-weight:900;color:#ddd;line-height:1;flex-shrink:0;width:28px;text-align:center}
.station-card-rang.r1{color:#f9a825}
.station-card-rang.r2{color:#90a4ae}
.station-card-rang.r3{color:#a1887f}
.station-card-info{flex:1;min-width:0}
.station-card-nom{font-weight:700;font-size:0.93rem;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.station-card-adr{font-size:0.76rem;color:#999;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.station-card-meta{font-size:0.75rem;color:#888;margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.station-card-body{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.station-carburants{display:flex;gap:6px;flex-wrap:wrap;flex:1}

/* ── Pills de carburant ────────────────────────────────────────── */
.carb-pill{
    display:inline-flex;flex-direction:column;align-items:center;
    background:#f8f9ff;border-radius:10px;
    padding:5px 10px;font-size:0.7rem;
    border:1px solid #e8eaf6;min-width:54px;cursor:default
}
.carb-pill .ctype{font-weight:700;color:#555;font-size:0.68rem}
.carb-pill .cprix{font-weight:800;font-size:0.88rem;margin-top:1px}
.carb-pill .cmaj{font-size:0.6rem;color:#bbb;margin-top:1px}
/* Carburant sélectionné mis en avant */
.carb-pill.highlight{background:#e8f0fe;border-color:#1565c0}
.carb-pill.highlight .cprix{color:#1565c0}
/* Rupture temporaire */
.carb-pill.rupture-temp{background:#fff3e0;border-color:#fb8c00}
.carb-pill.rupture-temp .cprix{color:#e65100;font-size:0.72rem}
/* Rupture définitive (masqué dans les résultats filtrés) */
.carb-pill.rupture-def{background:#f5f5f5;border-color:#bdbdbd}
.carb-pill.rupture-def .ctype{color:#aaa}
.carb-pill.rupture-def .cprix{color:#bbb;font-size:0.72rem;text-decoration:line-through}
/* Station en rupture sur tous ses carburants */
.station-card.rupture-totale{background:#f9f9f9;opacity:0.82}

/* ── Modal de signalement (bottom sheet) ───────────────────────── */
.modal-overlay{
    position:fixed;inset:0;
    background:rgba(0,0,0,0.5);
    z-index:1000;display:flex;
    align-items:flex-end;justify-content:center;padding:0
}
.modal-box{
    background:white;border-radius:20px 20px 0 0;
    padding:24px 20px;width:100%;max-width:500px;
    box-shadow:0 -4px 24px rgba(0,0,0,0.15);
    animation:slideUp 0.25s ease
}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.modal-box h3{font-size:1rem;font-weight:700;margin-bottom:4px}
.modal-box .station-name{font-size:0.82rem;color:#888;margin-bottom:16px}
.modal-types{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
.modal-type-btn{
    padding:10px 8px;border:2px solid #eee;
    border-radius:10px;background:white;
    font-size:0.82rem;font-weight:600;
    cursor:pointer;transition:all 0.15s;text-align:center
}
.modal-type-btn:hover{border-color:#1565c0;color:#1565c0}
.modal-type-btn.selected{border-color:#1565c0;background:#e3f2fd;color:#1565c0}
.modal-carb-select{
    width:100%;padding:8px 12px;
    border:1px solid #ddd;border-radius:8px;
    font-size:0.88rem;margin-bottom:10px;outline:none
}
.modal-carb-select:focus{border-color:#1565c0}
.modal-comment{
    width:100%;padding:8px 12px;
    border:1px solid #ddd;border-radius:8px;
    font-size:0.85rem;resize:none;outline:none;margin-bottom:14px
}
.modal-comment:focus{border-color:#1565c0}
.modal-actions{display:flex;gap:10px}
.modal-btn-cancel{
    flex:1;padding:11px;border:2px solid #ddd;
    border-radius:10px;background:white;
    font-size:0.88rem;font-weight:600;cursor:pointer;color:#666
}
.modal-btn-submit{
    flex:2;padding:11px;border:none;
    border-radius:10px;background:#1565c0;
    color:white;font-size:0.88rem;font-weight:700;cursor:pointer
}
.modal-btn-submit:disabled{background:#90a4ae;cursor:not-allowed}
.modal-success{text-align:center;padding:20px 0}
.modal-success .icon{font-size:3rem;margin-bottom:10px}

/* ── Responsive ────────────────────────────────────────────────── */
@media(max-width:640px){
    .geo-card{padding:22px 16px}
    .filter-sep{display:none}
    .filters-row{gap:8px}
    .table-wrap{display:none !important}
    #map{height:300px}
}
@media(min-width:641px){
    .card-list{display:none !important}
}
