/* FrancaiseApps Annuaire — Recherche & Listing Front */

/* ==========================================
   BARRE DE RECHERCHE
   ========================================== */
.fapps-search-wrapper {
    max-width: 900px;
    margin: 0 auto 30px;
}

.fapps-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.fapps-search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.fapps-search-input:focus {
    border-color: #2271b1;
    outline: none;
}

.fapps-platform-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    min-width: 180px;
}

.fapps-search-btn {
    padding: 12px 24px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.fapps-search-btn:hover {
    background: #135e96;
}

/* ==========================================
   FILTRES CATÉGORIE
   ========================================== */
.fapps-category-filters {
    margin-bottom: 20px;
}

.fapps-filters-toggle {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
}

.fapps-filters-toggle:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.fapps-category-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 0;
}

.fapps-category-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.fapps-category-label:hover {
    background: #e8f4fd;
    border-color: #2271b1;
}

.fapps-category-label input[type="checkbox"] {
    display: none;
}

.fapps-category-label:has(input:checked) {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ==========================================
   GRILLE D'APPS
   ========================================== */
.fapps-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fapps-app-card {
    display: flex;
    gap: 15px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.fapps-app-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.fapps-app-card__icon {
    flex-shrink: 0;
}

.fapps-app-card__img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.fapps-app-card__placeholder {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.fapps-app-card__info {
    flex: 1;
    min-width: 0;
}

.fapps-app-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fapps-app-card__developer {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.fapps-app-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.fapps-app-card__rating-value {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.fapps-app-card__meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==========================================
   BADGES
   ========================================== */
.fapps-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fapps-badge--free {
    background: #E1F5EE;
    color: #0F6E56;
}

.fapps-badge--freemium {
    background: #FAEEDA;
    color: #854F0B;
}

.fapps-badge--paid {
    background: #FAECE7;
    color: #993C1D;
}

.fapps-badge--platform {
    background: #EBF0F5;
    color: #3a5a7c;
}

/* ==========================================
   ÉTOILES FRONT
   ========================================== */
.fapps-stars-display {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.fapps-stars-display .fapps-star {
    font-size: 16px;
}

.fapps-stars-display .fapps-star--full {
    color: #EF9F27;
}

.fapps-stars-display .fapps-star--half {
    color: #EF9F27;
    opacity: 0.6;
}

.fapps-stars-display .fapps-star--empty {
    color: #ddd;
}

.fapps-rating-value {
    font-size: 14px;
    color: #666;
    margin-left: 6px;
    font-weight: 500;
}

/* ==========================================
   PROS / CONS
   ========================================== */
.fapps-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
}

.fapps-proscons__title {
    font-size: 18px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.fapps-proscons__title--pros {
    color: #0F6E56;
    border-color: #E1F5EE;
}

.fapps-proscons__title--cons {
    color: #993C1D;
    border-color: #FAECE7;
}

.fapps-proscons__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fapps-proscons__item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    line-height: 1.5;
}

.fapps-proscons__icon {
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 6px;
}

.fapps-proscons__item--pro .fapps-proscons__icon {
    color: #0F6E56;
}

.fapps-proscons__item--con .fapps-proscons__icon {
    color: #993C1D;
}

/* ==========================================
   STORE BUTTONS
   ========================================== */
.fapps-store-buttons {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.fapps-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    transition: opacity 0.2s;
}

.fapps-store-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.fapps-store-btn--android {
    background: #01875f;
}

.fapps-store-btn--ios {
    background: #000;
}

.fapps-store-btn__icon {
    font-size: 24px;
}

.fapps-store-btn__text small {
    font-size: 10px;
    opacity: 0.8;
}

/* ==========================================
   STATS CARDS
   ========================================== */
.fapps-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.fapps-stats__card {
    text-align: center;
    padding: 20px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.fapps-stats__icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.fapps-stats__value {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.fapps-stats__label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   PAGINATION
   ========================================== */
.fapps-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.fapps-pagination__btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.fapps-pagination__btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.fapps-pagination__btn--active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Loading */
.fapps-search-loading {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 15px;
}

.fapps-no-results {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .fapps-search-bar {
        flex-direction: column;
    }

    .fapps-app-grid {
        grid-template-columns: 1fr;
    }

    .fapps-proscons {
        grid-template-columns: 1fr;
    }

    .fapps-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .fapps-store-buttons {
        flex-direction: column;
    }
}
