/* Fiches 2027 — Liste des fiches à télécharger */

.fiches2027-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 2rem 0; }

/* Filtres */
.fiches2027-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.5rem; }
.fiches2027-filter-row { display: flex; flex-wrap: wrap; gap: 7px; }

.fiches2027-btn {
    font-size: 12px; padding: 5px 14px; border-radius: 20px;
    border: 1px solid #d0d0d0; background: #fff; color: #555;
    cursor: pointer; transition: all 0.15s;
}
.fiches2027-btn.active { background: #1a2744; color: #fff; border-color: #1a2744; }
.fiches2027-btn:hover:not(.active) { background: #f5f5f5; }

/* Couleurs badges partis dans les filtres */
.fiches2027-btn-parti.fiches2027-parti-lfi.active { background: #3C3489; border-color: #3C3489; color: #fff; }
.fiches2027-btn-parti.fiches2027-parti-ps.active  { background: #72243E; border-color: #72243E; color: #fff; }
.fiches2027-btn-parti.fiches2027-parti-eco.active { background: #27500A; border-color: #27500A; color: #fff; }
.fiches2027-btn-parti.fiches2027-parti-hor.active { background: #0C447C; border-color: #0C447C; color: #fff; }
.fiches2027-btn-parti.fiches2027-parti-rn.active  { background: #633806; border-color: #633806; color: #fff; }
.fiches2027-btn-parti.fiches2027-parti-lr.active  { background: #444441; border-color: #444441; color: #fff; }
.fiches2027-btn-parti.fiches2027-parti-ren.active { background: #444441; border-color: #444441; color: #fff; }

/* Compteur */
.fiches2027-count { font-size: 12px; color: #888; margin-bottom: 1rem; }

/* Grille — Desktop */
.fiches2027-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Carte */
.fiches2027-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s;
}
.fiches2027-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Miniature */
.fiches2027-thumb { aspect-ratio: 1/1; overflow: hidden; background: #1a2744; flex-shrink: 0; }
.fiches2027-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Infos */
.fiches2027-info { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

/* Tags */
.fiches2027-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.fiches2027-tag-theme { font-size: 11px; background: #E6F1FB; color: #0C447C; padding: 2px 8px; border-radius: 10px; }
.fiches2027-tag-parl  { font-size: 11px; background: #F1EFE8; color: #5F5E5A; padding: 2px 8px; border-radius: 10px; }
.fiches2027-tag-date  { font-size: 11px; color: #aaa; padding: 2px 0; }

/* Titre */
.fiches2027-titre { font-size: 14px; font-weight: 500; color: #1a2744; margin: 0; line-height: 1.4; flex: 1; }

/* Badges partis */
.fiches2027-partis { display: flex; flex-wrap: wrap; gap: 5px; }
.fiches2027-parti-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.fiches2027-parti-lfi { background: #EEEDFE; color: #3C3489; }
.fiches2027-parti-ps  { background: #FBEAF0; color: #72243E; }
.fiches2027-parti-eco { background: #EAF3DE; color: #27500A; }
.fiches2027-parti-hor { background: #E6F1FB; color: #0C447C; }
.fiches2027-parti-rn  { background: #FAEEDA; color: #633806; }
.fiches2027-parti-lr  { background: #F1EFE8; color: #444441; }
.fiches2027-parti-ren { background: #F1EFE8; color: #444441; }

/* Actions */
.fiches2027-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px solid #f0f0f0; }

.fiches2027-dl {
    font-size: 12px; font-weight: 500;
    padding: 6px 14px; border-radius: 6px;
    background: #1a2744; color: #fff;
    text-decoration: none; transition: opacity 0.15s;
}
.fiches2027-dl:hover { opacity: 0.85; }

.fiches2027-article {
    font-size: 12px; color: #1a2744;
    text-decoration: none; padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.fiches2027-article:hover { border-color: #1a2744; }

/* Vide */
.fiches2027-empty { font-size: 14px; color: #aaa; font-style: italic; }

/* ── Mobile — liste compacte ─────────────────────────────────────── */
@media (max-width: 600px) {
    .fiches2027-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fiches2027-card {
        flex-direction: row;
        border-radius: 10px;
    }

    .fiches2027-thumb {
        width: 90px;
        aspect-ratio: 1/1;
        flex-shrink: 0;
        border-radius: 0;
    }

    .fiches2027-info { padding: 10px 12px; }
    .fiches2027-titre { font-size: 13px; }
}
