/* ============================================================
   Liberta Map - Styles
   ============================================================ */

#liberta-map-wrap {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

/* Filtres */
#liberta-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

#liberta-filters button.liberta-filter {
    padding: 6px 14px !important;
    border: 2px solid #2ecc71 !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    font-size: 13px !important;
    transition: all 0.2s !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    border-style: solid !important;
}

#liberta-filters button.liberta-filter:hover,
#liberta-filters button.liberta-filter.active {
    background: #2ecc71 !important;
    background-color: #2ecc71 !important;
    border-color: #2ecc71 !important;
    color: #ffffff !important;
}

/* Carte */
#liberta-map {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 1;
}

/* Bouton ajouter */
#liberta-add-btn {
    display: block;
    margin: 16px auto 0;
    padding: 12px 28px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#liberta-add-btn:hover {
    background: #27ae60;
}

/* Icônes markers */
.liberta-pin {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.liberta-pin span {
    transform: rotate(45deg);
    display: block;
}

/* Popup */
.liberta-popup {
    max-width: 260px;
}

.liberta-popup img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.liberta-popup h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: bold;
}

.liberta-popup p {
    margin: 4px 0;
    font-size: 13px;
    color: #555;
}

.liberta-cat-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eafaf1;
    color: #27ae60;
    border-radius: 10px;
    font-size: 11px;
    margin-bottom: 6px;
}

.liberta-popup-btn {
    display: block;
    margin-top: 10px;
    padding: 8px;
    background: #2ecc71;
    color: #fff !important;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.liberta-popup-btn:hover {
    background: #27ae60;
}

/* Formulaire d'ajout */
#liberta-form-wrap {
    margin-top: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px;
}

#liberta-form-inner h3 {
    margin: 0 0 8px;
    color: #2c3e50;
}

.liberta-hint {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

#liberta-submit-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#liberta-submit-form input[type="text"],
#liberta-submit-form input[type="url"],
#liberta-submit-form select,
#liberta-submit-form textarea {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

#liberta-submit-form textarea {
    height: 80px;
    resize: vertical;
}

#liberta-coords-info {
    padding: 8px 12px;
    background: #eafaf1;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    color: #27ae60;
}

.liberta-form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

#liberta-submit-btn {
    flex: 1;
    padding: 12px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

#liberta-submit-btn:hover {
    background: #27ae60;
}

#liberta-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

#liberta-cancel-btn {
    padding: 12px 20px;
    background: #fff;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
}

#liberta-cancel-btn:hover {
    background: #f0f0f0;
}

.liberta-success {
    color: #27ae60;
    font-weight: bold;
    padding: 10px;
    background: #eafaf1;
    border-radius: 4px;
    margin-top: 12px;
}

.liberta-error {
    color: #e74c3c;
    font-weight: bold;
    padding: 10px;
    background: #fdf0f0;
    border-radius: 4px;
    margin-top: 12px;
}

/* Responsive mobile */
@media (max-width: 600px) {
    #liberta-filters {
        gap: 6px;
    }
    .liberta-filter {
        font-size: 12px;
        padding: 5px 10px;
    }
    #liberta-form-wrap {
        padding: 16px;
    }
}
