/**
 * NovaFeed v1.0.0 — DESKTOP (nwd-)
 * Porté de NovaWall v1.5.1 + follow box + likes + notifications
 */

/* Responsive: desktop visible > 768px, mobile en dessous */
.nvf-desktop-only { display: block; }
.nvf-mobile-only { display: none; }
@media (max-width: 768px) {
    .nvf-desktop-only { display: none; }
    .nvf-mobile-only { display: block; }
}

.nwd-container { max-width: 600px; margin: 0 auto; padding: 20px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }

/* App Banner */
.nwd-app-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 16px; background: linear-gradient(135deg, #096e09 0%, #0BB631 100%); border-radius: 12px; color: #fff; }
.nwd-app-text { font-size: 14px; font-weight: 500; flex: 1; }
.nwd-app-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; background: #fff; color: #096e09; font-size: 14px; font-weight: 700; text-decoration: none; border-radius: 999px; white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.nwd-app-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); color: #096e09; }
.nwd-store-icon { width: 22px; height: 22px; object-fit: contain; display: block; }

/* Feed */
.nwd-feed { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }

/* Item */
.nwd-item { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 16px; transition: background 0.15s ease; position: relative; }
.nwd-item:last-child { border-bottom: none; }
.nwd-item:hover { background: #f3f4f6; }
.nwd-item.nw-is-read { opacity: 0.72; }
.nwd-item.nw-is-read:hover { opacity: 1; }

/* Header */
.nwd-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.nwd-avatar { flex-shrink: 0; }
.nwd-avatar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; }
.nwd-meta { flex: 1; min-width: 0; }
.nwd-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 28px; }
.nwd-author { font-weight: 600; font-size: 15px; color: #111827; text-decoration: none; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nwd-author:hover { color: #096e09; text-decoration: underline; }
.nwd-date { font-size: 12px; color: #9ca3af; line-height: 1.3; white-space: nowrap; flex-shrink: 0; }
.nwd-meta-bottom { display: flex; align-items: center; gap: 6px; margin-top: 2px; }

/* Badges */
.nwd-badge, .nw-unread-badge { display: inline-block; padding: 2px 8px 1px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 999px; line-height: 14px; text-align: center; vertical-align: middle; }
.nwd-badge { background: #0BB631; color: #fff; }
.nw-unread-badge { background: #fbbf24; color: #78350f; }
.nwd-type-blog .nwd-badge { background: #3b82f6; }
.nwd-type-post .nwd-badge { background: #8b5cf6; }
.nwd-type-topic .nwd-badge { background: #096e09; }

/* Body */
.nwd-body { margin-left: 60px; }
.nwd-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; line-height: 1.35; color: #111827; }
.nwd-thumb { display: block; margin-bottom: 10px; border-radius: 8px; overflow: hidden; }
.nwd-thumb img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: cover; }
.nwd-excerpt { margin: 0; font-size: 14px; line-height: 1.5; color: #374151; }
.nwd-footer { margin-top: 12px; margin-left: 60px; }
.nwd-readmore { font-size: 14px; font-weight: 700; color: #096e09; text-decoration: none; }
.nwd-readmore:hover { text-decoration: underline; }

/* Dismiss button */
.nvf-dismiss-btn { position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 18px; color: #9ca3af; cursor: pointer; padding: 4px 8px; line-height: 1; border-radius: 4px; transition: color 0.15s, background 0.15s; }
.nvf-dismiss-btn:hover { color: #dc2626; background: #fee2e2; }

/* Load More */
.nwd-load-more-wrap { padding: 16px 0; text-align: center; }
.nvf-load-more { display: inline-block; padding: 12px 32px; background: #fff; border: 2px solid #096e09; color: #096e09; font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.nvf-load-more:hover { background: #096e09; color: #fff; }
.nvf-load-more:disabled { opacity: 0.6; cursor: not-allowed; }

/* Follow Button (nvf-) */
.nvf-follow-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; font-size: 13px; font-weight: 600; border-radius: 999px; border: 1px solid #096e09; background: transparent; color: #096e09; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; }
.nvf-follow-btn:hover { background: #096e09; color: #fff; }
.nvf-follow-btn:hover .nvf-follow-icon-img { filter: brightness(0) invert(1); }
.nvf-follow-btn.nvf-following { background: #e5e7eb; border-color: #e5e7eb; color: #6b7280; }
.nvf-follow-btn.nvf-following .nvf-follow-icon-img { filter: brightness(0); }
.nvf-follow-btn.nvf-following:hover { background: #c2410c; border-color: #c2410c; color: #fff; }
.nvf-follow-btn.nvf-loading { pointer-events: none; opacity: 0.6; }
.nvf-follow-cat-btn.nvf-following:hover { background: #c2410c; border-color: #c2410c; color: #fff; }
.nvf-follow-topic-btn.nvf-following:hover { background: #c2410c; border-color: #c2410c; color: #fff; }
.nvf-follow-icon-img { width: 18px; height: 18px; object-fit: contain; display: block; }

/* Follow Box — profil bbPress */
.nvf-follow-box { display: flex; align-items: center; gap: 20px; padding: 12px 0; margin: 8px 0; }
.nvf-follow-stat { cursor: pointer; text-align: center; }
.nvf-follow-stat-count { display: block; font-size: 18px; font-weight: 700; color: #111827; }
.nvf-follow-stat-label { display: block; font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }
.nvf-follow-stat:hover .nvf-follow-stat-count { color: #096e09; }

/* Popup */
.nvf-popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.nvf-popup-overlay.nvf-popup-open { display: flex; }
.nvf-popup { background: #fff; border-radius: 12px; width: 360px; max-height: 480px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.nvf-popup-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #e5e7eb; }
.nvf-popup-title { font-size: 16px; font-weight: 700; color: #111827; }
.nvf-popup-close { background: none; border: none; font-size: 20px; color: #6b7280; cursor: pointer; padding: 4px 8px; }
.nvf-popup-close:hover { color: #111827; }
.nvf-popup-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.nvf-popup-user { display: flex; align-items: center; gap: 12px; padding: 10px 16px; transition: background 0.1s; }
.nvf-popup-user:hover { background: #f9fafb; }
.nvf-popup-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.nvf-popup-user-info { flex: 1; min-width: 0; }
.nvf-popup-user-name { font-size: 14px; font-weight: 600; color: #111827; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nvf-popup-user-name:hover { color: #096e09; }
.nvf-popup-loading { text-align: center; padding: 20px; color: #9ca3af; font-size: 14px; }
.nvf-popup-empty { text-align: center; padding: 30px 20px; color: #9ca3af; font-size: 14px; }
.nvf-follow-from-list { padding: 4px 14px; font-size: 12px; font-weight: 600; border-radius: 999px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.nvf-follow-from-list.nvf-state-follow { background: transparent; border: 1px solid #096e09; color: #096e09; }
.nvf-follow-from-list.nvf-state-follow:hover { background: #096e09; color: #fff; }
.nvf-follow-from-list.nvf-state-following { background: #e5e7eb; border: 1px solid #e5e7eb; color: #6b7280; }
.nvf-follow-from-list.nvf-state-following:hover { background: #c2410c; border-color: #c2410c; color: #fff; }

/* CTA */
.nwd-cta { text-align: center; padding: 40px 24px; background: #fff; border: 2px solid #096e09; border-radius: 12px; }
.nwd-cta-title { font-size: 22px; font-weight: 800; color: #111827; margin: 0 0 16px; }
.nwd-cta-text { font-size: 16px; line-height: 1.65; color: #374151; margin: 0 auto 28px; max-width: 480px; text-align: left; }
.nwd-cta-text-left { font-size: 15px; line-height: 1.6; color: #374151; margin: 0 auto 28px; max-width: 480px; text-align: left; }
.nwd-cta-features { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.nwd-cta-feat { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 16px; font-weight: 600; color: #111827; }
.nwd-cta-feat-icon { width: 28px; height: 28px; object-fit: contain; display: block; flex-shrink: 0; }
.nwd-cta-steps { display: flex; flex-direction: column; gap: 12px; margin: 0 auto 24px; text-align: left; max-width: 320px; }
.nwd-cta-step { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 500; color: #374151; }
.nwd-step-num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: #096e09; color: #fff; font-weight: 700; font-size: 14px; border-radius: 50%; flex-shrink: 0; }
.nwd-cta-btn { display: inline-block; padding: 14px 32px; background: #096e09; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; border-radius: 8px; transition: background 0.2s ease; }
.nwd-cta-btn:hover { background: #075207; }
.nwd-cta-login { margin: 24px 0; padding: 20px; background: #f9f2e3; border-radius: 8px; }
.nwd-cta-login .nf-forum-login, .nwd-cta-login .nf-wrap { max-width: 100%; margin: 0; padding: 0; background: transparent; border: none; box-shadow: none; }
.nwd-cta-login .nf-form input[type="text"], .nwd-cta-login .nf-form input[type="password"], .nwd-cta-login .nf-form input[type="email"] { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.nwd-cta-login .nf-form button[type="submit"] { width: 100%; padding: 10px; background: #096e09; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.nwd-cta-login .nf-form button[type="submit"]:hover { background: #075207; }
.nwd-cta-register { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.nwd-cta-register p { margin: 0 0 10px; font-size: 14px; color: #6b7280; }
.nwd-register-btn { display: inline-block; padding: 12px 28px; background: #096e09; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; border-radius: 8px; }
.nwd-register-btn:hover { background: #075207; }
.nwd-login-btn { display: inline-block; padding: 10px 24px; background: #096e09; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; border-radius: 8px; }
.nwd-login-btn:hover { background: #075207; }
.nwd-cta-small { font-size: 12px; color: #6b7280; margin-top: 8px; }
