/**
 * GOULAINE COUNTRY - STYLES DE LA CARTE INTERACTIVE (LEAFLET / MODALE)
 * DEV_NOUV_V4
 */

/* ==========================================================================
   INTERACTIVE MAP & MODAL POPUP MODULE (LEAFLET.JS)
   ========================================================================== */

/* Triggers & Headers styling */
/* gbc-btn-map-trigger hover harmonisé */

body.gbc-modal-open {
    overflow: hidden !important;
}

/* Ensure Fancybox opens on top of the map modal */
.fancybox-container,
.fancybox__container {
    z-index: 1000000000 !important;
}

/* Modal Window Overlay */
.gbc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gbc-modal-overlay.gbc-active {
    opacity: 1;
}

/* Modal Inner Container */
.gbc-modal-box {
    width: 95%;
    max-width: 1600px;
    height: 90vh;
    background: rgba(26, 26, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gbc-modal-overlay.gbc-active .gbc-modal-box {
    transform: scale(1);
}

/* Close Button styling */
.gbc-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
    padding: 0;
}

/* When the close button is moved inline into the sidebar h3 */
@media (max-width: 768px) {
    .gbc-modal-close-btn.gbc-modal-close-btn-inline {
        position: static;
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        margin-left: 6px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

.gbc-modal-close-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    margin: 0;
    display: block;
}

.gbc-modal-close-btn:hover {
    background: #c07a2a;
    color: #fff;
    border-color: transparent;
}

.gbc-modal-close-btn:hover .dashicons {
    transform: rotate(90deg);
}

/* Modal Body Grid */
.gbc-modal-body {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* Sidebar Layout */
.gbc-map-sidebar {
    width: 300px;
    background: rgba(18, 18, 22, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    color: #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.gbc-map-sidebar h3 {
    margin: 0 0 5px 0;
    font-size: 1.25em;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px solid #c07a2a;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Filter Groups inside Sidebar */
.gbc-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.gbc-filter-group label {
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

.gbc-filter-group input[type="search"] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.92em;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-overflow: ellipsis;
}

.gbc-filter-group select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.92em;
    outline: none;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: none !important;
    /* Desactive la transition pour eviter le clignotement sous Chrome/Edge */
}

.gbc-filter-group select option {
    color: FieldText !important;
    background-color: revert !important;
}

.gbc-filter-group input[type="search"]:focus,
.gbc-filter-group select:focus {
    border-color: #c07a2a;
    box-shadow: 0 0 0 3px rgba(192, 122, 42, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

/* Checkbox Lists */
.gbc-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gbc-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    text-transform: none;
    font-weight: 400;
    letter-spacing: normal;
}

.gbc-checkbox-list input[type="checkbox"] {
    accent-color: #c07a2a;
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}

/* Map Canvas Container & Standalone Wrapper */
.gbc-map-canvas-container {
    flex: 1;
    position: relative;
    height: 100%;
    background: #151518;
}

.gbc-map-canvas {
    width: 100%;
    height: 100%;
}

/* Overlay de chargement élégant pour la carte */
.gbc-map-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 21, 24, 0.88);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: auto;
}

.gbc-map-loader-overlay.gbc-loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.gbc-map-loader-overlay.gbc-loaded .gbc-map-loader-spinner {
    animation: none !important;
}

.gbc-map-loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    border-top-color: #c07a2a;
    border-right-color: #c07a2a;
    animation: gbc-map-spin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 20px rgba(192, 122, 42, 0.25);
}

.gbc-map-loader-text {
    color: #f3f4f6;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

@keyframes gbc-map-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gbc-map-standalone-wrapper {
    width: 100%;
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    height: 600px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.gbc-map-standalone-wrapper .gbc-map-body {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

.gbc-map-standalone-wrapper .gbc-map-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e2e8f0;
    color: #334155;
}

.gbc-map-standalone-wrapper .gbc-map-sidebar h3 {
    color: #1e293b;
    border-bottom-color: #c07a2a;
}

.gbc-map-standalone-wrapper .gbc-filter-group label {
    color: #64748b;
}

.gbc-map-standalone-wrapper .gbc-filter-group input[type="search"] {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.gbc-map-standalone-wrapper .gbc-filter-group select {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    transition: none !important;
}

.gbc-map-standalone-wrapper .gbc-filter-group select option {
    color: FieldText !important;
    background-color: revert !important;
}

.gbc-map-standalone-wrapper .gbc-checkbox-list {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.gbc-map-standalone-wrapper .gbc-checkbox-list label {
    color: #334155;
}

/* Leaflet Overrides (Extremely Premium Design) */
.leaflet-container {
    font-family: inherit !important;
}

/* Custom styled Popups */
.leaflet-popup-content-wrapper {
    background: rgba(24, 24, 28, 0.96) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
    padding: 0 !important;
    overflow: hidden;
    animation: gbcPopupScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: bottom center;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 290px !important;
}

.leaflet-popup-tip {
    background: rgba(24, 24, 28, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.gbc-map-popup-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gbc-map-popup-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.gbc-map-popup-img-link .gbc-map-popup-img {
    transition: transform 0.3s ease;
}

.gbc-map-popup-img-link:hover .gbc-map-popup-img {
    transform: scale(1.05);
}

.gbc-zoom-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    pointer-events: none;
}

.gbc-map-popup-img-link:hover .gbc-zoom-icon {
    opacity: 1;
    background: #c07a2a;
}

.gbc-map-popup-img {
    height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gbc-map-popup-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gbc-map-popup-date {
    font-size: 1.15em;
    /* Increased for better visibility */
    font-weight: 700;
    color: #c07a2a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gbc-map-popup-club {
    margin: 2px 0;
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.gbc-map-popup-adresse-block {
    margin-top: 6px;
    margin-bottom: 6px;
    border-left: 2px solid var(--gc-bleu-nuit);
    padding-left: 8px;
    font-size: 13px;
    text-align: left;
}

.gbc-map-popup-salle {
    font-weight: bold;
    color: #ffffff;
    line-height: 1.3;
}

.gbc-map-popup-rue {
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
}

.gbc-map-popup-lieu {
    font-size: 1.15em !important;
    /* Make city larger to stand out */
    color: #ffffff !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    margin-bottom: 4px;
    text-align: left;
}

/* Buttons container for popup */
.gbc-map-popup-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.gbc-map-popup-btn {
    background: #c07a2a;
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    font-size: 0.8em;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.gbc-map-popup-btn:hover {
    background: #a2641f;
    transform: translateY(-1px);
}

.gbc-map-popup-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

.gbc-map-popup-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.gbc-map-popup-btn-maps {
    background: #4285f4 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.gbc-map-popup-btn-maps:hover {
    background: #2b75e2 !important;
}

.gbc-map-popup-btn-playlist {
    background: #009879 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.gbc-map-popup-btn-playlist:hover {
    background: #008066 !important;
}


@media screen and (max-width: 768px) {
    /* Modal layout stacked */
    .gbc-modal-body,
    .gbc-map-standalone-wrapper .gbc-map-body {
        flex-direction: column !important;
    }

    .gbc-modal-overlay {
        height: 100vh !important;
        height: 100dvh !important;
    }

    .gbc-modal-box {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        border: none;
        max-width: 100%;
    }

    .gbc-map-standalone-wrapper .gbc-map-sidebar {
        border-bottom: 1px solid #cbd5e1 !important;
    }

    .gbc-checkbox-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
        gap: 6px !important;
        padding: 8px 10px !important;
    }

    .gbc-checkbox-list label {
        font-size: 0.8em;
    }
}

/* Custom Pin Marker Style */
.gbc-custom-pin-wrapper {
    position: relative;
}

.gbc-pin-marker {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #c07a2a;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gbc-pin-emoji {
    font-size: 13px;
    line-height: 1;
    transform: rotate(45deg);
    display: inline-block;
    pointer-events: none;
    user-select: none;
}

@keyframes gbcPinPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        transform: rotate(-45deg) scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
        transform: rotate(-45deg) scale(1.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: rotate(-45deg) scale(1);
    }
}

.gbc-pin-marker:hover {
    animation: gbcPinPulse 1.5s infinite;
    z-index: 9999;
}

/* Leaflet Popup Scale Animation */
@keyframes gbcPopupScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* Popup Improvements */
.gbc-popup-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.gbc-popup-time-badge {
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap;
}

.gbc-popup-time-badge.future {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gbc-popup-time-badge.past {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.gbc-map-popup-card.gbc-past-event {
    opacity: 0.75;
}

.gbc-popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}

.gbc-popup-badge {
    font-size: 0.68em;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.3;
}

.gbc-popup-badge-bal {
    background: #e8f0fe;
    color: #1a56db;
}

.gbc-popup-badge-concert {
    background: #f3e8ff;
    color: #7c3aed;
}

.gbc-popup-badge-stage {
    background: #fff3e0;
    color: #c77b1a;
}

.gbc-popup-badge-festival {
    background: #fce4ec;
    color: #c62828;
}

.gbc-popup-badge-anniversaire {
    background: #fff8e1;
    color: #a67c00;
}

.gbc-map-popup-desc {
    font-size: 1.0em;
    color: rgba(255, 255, 255, 0.7);
    margin: 6px 0;
    line-height: 1.4;
    border-left: 2px solid #c07a2a;
    padding-left: 6px;
}

/* Type Pills Filter styling */
.gbc-type-pills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gbc-type-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.gbc-type-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.gbc-type-pill.active {
    color: #fff;
    border-color: transparent;
}

.gbc-type-pill-bal.active {
    background: #1E88E5 !important;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.35);
}

.gbc-type-pill-stage.active {
    background: #8E24AA !important;
    box-shadow: 0 2px 8px rgba(142, 36, 170, 0.35);
}

.gbc-type-pill-concert.active {
    background: #43A047 !important;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.35);
}

.gbc-type-pill-festival.active {
    background: #E53935 !important;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.35);
}

.gbc-type-pill-anniversaire.active {
    background: #AFB42B !important;
    box-shadow: 0 2px 8px rgba(175, 180, 43, 0.35);
}

/* Standalone Light Version Pill compatibility */
.gbc-map-standalone-wrapper .gbc-type-pills-list {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.gbc-map-standalone-wrapper .gbc-type-pill {
    background: #fff;
    border-color: #cbd5e1;
    color: #64748b;
}

.gbc-map-standalone-wrapper .gbc-type-pill:hover {
    background: #f8fafc;
    color: #1e293b;
}

.gbc-map-standalone-wrapper .gbc-type-pill.active {
    color: #fff;
}

/* Results Status Line */
.gbc-filter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

.gbc-map-standalone-wrapper .gbc-filter-status {
    border-top-color: #cbd5e1;
}

.gbc-results-counter {
    font-size: 0.85em;
    font-weight: 700;
    color: #10b981;
}

@keyframes gbcCounterPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
        color: #34d399;
    }

    100% {
        transform: scale(1);
    }
}

.gbc-results-counter.gbc-pulse {
    animation: gbcCounterPulse 0.4s ease;
}

.gbc-reset-filters-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.gbc-reset-filters-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* List View component */
.gbc-map-list-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    overflow: hidden;
}

.gbc-map-standalone-wrapper .gbc-map-list-section {
    border-top-color: #cbd5e1;
}

.gbc-map-list-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.82em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.gbc-map-standalone-wrapper .gbc-map-list-section h4 {
    color: #64748b;
}

.gbc-map-list-container {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.gbc-map-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gbc-map-list-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.gbc-map-standalone-wrapper .gbc-map-list-item {
    background: #fff;
    border-color: #cbd5e1;
}

.gbc-map-standalone-wrapper .gbc-map-list-item:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.gbc-map-list-item-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 44px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.gbc-badge-day {
    font-size: 0.9em;
}

.gbc-badge-month {
    font-size: 0.58em;
    text-transform: uppercase;
}

.gbc-badge-year {
    font-size: 0.55em;
    opacity: 0.85;
    margin-top: 1px;
}

.gbc-map-list-item-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    position: relative;
}

.gbc-map-list-item-emoji {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    font-size: 14px;
}

.gbc-map-list-item-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 18px;
}

.gbc-map-standalone-wrapper .gbc-map-list-item-title {
    color: #1e293b;
}

.gbc-map-list-item-salle {
    font-weight: 600;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.3;
    margin-top: 2px;
}

.gbc-map-list-item-rue {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1px;
}

.gbc-map-list-item-lieu {
    font-size: 13px !important;
    /* Larger city text in list */
    font-weight: bold !important;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.gbc-map-standalone-wrapper .gbc-map-list-item-salle {
    color: #111111 !important;
}

.gbc-map-standalone-wrapper .gbc-map-list-item-rue {
    color: #666666 !important;
}

.gbc-map-standalone-wrapper .gbc-map-list-item-lieu {
    color: #1d2327 !important;
}

.gbc-map-list-empty {
    font-size: 0.82em;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 15px 0;
}

/* Collapsible Legend */
.gbc-map-legend {
    background: rgba(24, 24, 28, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    color: #fff !important;
    max-width: 210px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    font-family: inherit !important;
}

.gbc-map-standalone-wrapper .gbc-map-legend {
    background: #fff !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.gbc-legend-toggle-btn {
    background: transparent;
    border: none;
    color: #c07a2a;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 3px 0;
    outline: none;
}

.gbc-legend-content {
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
    transition: max-height 0.25s ease-out, opacity 0.25s ease-out;
    max-height: 450px;
    opacity: 1;
    overflow: hidden;
}

.gbc-map-standalone-wrapper .gbc-legend-content {
    border-top-color: #e2e8f0;
}

.gbc-legend-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.gbc-legend-content h5 {
    margin: 6px 0 4px 0;
    font-size: 0.85em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    font-weight: 700;
}

.gbc-map-standalone-wrapper .gbc-legend-content h5 {
    color: #64748b;
}

.gbc-legend-months {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.gbc-legend-months span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.gbc-legend-types {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gbc-legend-types li {
    font-size: 0.82em;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (min-width: 769px) {
    .gbc-legend-types li {
        font-size: 0.95em;
    }

    .gbc-legend-content h5 {
        font-size: 0.9em;
    }

    .gbc-legend-toggle-btn {
        font-size: 1.05em;
    }
}

.gbc-legend-types li span {
    font-size: 1.25em;
}

/* Sidebar Toggle button for mobile drawer style */
.gbc-sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: none;
    padding: 0;
    margin-left: auto;
}

.gbc-map-standalone-wrapper .gbc-sidebar-toggle-btn {
    color: #1e293b;
}

.gbc-sidebar-toggle-btn span {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.3s ease;
}

.gbc-map-sidebar.collapsed .gbc-sidebar-toggle-btn span {
    transform: rotate(180deg);
}

/* Mobile bottom sheet popup */
.gbc-mobile-bottom-sheet {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    max-height: 55%;
    overflow-y: auto;
    background: rgba(24, 24, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateY(calc(100% + 30px));
    transition: transform 0.3s cubic-bezier(0.1, 0.76, 0.55, 0.94);
    padding: 14px;
    box-sizing: border-box;
}

.gbc-mobile-sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: -4px auto 12px auto;
    cursor: grab;
}

.gbc-map-standalone-wrapper .gbc-mobile-sheet-drag-handle {
    background: rgba(0, 0, 0, 0.15);
}

.gbc-map-standalone-wrapper .gbc-mobile-bottom-sheet {
    background: #fff;
    border: 1px solid #cbd5e1;
}

.gbc-map-standalone-wrapper .gbc-mobile-bottom-sheet .gbc-map-popup-salle {
    color: #222222;
}

.gbc-map-standalone-wrapper .gbc-mobile-bottom-sheet .gbc-map-popup-rue {
    color: #555555;
}

.gbc-map-standalone-wrapper .gbc-mobile-bottom-sheet .gbc-map-popup-lieu {
    color: #1d2327 !important;
}

.gbc-mobile-bottom-sheet.gbc-active {
    transform: translateY(0);
}

.gbc-mobile-sheet-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.gbc-map-standalone-wrapper .gbc-mobile-sheet-close {
    background: #f1f5f9;
    color: #475569;
}

.gbc-mobile-sheet-content {
    width: 100%;
}

.gbc-mobile-sheet-content .gbc-map-popup-card {
    opacity: 1 !important;
}

.gbc-mobile-sheet-content .gbc-map-popup-img {
    height: 100px;
    border-radius: 8px;
}

.gbc-mobile-sheet-content .gbc-map-popup-info {
    padding: 10px 0 0 0;
}

/* Responsive updates for mobile layouts */
@media screen and (max-width: 768px) {
    .gbc-sidebar-toggle-btn {
        display: inline-block !important;
    }

    .gbc-map-sidebar {
        width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 8px 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow-y: auto !important;
        transition: max-height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .gbc-map-sidebar.collapsed {
        max-height: 48px !important;
        overflow: hidden !important;
        padding-bottom: 10px !important;
    }

    .gbc-map-sidebar.collapsed>*:not(h3) {
        display: none !important;
    }

    .gbc-map-sidebar h3 {
        display: flex !important;
        align-items: center;
        width: 100%;
        margin: 0 !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
        font-size: 0.95em;
        cursor: pointer;
    }

    .gbc-map-sidebar .gbc-filter-group {
        gap: 3px;
    }

    .gbc-map-sidebar .gbc-filter-group label {
        font-size: 0.7em;
        margin: 0;
    }

    .gbc-map-sidebar .gbc-filter-group input[type="search"],
    .gbc-map-sidebar .gbc-filter-group select {
        padding: 6px 10px !important;
        font-size: 0.85em !important;
        border-radius: 6px;
    }

    .gbc-map-sidebar .gbc-type-pills-list {
        gap: 4px !important;
    }

    .gbc-map-sidebar .gbc-type-pill {
        padding: 4px 8px !important;
        font-size: 0.78em !important;
    }

    .gbc-map-list-section {
        max-height: 120px !important;
    }

    .gbc-map-list-container {
        max-height: 100px !important;
    }

    .gbc-map-canvas-container {
        flex: 1 !important;
        min-height: 200px;
    }

    /* Make Leaflet controls fit nice */
    .leaflet-bottom {
        bottom: 15px !important;
    }

    .leaflet-right {
        right: 10px !important;
    }
}

/* --- Styles pour l'affichage de l'adresse et de la salle dans la colonne Ville --- */
.gbc-table-ville-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 12px;
}

#gbc-bals-container .tableau-bals-country td.col-ville .gbc-table-ville-wrapper {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gbc-table-salle {
    font-weight: bold;
    color: #1d2327;
    font-size: 1.05em;
    line-height: 1.25;
    margin-bottom: 3px;
}

.gbc-table-rue {
    font-size: 11px;
    color: #646970;
    margin-bottom: 2px;
    line-height: 1.2;
}

.gbc-table-ville {
    font-size: 1.1em;
    font-weight: bold;
    color: #1d2327;
    margin-top: 4px;
    line-height: 1.25;
}

/* Alignement en responsive mobile */
@media screen and (max-width: 768px) {
    #gbc-bals-container .tableau-bals-country td.col-ville {
        height: auto !important;
        min-height: 48px;
    }

    #gbc-bals-container .tableau-bals-country td.col-ville .gbc-table-ville-wrapper {
        align-items: flex-end !important;
        text-align: right !important;
        padding: 4px 0;
    }
}

/* --- Correctif d'affichage de la surbrillance (highlight) sur mobile --- */
@media screen and (max-width: 768px) {

    /* 1. DÃ©sactiver les animations et ombres de surbrillance sur les cellules individuelles (td) sur mobile */
    .gbc-main-row.gbc-row-highlight td,
    .tableau-bals-country tbody tr.gbc-row-highlight td,
    .tableau-bals-country tbody tr.gbc-info-row.gbc-row-highlight>td {
        animation: none !important;
        box-shadow: none !important;
        background-color: transparent !important;
    }

    /* 2. Appliquer l'animation de surbrillance sur le conteneur TR entier (la ligne complÃ¨te) */
    .tableau-bals-country tbody tr.gbc-row-highlight {
        animation: gbcGlowPulseMobile 2.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
        position: relative;
        z-index: 100 !important;
    }

    /* 3. Ajustements de la lÃ©gende sur mobile pour la garder compacte */
    .gbc-legend-toggle-btn {
        font-size: 0.8em !important;
    }

    .gbc-legend-content h5 {
        font-size: 0.75em !important;
    }

    .gbc-legend-months {
        gap: 3px !important;
        margin-bottom: 6px !important;
    }

    .gbc-legend-months span {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.65em !important;
    }

    .gbc-legend-types {
        gap: 3px !important;
    }

    .gbc-legend-types li {
        font-size: 0.72em !important;
    }

    .gbc-legend-types li span {
        font-size: 1.1em !important;
    }
}



.gbc-floating-map-btn.gbc-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.gbc-floating-map-btn:hover {
    background: linear-gradient(135deg, #d88e3c 0%, #b86e1e 100%);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.gbc-floating-map-btn .dashicons {
    font-size: 26px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    color: #ffffff !important;
}

@media screen and (max-width: 768px) {
    .gbc-floating-map-btn {
        bottom: 20px;
        left: 20px;
        width: 48px;
        height: 48px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    }

    .gbc-floating-map-btn .dashicons {
        font-size: 22px;
        width: 22px;
        height: 22px;
        line-height: 22px;
    }
}

/* En mode PWA standalone (installée) : surélever le bouton au-dessus de la barre de menu basse (60px) */
@media screen and (max-width: 782px) {
    @media all and (display-mode: standalone), all and (display-mode: fullscreen) {
        .gbc-floating-map-btn {
            bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        }
    }
    html.gc-pwa-standalone .gbc-floating-map-btn {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

