/* ===== STYLES SPÉCIFIQUES AU DASHBOARD ===== */

/* Layout principal du dashboard */
.plusmoins-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Grille de layout avancée */
.dashboard-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-sidebar {
    background: var(--neutral-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Cartes de statistiques améliorées */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--neutral-white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card.energy { border-left-color: var(--energy-color); }
.stat-card.insurance { border-left-color: var(--insurance-color); }
.stat-card.travel { border-left-color: var(--travel-color); }
.stat-card.subscriptions { border-left-color: var(--primary-blue); }

.stat-card.energy::before { background: linear-gradient(90deg, var(--energy-color), #fbbf24); }
.stat-card.insurance::before { background: linear-gradient(90deg, var(--insurance-color), #34d399); }
.stat-card.travel::before { background: linear-gradient(90deg, var(--travel-color), #06b6d4); }
.stat-card.subscriptions::before { background: linear-gradient(90deg, var(--primary-blue), #3b82f6); }

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--neutral-dark), #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.energy .stat-value { 
    background: linear-gradient(135deg, var(--energy-color), #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card.insurance .stat-value { 
    background: linear-gradient(135deg, var(--insurance-color), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card.travel .stat-value { 
    background: linear-gradient(135deg, var(--travel-color), #0e7490);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--neutral-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Section objectifs */
.goals-section {
    background: var(--neutral-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.goals-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 2rem;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.goal-card {
    border: 1px solid var(--neutral-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.goal-card.completed {
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    border-color: #10b981;
}

.goal-card.in-progress {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border-color: #f59e0b;
}

.goal-card.pending {
    background: var(--neutral-white);
}

.goal-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.goal-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--neutral-dark);
}

.goal-description {
    color: var(--neutral-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.goal-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    background: var(--neutral-light);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-teal));
    transition: width 0.5s ease;
}

.goal-card.completed .progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.goal-card.in-progress .progress-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-text {
    font-size: 0.8rem;
    color: var(--neutral-gray);
    text-align: center;
}

.goal-actions {
    margin-top: 1rem;
}

/* Historique des activités */
.activity-timeline {
    background: var(--neutral-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--neutral-light);
    position: relative;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: 3px solid var(--neutral-white);
    box-shadow: 0 0 0 2px var(--primary-blue);
}

.timeline-item.savings::before { background: var(--accent-green); box-shadow: 0 0 0 2px var(--accent-green); }
.timeline-item.travel::before { background: var(--travel-color); box-shadow: 0 0 0 2px var(--travel-color); }
.timeline-item.energy::before { background: var(--energy-color); box-shadow: 0 0 0 2px var(--energy-color); }

.timeline-icon {
    font-size: 1.2rem;
    width: 40px;
    text-align: center;
    margin-left: 0.5rem;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--neutral-dark);
}

.timeline-description {
    color: var(--neutral-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--neutral-gray);
}

.timeline-amount {
    font-weight: 600;
    color: var(--accent-green);
}

/* Badges et récompenses */
.badges-section {
    background: var(--neutral-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.badge-item {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.badge-item.earned {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 2px solid #f59e0b;
}

.badge-item.locked {
    background: var(--neutral-light);
    border: 2px solid var(--neutral-light);
    opacity: 0.6;
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: grayscale(1);
}

.badge-item.earned .badge-icon {
    filter: none;
}

.badge-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--neutral-dark);
}

.badge-item.locked .badge-name {
    color: var(--neutral-gray);
}

/* Widgets sidebar */
.sidebar-widget {
    background: var(--neutral-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-light);
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h4 {
    color: var(--neutral-dark);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--neutral-light);
}

.quick-stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--neutral-gray);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--neutral-dark);
}

/* Cartes d'actions rapides */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.quick-action {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-action:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.quick-action.energy { background: var(--energy-color); }
.quick-action.insurance { background: var(--insurance-color); }
.quick-action.travel { background: var(--travel-color); }
.quick-action.settings { background: var(--neutral-gray); }

.quick-action.energy:hover { background: #d97706; }
.quick-action.insurance:hover { background: #059669; }
.quick-action.travel:hover { background: #0e7490; }
.quick-action.settings:hover { background: #4b5563; }

/* Éléments interactifs */
.calculator-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.calculator-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 0.8rem;
    color: white;
    width: 100%;
    margin-bottom: 1rem;
}

.calculator-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.calculator-result {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

/* Animations spécifiques */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

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

.animate-slide-in {
    animation: slideInUp 0.6s ease-out;
}

/* États de chargement */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive dashboard */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-sidebar {
        position: static;
        order: 2;
    }
    
    .dashboard-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-item::before {
        display: none;
    }
}