/*
Theme Name:   Generate Press
Description:  Thème enfant de Generate
Author:       Florian Jacquet
Template:     generatepress
Version:      1.0.0
*/

/* ═══════════════════════════════════════════════
   Archive Villes Invader
   ═══════════════════════════════════════════════ */

.archive-villes-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ── Switch liste / classement ─────────────────── */
.vue-switch {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.vue-btn {
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #f5f5f5;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid #ddd;
}

.vue-btn:last-child { border-right: none; }

.vue-btn.active {
    background: #1a73e8;
    color: #fff;
}

.vue-btn:hover:not(.active) {
    background: #e8e8e8;
    color: #222;
}

/* ── Filtres statut ────────────────────────────── */
.filtres-statut {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.filtre-lien {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #ccc;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    background: #fff;
    transition: all 0.15s;
}

.filtre-lien:hover {
    border-color: var(--statut-color, #1a73e8);
    color: var(--statut-color, #1a73e8);
}

.filtre-lien.active {
    background: var(--statut-color, #1a73e8);
    border-color: var(--statut-color, #1a73e8);
    color: #fff;
}

.filtre-count {
    display: inline-block;
    background: rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* ── Carte Leaflet ─────────────────────────────── */
.carte-villes {
    width: 100%;
    height: 420px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 1.5rem;
    z-index: 0;
}

/* ── Intro classement ──────────────────────────── */
.classement-intro {
    background: #f0f4ff;
    border-left: 3px solid #1a73e8;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    color: #333;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* ── Grille de cartes villes ───────────────────── */
.villes-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

/* ── Carte ville ───────────────────────────────── */
.ville-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
    overflow: hidden;
}

.ville-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Numéro de rang (vue classement) */
.ville-card-rank {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #bbb;
    letter-spacing: 0.5px;
}

.ville-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ville-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    padding-right: 28px; /* espace pour le rang */
}

.ville-card-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    width: fit-content;
}

.ville-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ville-stat {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 12px;
}

.ville-stat-val {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.ville-stat-flash {
    color: #e65100;
}

.ville-stat-score .ville-stat-val {
    color: #1a73e8;
}

.ville-stat-lbl {
    color: #888;
    font-size: 11px;
}

.dist-lbl {
    font-size: 12px !important;
    color: #aaa !important;
}

/* Barre de progression */
.ville-card-progress {
    height: 3px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.ville-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
    opacity: 0.75;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
    .villes-grille {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .carte-villes {
        height: 280px;
    }
    .filtres-statut {
        gap: 6px;
    }
    .filtre-lien {
        font-size: 12px;
        padding: 4px 9px;
    }
}
