/* ================================================================
   guichets.css — Page Nos Guichets isbaQ — v3
   Charte : Orange #FF6B00 | Navy #141F39 | Violet #6B4EFF
   Scope : .isbaq-guichets__* — zéro conflit
================================================================ */

:root {
    --gc-orange:      #FF6B00;
    --gc-orange-soft: rgba(255, 107, 0, 0.1);
    --gc-navy:        #141F39;
    --gc-purple:      #6B4EFF;
    --gc-purple-soft: rgba(107, 78, 255, 0.08);
    --gc-purple-mid:  rgba(107, 78, 255, 0.15);
    --gc-white:       #FFFFFF;
    --gc-off:         #F8F9FC;
    --gc-gray:        #6B7280;
    --gc-border:      #E5E7EB;
    --gc-green:       #10B981;
    --gc-radius:      14px;
    --gc-shadow:      0 4px 24px rgba(20, 31, 57, 0.08);
    --gc-shadow-lg:   0 12px 48px rgba(20, 31, 57, 0.16);
    --gc-transition:  all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════════════════════════
   INTRO + STATS
════════════════════════════════════════════════════════════ */

.isbaq-guichets__intro {
    text-align: center;
    margin-bottom: 20px;
}

/* Badge — VIOLET */
.isbaq-guichets__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--gc-purple-soft);
    color: var(--gc-purple);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.isbaq-guichets__badge::before {
    content: '✦';
    font-size: 0.65rem;
    color: var(--gc-purple);
}

.isbaq-guichets__title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--gc-navy);
    line-height: 1.25;
    margin-bottom: 12px;
}

.isbaq-guichets__title span { color: var(--gc-orange); }

.isbaq-guichets__desc {
    font-size: 1rem;
    color: var(--gc-gray);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Bande stats — fond violet ────────────────────────────── */

.isbaq-guichets__stats-band {
    background: linear-gradient(135deg, var(--gc-purple) 0%, #5538EE 100%);
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    position: relative;
    overflow: hidden;
}

.isbaq-guichets__stats-band::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.isbaq-guichets__stats-band::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255,107,0,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.isbaq-guichets__stat {
    text-align: center;
    position: relative;
    z-index: 1;
}

.isbaq-guichets__stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1;
}

.isbaq-guichets__stat-value span {
    color: var(--gc-orange);
    font-size: 1.3rem;
}

.isbaq-guichets__stat-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 5px;
}

/* Séparateur vertical entre stats */
.isbaq-guichets__stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   APP — carte + panneau
════════════════════════════════════════════════════════════ */

.isbaq-guichets__app {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--gc-shadow-lg);
    border: 1px solid var(--gc-border);
    height: 680px;
    position: relative;
}

/* ════════════════════════════════════════════════════════════
   PANNEAU LATÉRAL
════════════════════════════════════════════════════════════ */

.isbaq-guichets__panel {
    background: var(--gc-white);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.isbaq-guichets__panel-header {
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--gc-border);
    flex-shrink: 0;
}

/* Recherche — focus VIOLET */
.isbaq-guichets__search {
    position: relative;
    margin-bottom: 14px;
}

.isbaq-guichets__search input {
    width: 100%;
    background: var(--gc-off);
    border: 1.5px solid var(--gc-border);
    border-radius: 12px;
    padding: 12px 16px 12px 42px;
    font-size: 0.9rem;
    color: var(--gc-navy);
    outline: none;
    transition: var(--gc-transition);
    font-family: inherit;
}

.isbaq-guichets__search input:focus {
    background: var(--gc-white);
    border-color: var(--gc-purple);
    box-shadow: 0 0 0 3px var(--gc-purple-soft);
}

.isbaq-guichets__search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 1.05rem;
    pointer-events: none;
}

/* Select ville — focus VIOLET */
.isbaq-guichets__filter-select {
    width: 100%;
    background: var(--gc-off);
    border: 1.5px solid var(--gc-border);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--gc-navy);
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.isbaq-guichets__filter-select:focus {
    border-color: var(--gc-purple);
    box-shadow: 0 0 0 3px var(--gc-purple-soft);
}

/* Compteur résultats */
.isbaq-guichets__count {
    padding: 12px 22px;
    font-size: 0.78rem;
    color: var(--gc-gray);
    border-bottom: 1px solid var(--gc-border);
    flex-shrink: 0;
}

.isbaq-guichets__count strong { color: var(--gc-purple); }

/* Liste scrollable */
.isbaq-guichets__list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.isbaq-guichets__list::-webkit-scrollbar { width: 6px; }
.isbaq-guichets__list::-webkit-scrollbar-thumb { background: var(--gc-border); border-radius: 10px; }
.isbaq-guichets__list::-webkit-scrollbar-thumb:hover { background: #D1D5DB; }

/* Card guichet dans la liste */
.isbaq-guichets__item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--gc-transition);
    border: 1.5px solid transparent;
    margin-bottom: 4px;
}

.isbaq-guichets__item:hover { background: var(--gc-off); }

/* État actif — VIOLET */
.isbaq-guichets__item.is-active {
    background: var(--gc-purple-soft);
    border-color: var(--gc-purple-mid);
}

.isbaq-guichets__item-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--gc-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--gc-transition);
}

/* Icône active — VIOLET */
.isbaq-guichets__item.is-active .isbaq-guichets__item-icon {
    background: var(--gc-purple);
}

.isbaq-guichets__item-icon i { color: #fff; font-size: 1.1rem; }

.isbaq-guichets__item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gc-navy);
    margin-bottom: 3px;
    line-height: 1.3;
}

.isbaq-guichets__item-address {
    font-size: 0.78rem;
    color: var(--gc-gray);
    line-height: 1.4;
}

.isbaq-guichets__item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* District — VIOLET */
.isbaq-guichets__item-district {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gc-purple);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.isbaq-guichets__item-distance {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gc-gray);
    background: var(--gc-off);
    padding: 2px 8px;
    border-radius: 100px;
}

.isbaq-guichets__item-distance i { font-size: 0.78rem; }

/* État vide */
.isbaq-guichets__empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--gc-gray);
}

.isbaq-guichets__empty i {
    font-size: 2.4rem;
    color: #D1D5DB;
    margin-bottom: 12px;
    display: block;
}

.isbaq-guichets__empty p { font-size: 0.88rem; }

/* ════════════════════════════════════════════════════════════
   CARTE LEAFLET
════════════════════════════════════════════════════════════ */

.isbaq-guichets__map-wrap {
    position: relative;
    height: 100%;
}

#isbaqMap {
    width: 100%;
    height: 100%;
    background: var(--gc-off);
}

/* Bouton géolocalisation — hover VIOLET */
.isbaq-guichets__locate-btn {
    position: absolute;
    bottom: 24px;
    right: 16px;
    z-index: 999;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gc-white);
    border: none;
    box-shadow: var(--gc-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--gc-transition);
}

.isbaq-guichets__locate-btn:hover {
    background: var(--gc-purple);
    transform: scale(1.06);
    box-shadow: 0 8px 24px var(--gc-purple-mid);
}

.isbaq-guichets__locate-btn:hover i { color: #fff; }

.isbaq-guichets__locate-btn i {
    font-size: 1.3rem;
    color: var(--gc-navy);
    transition: var(--gc-transition);
}

/* Loader carte */
.isbaq-guichets__map-loader {
    position: absolute;
    inset: 0;
    background: var(--gc-off);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 1000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.isbaq-guichets__map-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Spinner — VIOLET */
.isbaq-guichets__map-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gc-border);
    border-top-color: var(--gc-purple);
    border-radius: 50%;
    animation: gc-spin 0.8s linear infinite;
}

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

.isbaq-guichets__map-loader p { font-size: 0.82rem; color: var(--gc-gray); }

/* ════════════════════════════════════════════════════════════
   POPUP LEAFLET CUSTOM
════════════════════════════════════════════════════════════ */

.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: var(--gc-shadow-lg) !important;
    padding: 0 !important;
}

.leaflet-popup-content { margin: 0 !important; width: 260px !important; }
.leaflet-popup-tip { box-shadow: var(--gc-shadow-lg) !important; }

.isbaq-guichets__popup { padding: 16px; }

.isbaq-guichets__popup-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gc-navy);
    margin-bottom: 6px;
}

.isbaq-guichets__popup-address {
    font-size: 0.8rem;
    color: var(--gc-gray);
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Marchand dans popup — VIOLET */
.isbaq-guichets__popup-merchant {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: #9CA3AF;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--gc-border);
}

.isbaq-guichets__popup-merchant i { color: var(--gc-purple); }

/* Téléphone popup — VIOLET au lieu d'orange */
.isbaq-guichets__popup-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gc-purple);
    text-decoration: none;
}

.isbaq-guichets__popup-phone:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   MARKERS CUSTOM
════════════════════════════════════════════════════════════ */

/* Marker orange standard */
.isbaq-guichets__marker {
    width: 36px;
    height: 36px;
    background: var(--gc-orange);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
    border: 2.5px solid #fff;
}

.isbaq-guichets__marker i { transform: rotate(45deg); color: #fff; font-size: 1rem; }

/* Marker actif — VIOLET */
.isbaq-guichets__marker.is-active {
    background: var(--gc-purple);
    width: 42px;
    height: 42px;
    box-shadow: 0 4px 16px var(--gc-purple-mid);
}

/* Marker utilisateur */
.isbaq-guichets__user-marker {
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), 0 2px 8px rgba(0,0,0,0.2);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
    .isbaq-guichets__app {
        grid-template-columns: 1fr;
        grid-template-rows: 420px 480px;
        height: auto;
    }
    .isbaq-guichets__panel { order: 2; height: 480px; }
    .isbaq-guichets__map-wrap { order: 1; height: 420px; }

    .isbaq-guichets__stats-band {
        gap: 24px;
        padding: 22px 24px;
        flex-wrap: wrap;
    }
}

@media (max-width: 575px) {
    .isbaq-guichets__app {
        border-radius: 16px;
        grid-template-rows: 320px 440px;
    }
    .isbaq-guichets__map-wrap { height: 320px; }
    .isbaq-guichets__panel { height: 440px; }
    .isbaq-guichets__panel-header { padding: 16px 16px 14px; }

    .isbaq-guichets__stats-band {
        flex-direction: column;
        gap: 16px;
        border-radius: 14px;
    }

    .isbaq-guichets__stat-sep { width: 60px; height: 1px; }

    .isbaq-guichets__stat-value { font-size: 1.6rem; }
}