.abm-map-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#abm-map {
    width: 100%;
    height: 100%;
}

/* Optionnel : popup un peu plus lisible */
.leaflet-popup-content-wrapper {
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
    margin: 8px 10px;
    font-size: 14px;
}

/* Légende */
.info.legend {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    color: #555;
    min-width: 200px;
    position: relative;
    transition: all 0.3s ease;
}

.abm-legend-collapsed {
    transform: translateX(calc(100% + 15px));
    /* Cache la légende à droite */
}

.abm-legend-collapsed .legend-content {
    visibility: hidden;
    opacity: 0;
}

.abm-legend-toggle {
    background: #fff;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 8px 0 0 8px;
    width: 18px !important;
    /* Ultra Slim */
    height: 80px !important;
    /* Haute */
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    z-index: 1001;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: -3px 0 6px rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 20px;
    font-weight: 200;
    /* Fine */
    transition: background 0.2s, box-shadow 0.2s;
    outline: none;
    line-height: 1;
}

.abm-legend-toggle:hover {
    background: #fcfcfc;
}

.abm-legend-collapsed .abm-legend-toggle {
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
}

.legend-content {
    margin-top: 5px;
    transition: opacity 0.3s;
}

.legend-title-1 {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-size: 14px;
    color: #000;
}

.legend-title-2 {
    font-weight: bold;
    margin-bottom: 2px;
    font-size: 13px;
    color: #333;
}

.legend-title-3 {
    font-style: italic;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-color {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    opacity: 0.8;
    border: 1px solid #ccc;
}

.legend-label {
    font-size: 13px;
}

.legend-logo-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 11px;
    text-align: right;
    color: #999;
}

/* Styles pour les popups détaillés */
.abm-popup-header {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    border-bottom: 2px solid #336699;
    padding-bottom: 3px;
    color: #336699;
}

.abm-popup-body {
    font-size: 13px;
    line-height: 1.4;
}

.abm-canteen-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.abm-canteen-item {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.abm-canteen-item:last-child {
    border-bottom: none;
}

.abm-canteen-sector {
    font-size: 11px;
    font-style: italic;
    color: #777;
    margin-bottom: 2px;
}

.abm-separator {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.abm-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 3px;
    color: white;
}

.abm-tag-public {
    background-color: #336699;
}

.abm-tag-privé {
    background-color: #e67e22;
}

.legend-egalim-note {
    margin-top: 10px;
    font-size: 11px;
    font-style: italic;
    color: #555;
    line-height: 1.3;
    border-left: 2px solid #a6d96a;
    padding-left: 8px;
}

.legend-egalim-note a,
.legend-source a {
    color: #336699;
    text-decoration: underline;
}

.abm-popup-body em {
    font-size: 11px;
    display: block;
    margin-top: 5px;
    line-height: 1.2;
    color: #666;
}

.abm-city-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: bold !important;
    color: #333 !important;
    text-shadow:
        1px 1px 0px #fff,
        -1px -1px 0px #fff,
        1px -1px 0px #fff,
        -1px 1px 0px #fff,
        0px 0px 4px #fff !important;
    font-size: 13px !important;
    pointer-events: none !important;
}

.leaflet-tooltip-pane .abm-city-label {
    z-index: 1000 !important;
}

/* Fix attribution trop petite (conflit thèmes WordPress) */
.leaflet-container .leaflet-control-attribution {
    font-size: 11px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    margin: 0 !important;
}

.leaflet-control-attribution a {
    font-size: 11px !important;
    text-decoration: none !important;
}