/**
 * Mapbox Events Map - Styles
 *
 * Styles personnalisés pour la carte Mapbox, les popups et le composant météo
 * 
 * Variables CSS utilisées (définies dans style.css) :
 * --color-primary: #020326
 * --color-accent: #29EB94
 * --border-radius: 4px
 * --spacing-base: 20px
 * 
 * @package Meup Child Theme
 */

/* ==========================================================================
   Wrapper principal
   ========================================================================== */

.meup-mapbox-wrapper {
    --map-search-panel-inset: 16px;
    --map-search-panel-width: min(380px, calc(100% - (var(--map-search-panel-inset) * 2)));
    width: 100%;
    height: 90vh;
    overflow: hidden;
}

/* ==========================================================================
   Carte plein écran + panneau flottant (inspiration AllTrails)
   ========================================================================== */

.mapbox-two-columns {
    position: relative;
    height: 100%;
}

.mapbox-map-column {
    position: relative;
    width: 100%;
    height: 100%;
}

.mapbox-map-column .map-search-map.fl-ui-map--full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    z-index: 1;
    overflow: hidden;
}

.mapbox-map-column .map-search-map.fl-ui-map--full .fl-ui-map__viewport {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.mapbox-map-column .map-search-map .fl-ui-map__controls {
    z-index: 12;
}

.map-search-map .fl-ui-map__viewport .mapboxgl-map,
.map-search-map .fl-ui-map__viewport .mapboxgl-canvas-container,
.map-search-map .fl-ui-map__viewport .mapboxgl-canvas {
    width: 100% !important;
    height: 100% !important;
}

.map-search-map .fl-ui-map__viewport .mapboxgl-canvas {
    cursor: grab !important;
}

.map-search-map .fl-ui-map__viewport .mapboxgl-canvas:active {
    cursor: grabbing !important;
}

.map-search-map .fl-ui-map__marker {
    cursor: pointer;
}

/* ==========================================================================
   Panneau flottant gauche : filtres + liste
   ========================================================================== */

.mapbox-left-column {
    position: absolute;
    top: var(--map-search-panel-inset);
    left: var(--map-search-panel-inset);
    bottom: var(--map-search-panel-inset);
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: var(--map-search-panel-width);
    max-width: calc(100% - (var(--map-search-panel-inset) * 2));
    overflow: hidden;
    background: #fff;
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(2, 3, 38, 0.14),
        0 2px 8px rgba(2, 3, 38, 0.08);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mapbox-events-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

/* Scrollbar personnalisée */
.mapbox-events-list::-webkit-scrollbar {
    width: 8px;
}

.mapbox-events-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: var(--border-radius);
}

.mapbox-events-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: var(--border-radius);
}

.mapbox-events-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.mapbox-events-count {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.mapbox-events-count p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.mapbox-events-count strong {
    color: var(--color-accent);
    font-size: 1.1rem;
}

/* Event cards — fl-event-type2-card template */
.mapbox-events-cards.event_archive.type2 {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.mapbox-events-cards.event_archive.type2.two-column {
	grid-template-columns: 1fr;
}

.mapbox-events-cards.event_archive.type2 .event_entry {
	cursor: pointer;
	height: 100%;
	display: flex;
	flex-direction: column;
	list-style: none;
	overflow: visible;
}

.mapbox-events-cards.event_archive.type2 .event_entry:hover {
	transform: none;
}

.mapbox-events-cards.event_archive.type2 .event_entry.highlighted .fl-event-type2-card {
	box-shadow: 0 0 0 3px var(--color-accent);
	border-color: rgba(2, 3, 38, 0.16);
}

.mapbox-events-cards.event_archive.type2 .fl-event-type2-card {
	flex: 1;
	width: 100%;
	margin-bottom: 0;
	border-radius: 12px !important;
	overflow: hidden;
}

.mapbox-events-cards.event_archive.type2 .fl-event-type2-card__media {
	border-radius: 12px 12px 0 0;
}

/* ==========================================================================
   Barre de filtres (hors sidebar, en haut à droite du panneau)
   ========================================================================== */

.mapbox-toolbar-filters {
    position: absolute;
    top: var(--map-search-panel-inset);
    left: calc(var(--map-search-panel-inset) + var(--map-search-panel-width) + 12px);
    right: var(--map-search-panel-inset);
    z-index: 21;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    pointer-events: none;
}

.mapbox-toolbar-filters .mapbox-filters-form {
    pointer-events: auto;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
}

.mapbox-toolbar-filters .mapbox-view-toggle {
    width: 88px;
    height: 40px;
}

.mapbox-toolbar-filters .mapbox-filter-group--select {
    flex: 0 1 auto;
    min-width: 0;
}

.mapbox-toolbar-filters .map-search-filter-field {
    margin: 0;
    min-width: 11.5rem;
}

.mapbox-toolbar-filters .map-search-filter-field .fl-ui-field__label,
.mapbox-fullscreen-filters .map-search-filter-field .fl-ui-field__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mapbox-toolbar-filters .map-search-filter-field .fl-ui-select-menu__trigger,
.mapbox-fullscreen-filters .map-search-filter-field .fl-ui-select-menu__trigger {
    min-height: 2.5rem;
}

.mapbox-filters-form .mapbox-filter-group--select,
.mapbox-fullscreen-filters-form .mapbox-filter-group--select {
    flex: 0 1 auto;
    min-width: 0;
}

.mapbox-toolbar-filters .fl-ui-select-menu__panel,
.mapbox-fullscreen-filters .fl-ui-select-menu__panel {
    z-index: 30;
}

/* ==========================================================================
   Filtres mobile (sidebar masquée < 992px)
   ========================================================================== */

.mapbox-fullscreen-filters {
    display: none;
}

.mapbox-toolbar-filters {
    display: flex;
}

.mapbox-fullscreen-filters-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    height: 40px;
}

.mapbox-fullscreen-filters-form .mapbox-filter-group {
    margin: 0;
}

.mapbox-fullscreen-filters-form .mapbox-view-toggle-group {
    flex-shrink: 0;
}

.mapbox-fullscreen-filters-form .mapbox-view-toggle {
    width: 80px;
    height: 40px;
}

.mapbox-fullscreen-filters-form .mapbox-view-toggle .toggle-option {
    font-size: 14px;
}

/* ==========================================================================
   Panneau d'infos événement mobile (style floating)
   ========================================================================== */

.mapbox-mobile-event-panel {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 30px));
    width: calc(100% - 40px);
    max-width: 500px;
    height: 180px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    z-index: 1000;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    cursor: pointer;
}

.mapbox-mobile-event-panel:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

@media (min-width: 992px) {
    .mapbox-mobile-event-panel {
        display: none !important;
    }
}

.mapbox-mobile-event-panel.active {
    transform: translateX(-50%) translateY(0);
}

.mapbox-mobile-event-panel .panel-content {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.mapbox-mobile-event-panel .panel-image {
    width: 140px;
    min-width: 140px;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 16px 0 0 16px;
}

.mapbox-mobile-event-panel .panel-image-placeholder {
    width: 140px;
    min-width: 140px;
    height: 100%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px 0 0 16px;
}

.mapbox-mobile-event-panel .panel-image-placeholder i {
    font-size: 3rem;
    color: #bbb;
}

.mapbox-mobile-event-panel .panel-details {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.mapbox-mobile-event-panel .panel-category {
    display: inline-block;
    padding: 0.0rem 0.6rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    align-self: flex-start;
}

.mapbox-mobile-event-panel .panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mapbox-mobile-event-panel .panel-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.mapbox-mobile-event-panel .panel-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
}

.mapbox-mobile-event-panel .panel-info-item i {
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-top: 0.15rem;
    width: 14px;
    flex-shrink: 0;
}

.mapbox-mobile-event-panel .panel-info-item span {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Pagination externe (au-dessus des popups/panels)
   ========================================================================== */

/* Pagination externe pour mobile uniquement */
.mapbox-external-pagination {
    position: fixed;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translate(-50%, -100%);
    transition: all 0.3s ease;
    pointer-events: none;
}

@media (min-width: 992px) {
    .mapbox-external-pagination {
        display: none !important;
    }
}

.mapbox-external-pagination .pagination-nav-btn {
    background: transparent;
    border: none;
    color: var(--color-primary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    pointer-events: all;
}

.mapbox-external-pagination .pagination-nav-btn:hover {
    color: var(--color-accent);
    transform: scale(1.2);
}

.mapbox-external-pagination .pagination-nav-btn i {
    font-size: 0.75rem;
}

.mapbox-external-pagination .pagination-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Pagination intégrée dans la popup Mapbox (desktop fullscreen) */
.mapboxgl-popup .mapbox-popup-external-pagination {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
    pointer-events: all;
}

.mapboxgl-popup .mapbox-popup-external-pagination .pagination-nav-btn {
    background: transparent;
    border: none;
    color: var(--color-primary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.mapboxgl-popup .mapbox-popup-external-pagination .pagination-nav-btn:hover {
    color: var(--color-accent);
    transform: scale(1.2);
}

.mapboxgl-popup .mapbox-popup-external-pagination .pagination-nav-btn i {
    font-size: 0.75rem;
}

.mapboxgl-popup .mapbox-popup-external-pagination .pagination-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Afficher uniquement sur mobile */
@media (min-width: 992px) {
    .mapbox-mobile-event-panel {
        display: none !important;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .mapbox-mobile-event-panel {
        bottom: 15px;
        width: calc(100% - 30px);
        height: 140px;
    }
    
    .mapbox-mobile-event-panel .panel-image,
    .mapbox-mobile-event-panel .panel-image-placeholder {
        width: 120px;
        min-width: 120px;
    }
    
    .mapbox-mobile-event-panel .panel-image-placeholder i {
        font-size: 2rem;
    }
    
    .mapbox-mobile-event-panel .panel-title {
        font-size: 1rem;
    }
    
    .mapbox-mobile-event-panel .panel-info-item {
        font-size: 0.8rem;
    }
}

.mapbox-map-column .mapboxgl-map {
    font-family: inherit;
}

/* ==========================================================================
   Filtres
   ========================================================================== */

.mapbox-filters-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: center;
}

/* Toggle View (Calendrier / Route) */
.mapbox-view-toggle-group {
    flex-shrink: 0;
}

.mapbox-view-toggle {
    position: relative;
    display: flex;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 4px;
    width: 100px;
    height: 44px;
}

.mapbox-view-toggle input[type="radio"] {
    display: none;
}

.mapbox-view-toggle .toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
    color: #999;
    font-size: 14px;
    margin: 0;
}

.mapbox-view-toggle input[type="radio"]:checked + .toggle-option {
    color: #fff;
}

.mapbox-view-toggle .toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--color-primary);
    border-radius: 50px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.mapbox-view-toggle input[type="radio"]:checked:nth-of-type(2) ~ .toggle-slider {
    transform: translateX(calc(100% + 4px));
}

.mapbox-filter-group {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Popups personnalisées
   ========================================================================== */

.mapboxgl-popup-content {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}

.meup-mapbox-popup {
    font-family: 'Montserrat', sans-serif;
    width: 300px;
}

/* Version compacte des pop-ups (nouveau format rectangle) */
.meup-mapbox-popup.compact-popup {
    width: 400px; /* Largeur par défaut augmentée avec sidebar ouverte */
    max-width: 100%; /* S'assure qu'elle ne déborde pas du conteneur */
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 120px;
    box-sizing: border-box; /* Inclut padding et border dans la largeur */
    overflow: hidden; /* Empêche tout débordement */
}

.meup-mapbox-popup.compact-popup .popup-left {
    flex: 0 0 25%; /* 1/4 de la largeur */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.meup-mapbox-popup.compact-popup .popup-compact-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.meup-mapbox-popup.compact-popup .popup-compact-placeholder {
    width: 100%;
    height: 100%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meup-mapbox-popup.compact-popup .popup-compact-placeholder i {
    font-size: 1.5rem;
    color: #bbb;
}

.meup-mapbox-popup.compact-popup .popup-right {
    flex: 1; /* 7/8 de la largeur */
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0; /* Permet au contenu de se rétracter */
    overflow: hidden; /* Empêche le débordement */
    box-sizing: border-box;
}

.meup-mapbox-popup.compact-popup .popup-category {
    display: inline-block;
    padding: 0px 8px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--border-radius);
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    align-self: flex-start;
}

.meup-mapbox-popup.compact-popup .popup-info {
    margin: 0.25rem 0;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow: hidden;
}

.meup-mapbox-popup.compact-popup .popup-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.meup-mapbox-popup.compact-popup .popup-info i {
    color: var(--color-primary);
    width: 12px;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.meup-mapbox-popup.compact-popup .popup-trace-stats {
    display: flex;
    gap: 0.2rem;
    flex: 1;
}

/* Liens cliquables dans les pop-ups */
.meup-mapbox-popup .popup-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meup-mapbox-popup .popup-image-link:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.meup-mapbox-popup .popup-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0; /* Permet au titre de se rétracter */
    width: 100%; /* Prend toute la largeur disponible */
    box-sizing: border-box;
}

.meup-mapbox-popup .popup-title-link:hover {
    opacity: 0.8;
}

.meup-mapbox-popup .popup-title-link h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.meup-mapbox-popup .popup-title-link:hover h3 {
    color: var(--color-accent);
}

/* Styles pour l'ancienne version (si nécessaire pour compatibilité) */
.meup-mapbox-popup:not(.compact-popup) .popup-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.meup-mapbox-popup:not(.compact-popup) .popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.meup-mapbox-popup:not(.compact-popup) .popup-image-placeholder {
    width: 100%;
    height: 180px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meup-mapbox-popup:not(.compact-popup) .popup-image-placeholder i {
    font-size: 3rem;
    color: #bbb;
}

.meup-mapbox-popup:not(.compact-popup) .popup-content {
    padding: 20px;
}

.meup-mapbox-popup:not(.compact-popup) .popup-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.meup-mapbox-popup:not(.compact-popup) .popup-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meup-mapbox-popup:not(.compact-popup) .popup-date,
.meup-mapbox-popup:not(.compact-popup) .popup-location {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.meup-mapbox-popup:not(.compact-popup) .popup-date span,
.meup-mapbox-popup:not(.compact-popup) .popup-location span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.meup-mapbox-popup:not(.compact-popup) .popup-date i,
.meup-mapbox-popup:not(.compact-popup) .popup-location i {
    color: var(--color-accent);
    width: 16px;
    flex-shrink: 0;
}

.meup-mapbox-popup:not(.compact-popup) .popup-link {
    display: inline-block;
    margin-top: 8px;
    padding: 0.6rem 1.5rem;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
}

.meup-mapbox-popup .popup-link:hover {
    background: var(--color-accent);
}

/* Bouton de fermeture de la popup */
.mapboxgl-popup-close-button {
    font-size: 1.5rem;
    padding: 0.5rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 8px 0 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mapboxgl-popup-close-button:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Retirer le triangle et ajouter de l'espace */
.mapboxgl-popup-tip {
    display: none !important;
}

/* ==========================================================================
   Contrôles de navigation
   ========================================================================== */

.mapboxgl-ctrl-group {
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.mapboxgl-ctrl-group button {
    width: 36px !important;
    height: 36px !important;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.mapbox-no-events {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.mapbox-no-events p {
    margin: 0;
    color: #6c757d;
    font-size: 1rem;
}

.mapbox-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.mapbox-error p {
    margin: 0.5rem 0;
    color: #856404;
}

@media (max-width: 992px) {
    .meup-mapbox-wrapper {
        height: auto;
        overflow: visible;
    }
    
    .mapbox-two-columns {
        height: auto;
    }
    
    /* Sur mobile, cacher la sidebar et la barre desktop */
    .mapbox-left-column {
        display: none !important;
    }

    .mapbox-toolbar-filters {
        display: none !important;
    }
    
    /* Afficher les filtres flottants sur mobile */
    .mapbox-fullscreen-filters {
        display: block !important;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
    }
    
    .mapbox-fullscreen-filters-form {
        gap: 0;
    }
    
    /* Ajouter une ombre pour que le toggle ressorte bien sur la carte */
    .mapbox-fullscreen-filters-form .mapbox-view-toggle {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Masquer les selects de filtres sur mobile, garder uniquement le toggle */
    .mapbox-fullscreen-filters-form .mapbox-filter-group:not(.mapbox-view-toggle-group) {
        display: none !important;
    }
    
    .mapbox-map-column {
        position: relative;
        top: 0;
        height: 93vh !important;
    }
    
    .mapbox-map-column .map-search-map.fl-ui-map--full,
    .mapbox-map-column .map-search-map.fl-ui-map--full .fl-ui-map__viewport {
        height: 100% !important;
        min-height: 100%;
    }
    
}

@media (max-width: 768px) {
    .mapbox-filters-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mapbox-view-toggle-group {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    /* Ajuster la taille du toggle sur petit mobile */
    .mapbox-fullscreen-filters-form .mapbox-view-toggle {
        width: 75px;
        height: 38px;
    }
    
    /* 1 colonne sur mobile */
    .mapbox-events-cards.event_archive.type2 {
        grid-template-columns: 1fr;
    }
    
    /* Ajustements type2 sur mobile */
    .mapbox-events-cards.event_archive.type2 .fl-event-type2-card {
        flex-direction: column;
    }

    .mapbox-events-cards.event_archive.type2 .fl-event-type2-card__media {
        width: 100%;
    }
    
    .mapbox-locate-btn {
        width: 35px;
        height: 35px;
    }
    
    .mapbox-locate-btn i {
        font-size: 16px;
    }
    
    .meup-mapbox-popup .popup-image {
        height: 150px;
    }
    
    .mapboxgl-popup-content {
        max-width: 280px;
    }
    
    .mapbox-map-column {
        height: 40vh;
    }
    
}

@media (max-width: 480px) {
    .mapbox-locate-btn {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
    
    .mapbox-locate-btn i {
        font-size: 14px;
    }
    
    /* Ajuster le toggle sur très petits écrans */
    .mapbox-fullscreen-filters {
        top: 70px;
        left: 15px;
    }
    
    .mapbox-fullscreen-filters-form .mapbox-view-toggle {
        width: 70px;
        height: 36px;
    }
    
    .mapbox-fullscreen-filters-form .mapbox-view-toggle .toggle-option {
        font-size: 13px;
    }
    
}

/* ==========================================================================
   Loader pour le chargement AJAX
   ========================================================================== */

.mapbox-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.mapbox-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--color-accent);
    border-radius: 50%;
    animation: mapbox-spin 1s linear infinite;
    z-index: 10000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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


/* ==========================================================================
   Carte Mapbox - Page détail événement
   ========================================================================== */

/* Container de la carte single event */
#event_map {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Marqueur personnalisé pour la carte single event */
.mapbox-single-event-marker {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mapbox-single-event-marker:hover {
    transform: scale(1.1);
}

/* Popup pour l'adresse */
.mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
}

.event-map-popup {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
    line-height: 1.4;
    max-width: 250px;
}

/* Styles responsive pour la carte single event */
@media (max-width: 768px) {
    #event_map {
        height: 300px;
    }
}

/* ==========================================================================
   formulaire de création d'un tracé 
   ========================================================================== */

/* ---- Overrides spécifiques au formulaire tracé ---- */
.trace_form_column .fl-events-dashboard__page-header {
	margin-bottom: 20px;
}

/* ---- Layout deux colonnes formulaire + carte ---- */

.trace_layout {
	display: flex;
	align-items: flex-start;
	width: 100%;
	height: 100vh;
	gap: 40px;
}

/* Colonne formulaire : colonne flex fixe, seul le conteneur de points scrolle */
.trace_form_column {
	flex: 1;
	min-width: 0;
	height: 100vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.vendor_create_trace {
	width: 100%;
	max-width: 100%;
}

/* ---- Colonne carte (sticky, 40%) ---- */
.trace_map_column {
	flex-shrink: 0;
	width: 40%;
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.trace_map_column__header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-shrink: 0;
	min-height: 36px;
}

.form_field {
	margin-bottom: 16px;
}

.form_field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.form_field .required {
	color: #e74c3c;
	margin-left: 2px;
}

.form_field input[type="text"] {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.form_field input[type="text"]:focus {
	border-color: #3498db;
	outline: none;
}

.checkbox_label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 400 !important;
}

.checkbox_label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.checkbox_label span {
	font-size: 14px;
	color: var(--color-primary);
}

.trace_stats {
	margin: 0;
}

.trace_stats_row {
	display: flex;
	gap: 20px;
	align-items: center;
}

.trace_stat_item {
	display: flex;
	flex-direction: column;
	gap: 1px;
	background-color: #fff;
	padding: 6px 10px;
	border: 1px solid #EEEEEE;
	border-radius: 6px;
}

.trace_stat_label {
	font-size: 10px;
	color: #999;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.trace_stat_value {
	font-size: 14px;
	color: var(--color-primary);
	font-weight: 600;
}

.form_divider {
	height: 1px;
	background: #e5e5e5;
	margin: 30px 0;
}

.form_section_title {
	font-size: 18px;
	font-weight: 600;
	color: var(--color-primary);
	margin-bottom: 12px;
}

.trace_points_container {
	overflow-y: auto;
	max-height: calc(100vh - 540px);
	min-height: 80px;
	margin-bottom: 6px;
	padding-right: 4px;
	padding-bottom: 12px;
}

.point_search_wrapper {
	position: relative;
    margin-top: 10px;
}

.point_search_input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.point_search_input:focus {
	border-color: #3498db;
	outline: none;
}

.point_search_results {
	position: fixed;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 6px 6px;
	max-height: 220px;
	overflow-y: auto;
	z-index: 9999;
	display: none;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.point_search_results.active {
	display: block;
}

.point_search_result_item {
	padding: 10px 12px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background 0.2s;
}

.point_search_result_item:hover {
	background: #f5f5f5;
}

.point_search_result_item:last-child {
	border-bottom: none;
}

.point_selected {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px;
	background: #FFFFFF;
	border: 1px solid #EEEEEE;
	border-radius: 4px;
	margin-top: 10px;
	gap: 10px;
}

.point_drag_handle {
	cursor: grab;
	padding: 5px;
	color: #d9d9d9;
	display: flex;
	align-items: center;
}

.point_drag_handle:active {
	cursor: grabbing;
}

.point_drag_handle i {
	font-size: 16px;
}

.trace_points_container.ui-sortable .trace_point_item {
	transition: all 0.3s ease;
}

.trace_points_container .ui-sortable-helper {
	opacity: 0.8;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.trace_point_placeholder {
	background: #f0f0f0;
	border: 2px dashed #ccc;
	border-radius: 4px;
	height: 60px;
	margin-bottom: 20px;
}

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

.point_selected_content i {
	color: var(--primary-color);
	font-size: 16px;
}

.point_info {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.point_selected_text {
	font-size: 14px;
	color: #333;
	font-weight: 500;
}

.point_label_subtitle {
	font-size: 12px;
	color: #999;
	font-weight: 500;
}

.point_remove_btn {
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	padding: 5px;
	font-size: 16px;
	transition: color 0.2s;
}

.point_remove_btn:hover {
	color: #e74c3c;
}

.btn_add_point {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 0;
	background: none;
	border: none;
	color: #666;
	font-size: 13px;
	font-weight: 400;
	cursor: pointer;
	transition: color 0.2s;
	text-align: left;
}

.btn_add_point:hover {
	color: #29EB94;
}

.form_submit_wrapper {
	position: sticky;
	bottom: 0;
	z-index: 10;
	margin-top: auto;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 0px;
	background: #f7f7f7;
	border-top: 1px solid #e5e5e5;
}

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

.btn_back_traces {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 16px;
	background: transparent;
	border: 1px solid #CCC;
	border-radius: 6px;
	color: #555 !important;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.btn_back_traces:hover {
	background: #f5f5f5;
	border-color: #bbb;
	color: #333 !important;
	text-decoration: none;
}

.btn_submit_trace {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 20px;
	background: #020326 !important;
	border: none;
	border-radius: 6px;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.btn_submit_trace:hover {
	background: #0d0f3a !important;
}

.btn_submit_trace:active {
	transform: translateY(0);
}

.btn_submit_trace i {
	font-size: 14px;
}

.form_section_description {
	font-size: 12px;
	color: #666 !important;
	margin: -10px 0 20px 0;
}

.poi_container {
	margin-bottom: 20px;
}

.poi_item {
	margin-bottom: 20px;
	padding: 15px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.poi_item_header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 15px;
}

.poi_type_select {
	flex: 1;
	margin-right: 10px;
}

.poi_type_select label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.poi_type_select select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	cursor: pointer;
}

.poi_remove_btn {
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	padding: 5px;
	font-size: 18px;
	transition: color 0.2s;
}

.poi_remove_btn:hover {
	color: #e74c3c;
}

.poi_search_wrapper {
	position: relative;
}

.poi_search_wrapper label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.poi_search_input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.poi_search_input:focus {
	border-color: #3498db;
	outline: none;
}

.poi_search_results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 10;
	display: none;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.poi_search_results.active {
	display: block;
}

.poi_search_result_item {
	padding: 10px 12px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background 0.2s;
}

.poi_search_result_item:hover {
	background: #f5f5f5;
}

.poi_search_result_item:last-child {
	border-bottom: none;
}

.poi_selected {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	margin-top: 10px;
}

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

.poi_selected_content i {
	color: #ff9800;
	font-size: 16px;
}

.poi_selected_text {
	font-size: 14px;
	color: #333;
}

.poi_clear_btn {
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	padding: 5px;
	font-size: 16px;
	transition: color 0.2s;
}

.poi_clear_btn:hover {
	color: #e74c3c;
}

.section_header_with_button {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 8px;
}

.section_header_with_button > div:first-child {
	flex: 1;
}

.section_header_with_button .form_section_title {
	margin-bottom: 12px;
    margin-top: 0px;
}

.section_header_with_button .form_section_description {
	margin: -10px 0 0 0;
	font-size: 12px;
}

.section_header_with_button .add_point_wrapper {
	flex-shrink: 0;
	margin: 0;
}

.section_header_with_button .btn_add_point {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 0;
	background: none;
	border: none;
	color: var(--color-primary);
	font-size: 13px;
	font-weight: 400;
	cursor: pointer;
	transition: color 0.2s;
	text-align: left;
	white-space: nowrap;
}

.section_header_with_button .btn_add_point:hover {
	color: #29EB94;
}

.poi_section_header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.poi_section_header > div {
	flex: 1;
}

.poi_section_header .form_section_title {
	margin-bottom: 12px;
}

.poi_section_header .form_section_description {
	margin: -10px 0 0 0;
	font-size: 12px;
}

.btn_add_poi {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 0;
	background: none;
	border: none;
	color: #666;
	font-size: 13px;
	font-weight: 400;
	cursor: pointer;
	transition: color 0.2s;
	text-align: left;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ==========================================================================
   États vides pour le créateur de tracés
   ========================================================================== */

.empty_state {
	background: #f8f9fa;
	border: 2px dashed #dee2e6;
	border-radius: 8px;
	padding: 1rem;
	text-align: center;
	margin: 1rem 0;
}

.empty_state_content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.empty_state_content i {
	font-size: 36px;
	color: #6c757d;
	margin-bottom: 0.5rem;
}

.empty_state_content p {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #495057;
}

.empty_state_content small {
	margin: 0;
	font-size: 12px;
	color: #6c757d;
	line-height: 1.4;
}

#trace_empty_state .empty_state_content i {
	color: #29EB94;
}

#poi_empty_state .empty_state_content i {
	color: #ff9800;
}

.btn_add_poi:hover {
	color: #ff9800;
}

/* ==========================================================================
   Message de succès
   ========================================================================== */

.trace_success_message {
	background: #29EB942A;
	border-radius: 8px;
	padding: 10px;
	margin-bottom: 2rem;
}

.success_content {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: var(--color-primary);
}

.success_content .success_header {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.success_content .success_text {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.success_content i {
	font-size: 20px;
	color: var(--color-accent);
	flex-shrink: 0;
}

.success_content h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--color-primary);
}

.success_content p {
	margin: 0;
	font-size: 12px;
	color: var(--color-primary);
	line-height: 1.4;
}

/* ==========================================================================
   Responsive — formulaire tracé (mobile)
   ========================================================================== */

@media screen and (max-width: 991px) {
	/* Blocs empilés, aucun scroll interne, flux naturel */
	.trace_layout {
		flex-direction: column;
		height: auto;
		gap: 0;
	}

	/* Carte en premier */
	.trace_map_column {
		order: -1;
		position: static;
		width: 100%;
		height: auto;
		gap: 0;
	}

	.trace_map_column__header {
		padding: 12px 16px;
		min-height: unset;
	}

	/* Formulaire : hauteur et overflow naturels */
	.trace_form_column {
		height: auto;
		overflow: visible;
		padding: 20px 0px;
	}

	/* Points : hauteur libre, pas de scroll interne */
	.trace_points_container {
		max-height: none;
		overflow: visible;
	}

	/* Submit wrapper : position normale dans le flux, colonne */
	.form_submit_wrapper {
		position: static;
		margin-top: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.trace_stats_row {
		justify-content: flex-start;
	}

	.form_buttons_row {
		width: 100%;
	}

	.btn_back_traces,
	.btn_submit_trace {
		flex: 1;
		justify-content: center;
	}

	/* Stats : retour à la ligne si nécessaire */
	.trace_stats_row {
		flex-wrap: wrap;
		gap: 8px;
	}

	/* Section header */
	.section_header_with_button {
		flex-wrap: wrap;
		gap: 8px;
	}

	/* Actions header : visibilité + IA */
	.trace-header-actions {
		flex-wrap: wrap;
		gap: 8px;
	}
}

/* ==========================================================================
   Cards de Tracés pour la Sidebar
   ========================================================================== */

/* Styles généraux pour les cards de tracé similaires aux événements */
.mapbox-traces-cards.trace_archive.type2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mapbox-traces-cards.trace_archive.type2.two-column {
    grid-template-columns: 1fr;
}

.mapbox-traces-cards.trace_archive.type2 li {
    display: flex;
    margin: 0;
}

.mapbox-traces-cards.trace_archive.type2 .trace_entry {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    border: 1px solid #CCCCCC;
}

.mapbox-traces-cards.trace_archive.type2 .trace_entry.highlighted {
    box-shadow: 0 0 0 3px #e86c60;
    border-radius: 8px;
}

/* Faire en sorte que les trace_item prennent toute la hauteur */
.mapbox-traces-cards.trace_archive.type2 .trace_item {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

/* Le detail doit pousser le footer en bas */
.mapbox-traces-cards.trace_archive.type2 .trace_detail {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Le footer doit rester en bas */
.mapbox-traces-cards.trace_archive.type2 .trace_detail .meta-footer {
    margin-top: auto;
}

/* Bouton "Localiser sur la carte" dans le thumbnail */
.mapbox-traces-cards .trace_thumbnail {
    position: relative;
}

/* S'assurer que les images sont bien cadrées */
.mapbox-traces-cards.trace_archive.type2 .trace_thumbnail .thumbnail_figure {
    position: relative;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
}

.mapbox-traces-cards.trace_archive.type2 .trace_thumbnail .thumbnail_figure a {
    display: block;
}

.mapbox-traces-cards.trace_archive.type2 .trace_thumbnail .thumbnail_figure a img {
    border-radius: 5px 5px 0 0;
    display: block;
    width: 100%;
    height: 245px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mapbox-traces-cards.trace_archive.type2 .trace_entry:hover .trace_thumbnail .thumbnail_figure a img {
    transform: scale(1.05);
}

/* Boutons pin supprimés - CSS nettoyé */

/* Meta informations des tracés */
.mapbox-traces-cards.trace_archive.type2 .trace-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.mapbox-traces-cards.trace_archive.type2 .trace_meta_type span {
    background: var(--color-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.mapbox-traces-cards.trace_archive.type2 .trace_meta_waypoints {
    display: none;
}

/* Titre des tracés */
.mapbox-traces-cards.trace_archive.type2 .trace_detail .loop_title {
    margin-bottom: 15px;
    line-height: 1;
}

.mapbox-traces-cards.trace_archive.type2 .trace_detail .loop_title a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
}

/* Location et stats des tracés */
.mapbox-traces-cards.trace_archive.type2 .trace-location-stats {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.mapbox-traces-cards.trace_archive.type2 .trace_location,
.mapbox-traces-cards.trace_archive.type2 .trace-stats {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.mapbox-traces-cards.trace_archive.type2 .trace-icon {
    margin-right: 8px;
    color: #e86c60;
    width: 16px;
}

.mapbox-traces-cards.trace_archive.type2 .trace_location a {
    color: #666;
    text-decoration: none;
}

.mapbox-traces-cards.trace_archive.type2 .trace_location a:hover {
    color: #e86c60;
}

.mapbox-traces-cards.trace_archive.type2 .trace-button a {
    background: #E7E7E7;
    color: var(--color-primary);
    padding: 4px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Detail padding */
.mapbox-traces-cards.trace_archive.type2 .trace_detail {
    padding: 15px;
}

/* Mode colonne pour la sidebar */
@media screen and (max-width: 1400px) {
    .mapbox-traces-cards.trace_archive.type2.two-column {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   STYLES STANDARDISÉS MAPBOX - Markers, Traces & Waypoints
   ========================================================================== */

/* --- MARKERS ÉVÉNEMENTS (Pin standard) --- */
.mapbox-event-marker {
    cursor: pointer;
}

.mapbox-event-marker:hover {
    transform: scale(1.1);
}

.mapbox-event-marker svg {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* Marker événement single (page détail) */
.mapbox-single-event-marker svg {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

/* --- TRACÉS - Lignes de route --- */

/* Ces styles sont appliqués via Mapbox layers, mais on définit les couleurs ici pour cohérence */
:root {
    --trace-color-outline: #1B8F5F;  /* Vert foncé pour bordure */
    --trace-color-main: #29EB94;     /* Vert clair pour ligne principale */
    --trace-width-outline: 7px;
    --trace-width-main: 3px;
}

/* --- WAYPOINTS - Marqueurs de début/fin de tracé --- */

/* Waypoints principaux (départ et arrivée) - ronds verts */
.mapbox-trace-waypoint-main {
    width: 16px;
    height: 16px;
    background-color: #29EB94;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.mapbox-trace-waypoint-main:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Waypoint intermédiaire - ronds bleu foncé */
.mapbox-trace-waypoint-intermediate {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

.mapbox-trace-waypoint-intermediate > div {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mapbox-trace-waypoint-intermediate:hover > div {
    transform: scale(1.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Anciens styles SVG - conservés pour compatibilité mais non utilisés */
.mapbox-trace-waypoint-start,
.mapbox-trace-waypoint-end {
    cursor: pointer;
}

.mapbox-trace-waypoint-start:hover,
.mapbox-trace-waypoint-end:hover {
    transform: scale(1.15);
}

.mapbox-trace-waypoint-start svg,
.mapbox-trace-waypoint-end svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

/* --- POI MARKERS (Points d'intérêt) --- */

.mapbox-poi-marker {
    cursor: pointer;
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.mapbox-poi-marker:hover {
    transform: scale(1.2);
}

/* --- POPUPS MAPBOX --- */

.mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
}

.mapboxgl-popup-close-button {
    font-size: 20px;
    padding: 6px;
    color: #999;
}

.mapboxgl-popup-close-button:hover {
    background: transparent;
    color: #333;
}

.event-map-popup,
.trace-map-popup {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
    line-height: 1.4;
    max-width: 250px;
}

/* --- CONTROLS MAPBOX (Zoom, Navigation) --- */

.mapboxgl-ctrl-group {
    border-radius: 6px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.mapboxgl-ctrl-group button {
    width: 32px;
    height: 32px;
}

.mapboxgl-ctrl-group button:hover {
    background-color: #f0f0f0;
}

/* Responsive - Ajustements mobiles */
@media (max-width: 768px) {
    .mapbox-trace-waypoint-start svg,
    .mapbox-trace-waypoint-end svg,
    .mapbox-trace-waypoint-intermediate svg {
        width: 20px;
        height: 26px;
    }
    
    .mapboxgl-ctrl-group button {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 767px) {
    .vendor_wrap .contents {
        padding: 20px 20px;
    }
}

/* ==========================================================================
   Composant météo — page détail événement
   ========================================================================== */

.event_weather_section {
    padding: 10px 12px 6px 12px;
}

.event_weather_unavailable {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #999;
}

.event_weather_inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.event_weather_left {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.event_weather_subtitle {
	font-size: 12px;
	font-weight: 500;
	color: var(--color-second-text-grey, #747688);
}

.event_weather_city {
	font-size: 18px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0;
	line-height: 1.2;
}


.event_weather_right {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.event_weather_temp {
	font-size: 22px;
	font-weight: 700;
	color: #1a1a2e;
	line-height: 1;
}

.event_weather_icon {
	font-size: 22px;
	color: #ccc;
	opacity: 0.85;
}

@media (max-width: 480px) {
	.event_weather_section {
		padding: 16px;
	}
	.event_weather_city {
		font-size: 15px;
	}
	.event_weather_temp {
		font-size: 26px;
	}
	.event_weather_icon {
		font-size: 22px;
	}
}