/**
 * 🎨 Dashboard Premium Design
 * Design moderne et professionnel pour le tableau de bord
 */

/* ========== VARIABLES ========== */
:root {
    --dash-primary: #6366f1;
    --dash-primary-dark: #4f46e5;
    --dash-success: #10b981;
    --dash-success-light: rgba(16, 185, 129, 0.1);
    --dash-warning: #f59e0b;
    --dash-danger: #ef4444;
    --dash-info: #3b82f6;
    --dash-dark: #0f172a;
    --dash-gray: #64748b;
    --dash-light: #f8fafc;
    --dash-border: #e2e8f0;
    --dash-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dash-gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --dash-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --dash-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --dash-shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* ========== SECTION PRINCIPALE ========== */
.dashboard-section {
    background: linear-gradient(180deg, #f0f4ff 0%, #f8fafc 100%) !important;
    min-height: 100vh;
    padding: 7rem 0 4rem 0 !important;
}

/* ========== HERO STATS ========== */
.dashboard-stats {
    background: var(--dash-gradient-dark) !important;
    border-radius: 24px !important;
    padding: 2.5rem !important;
    margin-bottom: 2rem !important;
    position: relative;
    overflow: hidden;
    box-shadow: var(--dash-shadow-lg), var(--dash-shadow-glow) !important;
}

.dashboard-stats::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.dashboard-stats::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 40%;
    height: 150%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.dashboard-stat {
    position: relative;
    z-index: 1;
    padding: 1rem 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.dashboard-stat:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.dashboard-stat-value {
    font-size: 3rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.dashboard-stat-label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

/* ========== ACTIONS BAR ========== */
.actions-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--dash-shadow);
}

.actions-bar .btn {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.actions-bar .btn-primary {
    background: var(--dash-gradient) !important;
    border: none !important;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.actions-bar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.actions-bar .btn-secondary {
    background: white !important;
    border: 2px solid var(--dash-border) !important;
    color: var(--dash-gray) !important;
}

.actions-bar .btn-secondary:hover {
    border-color: var(--dash-primary) !important;
    color: var(--dash-primary) !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

/* ========== GRILLE DES SITES ========== */
.websites-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    gap: 1.5rem !important;
}

/* ========== CARTE SITE WEB PREMIUM ========== */
.website-card {
    background: white !important;
    border-radius: 20px !important;
    padding: 0 !important;
    box-shadow: var(--dash-shadow) !important;
    border: 1px solid var(--dash-border) !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
}

.website-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--dash-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.website-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--dash-shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1) !important;
}

.website-card:hover::before {
    opacity: 1;
}

/* Header de la carte */
.website-card-header,
.website-card .website-header {
    padding: 1.5rem 1.5rem 1rem !important;
    border-bottom: 1px solid var(--dash-border);
    background: linear-gradient(180deg, #fafbfc 0%, white 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.website-card-header .website-info h3,
.website-card .website-header h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--dash-dark) !important;
    margin-bottom: 0.35rem !important;
    margin: 0 0 0.35rem 0 !important;
}

.website-card-header .website-url,
.website-card .website-url {
    font-size: 0.8rem !important;
    color: var(--dash-gray) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.website-card .website-url::before {
    content: '🔗';
    font-size: 0.7rem;
}

/* Status Badge Premium */
.website-status {
    padding: 0.35rem 0.85rem !important;
    border-radius: 20px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
}

.status-completed {
    background: var(--dash-success-light) !important;
    color: var(--dash-success) !important;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1) !important;
    color: var(--dash-warning) !important;
}

.status-analyzing {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--dash-info) !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Stats de la carte */
.website-card .stats-row,
.website-card .card-stats,
.website-card .website-stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 !important;
    padding: 1rem 0 !important;
    margin: 0 1.5rem !important;
    border-bottom: 1px solid var(--dash-border);
}

.website-card .stat-item,
.website-card .stat {
    text-align: center;
    padding: 0.75rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.website-card .stat-item:first-child,
.website-card .stat:first-child {
    border-right: 1px solid var(--dash-border);
}

.website-card .stat-item .stat-label,
.website-card .stat .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dash-gray);
    font-weight: 600;
    margin-bottom: 0.35rem;
    order: -1;
}

.website-card .stat-item .stat-value,
.website-card .stat .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dash-dark);
}

/* Score SEO avec gradient */
.website-card .score-display,
.website-card .seo-score {
    padding: 1rem 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
}

.website-card .score-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dash-gray);
    font-weight: 600;
}

.website-card .score-value {
    font-size: 1.75rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
}

.website-card .score-value.score-good,
.website-card .stat-value.score-excellent,
.website-card .stat-value.score-good {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.website-card .score-value.score-average,
.website-card .stat-value.score-average {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.website-card .score-value.score-bad,
.website-card .stat-value.score-poor {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Visites mensuelles */
.website-card .visits-row {
    padding: 0.75rem 1.5rem;
    background: rgba(16, 185, 129, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.website-card .visits-row .visits-icon {
    font-size: 1rem;
}

.website-card .visits-row .visits-value {
    font-weight: 700;
    color: var(--dash-success);
    font-size: 1.1rem;
}

.website-card .visits-row .visits-label {
    color: var(--dash-gray);
    font-size: 0.8rem;
}

/* Actions de la carte */
.website-card .card-actions,
.website-card .website-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    padding: 1.25rem 1.5rem !important;
    background: #fafbfc;
}

.website-card .card-actions button,
.website-card .card-actions a,
.website-card .website-actions button,
.website-card .website-actions a {
    padding: 0.75rem 1rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.website-card .btn-audit,
.website-card .card-actions button:first-child,
.website-card .website-actions button:first-child,
.website-card .btn-primary {
    background: var(--dash-gradient) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.website-card .btn-audit:hover,
.website-card .card-actions button:first-child:hover,
.website-card .website-actions button:first-child:hover,
.website-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.website-card .btn-analyze,
.website-card .card-actions button:last-child,
.website-card .website-actions button:last-child,
.website-card .btn-secondary {
    background: white !important;
    color: var(--dash-dark) !important;
    border: 2px solid var(--dash-border) !important;
}

.website-card .btn-analyze:hover,
.website-card .card-actions button:last-child:hover,
.website-card .website-actions button:last-child:hover,
.website-card .btn-secondary:hover {
    border-color: var(--dash-primary) !important;
    color: var(--dash-primary) !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: var(--dash-shadow);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.empty-state h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dash-dark);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--dash-gray);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.empty-state .btn {
    background: var(--dash-gradient) !important;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* ========== PROJECTION DE CROISSANCE ========== */
.growth-projection-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--dash-shadow-lg), 0 0 60px rgba(99, 102, 241, 0.1) !important;
}

.growth-projection-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: 24px;
}

.growth-cards {
    grid-template-columns: repeat(4, 1fr) !important;
}

.growth-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(10px);
}

.growth-card.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* ========== MODALES ========== */
.modal-content {
    border-radius: 24px !important;
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.modal-header {
    padding: 1.5rem 2rem !important;
    border-bottom: 1px solid var(--dash-border) !important;
    background: linear-gradient(180deg, #fafbfc 0%, white 100%) !important;
    border-radius: 24px 24px 0 0 !important;
}

.modal-header h2 {
    font-weight: 700 !important;
    color: var(--dash-dark) !important;
}

.modal-body {
    padding: 2rem !important;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px !important;
    background: var(--dash-light) !important;
    border: none !important;
    font-size: 1.25rem !important;
    color: var(--dash-gray) !important;
    transition: all 0.2s ease !important;
}

.modal-close:hover {
    background: var(--dash-danger) !important;
    color: white !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .growth-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .websites-grid {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-stats {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1.5rem !important;
    }
    
    .dashboard-stat {
        padding: 1rem !important;
    }
    
    .dashboard-stat-value {
        font-size: 2rem !important;
    }
    
    .actions-bar {
        flex-direction: column;
    }
    
    .growth-cards {
        grid-template-columns: 1fr !important;
    }
    
    .website-card .card-actions {
        grid-template-columns: 1fr !important;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.website-card {
    animation: fadeInUp 0.5s ease-out;
}

.website-card:nth-child(2) { animation-delay: 0.1s; }
.website-card:nth-child(3) { animation-delay: 0.2s; }
.website-card:nth-child(4) { animation-delay: 0.3s; }
.website-card:nth-child(5) { animation-delay: 0.4s; }
.website-card:nth-child(6) { animation-delay: 0.5s; }

/* ========== SCROLLBAR CUSTOM ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dash-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--dash-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dash-gray);
}

