/* ═══════════════════════════════════════════════════════════════
   WEEKLY DIGEST — ProductiveApp v1.0
   Panel intégré au dashboard
   ═══════════════════════════════════════════════════════════════ */

.wd-panel {
    border-radius: 20px;
    background: linear-gradient(155deg,
        rgba(15, 20, 38, 0.95) 0%,
        rgba(22, 30, 55, 0.95) 50%,
        rgba(12, 16, 32, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(99, 102, 241, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 24px;
    margin-bottom: 20px;
    animation: wd-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wd-slide-in {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.wd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.wd-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wd-icon {
    font-size: 24px;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wd-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}
.wd-period {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}
.wd-close {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-out, background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out, opacity 0.2s ease-out;
}
.wd-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

/* Stats Grid */
.wd-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.wd-stat {
    text-align: center;
    padding: 14px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease-out, background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out, opacity 0.2s ease-out;
}
.wd-stat:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
}
.wd-stat-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}
.wd-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}
.wd-stat-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 3px;
    font-weight: 500;
}

/* Metrics */
.wd-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.wd-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}
.wd-metric-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}
.wd-metric-value {
    font-size: 14px;
    font-weight: 700;
    color: rgba(167, 139, 250, 0.9);
}

/* Progress bar */
.wd-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 12px;
    overflow: hidden;
}
.wd-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Insights */
.wd-insights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.wd-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.1);
}
.wd-insight-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.wd-insight-text {
    flex: 1;
    min-width: 0;
}
.wd-insight-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
}
.wd-insight-text p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}

/* Mobile */
@media (max-width: 768px) {
    .wd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wd-panel {
        padding: 18px;
        border-radius: 16px;
    }
}
