/* =================================
   STYLES POUR LE SYSTÈME DE FILTRES
   ================================= */

/* Container principal */
.lunettes-page {
    padding: 1rem 0;
}

.lunettes-header {
    margin-bottom: 1.5rem;
}

/* SECTION FILTRES */
.filters-container {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.filtre-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

.filter-group {
    position: relative;
    min-width: 180px;
    flex: 1;
}

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

/* SELECTS */
.filter-group select.form-select {
    width: 100%;
    height: 38px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-group select.form-select:hover {
    border-color: #999;
}

.filter-group select.form-select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* VALEURS SÉLECTIONNÉES */
.selected-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    padding: 0.5rem 0.75rem;
    background-color: rgba(155, 196, 49, 0.05);
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    width: 100%;
}

.selected-text {
    flex: 1;
    margin-right: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* BOUTONS */
.reset-filter {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: none;
    background: none;
    color: #dc3545;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.reset-filter:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--primary-color);
}

.filter-actions {
    width: 100%;
    margin-top: 0.5rem;
}

#reset-filters {
    width: 100%;
    height: 38px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: #fff;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

#reset-filters:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* RÉSULTATS */
#lunettes-results {
    min-height: 300px;
    transition: opacity 0.3s ease;
}

#lunettes-results.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

#lunettes-results.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
