/* ══════════════════════════════════════════════════════════════
   ALDON RADAR — Favoris Page
   ══════════════════════════════════════════════════════════════ */

.fav-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* ── Header ── */
.fav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.fav-header-left {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.fav-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fav-header h1 i {
    color: var(--accent-primary, #10b981);
    font-size: 20px;
}

.fav-header-count {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* ── Layout split-panel ── */
.fav-layout {
    display: flex;
    gap: 24px;
    min-height: calc(100vh - 160px);
}

/* ── Sidebar (panneau gauche) ── */
.fav-sidebar {
    flex: 0 0 300px;
    background: rgba(15, 25, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: fit-content;
    max-height: calc(100vh - 160px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Création de liste */
.fav-create {
    padding: 16px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.fav-create-row {
    display: flex;
    gap: 8px;
}

.fav-create-input {
    flex: 1;
    padding: 9px 14px;
    background: var(--bg-primary, #0a1019);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary, #f1f5f9);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.fav-create-input:focus {
    border-color: var(--accent-primary, #10b981);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

.fav-create-input::placeholder {
    color: var(--text-muted, #64748b);
}

.fav-create-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm, 8px);
    background: var(--accent-primary, #10b981);
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.fav-create-btn:hover { opacity: 0.85; }
.fav-create-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Item "Tous les favoris" */
.fav-list-all {
    margin: 8px 10px 0;
    padding-right: 12px;
}

.fav-list-icon-all {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.fav-list-all.active .fav-list-icon-all {
    color: var(--accent-primary, #10b981);
}

.fav-list-all.active {
    background: rgba(16, 185, 129, 0.06);
}

.fav-list-all.active .fav-list-name {
    color: var(--accent-primary, #10b981);
    font-weight: 500;
}

.fav-list-all.active .fav-list-count {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-primary, #10b981);
}

/* Séparateur */
.fav-separator {
    height: 1px;
    background: var(--border-color, rgba(255,255,255,0.06));
    margin: 8px 16px;
}

/* Loading listes */
.fav-loading-lists {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Scroll listes */
.fav-lists-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 4px 10px 12px;
}

/* Item liste */
.fav-list-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 34px 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    margin-bottom: 1px;
    flex-wrap: nowrap;
}

.fav-list-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.fav-list-item.active {
    background: rgba(16, 185, 129, 0.06);
}

.fav-list-emoji {
    font-size: 15px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.fav-list-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.fav-list-item.active .fav-list-name {
    color: var(--accent-primary, #10b981);
    font-weight: 500;
}

.fav-list-item:hover .fav-list-name {
    color: var(--text-primary, #f1f5f9);
}

.fav-list-count {
    font-size: 10px;
    color: var(--text-muted, #64748b);
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9px;
    padding: 0 5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.fav-list-item.active .fav-list-count {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-primary, #10b981);
}

/* Bouton menu contextuel */
.fav-list-menu-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: all 0.15s ease;
}

.fav-list-item:hover .fav-list-menu-btn { opacity: 0.6; }

.fav-list-menu-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #f1f5f9);
}

/* Menu contextuel */
.fav-context-menu {
    position: absolute;
    right: 4px;
    top: calc(100% + 4px);
    background: rgba(20, 27, 45, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 20;
    min-width: 150px;
    padding: 5px;
    overflow: hidden;
    animation: favCtxFadeIn 0.12s ease-out;
}

@keyframes favCtxFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.fav-context-menu button {
    display: flex;
    width: 100%;
    padding: 9px 12px;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fav-context-menu button i {
    width: 14px;
    text-align: center;
    font-size: 12px;
}

.fav-context-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.fav-ctx-danger { color: #f87171 !important; }
.fav-ctx-danger:hover { 
    background: rgba(239, 68, 68, 0.1) !important; 
    color: #f87171 !important;
}

/* Input renommage */
.fav-rename-input {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-primary, #0a1019);
    border: 1px solid var(--accent-primary, #10b981);
    border-radius: 6px;
    color: var(--text-primary, #f1f5f9);
    font-size: 13px;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

/* État vide listes */
.fav-empty-lists {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted, #64748b);
}

.fav-empty-lists i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.fav-empty-lists p {
    margin: 0 0 4px;
    font-size: 13px;
}

.fav-empty-hint {
    font-size: 11px !important;
    opacity: 0.7;
}

/* ── Contenu (panneau droit) ── */
.fav-content {
    flex: 1;
    min-width: 0;
}

/* Header articles */
.fav-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.fav-content-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.fav-content-title i {
    color: var(--text-muted, #64748b);
}

.fav-content-count {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.fav-content-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fav-select-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 6px;
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.fav-select-all-btn:hover {
    border-color: var(--accent-primary, #10b981);
    color: var(--text-primary, #f1f5f9);
}

.fav-bulk-remove-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.08);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.fav-bulk-remove-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
}

/* Loading articles */
.fav-loading-articles {
    padding: 60px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

/* Articles */
.fav-articles {
    display: flex;
    flex-direction: column;
}

.fav-article {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.04));
    transition: background 0.15s;
    cursor: pointer;
}

.fav-article:hover {
    background: rgba(255, 255, 255, 0.025);
}

.fav-article:hover .fav-article-title {
    color: var(--accent-primary, #10b981);
}

.fav-article.selected {
    background: rgba(16, 185, 129, 0.04);
}

/* Checkbox */
.fav-article-check {
    padding-top: 2px;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.fav-article-check:hover {
    color: var(--accent-primary, #10b981);
}

.fav-article.selected .fav-article-check {
    color: var(--accent-primary, #10b981);
}

/* Thumbnail */
.fav-article-thumb {
    flex: 0 0 80px;
    height: 60px;
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
    background: var(--bg-tertiary, #1a2636);
    cursor: pointer;
}

.fav-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
    font-size: 20px;
}

/* Body */
.fav-article-body {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.fav-article-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #f1f5f9);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fav-article-meta {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.fav-article-source {
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
}

.fav-article-list-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 100px;
    font-size: 11px;
    color: rgba(16, 185, 129, 0.8);
    white-space: nowrap;
}

.fav-article-desc {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fav-article-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.fav-article-tag {
    padding: 2px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 100px;
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

/* Actions */
.fav-article-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.fav-article:hover .fav-article-actions { opacity: 1; }

.fav-article-open,
.fav-article-remove {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    text-decoration: none;
}

.fav-article-open {
    color: var(--text-muted, #64748b);
}

.fav-article-open:hover {
    color: var(--accent-primary, #10b981);
    background: rgba(16,185,129,0.08);
}

.fav-article-remove {
    color: var(--text-muted, #64748b);
}

.fav-article-remove:hover {
    color: #f87171;
    background: rgba(239,68,68,0.08);
}

/* ── État vide ── */
.fav-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-muted, #64748b);
}

.fav-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.fav-empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.fav-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.fav-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--accent-primary, #10b981);
    color: white;
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
    transition: opacity 0.2s;
}

.fav-empty-cta:hover { opacity: 0.85; }

/* ── Modale de confirmation ── */
.fav-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    animation: favFadeIn 0.15s ease-out;
}

@keyframes favFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fav-confirm-modal {
    background: #1a2234;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: favSlideUp 0.2s ease-out;
}

@keyframes favSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fav-confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary, #10b981);
}

.fav-confirm-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.fav-confirm-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 8px;
}

.fav-confirm-message {
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
    margin: 0 0 24px;
}

.fav-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.fav-confirm-cancel {
    flex: 1;
    padding: 10px 20px;
    background: none;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.fav-confirm-cancel:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--text-primary, #f1f5f9);
    background: rgba(255,255,255,0.03);
}

.fav-confirm-btn {
    flex: 1;
    padding: 10px 20px;
    background: var(--accent-primary, #10b981);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
}

.fav-confirm-btn:hover {
    opacity: 0.85;
}

.fav-confirm-danger {
    background: #ef4444;
}

.fav-confirm-danger:hover {
    background: #dc2626;
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .fav-page { padding: 16px; }
    .fav-layout { flex-direction: column; }
    .fav-sidebar { flex: none; width: 100%; max-height: 200px; overflow-y: auto; }
}

@media (max-width: 600px) {
    .fav-article-thumb { display: none; }
    .fav-article-actions { opacity: 1; }
    .fav-content-header { flex-direction: column; align-items: flex-start; }
}
