/**
 * Fichier : map-style.css
 * Rôle : Design de la carte interactive et des popups
 */

/* 1. Conteneur principal de la carte */
#destinations-map {
    width: 100%;
    height: 600px; /* Hauteur généreuse pour une meilleure visibilité */
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1;
}

/* 2. Style des Bulles (Popups) Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #eee;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 250px !important; /* Largeur augmentée pour le confort visuel */
}

/* 3. Image dans la bulle */
.map-popup-thumb {
    width: 100%;
    height: 140px; /* Plus grande pour mettre en valeur la destination */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.map-popup-card:hover .map-popup-thumb {
    transform: scale(1.05); /* Petit effet de zoom au survol */
}

/* 4. Infos textuelles dans la bulle */
.map-popup-info {
    padding: 15px;
    text-align: center;
}

.map-popup-info h4 {
    font-size: 18px; /* Titre plus grand */
    font-weight: 700;
    color: #116AB4;
    margin: 0 0 8px 0;
    font-family: sans-serif;
}

.map-popup-info .price {
    font-size: 16px; /* Prix bien visible */
    color: #F15B2C;
    font-weight: 700;
    margin-bottom: 15px;
}

/* 5. Bouton d'action */
.map-popup-btn {
    display: block;
    background: #116AB4;
    color: #ffffff !important;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.map-popup-btn:hover {
    background: #0d548f;
    transform: translateY(-2px);
}

/* 6. Marqueurs personnalisés sur la carte */
.dest-marker {
    width: 14px;
    height: 14px;
    background: #F15B2C;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(241, 91, 44, 0.5);
}

.dest-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-shadow: 0 0 4px white, 0 0 4px white; /* Contour blanc pour lisibilité */
    margin-top: 4px;
    white-space: nowrap;
}

/* Marqueur spécial Strasbourg (Départ) */
.sxb-marker {
    width: 18px;
    height: 18px;
    background: #116AB4;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(17, 106, 180, 0.6);
}

/* 7. Animation de la ligne de vol */
.flying-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 2.5s ease-out forwards;
    filter: drop-shadow(0 0 2px rgba(241, 91, 44, 0.4));
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* 8. Ajustement pour mobile */
@media (max-width: 768px) {
    #destinations-map {
        height: 450px;
    }
    .leaflet-popup-content {
        width: 220px !important;
    }
}

.map-wrapper {
    width: 100vw;       /* 100% de la largeur de la fenêtre */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

#destinations-map {
    width: 100%;
    height: 600px;
    background: #f8f9fa;
    border-radius: 0;   /* On enlève les arrondis pour un effet plein écran propre */
}


/* Ligne de vol Orange en pointillés */
.flying-line-animated {
    stroke-dasharray: 10, 10;
    animation: flight-flow 2s linear infinite;
}

@keyframes flight-flow {
    from { stroke-dashoffset: 40; }
    to { stroke-dashoffset: 0; }
}