.jobs-filter-section {
    padding: 3rem 0;
    background-color: #ffffff;
}

.card-pagination a {
    text-decoration: none !important;
}

.filter-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Groupe de recherche unifié */
.search-group-container {
    display: flex;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.search-group-container:focus-within {
    border-color: #c53c3c;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-group-container:hover {
    border-color: #9ca3af;
}

.filter-element {
    flex: 1;
    border: none;
    background: transparent;
    position: relative;
}

.filter-element:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: #e5e7eb;
}

.filter-element select,
.filter-element input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #374151;
    height: 48px;
    outline: none;
}

.filter-element select:focus,
.filter-element input:focus {
    outline: none;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper .fas {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.search-input {
    padding-right: 3rem !important;
}

.search-btn {
    flex: 0 0 auto;
    padding: 0 2rem;
    background: #c53c3c;
    color: white;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-btn:hover {
    background: rgba(197, 60, 60, .9);
}

.search-btn:active {
    background: #c53c3c;
}

/* Section des tags */
.tags-section {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tags-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 6px 6px 0 0;
}

.tags-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-title::before {
    content: '🏷️';
    font-size: 1rem;
}

.tags-counter {
    background: #c53c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.tags-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* Scrollbar personnalisée */
.tags-container::-webkit-scrollbar {
    width: 6px;
}

.tags-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.tags-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tags-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(197, 60, 60, .05);
    border: 1px solid rgba(197, 60, 60, .5);
    border-radius: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    white-space: nowrap;
    color: #c53c3c;
}

.tag-item:hover {
    background: rgba(197, 60, 60, .1);
    border-color: rgba(197, 60, 60, .4);
    transform: translateY(-1px);
}

.tag-item.selected {
    background: #c53c3c;
    border-color: #c53c3c;
    color: white;
}

.tag-item.selected:hover {
    background: #b52525;
    border-color: #b52525;
}

.tag-checkbox {
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(197, 60, 60, .2);
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tag-item.selected .tag-checkbox {
    background: white;
    border-color: white;
}

.tag-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.tag-checkbox input[type="checkbox"]:checked+.checkmark {
    opacity: 1;
}

.checkmark {
    position: absolute;
    top: -1px;
    left: 3px;
    width: 6px;
    height: 10px;
    border: solid #c53c3c;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.2s ease;
}

.tag-item.selected .checkmark {
    border-color: #c53c3c;
    opacity: 1;
}

.tag-label {
    font-weight: 500;
    color: inherit;
}

.results-summary {
    text-align: center;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.results-count::before {
    content: '📊';
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-group-container {
        flex-wrap: wrap;
    }

    .filter-element {
        min-width: 200px;
    }

    .filter-element:not(:last-child)::after {
        display: none;
    }

    .tags-container {
        max-height: 180px;
    }
}

@media (max-width: 768px) {

    .filter-card {
        padding: 1.5rem;
    }

    .search-group-container {
        flex-direction: column;
        border-radius: 6px;
    }

    .filter-element {
        min-width: auto;
        flex: none;
    }

    .filter-element:not(:last-child)::after {
        display: none;
    }

    .filter-element:not(:last-child) {
        border-bottom: 1px solid #e5e7eb;
    }

    .search-btn {
        justify-content: center;
        padding: 0.875rem;
    }

    .tags-header {
        padding: 0.75rem 1rem;
    }

    .tags-container {
        padding: 0.75rem 1rem;
        max-height: 160px;
    }

    .tags-grid {
        gap: 0.375rem;
    }

    .tag-item {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .jobs-filter-section {
        padding: 2rem 0;
    }

    .filter-header {
        margin-bottom: 2rem;
    }

    .filter-header h2 {
        font-size: 1.75rem;
    }

    .filter-card {
        padding: 1rem;
        border-radius: 6px;
    }

    .tags-container {
        max-height: 140px;
    }
}

/* Animation pour les éléments */
.search-group-container,
.tags-section {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.tags-section {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration de l'accessibilité */
.search-btn:focus-visible,
.tag-checkbox input:focus-visible {
    outline: 2px solid #c53c3c;
    outline-offset: 2px;
}

/* Placeholder styling */
.filter-element select option:first-child {
    color: #9ca3af;
}

.filter-element input::placeholder {
    color: #9ca3af;
}

/* Indicateur de scroll */
.tags-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tags-container:not(:hover)::-webkit-scrollbar-thumb {
    background: transparent;
}