/* Container principal */
.lieux-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header avec recherche */
.lieux-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.lieux-search {
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.lieux-search input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.lieux-search input:focus {
    outline: none;
    border-color: #54595f;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Zone de filtres */
.lieux-filters {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #54595f;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filtres tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    padding: 8px 16px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.filter-tag:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.filter-tag.active {
    background: #61ce70;
    color: white;
    border-color: #61ce70;
}

/* Filtres étoiles */
.stars-filter {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.star-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.star-option:hover {
    background: #f8f8f8;
}

.star-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* Grille des lieux - 3 colonnes */
.lieux-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .lieux-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .lieux-grid {
        grid-template-columns: 1fr;
    }
}

/* Carte de lieu */

.lieu-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    position: relative;
       display: flex;
    flex-direction: column;
    min-height: 200px; 
}

.lieu-card .lieu-tags {
    margin-top: auto;
}
.lieu-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

/* Warning données incomplètes */
.lieu-warning {
    display: inline-block;
    font-size: 11px;
    color: #ff9800;
    background: #fff3e0;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Titre du lieu */
.lieu-title {
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Ville */
.lieu-ville {
    font-size: 14px;
    color: #7e8993;
    margin-bottom: 15px;
}

/* Grille des notes */
.lieu-notes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.note-label {
    color: #7e8993;
}

.note-stars {
    color: #ffc107;
    font-size: 14px;
}

/* Tags du lieu */
.lieu-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lieu-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 12px;
    color: #54595f;
    font-weight: 500;
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7e8993;
    font-size: 16px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.modal-body {
    padding: 25px;
}

.info-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 12px;
    color: #7e8993;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.info-value {
    font-size: 15px;
    color: #23282d;
}

/* ========================================
   MODAL
======================================== */

/* Cacher les éléments Alpine.js avant initialisation */
[x-cloak] {
    display: none !important;
}

/* Overlay du modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    overflow-y: auto;
}

/* Contenu du modal */
.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header du modal */
.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #23282d;
    margin: 0;
    line-height: 1.3;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #7e8993;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #23282d;
}

/* Body du modal */
.modal-body {
    padding: 25px;
}

/* Sections */
.info-section,
.notes-section,
.tags-section,
.comment-section,
.history-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 15px 0;
}

.section-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 25px 0;
}

/* Info rows */
.info-row {
    margin-bottom: 12px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 12px;
    color: #7e8993;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    font-size: 15px;
    color: #23282d;
}

/* Notes - rangée d'étoiles */
.note-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.note-row:last-of-type {
    border-bottom: none;
}

.note-row-label {
    font-size: 14px;
    color: #54595f;
    font-weight: 500;
}

.stars-input {
    display: flex;
    gap: 6px;
}

.star-clickable {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.star-clickable:hover {
    transform: scale(1.15);
}

.star-clickable.active {
    color: #ffc107;
}

/* Message d'erreur validation */
.validation-error {
    color: #dc3232;
    font-size: 13px;
    margin-top: 10px;
    padding: 10px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 3px solid #dc3232;
}

/* Tags toggle */
.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-toggle {
    padding: 10px 18px;
    background: #f8f8f8;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    font-weight: 500;
}

.tag-toggle:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.tag-toggle.active {
    background: #61ce70;
    color: white;
    border-color: #61ce70;
}

/* Commentaire */
.comment-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.comment-input:focus {
    outline: none;
    border-color: #54595f;
    box-shadow: 0 0 0 3px rgba(84, 89, 95, 0.1);
}

/* Historique */
.history-list {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 15px;
}

.history-item {
    font-size: 13px;
    color: #54595f;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Footer du modal */
.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.save-status {
    font-size: 14px;
}

.status-saved {
    color: #46b450;
    font-weight: 500;
}

.status-modified {
    color: #ff9800;
    font-weight: 500;
}

.status-saving {
    color: #0073aa;
    font-weight: 500;
}

.modal-footer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .note-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stars-input {
        margin-top: 5px;
    }
}
/* ========================================
   MODAL CARTE LEAFLET
======================================== */

.map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    display: flex;
    flex-direction: column;
}

.map-modal-header {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
    margin: 0;
}

.map-count {
    font-size: 14px;
    color: #7e8993;
    margin-left: 10px;
    font-weight: normal;
}

.map-modal-close {
    background: #f0f0f0;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #23282d;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: normal;
}

.map-modal-close:hover {
    background: #e0e0e0;
}

.map-container-wrapper {
    flex: 1;
    position: relative;
}

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

/* Popup Leaflet personnalisé */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 15px;
    font-family: inherit;
}

.map-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 8px 0;
}

.map-popup-ville {
    font-size: 13px;
    color: #7e8993;
    margin: 0 0 10px 0;
}

.map-popup-button {
    display: inline-block;
    padding: 8px 16px;
    background: #61ce70;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.map-popup-button:hover {
    background: #50b85f;
}

/* Clusters Leaflet */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(97, 206, 112, 0.6);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(97, 206, 112, 0.8);
    color: white;
    font-weight: 600;
}
/* Popup Leaflet améliorée */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.leaflet-popup-content {
    margin: 16px;
    font-family: inherit;
    line-height: 1.4;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.map-popup-title {
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.map-popup-ville {
    font-size: 13px;
    color: #7e8993;
    margin: 0;
}

.map-popup-button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #61ce70;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.map-popup-button:hover {
    background: #50b85f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(97, 206, 112, 0.3);
}

/* ============================================
   BANDEAU PHOTO MODAL - Version optimisée
   ============================================ */
/* ============================================
   SECTION PHOTO SIMPLIFIÉE
   ============================================ */

.modal-photo-section {
    width: 100%;
    position: relative;
}

/* Bandeau photo éditable (hauteur fixe 180px) */
.modal-photo-banner-editable {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.modal-photo-banner-editable img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center center !important;
    display: block;
}

/* Bandeau vide cliquable (hauteur fixe 180px) */
.modal-photo-banner-empty-upload {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.modal-photo-banner-empty-upload:hover {
    opacity: 0.9;
}

.photo-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: white;
}

.photo-icon {
    font-size: 48px;
}

.photo-text {
    font-size: 15px;
    font-weight: 500;
}

/* Boutons d'action photo */
.photo-action-buttons {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea00 0%, #764ba200 100%);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Boutons photo - Surcharge Elementor */
.photo-action-buttons .photo-button,
.photo-action-buttons button.photo-button {
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #d0d0d0 !important;
    border-style: solid !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    color: #54595f !important;
    box-shadow: none !important;
}

.photo-action-buttons .photo-button:hover,
.photo-action-buttons button.photo-button:hover {
    border-color: #a0a0a0 !important;
    background: rgba(0, 0, 0, 0.02) !important;
    background-image: none !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
    transform: none !important;
}

.photo-action-buttons .photo-button-change,
.photo-action-buttons button.photo-button-change {
    border-color: #54595f !important;
    color: #54595f !important;
}

.photo-action-buttons .photo-button-change:hover,
.photo-action-buttons button.photo-button-change:hover {
    border-color: #23282d !important;
    background: rgba(84, 89, 95, 0.05) !important;
    background-image: none !important;
    background-color: rgba(84, 89, 95, 0.05) !important;
    color: #23282d !important;
}

.photo-action-buttons .photo-button-delete,
.photo-action-buttons button.photo-button-delete {
    border-color: #d63638 !important;
    border-style: solid !important;
    color: #d63638 !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

.photo-action-buttons .photo-button-delete:hover,
.photo-action-buttons button.photo-button-delete:hover {
    background: rgba(214, 54, 56, 0.1) !important;
    background-image: none !important;
    background-color: rgba(214, 54, 56, 0.1) !important;
    border-color: #b32d2e !important;
    color: #b32d2e !important;
}

/* Masquer anciens styles */
.modal-photo-banner,
.modal-photo-banner-empty,
.photo-section {
    display: none !important;
}

/* ============================================
   FERMETURE MODAL SANS BACKGROUND
   ============================================ */

.modal-close-simple {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #23282d;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 0; /* Forcer line-height à 0 */
    font-family: Arial, sans-serif; /* Police standard pour le × */
}
.modal-close-simple:hover {
    transform: scale(1.1);
}

/* Garder le style de l'ancien modal-close pour compatibilité */
.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #23282d;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #d63638;
    transform: scale(1.1);
}
/* ============================================
   BANDEAU PHOTO SUR LES CARTES 
   ============================================ */

.lieu-card-with-photo {
    position: relative;
    padding-top: 90px !important;
}

.lieu-card-photo-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    width: 100%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.lieu-card-photo-banner img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center center !important;
    display: block;
}

.lieu-card-with-photo .lieu-title {
    margin-top: 0;
}