/* ============================================
   DASHBOARD - Professional Design
   ============================================ */

.dashboard-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* ============================================
   HEADER
   ============================================ */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-header-left {
    flex: 1;
}

.dash-title {
    font-size: 1.75rem;
    font-weight: 300;
    color: #94a3b8;
    margin: 0 0 0.25rem;
}

.dash-title .username {
    font-weight: 700;
    color: #fff;
}

.dash-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.update-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
}

.btn-refresh {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16,185,129,0.4);
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1a2234;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-green .stat-icon { background: rgba(16,185,129,0.15); color: #10b981; }
.stat-blue .stat-icon { background: rgba(59,130,246,0.15); color: #3b82f6; }
.stat-purple .stat-icon { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.stat-orange .stat-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
}

/* ============================================
   NEWS SECTION
   ============================================ */
.news-section {
    background: #1a2234;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    overflow: hidden;
}

.section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(135deg, rgba(245,158,11,0.08), transparent);
}

.section-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h2 i {
    color: #f59e0b;
}

/* ============================================
   STATES
   ============================================ */
.state-box {
    padding: 4rem 2rem;
    text-align: center;
    color: #64748b;
}

.state-box > i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.state-box h3 {
    color: #e2e8f0;
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.state-box p {
    margin: 0 0 1.5rem;
}

.state-box.state-small {
    padding: 3rem 2rem;
}

.state-box.state-small > i {
    font-size: 2rem;
}

.state-error > i {
    color: #ef4444;
    opacity: 1;
}

/* Loader */
.loader-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(1) { animation-delay: 0s; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.4);
    color: white;
}

/* ============================================
   NEWS CONTENT
   ============================================ */
.news-content {
    padding: 1.5rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cat-tab:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.cat-tab.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    color: white;
}

.cat-count {
    padding: 0.125rem 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    font-size: 0.75rem;
}

.cat-tab.active .cat-count {
    background: rgba(255,255,255,0.2);
}

/* Category Panel */
.category-panel {
    animation: fadeIn 0.3s ease;
}

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

/* Tags */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 6px;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag i {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* ============================================
   ARTICLES LAYOUT
   ============================================ */
.articles-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Hero Article */
.article-hero {
    border-radius: 16px;
    overflow: hidden;
}

.hero-image {
    position: relative;
    height: 350px;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.3) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-source {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #10b981;
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem;
}

.hero-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.hero-title a:hover {
    color: #10b981;
}

.hero-excerpt {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
    max-width: 700px;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-date {
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.5rem;
}

.hero-actions button,
.hero-actions a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.hero-actions button:hover,
.hero-actions a:hover {
    background: #10b981;
    transform: scale(1.05);
}

/* ============================================
   ARTICLES GRID
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.article-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16,185,129,0.3);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.card-image {
    position: relative;
    height: 160px;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.card-source {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.card-title a {
    color: #e2e8f0;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #10b981;
}

.card-excerpt {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.card-date {
    color: #64748b;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-actions {
    display: flex;
    gap: 0.25rem;
}

.card-actions button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-actions button:hover {
    background: rgba(16,185,129,0.15);
    color: #10b981;
}

/* ============================================
   MEDIA TYPE BADGES
   ============================================ */

/* Badge row dans le hero (source + badge type) */
.media-type-badge-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.media-type-badge-row .hero-source {
    margin-bottom: 0;
}

/* Badge type média générique */
.media-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.media-type-badge.badge-youtube {
    background: #ff0000;
    color: white;
}

.media-type-badge.badge-podcast {
    background: #8b5cf6;
    color: white;
}

.media-type-badge.badge-video {
    background: #3b82f6;
    color: white;
}

/* Badge sur les cartes article */
.card-type-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 2;
}

.card-type-badge.badge-youtube {
    background: #ff0000;
    color: white;
}

.card-type-badge.badge-podcast {
    background: #8b5cf6;
    color: white;
}

.card-type-badge.badge-video {
    background: #3b82f6;
    color: white;
}

/* ============================================
   ARTICLE YOUTUBE - BORDURE SPÉCIALE
   ============================================ */

.article-card.type-youtube {
    border-color: rgba(255, 0, 0, 0.2);
}

.article-card.type-youtube:hover {
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.1);
}

.article-card.type-podcast {
    border-color: rgba(139, 92, 246, 0.2);
}

.article-card.type-podcast:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.1);
}

.article-card.type-video {
    border-color: rgba(59, 130, 246, 0.2);
}

.article-card.type-video:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.1);
}

/* ============================================
   HERO PLAY BUTTON (YouTube)
   ============================================ */

.hero-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-play-btn:hover {
    transform: translate(-50%, -70%) scale(1.08);
}

.hero-play-btn:hover .play-btn-circle {
    background: #ff0000;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
}

.play-btn-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 25px rgba(255, 0, 0, 0.4);
    transition: all 0.3s;
}

.play-btn-circle i {
    color: white;
    font-size: 1.75rem;
    margin-left: 4px;
}

.play-btn-label {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.5);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* ============================================
   CARD PLAY OVERLAY (YouTube - Grid)
   ============================================ */

.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.article-card.type-youtube:hover .card-play-overlay {
    opacity: 1;
}

.card-play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
    transition: all 0.2s;
}

.card-play-btn i {
    color: white;
    font-size: 1.25rem;
    margin-left: 3px;
}

.card-play-overlay:hover .card-play-btn {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 0, 0, 0.6);
}

/* Titre cliquable pour YouTube */
.hero-title-link,
.card-title-playable {
    cursor: pointer;
}

.card-title-playable {
    color: #e2e8f0;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.card-title-playable:hover {
    color: #ff4444;
}

.hero-title-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.hero-title-link:hover {
    color: #ff4444;
}

/* Bouton play dans les actions */
.action-play {
    background: rgba(255, 0, 0, 0.3) !important;
}

.action-play:hover {
    background: #ff0000 !important;
}

.action-play-sm {
    color: #ff4444 !important;
}

.action-play-sm:hover {
    background: rgba(255, 0, 0, 0.2) !important;
    color: #ff0000 !important;
}

/* ============================================
   VIDEO PLAYER OVERLAY (LECTEUR YOUTUBE)
   ============================================ */

.video-player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeInOverlay 0.3s ease;
}

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

.video-player-container {
    width: 100%;
    max-width: 960px;
    background: #1a2234;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: slideUpPlayer 0.3s ease;
}

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

/* Header du lecteur */
.video-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255,0,0,0.08), transparent);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.video-player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.video-player-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #ff0000;
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.video-player-source {
    color: #94a3b8;
    font-size: 0.85rem;
}

.video-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Iframe YouTube 16:9 */
.video-player-frame {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-player-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Footer du lecteur */
.video-player-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.video-player-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.video-player-date {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.video-player-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.vp-action-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dash-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .dash-title {
        font-size: 1.5rem;
    }
    
    .hero-image {
        height: 280px;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-overlay {
        padding: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Video player responsive */
    .video-player-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .video-player-container {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .play-btn-circle {
        width: 56px;
        height: 56px;
    }
    
    .play-btn-circle i {
        font-size: 1.25rem;
    }
    
    .video-player-actions {
        flex-direction: column;
    }
    
    .vp-action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .cat-tab {
        padding: 0.625rem 1rem;
    }
    
    .cat-name {
        display: none;
    }
    
    .cat-tab.active .cat-name {
        display: inline;
    }
    
    .hero-image {
        height: 220px;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .hero-excerpt {
        display: none;
    }
    
    .play-btn-label {
        display: none;
    }
    
    .media-type-badge-row {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================
   PAGINATION BAR
   ============================================ */

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.pagination-info {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}

.page-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(16,185,129,0.3);
    cursor: default;
}

.page-btn.page-nav {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
    color: #64748b;
    font-size: 0.7rem;
}

.page-btn.page-nav:hover:not(:disabled) {
    background: rgba(16,185,129,0.12);
    border-color: rgba(16,185,129,0.25);
    color: #10b981;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #475569;
    font-size: 0.85rem;
    padding: 0 0.25rem;
    user-select: none;
}

/* ============================================
   BOOKMARK ACTIVE STATE (FAVORIS)
   ============================================ */

/* Hero actions - favori actif */
.hero-actions .bookmark-active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.25) !important;
}

.hero-actions .bookmark-active:hover {
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.35) !important;
}

/* Card actions - favori actif */
.card-actions .bookmark-active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.15) !important;
}

.card-actions .bookmark-active:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #fbbf24 !important;
}

/* Video player - favori actif */
.vp-bookmark-active {
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.vp-bookmark-active:hover {
    color: #fbbf24 !important;
    background: rgba(245, 158, 11, 0.2) !important;
}

/* Animation de transition favori */
.hero-actions button[ng-click*="toggleBookmark"] i,
.card-actions button[ng-click*="toggleBookmark"] i {
    transition: transform 0.2s ease, color 0.2s ease;
}

.hero-actions .bookmark-active i,
.card-actions .bookmark-active i {
    transform: scale(1.15);
}

/* Bouton désactivé pendant le chargement */
.hero-actions button:disabled,
.card-actions button:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* ── Responsive pagination ── */
@media (max-width: 768px) {
    .pagination-bar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .pagination-info {
        font-size: 0.75rem;
    }
}


/* ════════════════════════════════════════════════════
   DAILY PULSE WIDGET — V6
   ════════════════════════════════════════════════════ */

.pulse-section {
    background: linear-gradient(135deg, #0f1a2e 0%, #1a2234 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s;
}

.pulse-section:hover {
    border-color: rgba(16, 185, 129, 0.45);
}

/* ── Header ────────────────────────────────────── */
.pulse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.pulse-header:hover {
    background: rgba(16, 185, 129, 0.05);
}

.pulse-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pulse-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

/* ── Indicateur pulsant ────────────────────────── */
.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #475569;
    flex-shrink: 0;
}

.pulse-indicator.pulse-active {
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.4); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0); }
}

/* ── Titre ─────────────────────────────────────── */
.pulse-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pulse-title i {
    color: #10b981;
    font-size: 0.85rem;
}

.pulse-age {
    font-size: 0.75rem;
    color: #64748b;
}

/* ── Badges stats rapides (toujours visibles) ───── */
.pulse-quick-stats {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.pulse-stat-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid;
}

.pulse-badge-green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.pulse-badge-blue {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.pulse-badge-purple {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

/* ── Chevron animé ─────────────────────────────── */
.pulse-chevron {
    transition: transform 0.25s ease;
    color: #64748b;
    font-size: 0.75rem;
}

/* ── Body collapsible ──────────────────────────── */
.pulse-body {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    animation: pulse-body-in 0.25s ease;
}

@keyframes pulse-body-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pulse-body-inner {
    display: flex;
    gap: 0;
    padding: 0;
    min-height: 200px;
}

/* ── Colonnes ──────────────────────────────────── */
.pulse-col {
    padding: 1.25rem;
}

.pulse-col-articles {
    flex: 1.6;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.pulse-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pulse-separator {
    /* fallback si border-right n'est pas supporté */
    width: 0;
}

.pulse-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pulse-col-title i {
    color: #10b981;
}

.pulse-col-title-sm {
    margin-top: 0;
}

/* ── Articles impact ───────────────────────────── */
.pulse-article {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.pulse-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pulse-article:first-child {
    padding-top: 0;
}

/* Score badge */
.pulse-article-score {
    flex-shrink: 0;
    min-width: 44px;
    text-align: center;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.impact-high {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.impact-med {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.impact-low {
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Contenu article */
.pulse-article-content {
    flex: 1;
    min-width: 0;
}

.pulse-article-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    transition: color 0.2s;
}

.pulse-article-title:hover {
    color: #10b981;
}

.pulse-article-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: #64748b;
}

.pulse-source {
    color: #10b981;
    font-weight: 500;
}

.pulse-dot {
    opacity: 0.4;
}

.pulse-numbers {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.68rem;
}

/* Miniature */
.pulse-article-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 40px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    opacity: 0.8;
}

/* ── Trending keywords ─────────────────────────── */
.pulse-trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.pulse-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.72rem;
    color: #94a3b8;
    cursor: default;
    transition: all 0.2s;
}

.pulse-tag:first-child {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.25);
    color: #a78bfa;
}

.pulse-tag small {
    opacity: 0.55;
    font-size: 0.6rem;
    font-variant-numeric: tabular-nums;
}

/* ── Collections actives ───────────────────────── */
.pulse-col-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pulse-col-item:last-child {
    border-bottom: none;
}

.pulse-col-name {
    font-size: 0.78rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.pulse-col-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.pulse-col-new {
    color: #10b981;
    font-weight: 700;
}

.pulse-col-total {
    color: #475569;
}

.pulse-spike-icon {
    color: #f59e0b;
    font-size: 0.65rem;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .pulse-body-inner {
        flex-direction: column;
    }
    .pulse-col-articles {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .pulse-quick-stats {
        display: none;
    }
    .pulse-header-left {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .pulse-article-thumb {
        display: none;
    }
    .pulse-article-score {
        min-width: 36px;
        font-size: 0.65rem;
    }
}

/* ════════════════════════════════════════════════════
   SIGNALS TABS — V17
   Onglets Signaux Aldon | Pulse IA dans le header
   ════════════════════════════════════════════════════ */

.signals-tabs {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.signals-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
}

.signals-tab-btn:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
}

.signals-tab-btn.active {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.signals-tab-btn i {
    font-size: 0.65rem;
}

/* Bouton IA — accent violet/vert dégradé */
.signals-tab-btn-ai {
    letter-spacing: 0.01em;
}

.signals-tab-btn-ai.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(16, 185, 129, 0.12));
    color: #a78bfa;
    border-color: rgba(139, 92, 246, 0.28);
}

.signals-tab-lock {
    font-size: 0.58rem;
    color: #475569;
    margin-left: 1px;
}

/* Badges supplémentaires dans le header */
.pulse-badge-ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(16, 185, 129, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.pulse-badge-preview {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    font-size: 0.68rem;
}

/* ════════════════════════════════════════════════════
   AI PULSE TAB — CONTENU
   ════════════════════════════════════════════════════ */

.ai-pulse-tab-content {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    animation: pulse-body-in 0.25s ease;
}

/* ── États vides ─────────────────────────────────── */
.ai-pulse-loading-state,
.ai-pulse-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
    color: #475569;
    font-size: 0.85rem;
    text-align: center;
}

.ai-pulse-loading-state i,
.ai-pulse-empty-state i {
    font-size: 1.5rem;
    color: #334155;
}

.ai-pulse-empty-state small {
    color: #334155;
    font-size: 0.78rem;
}

/* ── Contenu principal ───────────────────────────── */
.ai-pulse-content {
    position: relative;
}

/* Floutage pour l'aperçu free */
.ai-pulse-blurred {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    max-height: 340px;
    overflow: hidden;
}

/* ── Intro éditoriale ────────────────────────────── */
.ai-pulse-intro {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(16, 185, 129, 0.04));
}

.ai-pulse-intro-icon {
    color: rgba(139, 92, 246, 0.5);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-pulse-intro p {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.65;
    margin: 0 0 0.5rem;
    font-style: italic;
    flex: 1;
}

.ai-pulse-intro-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ai-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: #475569;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 0.15rem 0.5rem;
}

.ai-model-badge i {
    font-size: 0.6rem;
    color: #10b981;
}

.ai-window-badge {
    font-size: 0.68rem;
    color: #64748b;
}

/* ── Articles IA ─────────────────────────────────── */
.ai-pulse-articles {
    display: flex;
    gap: 0;
    padding: 0;
}

.ai-pulse-col {
    flex: 1;
    padding: 1.125rem 1.25rem;
    min-width: 0;
}

.ai-pulse-col:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Article IA row */
.ai-art {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-art:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ai-art:first-child {
    padding-top: 0;
}

/* Rank badge */
.ai-art-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #475569;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.ai-art-body {
    flex: 1;
    min-width: 0;
}

/* Meta ligne */
.ai-art-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.ai-art-fscore {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
    opacity: 0.8;
}

/* Stat badge vert */
.ai-art-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.18rem 0.55rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    margin: 0.3rem 0 0.25rem;
}

.ai-art-stat i {
    font-size: 0.58rem;
    opacity: 0.7;
}

/* Teaser */
.ai-art-teaser {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0.2rem 0 0.2rem;
}

/* Why it matters */
.ai-art-why {
    font-size: 0.71rem;
    color: #475569;
    font-style: italic;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    line-height: 1.5;
}

.ai-art-why i {
    font-size: 0.62rem;
    color: #f59e0b;
    opacity: 0.7;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   AI LOCK OVERLAY — Utilisateurs Free
   ════════════════════════════════════════════════════ */

.ai-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(10, 15, 30, 0.7) 25%,
        rgba(10, 15, 30, 0.96) 60%,
        rgba(10, 15, 30, 0.98) 100%
    );
    z-index: 10;
    border-radius: 0 0 15px 15px;
}

.ai-lock-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.75rem 2rem;
    max-width: 380px;
}

.ai-lock-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
}

.ai-lock-icon-wrap i {
    font-size: 1.1rem;
    background: linear-gradient(135deg, #a78bfa, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-lock-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 0.5rem;
}

.ai-lock-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 0.875rem;
}

.ai-lock-features {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
    width: 100%;
    max-width: 240px;
}

.ai-lock-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: #94a3b8;
}

.ai-lock-features span i {
    color: #10b981;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.ai-nudge-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: #10b981;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.ai-nudge-cta:hover {
    background: #0ea371;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.ai-nudge-cta i {
    font-size: 0.75rem;
}

/* ── Responsive AI Pulse ─────────────────────────── */
@media (max-width: 768px) {
    .ai-pulse-articles {
        flex-direction: column;
    }
    .ai-pulse-col:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .signals-tabs {
        display: none; /* Masqué sur mobile — trop étroit dans le header */
    }
    .ai-art-teaser,
    .ai-art-why {
        display: none;
    }
}

/* ════════════════════════════════════════════════════
   KPI SECTION "VOTRE RADAR" — V2
   ════════════════════════════════════════════════════ */

.kpi-section {
    margin-bottom: 1.5rem;
}

.kpi-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 0.875rem;
}

/* Grille KPI — réutilise le layout .stats-grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
}

/* Carte KPI — étend les styles .stat-card existants */
.kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: default;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: visible; /* permet au tooltip de déborder */
}

.kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Supprimer les bordures colorées — l'icône suffit à l'identification visuelle */
.kpi-card.stat-green,
.kpi-card.stat-blue,
.kpi-card.stat-purple,
.kpi-card.stat-orange {
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* ── Tooltip KPI ────────────────────────────────── */
.kpi-tooltip {
    position: absolute;
    top: 100%;           /* Collé directement sous la carte — ZERO gap externe */
    left: 0;
    min-width: 240px;
    max-width: 280px;
    background: #1a1f2e;
    border: 1px solid #2d3748;
    border-radius: 10px;
    padding: 1rem 1rem 0.875rem; /* padding-top absorbe l'espace visuel */
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(2px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

/* Pont invisible de 8px entre la carte et le tooltip — empêche la zone morte */
.kpi-card::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    z-index: 199;
}

/* Trigger combiné : hover carte OU hover tooltip lui-même */
.kpi-card:hover .kpi-tooltip,
.kpi-card .kpi-tooltip:hover {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
    transform: translateY(0);
}

/* Éviter débordement sur les cartes de droite */
.kpi-card:nth-child(3) .kpi-tooltip,
.kpi-card:nth-child(4) .kpi-tooltip {
    left: auto;
    right: 0;
}

/* Petite flèche vers le haut */
.kpi-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 16px;
    width: 10px;
    height: 10px;
    background: #1a1f2e;
    border-left: 1px solid #2d3748;
    border-top: 1px solid #2d3748;
    transform: rotate(45deg);
}

.kpi-card:nth-child(3) .kpi-tooltip::before,
.kpi-card:nth-child(4) .kpi-tooltip::before {
    left: auto;
    right: 16px;
}

.kpi-tooltip-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.kpi-tooltip-text {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 0.625rem;
}

.kpi-tooltip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 6px;
    color: #10b981;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: left;
    white-space: nowrap;
    text-decoration: none;
}

.kpi-tooltip-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
    text-decoration: none;
}

/* ════════════════════════════════════════════════════
   SKELETON LOADER — Articles collections
   ════════════════════════════════════════════════════ */

@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.articles-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skeleton-card {
    background: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(90deg, #1e293b 25%, #243044 50%, #1e293b 75%);
    background-size: 400px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-line {
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1e293b 25%, #243044 50%, #1e293b 75%);
    background-size: 400px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-line-title  { height: 14px; width: 90%; }
.skeleton-line-short  { width: 70%; }
.skeleton-line-xshort { width: 45%; }

/* ── Section Actualités : titre dynamique (Modif 1A V3) ── */
.section-header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.section-source-badge { display: inline-flex; align-items: center; gap: .35rem; margin-left: .75rem;
    padding: .2rem .6rem; background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2);
    border-radius: 20px; font-size: .7rem; font-weight: 600; color: #10b981; vertical-align: middle; }
.section-source-badge i { font-size: .65rem; }
.section-freshness-hint { font-size: .75rem; color: #64748b; display: flex; align-items: center; gap: .35rem; }

/* ── Modif 1 : Signaux du jour — sous-titre collapsé ── */
.pulse-subtitle-hint {
    font-size: 11px;
    color: #64748b;
    margin-left: 10px;
    font-style: italic;
}

/* ── Modif 2 : Revue de presse — sous-titre section ── */
.revue-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
    font-style: italic;
}

/* ── Modif 3 : Badge nouveaux articles (onglets collections) ── */
.cat-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    margin-left: 5px;
    line-height: 1;
}

/* ── Modif 5 : CTA "Voir tous les articles" ── */
.revue-cta-row {
    display: flex;
    justify-content: center;
    padding: 16px 0 4px;
}

.revue-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #1e2d42;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.revue-cta-btn:hover {
    background: #1e2d42;
    color: #10b981;
    border-color: #10b981;
}

.revue-cta-btn .fa-bolt {
    color: #10b981;
    font-size: 11px;
}

.revue-cta-btn .fa-arrow-right {
    font-size: 11px;
    opacity: 0.6;
}

.revue-cta-count {
    font-size: 11px;
    padding: 2px 7px;
    background: #10b981;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
}

/* ── Quota label sous le chiffre KPI ── */
.stat-quota-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 400;
    margin-left: 2px;
}

/* ── Barre de progression quota dans KPI card ── */
.stat-quota-bar {
    width: 100%;
    height: 3px;
    background: #1e2d42;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.stat-quota-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.quota-fill-ok      { background: #10b981; }
.quota-fill-warning { background: #f59e0b; }
.quota-fill-danger  { background: #ef4444; }

/* ── Nudge upgrade ── */
.upgrade-nudge {
    margin: 8px 0 16px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.06);
    animation: fadeInDown 0.3s ease;
}

.nudge-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    flex-wrap: wrap;
}

.nudge-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.nudge-text {
    font-size: 13px;
    color: #94a3b8;
    flex: 1;
    min-width: 200px;
}

.nudge-text strong {
    color: #f59e0b;
}

.nudge-cta {
    display: inline-block;
    padding: 6px 14px;
    background: #f59e0b;
    color: #0a0f1a;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}

.nudge-cta:hover {
    background: #d97706;
    color: #0a0f1a;
}

.nudge-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.nudge-close:hover { color: #94a3b8; }

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

/* ══════════════════════════════════════════════════════════════
   BOOKMARK MODAL (Dashboard)
   ══════════════════════════════════════════════════════════════ */

.dash-bookmark-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: 1100;
    animation: dashBmFadeIn 0.15s ease-out;
}

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

.dash-bookmark-modal {
    background: #1a2234;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: dashBmSlideUp 0.2s ease-out;
}

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

.dash-bookmark-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
}

.dash-bookmark-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dash-bookmark-modal-header h3 i {
    color: #10b981;
}

.dash-bookmark-close {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}

.dash-bookmark-close:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

/* Article preview */
.dash-bookmark-preview {
    padding: 0 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-bookmark-preview-title {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-bookmark-preview-source {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* Listes */
.dash-bookmark-lists {
    padding: 12px 24px;
}

.dash-bookmark-lists-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 8px;
}

.dash-bookmark-quota-hint {
    font-size: 11px;
    color: #64748b;
    padding: 0 0 6px;
    text-align: right;
}

.dash-bookmark-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.dash-bookmark-list-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dash-bookmark-list-item.active {
    background: rgba(16, 185, 129, 0.08);
}

.dash-bookmark-list-check {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    color: transparent;
    transition: all 0.15s;
}

.dash-bookmark-list-item.active .dash-bookmark-list-check {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.dash-bookmark-list-emoji { font-size: 16px; }

.dash-bookmark-list-name {
    flex: 1;
    font-size: 14px;
    color: white;
}

.dash-bookmark-list-count {
    font-size: 11px;
    color: #64748b;
    min-width: 20px;
    text-align: right;
}

.dash-bookmark-list-loading {
    font-size: 12px;
    color: #10b981;
}

.dash-bookmark-empty {
    text-align: center;
    padding: 24px 0;
    color: #64748b;
}

.dash-bookmark-empty i { font-size: 24px; margin-bottom: 8px; display: block; }
.dash-bookmark-empty p { font-size: 13px; margin: 0; }

/* Créer une liste */
.dash-bookmark-create {
    padding: 12px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-bookmark-create-input {
    display: flex;
    gap: 8px;
}

.dash-bookmark-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    background: #0a1019;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f1f5f9;
    outline: none;
    transition: border-color 0.2s;
}

.dash-bookmark-input:focus {
    border-color: #10b981;
}

.dash-bookmark-input::placeholder {
    color: #64748b;
}

.dash-bookmark-create-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #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;
}

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

@media (max-width: 480px) {
    .dash-bookmark-modal { width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; }
}
