/* --- LA GRILLE ET LES CARTES --- */
.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

.card {
    background: var(--apple-card, #ffffff);
    border-radius: 18px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 300px;
    overflow: hidden;
}

.activity-card {
    display: flex;
    height: 100%;
    align-items: stretch; /* Gère l'adaptation en hauteur automatique */
    cursor: pointer;
}

.mini-map-container {
    width: 160px;
    min-height: 100%; /* S'adapte à la hauteur du bloc */
    background: #eef2f3;
    flex-shrink: 0;
}

/* --- LE BLOC DE CONTENU --- */
.activity-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

/* On remonte un peu les titres */
.activity-header h3, 
.activity-header h4 {
    margin-top: 5px; 
    margin-bottom: 0;
}

.activity-title {
    margin: 12px 0 6px 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.activity-badge-row {
    margin-bottom: 10px;
}

/* --- LES LISTES DE DONNÉES GÉNÉRIQUES --- */
.activity-metrics,
.activity-metrics-list {
    margin-top: 10px;
    display: flex;
}

.activity-metrics {
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
}

.activity-metrics-list {
    flex-direction: column;
    gap: 12px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.88rem;
}

.data-row.total-row {
    border-bottom: none;
    padding-top: 10px;
}

/* --- INTEGRATION ALL_ROADS --- */

/* Espacement interne pour l'en-tête de la carte */
.global-map-section .map-header-padding {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

/* Style du lien sans style en ligne */
.global-map-section .map-link {
    font-size: 0.8rem;
    color: var(--text-sub, #666);
    text-decoration: none;
}

/* Hauteur par défaut pour écran d'ordinateur */
.global-map-container {
    height: 600px;
    width: 100%;
    overflow: hidden;
}

/* --- LE FIX IPHONE --- */
@media (max-width: 768px) {
    /* Réduction de la largeur de la carte uniquement sur mobile */
    .mini-map-container {
        width: 120px; 
    }

    /* Passage à la ligne auto pour les données de la liste */
    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .data-row span:last-child {
        font-size: 0.8rem;
    }

        /* On réduit sacrément la hauteur de la carte sur mobile */
    .global-map-container {
        height: 320px; /* Moitié moins haut sur écran de téléphone */
    }
    
    .global-map-section .map-header-padding {
        padding: 12px 15px;
    }
}