/**
 * Styles du filtre de recherche Relevanssi
 */

.rsf-search-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Barre de recherche */
.rsf-search-bar {
    margin-bottom: 20px;
}

.rsf-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rsf-search-input-container {
    position: relative;
    /* flex: 1; */
    display: flex;
    align-items: center;
}

.rsf-search-input {
    flex: 1;
    width: 100%;
    padding: 12px 20px 12px 48px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.rsf-search-input:focus {
    border-color: #2271b1;
}

/* Icône de recherche dans l'input */
.rsf-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 1;
}

.rsf-search-icon path {
    stroke: #787c82;
    stroke-width: 2;
}

/* Bouton Rechercher */
.rsf-search-button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    background-color: #2271b1;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rsf-search-button:hover {
    background-color: #1a5a8a;
}

.rsf-search-button:active {
    transform: scale(0.98);
}

/* Lien Effacer la recherche */
.rsf-reset-button {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    color: #2271b1;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.rsf-reset-button:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* Filtres */
.rsf-filter-container {
    margin-bottom: 30px;
}

.rsf-filter-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rsf-filter-button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #50575e;
}

.rsf-filter-button:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.rsf-filter-button--active {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.rsf-filter-button--active:hover {
    background-color: #1a5a8a;
    border-color: #1a5a8a;
}

/* Chargement */
.rsf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 15px;
}

.rsf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: rsf-spin 1s linear infinite;
}

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

.rsf-loading p {
    margin: 0;
    color: #50575e;
    font-size: 14px;
}

/* Résultats */
.rsf-results-container {
    margin-top: 30px;
}

.rsf-results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 0px;
}

.rsf-results-count {
    font-family: Open Sans;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    color: #2C2D42;
}

.rsf-results-showing {
    color: #2C2D42;
    font-family: Open Sans;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    margin-top:5px;
}
.rsf-no-results {
    padding: 40px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #50575e;
}

.rsf-no-results p {
    margin: 0;
    font-size: 16px;
}

.rsf-results-list {
    display: grid;
    gap: 20px;
}

.rsf-result-item {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.rsf-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rsf-result-media {
    flex: 0 0 140px;
    max-width: 140px;
}

.rsf-result-media img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.rsf-result-content {
    flex: 1;
}

.rsf-result-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.rsf-result-title a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rsf-result-title a:hover {
    color: #135e96;
    text-decoration: underline;
}

.rsf-result-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #787c82;
}

.rsf-result-type {
    padding: 8px;
    background-color: #CDCED5;
    border-radius: 3px;
    font-weight: 500;
}

.rsf-result-excerpt {
    font-family: Open Sans;
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
    color: #4F5062;
}

/* Styles pour le highlighting Relevanssi */
.relevanssi-query-term {
    background-color: #ffff00;
    font-weight: 600;
    color: #000;
}

.rsf-result-title .relevanssi-query-term,
.rsf-result-excerpt .relevanssi-query-term {
    background-color: #ffff00;
    font-weight: 600;
    color: #000;
}

/* Pagination */
.rsf-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
}

.rsf-pagination-button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #50575e;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rsf-pagination-button:hover:not(:disabled) {
    border-color: #2271b1;
    color: #2271b1;
    background-color: #f0f6fc;
}

.rsf-pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rsf-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rsf-pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #50575e;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rsf-pagination-number:hover {
    border-color: #2271b1;
    color: #2271b1;
    background-color: #f0f6fc;
}
button.rsf-pagination-button {
    color: #2C2D42 !important;
    background: transparent !important;
    border-color: #2C2D42;
    border: 1px solid #D5D5D9;
    border-radius: 2px !important;
}
.rsf-pagination-number {
    color: #2C2D42 !important;
    background: transparent !important;
    border-color: #2C2D42 !important;
    border: 1px solid #D5D5D9 !important;
    border-radius: 2px !important;
}
button.rsf-pagination-number.rsf-pagination-current{
    color: #ffffff !important;
    background: #2C2D42 !important;
    border-color: #2C2D42 !important;
    border: 1px solid #2C2D42 !important;
    border-radius: 2px !important;
}

.rsf-pagination-dots {
    padding: 0 8px;
    color: #787c82;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .rsf-search-input-wrapper {
        flex-direction: column;
    }

    .rsf-reset-button {
        width: 100%;
    }

    .rsf-filter-button-group {
        flex-direction: column;
    }

    .rsf-filter-button {
        width: 100%;
        text-align: center;
    }
    .rsf-result-item {
        flex-direction: column;
    }

    .rsf-result-media {
        width: 100%;
        max-width: 100%;
    }

    /* Pagination responsive */
    .rsf-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .rsf-pagination-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .rsf-pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}
