/* =================================== */
/* COMPONENT: FILTERS                  */
/* Formulaire de filtres personnalisé */
/* =================================== */

.filter-section {
    background: var(--bubble-color);
    padding: 2.5rem 0;
    border-bottom: 1px solid #e9ecef;
    opacity: 1;
}

.filter-form {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    opacity: 0.95;
}

.filter-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    flex: 1;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 160px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bee-dark);
    margin-bottom: 0;
}

.filter-select,
.filter-input {
    padding: 0.625rem 0.875rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--bee-dark);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--bee-yellow);
    box-shadow: 0 0 0 4px rgba(255, 172, 0, 0.1);
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.filter-input::placeholder {
    color: #adb5bd;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.filter-btn-primary {
    background: var(--gold);
    color: var(--bee-dark);
    box-shadow: 0 4px 12px rgba(255, 172, 0, 0.3);
}

.filter-btn-primary:hover {
    background: var(--bee-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 172, 0, 0.4);
}

.filter-btn-reset {
    background: white;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.filter-btn-reset:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.filter-btn i {
    font-size: 0.9rem;
}

/* Toggle button - caché par défaut */
.filter-toggle {
    display: none;
}

/* Responsive */
/* Tablette et petits écrans */
@media (max-width: 1024px) {
    .filter-group {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .filter-item {
        min-width: 140px;
    }
}

/* Tablette */
@media (max-width: 768px) {
    .filter-section {
        padding: 2rem 0;
    }

    .filter-form {
        padding: 1.25rem;
    }

    /* Toggle button visible sur tablette/mobile */
    .filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.875rem 1rem;
        background: var(--gold);
        color: var(--bee-dark);
        border: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(255, 172, 0, 0.3);
    }

    .filter-toggle:hover {
        background: var(--bee-dark);
        color: white;
    }

    .filter-toggle-text {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .filter-toggle i {
        transition: transform 0.3s ease;
    }

    /* Contenu dépliable */
    .filter-content {
        max-height: 1000px;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
        opacity: 1;
        margin-top: 1rem;
    }

    .filter-content.filter-collapsed {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
    }

    .filter-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }

    .filter-item {
        min-width: auto;
    }

    .filter-actions {
        width: 100%;
        flex-direction: row;
        gap: 0.75rem;
    }

    .filter-btn {
        flex: 1;
        padding: 0.75rem 1rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .filter-section {
        padding: 1.5rem 0;
    }

    .filter-form {
        padding: 1rem;
        border-radius: 15px;
    }

    .filter-wrapper {
        gap: 1rem;
    }

    .filter-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .filter-label {
        font-size: 0.8125rem;
    }

    .filter-select,
    .filter-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }

    .filter-btn span {
        font-size: 0.875rem;
    }
}
