/* ============================================= */
/* == STYLES POUR LA PAGE CARTE DES SPOTS     == */
/* ============================================= */

.spots-page-container {
    max-width: 100%; /* On prend toute la largeur */
    padding: 4rem 2rem;
}

.spots-header {
    text-align: center;
    margin-bottom: 2rem;
}

.spots-header h1 {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--primary-color);
}
.spots-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0.5rem auto 0;
    color: #ccc;
}

/* --- Conteneur des contrôles (filtres + bouton) --- */
.map-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.map-controls .filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* On peut réutiliser le style des boutons du Hangar pour la cohérence */
#submit-spot-btn i { margin-right: 0.5rem; }

/* --- Zone principale de la carte --- */
.map-area {
    position: relative; /* Contexte pour le positionnement du panneau latéral */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: 75vh; /* La carte prendra 75% de la hauteur de l'écran */
    border-radius: 8px;
    overflow: hidden; /* Empêche les éléments de déborder */
    border: 1px solid #333;
}

/* Le conteneur de la carte Leaflet */
#map {
    width: 100%;
    height: 100%;
    background-color: #0a0a0c; /* Fond sombre pendant le chargement */
}

/* --- Panneau Latéral de Détail (Sidebar) --- */
#spot-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px; /* Largeur du panneau */
    max-width: 90%; /* Limite sur petit écran */
    height: 100%;
    background-color: rgba(30, 30, 30, 0.95); /* Fond semi-transparent */
    backdrop-filter: blur(10px); /* Effet de verre dépoli (très moderne) */
    border-left: 1px solid #444;
    z-index: 1000; /* Se place au-dessus de la carte */
    overflow-y: auto; /* Active le scroll si le contenu est trop long */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Animation de glissement */
}

/* État caché du panneau */
#spot-sidebar.is-hidden {
    transform: translateX(100%); /* Déplace le panneau hors de l'écran */
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.sidebar-close:hover {
    color: white;
    transform: rotate(90deg);
}

.sidebar-content {
    padding: 2rem;
}

.sidebar-photos {
    width: 100%;
    height: 200px;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
#sidebar-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

#sidebar-title { font-family: var(--font-title); font-size: 2rem; color: var(--primary-color); }
#sidebar-author { color: #888; margin-top: -0.5rem; margin-bottom: 1rem; }
.sidebar-categories { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sidebar-categories .tag { font-family: var(--font-tech, monospace); font-size: 0.8rem; background: #333; padding: 0.3rem 0.6rem; border-radius: 5px; }

.sidebar-content h3 { color: var(--fpv-green); margin-top: 2rem; margin-bottom: 0.5rem; }
.sidebar-content p { color: #ccc; line-height: 1.6; }

.sidebar-notes { display: flex; gap: 0.25rem; font-size: 1.2rem; color: var(--primary-color); }
.sidebar-notes .star-empty { color: #444; }


/* --- Surcharger le style de Leaflet pour un thème sombre --- */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--light-bg);
    color: var(--text-color);
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-control-zoom a, .leaflet-control-layers-toggle {
    background-color: var(--light-bg) !important;
    color: var(--text-color) !important;
    border-color: #444 !important;
}

/* --- Style pour les marqueurs personnalisés sur la carte --- */
.custom-map-icon {
    background: transparent;
    border: none;
    text-align: center;
}
.custom-map-icon i {
    color: var(--fpv-green);
    font-size: 24px;
    text-shadow: 0 0 8px rgba(0, 255, 106, 0.7);
    transition: transform 0.2s ease;
}
.leaflet-marker-icon:hover .custom-map-icon i {
    transform: scale(1.5);
    color: var(--primary-color);
}

/* --- Style pour le formulaire dans la modale --- */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    margin: 2rem 0;
}
.modal-form .form-group {
    display: flex;
    flex-direction: column;
}
.modal-form label {
    font-family: var(--font-tech, 'Source Code Pro', monospace);
    margin-bottom: 0.5rem;
    color: #ccc;
}
.modal-form input, .modal-form textarea {
    background-color: #0a0a0c;
    border: 1px solid #333;
    color: var(--text-color);
    padding: 0.8rem;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.modal-form input:focus, .modal-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}
#spot-form-status {
    margin-top: 1rem;
    font-weight: bold;
    text-align: center;
}