/* ============================================================
   Tehono Market - Feedback Board CSS
   Agora - Suggestions, Votes, Commentaires
   ============================================================ */

/* ---------- ROOT & VARIABLES ---------- */
.th-fb-wrap {
    --fb-bg:         transparent;
    --fb-card:       rgba(255,255,255,0.025);
    --fb-card-hover: rgba(255,255,255,0.04);
    --fb-border:     rgba(255,255,255,0.08);
    --fb-border-h:   rgba(255,255,255,0.15);
    --fb-text:       #e0e0e0;
    --fb-muted:      #888;
    --fb-accent:     #fff;
    --fb-accent-h:   #e0e0e0;
    --fb-green:      #ccc;
    --fb-gold:       #ccc;
    --fb-red:        #ccc;
    --fb-blue:       #ccc;
    --fb-radius:     12px;
    --fb-shadow:     none;
    --fb-transition: all 0.2s ease;

    font-family: 'Montserrat', sans-serif;
    color: var(--fb-text);
    max-width: 100%;
    margin: 0;
    padding: 0 0 40px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 36px;
}

/* ---------- HEADER ---------- */
.th-fb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}
.th-fb-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    color: #f0f0f0 !important;
    letter-spacing: 0;
}
.th-fb-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0 !important;
    line-height: 1.6;
}

/* ---------- BOUTON NOUVELLE SUGGESTION ---------- */
.th-fb-btn-new {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #fff !important;
    border: none !important;
    border-radius: 10px;
    color: #0a0a0a !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.th-fb-btn-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.1);
    background: #e0e0e0 !important;
}
.th-fb-btn-new span { font-size: 18px; font-weight: 300; }

/* ---------- FILTRES ---------- */
.th-fb-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}
.th-fb-filters::before {
    display: none;
}
/* Recherche + toggle vue */
.th-fb-filter-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.th-fb-search-input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 18px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: var(--fb-transition);
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.th-fb-search-input::placeholder { color: var(--fb-muted); }
.th-fb-search-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.03);
}

/* Toggle grille / liste */
.th-fb-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.32);
    padding: 5px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    align-self: end;
}
.th-fb-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--fb-muted);
    cursor: pointer;
    transition: var(--fb-transition);
    padding: 0;
}
.th-fb-view-btn:hover { color: #fff; }
.th-fb-view-btn.active {
    background: #fff !important;
    color: #0a0a0a !important;
    box-shadow: none;
}

/* Ligne de filtres en inline */
.th-fb-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    position: relative;
    z-index: 1;
}

/* Groupe filtre (label + bulles) */
.th-fb-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 0;
    min-width: 0;
}
.th-fb-filter-group + .th-fb-filter-group {
    padding-left: 18px;
    border-left: 1px solid rgba(255,255,255,0.08);
}
.th-fb-filter-group-sort {
    margin-left: 0;
    min-width: 210px;
    align-self: end;
}

.th-fb-filter-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9c94c8;
}

.th-fb-filter-status,
.th-fb-filter-cats,
.th-fb-filter-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

/* Bulles communes */
.th-fb-filter-btn,
.th-fb-filter-cat-btn,
.th-fb-sort-btn {
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.th-fb-filter-btn:hover,
.th-fb-filter-cat-btn:hover,
.th-fb-sort-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: #ccc;
    background: rgba(255,255,255,0.04);
}
.th-fb-filter-btn.active,
.th-fb-filter-cat-btn.active,
.th-fb-sort-btn.active {
    background: #fff;
    border-color: #fff;
    color: #0a0a0a;
    box-shadow: none;
}

/* ============================================================
   LISTE - Modes d'affichage
   ============================================================ */
.th-fb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

/* --- Vue GRILLE (galerie) --- */
.th-fb-view-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.th-fb-view-grid .th-fb-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}
.th-fb-view-grid .th-fb-card-body {
    padding: 18px 20px 14px;
    flex: 1;
}
.th-fb-view-grid .th-fb-card-title {
    white-space: normal;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    margin-bottom: 8px;
}
.th-fb-view-grid .th-fb-card-desc {
    -webkit-line-clamp: 3;
    margin-bottom: 12px;
}
.th-fb-view-grid .th-fb-vote-col {
    display: none;
}
.th-fb-view-grid .th-fb-card-right {
    display: none;
}
.th-fb-view-grid .th-fb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--fb-border);
    background: rgba(0,0,0,0.15);
}
/* Inject a footer row in grid mode via meta + vote inline */
.th-fb-view-grid .th-fb-card-meta {
    padding: 0 20px 16px;
}
/* Vote inline pour la vue grille - affiché via la barre du bas */
.th-fb-view-grid .th-fb-grid-vote {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--fb-border);
    background: rgba(0,0,0,0.15);
}
.th-fb-view-grid .th-fb-grid-vote .th-fb-vote-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 14px;
}
.th-fb-view-grid .th-fb-grid-vote .th-fb-vote-count {
    font-size: 14px;
}
.th-fb-view-grid .th-fb-grid-vote .th-fb-comment-count {
    margin-left: auto;
}

/* --- Vue LISTE (classique) --- */
.th-fb-view-list {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}
.th-fb-view-list .th-fb-grid-vote {
    display: none !important;
}
.th-fb-view-list .th-fb-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
}
.th-fb-view-list .th-fb-vote-col {
    display: flex;
}

/* ---------- CARTE (base) ---------- */
.th-fb-card {
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius);
    cursor: pointer;
    transition: var(--fb-transition);
    animation: th-fb-slide-in 0.3s ease forwards;
    opacity: 0;
}
.th-fb-card:hover {
    background: var(--fb-card-hover);
    border-color: rgba(160,108,213,0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(160,108,213,0.12);
}

@keyframes th-fb-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Vote colonne gauche (vue liste) */
.th-fb-vote-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* ---------- BOUTON VOTE ---------- */
.th-fb-vote-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--fb-border);
    background: rgba(255,255,255,0.03);
    color: var(--fb-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: var(--fb-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.th-fb-vote-btn:hover {
    border-color: var(--fb-accent);
    color: var(--fb-accent);
    background: rgba(160,108,213,0.1);
}
.th-fb-vote-btn:focus {
    outline: none;
    box-shadow: none;
}
.th-fb-vote-btn.voted {
    border-color: var(--fb-green);
    color: #fff !important;
    background: rgba(46,204,113,0.22);
    box-shadow: 0 0 12px rgba(46,204,113,0.35);
}
.th-fb-vote-btn.voted:hover {
    border-color: #58d68d;
    color: #fff !important;
    background: rgba(46,204,113,0.30);
    box-shadow: 0 0 16px rgba(46,204,113,0.45);
}

.th-fb-vote-count {
    font-size: 15px;
    font-weight: 700;
    color: var(--fb-text);
}

/* Contenu central */
.th-fb-card-body { overflow: hidden; }

.th-fb-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.th-fb-card-desc {
    font-size: 13px;
    color: var(--fb-muted);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.th-fb-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tags catégorie */
.th-fb-wrap .th-fb-cat-tag,
.th-fb-wrap .th-fb-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--cat-color, var(--fb-accent));
    color: var(--cat-color, var(--fb-accent));
    background: transparent;
    transition: var(--fb-transition);
}

/* Badge statut */
.th-fb-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--st-color, var(--fb-accent));
    color: var(--st-color, var(--fb-accent));
    background: transparent;
}

.th-fb-card-author {
    font-size: 11px;
    color: var(--fb-muted);
}

/* Colonne droite (vue liste) */
.th-fb-card-right {
    text-align: right;
    white-space: nowrap;
}
.th-fb-comment-count {
    font-size: 12px;
    color: var(--fb-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---------- ÉTAT VIDE & LOADING ---------- */
.th-fb-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--fb-muted);
    grid-column: 1 / -1;
}
.th-fb-empty-icon { font-size: 48px; margin-bottom: 12px; }
.th-fb-empty-text { font-size: 16px; font-weight: 600; }
.th-fb-empty-sub  { font-size: 13px; margin-top: 4px; }

.th-fb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px;
    color: var(--fb-muted);
    grid-column: 1 / -1;
}
.th-fb-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--fb-border);
    border-top-color: var(--fb-accent);
    border-radius: 50%;
    animation: th-fb-spin 0.8s linear infinite;
}
@keyframes th-fb-spin { to { transform: rotate(360deg); } }

/* ---------- PAGINATION ---------- */
.th-fb-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.th-fb-page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--fb-border);
    background: var(--fb-card);
    color: var(--fb-text);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--fb-transition);
    text-decoration: none;
}
.th-fb-page-btn:hover,
.th-fb-page-btn.active {
    background: var(--fb-accent);
    border-color: var(--fb-accent);
    color: #fff;
}

/* ---------- MODAL ---------- */
.th-fb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: th-fb-fade-in 0.2s ease;
}
@keyframes th-fb-fade-in { from { opacity: 0; } to { opacity: 1; } }

.th-fb-modal {
    background: var(--fb-card, #12122a);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    animation: th-fb-slide-up 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
@keyframes th-fb-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.th-fb-modal-detail { max-width: 680px; }

.th-fb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.th-fb-modal-header h3 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin: 0 !important;
}
.th-fb-modal-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    color: var(--fb-muted);
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--fb-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.th-fb-modal-close:hover {
    background: rgba(231,76,60,0.15);
    border-color: var(--fb-red);
    color: var(--fb-red);
}

/* ---------- FORMULAIRE ---------- */
.th-fb-field { margin-bottom: 20px; position: relative; }
.th-fb-field label {
    display: block; font-size: 13px; font-weight: 700;
    color: var(--fb-text); margin-bottom: 8px;
}
.th-fb-required { color: var(--fb-red); margin-left: 2px; }
.th-fb-optional { color: var(--fb-muted); font-weight: 400; font-size: 12px; }

.th-fb-field input[type="text"],
.th-fb-field textarea {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--fb-border);
    border-radius: 10px;
    color: #fff;
    padding: 12px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: var(--fb-transition);
    box-sizing: border-box;
    resize: vertical;
}
.th-fb-field input[type="text"]:focus,
.th-fb-field textarea:focus {
    outline: none;
    border-color: var(--fb-accent);
    background: rgba(160,108,213,0.06);
    box-shadow: 0 0 0 3px rgba(160,108,213,0.12);
}
.th-fb-field input::placeholder,
.th-fb-field textarea::placeholder { color: var(--fb-muted); }

.th-fb-char-count {
    position: absolute; right: 12px; bottom: -18px;
    font-size: 11px; color: var(--fb-muted);
}

/* Picker catégories */
.th-fb-cat-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.th-fb-cat-option { cursor: pointer; }
.th-fb-cat-option input[type="radio"] { display: none; }
.th-fb-cat-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 14px; border-radius: 30px; font-size: 12px;
    font-weight: 700; border: 1px solid var(--cat-color, var(--fb-accent));
    color: var(--fb-muted); cursor: pointer; transition: var(--fb-transition);
    user-select: none;
}
.th-fb-cat-option input[type="radio"]:checked + .th-fb-cat-pill {
    color: var(--cat-color); background: transparent;
    box-shadow: 0 0 12px rgba(var(--cat-rgb,160,108,213),0.3);
    border-width: 2px;
}
.th-fb-cat-pill:hover { color: var(--cat-color); background: rgba(255,255,255,0.03); }

.th-fb-form-footer {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-top: 8px;
}
.th-fb-form-notice { font-size: 12px; color: var(--fb-muted); margin: 0 !important; }

.th-fb-btn-submit {
    padding: 12px 28px;
    background: #fff !important; border: none !important; border-radius: 10px;
    color: #0a0a0a !important;
    font-family: 'Montserrat', sans-serif; font-size: 14px;
    font-weight: 700; cursor: pointer; transition: all 0.2s ease;
    width: 100%;
}
.th-fb-btn-submit:hover {
    transform: translateY(-1px);
    background: #e0e0e0 !important;
    box-shadow: 0 6px 20px rgba(255,255,255,0.1);
}
.th-fb-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.th-fb-form-msg {
    padding: 12px 16px; border-radius: 10px;
    font-size: 14px; font-weight: 600; margin-top: 16px;
}
.th-fb-form-msg.success { background: rgba(46,204,113,0.12); border: 1px solid var(--fb-green); color: var(--fb-green); }
.th-fb-form-msg.error { background: rgba(231,76,60,0.12); border: 1px solid var(--fb-red); color: var(--fb-red); }

/* ---------- MODAL DÉTAIL ---------- */
.th-fb-detail-body {
    margin-bottom: 24px; padding-bottom: 24px;
    border-bottom: 1px solid var(--fb-border);
}
.th-fb-detail-desc {
    font-size: 14px; color: var(--fb-muted); line-height: 1.7;
    white-space: pre-wrap; margin: 0 0 16px;
}
.th-fb-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Commentaires */
.th-fb-comment-section h4 { font-size: 15px !important; font-weight: 700 !important; color: #fff !important; margin: 0 0 16px !important; }
.th-fb-comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-height: 300px; overflow-y: auto; }
.th-fb-comment-item { padding: 14px 16px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--fb-border); }
.th-fb-comment-item.admin-comment { background: rgba(46,204,113,0.07); border-color: rgba(46,204,113,0.3); }
.th-fb-comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.th-fb-comment-author { font-size: 13px; font-weight: 700; color: #fff; }
.th-fb-comment-author.admin { color: var(--fb-green); }
.th-fb-admin-badge-tag { font-size: 10px; padding: 2px 7px; border-radius: 10px; background: rgba(46,204,113,0.15); border: 1px solid var(--fb-green); color: var(--fb-green); font-weight: 700; }
.th-fb-comment-date { font-size: 11px; color: var(--fb-muted); margin-left: auto; }
.th-fb-comment-text { font-size: 13px; color: var(--fb-muted); line-height: 1.6; margin: 0; white-space: pre-wrap; }

.th-fb-comment-form { display: flex; flex-direction: column; gap: 10px; }
.th-fb-comment-form textarea {
    background: rgba(255,255,255,0.04); border: 1px solid var(--fb-border);
    border-radius: 10px; color: #fff; padding: 12px;
    font-family: 'Montserrat', sans-serif; font-size: 13px;
    resize: vertical; transition: var(--fb-transition);
}
.th-fb-comment-form textarea:focus { outline: none; border-color: rgba(255,255,255,0.25); box-shadow: 0 0 0 3px rgba(255,255,255,0.03); }
.th-fb-btn-comment {
    align-self: flex-end; padding: 10px 22px;
    background: #fff !important; border: none !important;
    border-radius: 10px; color: #0a0a0a !important;
    font-family: 'Montserrat', sans-serif; font-size: 13px;
    font-weight: 700; cursor: pointer; transition: all 0.2s ease;
}
.th-fb-btn-comment:hover { background: #e0e0e0 !important; color: #0a0a0a !important; }

/* ============================================================
   ADMIN STYLES - AGORA BACKEND (Thème clair)
   ============================================================ */
.th-fb-admin-wrap { padding: 20px 0; font-family: 'Montserrat', -apple-system, sans-serif; color: #1d2327; }

.th-fb-admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 28px; }
.th-fb-admin-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px 18px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: all 0.2s ease; }
.th-fb-admin-stat:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.th-fb-admin-stat-val { display: block; font-size: 32px; font-weight: 800; color: #1d2327; line-height: 1; margin-bottom: 6px; }
.th-fb-admin-stat-label { font-size: 12px; color: #64748b; font-weight: 600; }
.th-fb-stat-pending { border-color: rgba(243,156,18,0.35); background: linear-gradient(135deg, #fff 80%, rgba(243,156,18,0.05)); }
.th-fb-stat-pending .th-fb-admin-stat-val { color: #d97706; }
.th-fb-stat-done { border-color: rgba(46,204,113,0.35); background: linear-gradient(135deg, #fff 80%, rgba(46,204,113,0.05)); }
.th-fb-stat-done .th-fb-admin-stat-val { color: #16a34a; }

.th-fb-admin-filters { margin-bottom: 20px; padding: 16px 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.th-fb-admin-filters form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.th-fb-admin-filters .th-fb-select,
.th-fb-admin-wrap .th-fb-select { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; color: #334155; padding: 8px 12px; font-family: 'Montserrat', sans-serif; font-size: 13px; cursor: pointer; transition: all 0.2s ease; -webkit-appearance: none; }
.th-fb-admin-filters .th-fb-select:hover, .th-fb-admin-filters .th-fb-select:focus,
.th-fb-admin-wrap .th-fb-select:hover, .th-fb-admin-wrap .th-fb-select:focus { border-color: #a06cd5; outline: none; }

.th-fb-admin-table { border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0 !important; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.th-fb-admin-table thead th { background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; }
.th-fb-admin-row td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #334155; }
.th-fb-admin-row:last-child td { border-bottom: none; }
.th-fb-admin-row:hover td { background: #faf8ff; }
.th-fb-admin-post-title { font-size: 14px; color: #1d2327; display: block; margin-bottom: 4px; font-weight: 700; }
.th-fb-admin-post-desc { font-size: 12px; color: #94a3b8; margin: 0 0 4px; }
.th-fb-admin-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(160,108,213,0.1); border: 1px solid rgba(160,108,213,0.25); color: #a06cd5; }
.th-fb-vote-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; background: rgba(46,204,113,0.08); border: 1px solid rgba(46,204,113,0.25); color: #16a34a; font-size: 13px; font-weight: 700; }
.th-fb-admin-wrap .th-fb-cat-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid var(--cat-color, #a06cd5); color: var(--cat-color, #a06cd5); background: transparent; }
.th-fb-btn-delete { color: #e74c3c !important; border-color: rgba(231,76,60,0.25) !important; }
.th-fb-btn-delete:hover { background: rgba(231,76,60,0.08) !important; }
.th-fb-status-select { border-color: var(--st-color, #a06cd5) !important; color: var(--st-color, #a06cd5) !important; background: #fff !important; border-radius: 8px !important; padding: 6px 10px !important; font-size: 12px !important; font-weight: 600 !important; }

.th-fb-admin-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.th-fb-admin-pagination .th-fb-page-btn { background: #fff; border-color: #e2e8f0; color: #334155; }
.th-fb-admin-pagination .th-fb-page-btn:hover, .th-fb-admin-pagination .th-fb-page-btn.active { background: #a06cd5; border-color: #a06cd5; color: #fff; }

.th-fb-admin-cats-section { margin-top: 40px; padding: 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.th-fb-admin-cats-section h3 { margin-top: 0; color: #1d2327; font-size: 16px; font-weight: 800; }
.th-fb-cats-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.th-fb-cats-table th { text-align: left; padding: 8px 12px; font-size: 12px; color: #64748b; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid #e2e8f0; }
.th-fb-cats-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; }
.th-fb-cats-table input { color: #334155; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 10px; }
.th-fb-cats-table input:focus { outline: none; border-color: #a06cd5; }

#th-fb-admin-comments-modal > div { background: #fff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important; }
#th-fb-admin-comments-modal h3 { color: #1d2327 !important; }
#th-fb-admin-comments-modal #th-fb-admin-close-comments { color: #64748b !important; }
#th-fb-admin-comments-modal #th-fb-admin-close-comments:hover { color: #e74c3c !important; }
#th-fb-admin-comments-modal #th-fb-admin-comment-text { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; color: #334155 !important; }
#th-fb-admin-comments-modal #th-fb-admin-comment-text:focus { border-color: #a06cd5 !important; }

/* ---------- SCROLLBAR ---------- */
.th-fb-comments-list::-webkit-scrollbar, .th-fb-modal::-webkit-scrollbar { width: 4px; }
.th-fb-comments-list::-webkit-scrollbar-track, .th-fb-modal::-webkit-scrollbar-track { background: transparent; }
.th-fb-comments-list::-webkit-scrollbar-thumb, .th-fb-modal::-webkit-scrollbar-thumb { background: rgba(160,108,213,0.4); border-radius: 4px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    .th-fb-view-grid { grid-template-columns: 1fr !important; }
    .th-fb-view-list .th-fb-card { grid-template-columns: 54px 1fr; }
    .th-fb-card-right { display: none; }
    .th-fb-header { flex-direction: column; align-items: flex-start; }
    .th-fb-filters { flex-direction: column; }
    .th-fb-filter-search {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .th-fb-filter-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .th-fb-filter-group + .th-fb-filter-group {
        padding-left: 0; border-left: none;
        padding-top: 10px; border-top: 1px solid var(--fb-border);
    }
    .th-fb-filter-group-sort {
        margin-left: 0;
        min-width: 0;
    }
    .th-fb-modal { padding: 20px; }
    .th-fb-admin-stats { grid-template-columns: repeat(2, 1fr); }
}

.th-fb-vote-btn {
    color: #fff !important;
    font-size: 18px !important;
    font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif !important;
    text-indent: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
}

.th-fb-vote-btn img.emoji {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    display: block !important;
    flex: 0 0 16px !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}
/* ═══════════════════════════════════════════════
   🔧 RESPONSIVE PATCH - Feedback Board (Agora)
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {
    .th-fb-title { font-size: 20px !important; }
    .th-fb-subtitle { font-size: 12px !important; }
    .th-fb-btn-new { padding: 10px 16px !important; font-size: 12px !important; }
    .th-fb-filters { padding: 14px 12px !important; border-radius: 14px !important; }
    .th-fb-search-input { min-height: 42px !important; font-size: 13px !important; padding: 10px 14px !important; }
    .th-fb-view-btn { width: 34px !important; height: 34px !important; }

    /* Bulles filtres - plus compactes */
    .th-fb-filter-btn,
    .th-fb-filter-cat-btn,
    .th-fb-sort-btn {
        min-height: 30px !important;
        padding: 5px 10px !important;
        font-size: 10px !important;
    }

    /* Cards */
    .th-fb-card-title { font-size: 13px !important; }
    .th-fb-card-desc { font-size: 12px !important; }
    .th-fb-vote-btn { width: 38px !important; height: 38px !important; font-size: 16px !important; }
    .th-fb-vote-count { font-size: 13px !important; }

    /* Modal */
    .th-fb-modal { padding: 20px 16px !important; border-radius: 16px !important; }
    .th-fb-modal-header h3 { font-size: 16px !important; }
    .th-fb-detail-desc { font-size: 13px !important; }
    .th-fb-comment-item { padding: 10px 12px !important; }

    /* Pagination */
    .th-fb-page-btn { width: 32px !important; height: 32px !important; font-size: 12px !important; }
}
