/* ==========================================================================
   Page Restaurant Département - Carte Modal
   ========================================================================== */

/* Bouton Voir la carte */
.btn-voir-carte {
    margin-left: 15px;
    vertical-align: middle;
}

.btn-voir-carte i {
    margin-right: 5px;
}

/* Container titre avec bouton */
.titre-avec-carte {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.titre-avec-carte h1 {
    margin: 0;
}

/* Modal carte fullscreen */
.modal-carte-restaurant {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow: hidden;
}

.modal-carte-restaurant.show {
    display: block;
}

.modal-carte-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, #e65100 0%, #bf360c 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.modal-carte-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-carte-title i {
    font-size: 1.3rem;
}

.modal-carte-count {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 10px;
}

.btn-close-carte {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-carte:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.btn-close-carte i {
    font-size: 1.5rem;
}

/* Container de la carte */
.modal-carte-body {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
}

#mapid-restaurant {
    width: 100%;
    height: 100%;
}

/* Loader pendant chargement */
.carte-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10000;
}

.carte-loader .preloader-wrapper {
    margin-bottom: 15px;
}

.carte-loader-text {
    font-size: 1rem;
    margin-top: 10px;
}

/* Message d'erreur */
.carte-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    padding: 30px;
    max-width: 400px;
}

.carte-error i {
    font-size: 3rem;
    color: #f44336;
    margin-bottom: 15px;
}

.carte-error-text {
    font-size: 1.1rem;
}

/* Style des popups Leaflet personnalisés */
.leaflet-popup-content {
    margin: 10px 15px;
    min-width: 180px;
}

.restaurant-popup {
    text-align: center;
}

.restaurant-popup-image {
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.restaurant-popup-image img {
    max-width: 180px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.restaurant-popup-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.restaurant-popup-name a {
    color: #e65100;
    text-decoration: none;
}

.restaurant-popup-name a:hover {
    text-decoration: underline;
}

.restaurant-popup-lieu {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.restaurant-popup-btn {
    display: inline-block;
    background: #e65100;
    color: white !important;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.2s;
}

.restaurant-popup-btn:hover {
    background: #bf360c;
    text-decoration: none;
}

/* Badge type de cuisine */
.badge-cuisine {
    display: inline-block;
    background: linear-gradient(135deg, #e65100, #ff6d00);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .titre-avec-carte {
        flex-direction: column;
    }

    .btn-voir-carte {
        margin-left: 0;
        margin-top: 10px;
    }

    .modal-carte-header {
        height: 45px;
        padding: 0 10px;
    }

    .modal-carte-title {
        font-size: 0.95rem;
    }

    .modal-carte-title i {
        display: none;
    }

    .modal-carte-count {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .modal-carte-body {
        top: 45px;
    }

    .btn-close-carte {
        width: 35px;
        height: 35px;
    }

    .leaflet-popup-content {
        min-width: 150px;
    }

    .restaurant-popup-image img {
        max-width: 150px;
        max-height: 100px;
    }
}
