/* Dashboard Styles */
.dashboard-main {
    margin-top: 70px;
    padding: 30px 0;
    background: #f8f9fa;
    min-height: calc(100vh - 70px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: #333;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.kpi-icon {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 10px;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
}

.kpi-label {
    color: #666;
    margin: 5px 0;
}

.kpi-trend {
    font-size: 0.9rem;
    font-weight: 600;
}

.kpi-trend.positive {
    color: #10b981;
}

.kpi-trend.negative {
    color: #ef4444;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.chart-card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.chart-card canvas {
    max-height: 300px;
    margin: 10px 0;
}

/* AI Suggestions */
.ai-suggestions {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.ai-suggestions h3 {
    color: #333;
    margin-bottom: 25px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.suggestion-card {
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.suggestion-card.critical {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.suggestion-card.important {
    border-left-color: #f59e0b;
    background: #fef3c7;
}

.suggestion-card.info {
    border-left-color: #2563eb;
    background: #f0f9ff;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.suggestion-header h4 {
    margin: 0;
    color: #333;
}

.suggestion-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.suggestion-actions {
    display: flex;
    gap: 10px;
}

/* Sites Monitoring */
.sites-monitoring {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sites-monitoring h3 {
    color: #333;
    margin-bottom: 25px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.site-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.site-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
}

.site-url {
    font-weight: 600;
    color: #333;
}

.site-score {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.site-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.metric {
    text-align: center;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2563eb;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-small {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: white;
    border: 1px solid #e5e7eb;
    color: #666;
}

.btn-small:hover {
    background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations pour les notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification {
    animation: slideIn 0.3s ease-out;
}

/* Sites surveillés */
.sites-monitoring {
    margin-top: 40px;
}

.sites-monitoring h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.site-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.site-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

.site-url {
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
}

.site-score {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 50px;
    text-align: center;
}

.score-excellent { background: #d1fae5; color: #065f46; }
.score-good { background: #fef3c7; color: #92400e; }
.score-average { background: #fed7aa; color: #9a3412; }
.score-poor { background: #fecaca; color: #991b1b; }

.site-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.trend-positive {
    color: #059669;
}

.trend-negative {
    color: #dc2626;
}

.status-active {
    color: #059669;
}

.status-inactive {
    color: #dc2626;
}

.site-issues {
    margin-bottom: 15px;
}

.issues-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.issues-list {
    margin: 8px 0 0 20px;
    padding: 0;
}

.issues-list li {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 3px;
}

.site-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-sm {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary.btn-sm {
    background: #2563eb;
    color: white;
}

.btn-primary.btn-sm:hover {
    background: #1d4ed8;
}

.btn-secondary.btn-sm {
    background: #6b7280;
    color: white;
}

.btn-secondary.btn-sm:hover {
    background: #4b5563;
}

.btn-danger.btn-sm {
    background: #dc2626;
    color: white;
}

.btn-danger.btn-sm:hover {
    background: #b91c1c;
}

.site-footer {
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.site-footer small {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Mots-clés en progression */
.keywords-list {
    max-height: 300px;
    overflow-y: auto;
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.keyword-info {
    flex: 1;
}

.keyword-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.keyword-meta {
    font-size: 0.8rem;
    color: #666;
}

.keyword-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend-change {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.trend-change.negative {
    background: #fecaca;
    color: #991b1b;
}
