/* Fichier: style.css (Remplacement complet) */

body { font-family: sans-serif; padding: 20px; background-color: #f0f2f5; }
#app { max-width: 800px; margin: 0 auto; }

/* ... Styles des cartes (inchangés) ... */
.competition-card {
    background: #fff; border-radius: 8px; padding: 20px;
    margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e8e8e8;
}
.competition-card h3 { margin-top: 0; color: #1a0dab; }
.badge-container { margin-bottom: 10px; display: flex; gap: 8px; }
.badge {
    padding: 3px 10px; border-radius: 12px; font-size: 0.8em;
    font-weight: bold; text-transform: uppercase;
}
.badge-new { background: #e6ffed; color: #006421; border: 1px solid #006421; }
.badge-recent { background: #e0f2fe; color: #0c599c; border: 1px solid #0c599c; }
.badge-upcoming { background: #fffbeb; color: #b45309; border: 1px solid #b45309; }
.deadline {
    font-size: 1.1em; font-weight: bold; color: #d9534f; margin-bottom: 15px;
}
.deadline.ended { color: #777; font-weight: normal; }
.tags-container { margin: 15px 0; }
.tag {
    display: inline-block; background-color: #eee; color: #333;
    padding: 4px 10px; border-radius: 15px; font-size: 0.85em;
    margin-right: 5px; margin-bottom: 5px;
}
.details p { margin: 5px 0; }
.main-link {
    display: inline-block; margin-top: 15px; font-weight: bold;
    text-decoration: none; color: #fff; background-color: #007bff;
    padding: 8px 12px; border-radius: 5px;
}

/* ... Styles de pagination (inchangés) ... */
.pagination-controls {
    display: flex; justify-content: center; align-items: center;
    margin-top: 25px;
}
.pagination-controls button {
    padding: 8px 16px; font-size: 1em; background-color: #007bff;
    color: white; border: none; border-radius: 5px;
    cursor: pointer; margin: 0 10px;
}
.pagination-controls button:disabled {
    background-color: #ccc; cursor: not-allowed;
}
.pagination-controls span { font-size: 1.1em; font-weight: 600; }


/* --- Styles des filtres (Modifiés) --- */

.filter-controls {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}

.search-bar {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box; 
    margin-bottom: 20px;
}

.quick-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.toggle-container {
    display: flex;
    align-items: center;
}
.toggle-container label {
    margin-left: 8px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.toggle-container input {
    cursor: pointer;
    transform: scale(1.2);
}

.sort-container label {
    font-weight: 600;
    margin-right: 10px;
}
.sort-container select {
    padding: 8px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100%;
}

.collapsible-filter {
    margin-top: 15px;
}

.collapsible-filter summary {
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
}

.collapsible-filter summary:hover {
    background: #f4f4f4;
}

/* Conteneur pour les pilules */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-top: none;
    padding: 15px;
    border-radius: 0 0 5px 5px;
}

/* Style des pilules */
.source-checkbox-item input[type="checkbox"],
.tag-checkbox-item input[type="checkbox"] {
    display: none;
}

.source-checkbox-item label,
.tag-checkbox-item label {
    display: block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.tag-checkbox-item label {
    background-color: #eee;
    color: #333;
}
.source-checkbox-item label {
    background-color: #e0f2fe;
    color: #0c599c;
}
.tag-checkbox-item input[type="checkbox"]:checked + label {
    background-color: #333;
    color: white;
    font-weight: bold;
}
.source-checkbox-item input[type="checkbox"]:checked + label {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

/* NOUVEAU : Style pour la barre de recherche des tags */
.tag-search-bar {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9em;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box; /* Important */
    margin-top: 15px;
    margin-bottom: 10px;
}