/* ==================================================================
   SYSTÈME DE FILTRES - AGENDA
   ================================================================== */

/* CLASSES UTILITAIRES */
.hidden {
    display: none !important;
}

.error-message {
    color: #D32F2F;
    background-color: #FFEBEE;
    padding: 20px;
    margin: 20px;
    border-left: 4px solid #D32F2F;
    border-radius: 4px;
    font-weight: bold;
}

/* BOUTON FIXE LATÉRAL - DESKTOP */
.filtres-btn-fixe {
    position: fixed;
    right: 16px;
    bottom: 70px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #FED100;
    color: #000;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    transition: all 0.3s ease;
}

.filtres-btn-fixe:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.filtres-btn-fixe svg {
    width: 24px;
    height: 24px;
}

/* BADGE COMPTEUR */
.filtres-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #FF0000;
    color: #FFF;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* MODAL */
.filtres-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filtres-modal.active {
    display: block;
    opacity: 1;
}

.filtres-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.filtres-modal-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background-color: #FFF;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.filtres-modal.active .filtres-modal-content {
    transform: translateX(0);
}

/* HEADER */
.filtres-header {
    padding: 20px;
    background-color: #FED100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filtres-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.filtres-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.2s ease;
}

.filtres-close:hover {
    transform: rotate(90deg);
}

/* SECTIONS */
.filtres-section {
    padding: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.filtres-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* RECHERCHE */
.filtres-search {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

.filtres-search:focus {
    outline: none;
    border-color: #FED100;
}

/* LISTES */
.filtres-list {
    max-height: 250px;
    overflow-y: auto;
}

.filtres-item {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    margin-bottom: 5px;
}

.filtres-item:hover {
    background-color: #F5F5F5;
}

.filtres-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.filtres-item-text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.filtres-item-text strong {
    color: #000;
    font-weight: bold;
}

/* PASTILLES COULEUR RUBRIQUES */
.filtres-rub-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.filtres-rub-lavande { background-color: #9966ff; }
.filtres-rub-bleu { background-color: #1e4892; }
.filtres-rub-vert { background-color: #009A74; }
.filtres-rub-orange { background-color: #FF7900; }
.filtres-rub-corail { background-color: #FF8B7C; }
.filtres-rub-violet { background-color: #7d42f3; }

/* ACTIONS */
.filtres-actions {
    padding: 20px;
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background-color: #FFF;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary,
.btn-primary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: #E0E0E0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #D0D0D0;
}

.btn-primary {
    background-color: #FED100;
    color: #000;
}

.btn-primary:hover {
    background-color: #E5BE00;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */

/* TABLETTE */
@media (max-width: 768px) {
    .filtres-modal-content {
        max-width: 350px;
    }
}

/* MOBILE */
@media (max-width: 480px) {
    .filtres-btn-fixe {
        right: 20px;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
    }

    .filtres-btn-fixe:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .filtres-modal-content {
        max-width: 100%;
    }

    .filtres-header {
        padding: 15px;
    }

    .filtres-header h2 {
        font-size: 20px;
    }

    .filtres-section {
        padding: 15px;
    }
}

/* ACCESSIBILITÉ */
@media (prefers-reduced-motion: reduce) {
    .filtres-btn-fixe,
    .filtres-modal,
    .filtres-modal-content,
    .filtres-close {
        transition: none;
    }
}
