/* ===== CONTAINER PRINCIPAL ===== */

.act-tour-map-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* FORCE LE LAYOUT GRID SUR DESKTOP - CRITIQUE */
@media screen and (min-width: 1025px) {
    .act-tour-map-container {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .act-tour-map-container .act-tour-content {
        display: grid !important;
        grid-template-columns: 400px calc(100% - 420px) !important;
        grid-template-rows: auto !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .act-tour-map-container .act-tour-sidebar {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
        width: 400px !important;
        max-width: 400px !important;
    }
    
    .act-tour-map-container .act-tour-map-wrapper {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 500px !important;
    }
}

/* ===== BARRE DE RECHERCHE ===== */

.act-tour-search-bar {
    position: relative;
    margin-bottom: 20px;
}

.act-tour-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.act-tour-search-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.act-tour-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.act-tour-search-icon svg {
    width: 20px;
    height: 20px;
}

/* ===== LAYOUT PRINCIPAL ===== */

.act-tour-content {
    display: grid !important;
    grid-template-columns: 400px calc(100% - 420px) !important;
    gap: 20px !important;
    min-height: 600px;
    width: 100% !important;
    max-width: none !important;
}

@media screen and (min-width: 1025px) {
    .act-tour-map-container {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .act-tour-content {
        display: grid !important;
        grid-template-columns: 400px calc(100% - 420px) !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .act-tour-sidebar {
        grid-column: 1 !important;
        width: 400px !important;
        max-width: 400px !important;
    }
    
    .act-tour-map-wrapper {
        grid-column: 2 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 500px !important;
    }
}

/* ===== SIDEBAR ===== */

.act-tour-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    overflow-y: auto;
    max-height: 800px;
}

.act-tour-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

/* ===== CATÉGORIES ===== */

.act-tour-category-section {
    border-bottom: 1px solid #f3f4f6;
}

.act-tour-category-section:last-child {
    border-bottom: none;
}

.act-tour-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    background: #f9fafb;
    border-left: 4px solid #3B82F6;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.act-tour-category-title:hover {
    background: #f3f4f6;
}

.act-tour-category-title::after {
    content: '▼';
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

.act-tour-category-section.collapsed .act-tour-category-title::after {
    transform: rotate(-90deg);
}

.act-tour-category-section.collapsed .act-tour-activities-list {
    display: none;
}

.act-tour-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.act-tour-category-icon i {
    font-size: 20px;
}

.act-tour-category-icon svg {
    width: 20px;
    height: 20px;
}

.act-tour-category-count {
    margin-left: auto;
    margin-right: 10px;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ===== LISTE DES ACTIVITÉS ===== */

.act-tour-activities-list {
    padding: 0;
    margin: 0;
}

.act-tour-activity-card {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
}

.act-tour-activity-card:last-child {
    border-bottom: none;
}

.act-tour-activity-card:hover {
    background: #f9fafb;
}

.act-tour-activity-card.active {
    background: #eff6ff;
    border-left: 3px solid #3B82F6;
}

.act-tour-activity-image {
    width: 100%;
    height: 120px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.act-tour-activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.act-tour-activity-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.act-tour-activity-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.act-tour-activity-address {
    display: flex;
    align-items: start;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.act-tour-activity-address svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.act-tour-activity-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.act-tour-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

.act-tour-meta-item:hover {
    color: #2563eb;
}

.act-tour-meta-item svg {
    width: 14px;
    height: 14px;
}

/* ===== CARTE ===== */

.act-tour-map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    height: 800px;
}

.act-tour-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 800px;
    border-radius: 12px;
}

/* S'assurer que Leaflet utilise toute la hauteur */
.act-tour-map.leaflet-container {
    height: 100% !important;
}

/* ===== MARQUEURS PERSONNALISÉS ===== */

.act-tour-custom-marker {
    background: none;
    border: none;
}

.act-tour-marker-pin {
    width: 30px;
    height: 42px;
    position: relative;
    background: #3B82F6;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.act-tour-marker-pin::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.act-tour-gite-pin {
    width: 40px;
    height: 52px;
}

.act-tour-gite-pin::after {
    width: 20px;
    height: 20px;
}

/* ===== POPUP DE LA CARTE ===== */

.act-tour-popup {
    min-width: 250px;
    max-width: 300px;
    padding: 20px;
}

.act-tour-popup h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.act-tour-popup-image {
    width: 100%;
    height: 150px;
    margin: -10px -10px 12px -10px;
    overflow: hidden;
}

.act-tour-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.act-tour-popup-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.act-tour-popup-address {
    display: flex;
    align-items: start;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px 0;
}

.act-tour-popup-address svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.act-tour-popup-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.act-tour-popup-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.2s;
}

.act-tour-popup-link:hover {
    color: #2563eb;
}

.act-tour-popup-link svg {
    width: 14px;
    height: 14px;
}

.act-tour-directions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #3B82F6;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.act-tour-directions-btn:hover {
    background: #2563eb;
    color: white !important;
}

.act-tour-directions-btn svg {
    width: 16px;
    height: 16px;
    stroke: white !important;
}

/* ===== PERSONNALISATION LEAFLET ===== */

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 20px !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
}

.leaflet-popup-tip {
    border-radius: 2px;
}

/* ===== MOBILE FORCÉ : SIDEBAR AU DESSUS / CARTE EN DESSOUS ===== */

@media screen and (max-width: 768px) {

    .act-tour-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
    }

    /* Sidebar en premier */
    .act-tour-sidebar {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 350px;
    }

    /* Carte obligatoirement en dessous */
    .act-tour-map-wrapper {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 450px !important;
        display: block !important;
    }

    .act-tour-map {
        min-height: 450px !important;
        height: 100% !important;
    }
}


/* ===== RESPONSIVE ===== */

@media screen and (max-width: 1024px) {
    .act-tour-content {
        grid-template-columns: 1fr;
    }
    
    .act-tour-sidebar {
        max-height: 400px;
    }
    
    .act-tour-map-wrapper {
        height: 600px;
    }
    
    .act-tour-map {
        min-height: 600px;
    }
}

@media screen and (max-width: 768px) {
    .act-tour-map-wrapper {
        height: 500px;
    }
    
    .act-tour-map {
        min-height: 500px;
    }
    
    .act-tour-sidebar {
        max-height: 350px;
    }
    
    .act-tour-category-title {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .act-tour-activity-card {
        padding: 12px 16px;
    }
    
    .act-tour-activity-name {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .act-tour-search-input {
        padding: 12px 40px 12px 16px;
        font-size: 14px;
    }
    
    .act-tour-content {
        gap: 15px;
    }
    
    .act-tour-map-wrapper {
        height: 450px;
    }
    
    .act-tour-map {
        min-height: 450px;
    }
}
