/* ============================
   Itinéraire Wonder Park CSS
   Navigation GPS & Google Maps
   Couleurs: #FF006F (primary)
============================ */

/* Variables CSS */
:root {
    --primary: #FF006F;
    --primary-light: #FF4081;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition: all 0.2s ease;
}

/* Section Itinéraire */
.itineraire-section {
    padding: 0;
    position: relative;
}

/* Panel de navigation */
.navigation-panel {
    background: white;
    padding: 20px 0;
    box-shadow: var(--shadow-subtle);
    position: relative;
    z-index: 100;
}

.nav-controls {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
}

/* Statut GPS */
.gps-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
    animation: pulse 2s infinite;
}

.status-indicator.searching {
    background: #ffc107;
}

.status-indicator.connected {
    background: var(--success);
}

.status-text {
    font-weight: 500;
    color: #495057;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Informations de trajet */
.trip-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius);
    padding: 15px;
    color: white;
}

.info-item {
    text-align: center;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-label {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contrôles de carte */
.map-controls {
    text-align: right;
}

.map-controls .btn {
    border-radius: 25px;
    font-weight: 500;
}

/* Conteneur de carte */
.map-container {
    position: relative;
    height: 70vh;
    width: 100%;
}

.google-map {
    width: 100%;
    height: 100%;
    border: none;
}

/* Loader de carte */
.map-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loader-content {
    text-align: center;
    color: #6c757d;
}

/* Erreur de carte */
.map-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.error-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

/* Instructions */
.instructions-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
}

.instruction-item {
    padding: 20px;
}

.instruction-icon {
    margin-bottom: 20px;
}

.instruction-item h5 {
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 600;
}

.instruction-item p {
    color: #6c757d;
    line-height: 1.6;
}

/* Section contact d'urgence */
.emergency-contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-card h4 {
    color: white;
    margin-bottom: 15px;
}

.contact-card p {
    color: rgba(255, 255, 255, 0.9);
}

.contact-buttons .btn {
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 500;
}

.contact-buttons .btn-primary {
    background: white;
    color: var(--primary);
    border-color: white;
}

.contact-buttons .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.contact-buttons .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.contact-buttons .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* Styles des marqueurs personnalisés Google Maps */
.custom-marker {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: markerPulse 2s infinite;
}

.custom-marker.user-location {
    background: var(--success);
}

.custom-marker.destination {
    background: var(--primary);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

@keyframes markerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Info Window personnalisé */
.custom-info-window {
    padding: 15px;
    max-width: 250px;
}

.custom-info-window h5 {
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.custom-info-window p {
    margin-bottom: 0;
    color: #6c757d;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navigation-panel {
        padding: 15px 0;
    }
    
    .nav-controls {
        padding: 15px;
    }
    
    .trip-info .row {
        text-align: center;
    }
    
    .map-controls {
        text-align: center;
        margin-top: 15px;
    }
    
    .map-container {
        height: 60vh;
    }
    
    .instructions-card {
        padding: 30px 20px;
    }
    
    .contact-card {
        padding: 30px 20px;
    }
    
    .contact-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .contact-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .info-value {
        font-size: 1rem;
    }
    
    .info-label {
        font-size: 0.75rem;
    }
    
    .map-container {
        height: 50vh;
    }
    
    .instruction-item {
        padding: 15px 0;
    }
}

/* Animation d'entrée */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* États de chargement */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
