/* =====================================================
   VISION IMPACT CONSULTING — CSS Principal
   consulting.visionimpact.pro
   ===================================================== */

:root {
    --primary:    #174FA2;
    --primary-dk: #0f3a7a;
    --secondary:  #F26722;
    --secondary-dk:#d4551a;
    --dark:       #0a1628;
    --light:      #f8fafc;
    --success:    #10b981;
    --warning:    #f59e0b;
    --danger:     #ef4444;
    --info:       #0891b2;
    --text:       #0f172a;
    --text-muted: #64748b;
    --border:     #e2e8f0;
    --radius:     12px;
    --radius-lg:  20px;
    --shadow:     0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHIE ===== */
h1,h2,h3,h4,h5,h6 { font-weight: 800; letter-spacing: -0.3px; }
.fw-900 { font-weight: 900 !important; }
.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }

/* ===== BOUTONS ===== */
.btn-vic-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dk));
    color: white; border: none; border-radius: var(--radius);
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    text-decoration: none; transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(23,79,162,0.3);
    font-family: inherit;
}
.btn-vic-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(23,79,162,0.4);
    color: white;
}

.btn-vic-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dk));
    color: white; border: none; border-radius: var(--radius);
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    text-decoration: none; transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(242,103,34,0.3);
    font-family: inherit;
}
.btn-vic-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(242,103,34,0.4);
    color: white;
}

.btn-vic-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: transparent; color: var(--primary);
    border: 2px solid var(--primary); border-radius: var(--radius);
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    text-decoration: none; transition: all 0.25s;
    font-family: inherit;
}
.btn-vic-outline:hover {
    background: var(--primary); color: white;
}

/* ===== CARTES ===== */
.vic-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.vic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* ===== FORMULAIRES ===== */
.vic-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s;
    color: var(--text);
    background: #f8fafc;
}
.vic-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(23,79,162,0.08);
}

.vic-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 0.4rem;
}

.vic-form-group { margin-bottom: 1.25rem; }

/* ===== BADGES ===== */
.vic-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.vic-badge-primary   { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }
.vic-badge-success   { background: #f0fdf4; color: #065f46; border: 1px solid #a7f3d0; }
.vic-badge-warning   { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.vic-badge-danger    { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.vic-badge-secondary { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.vic-badge-purple    { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.vic-badge-gray      { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

/* ===== STATUTS ===== */
.status-dot {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; font-weight: 600;
}
.status-dot::before {
    content: ''; width: 8px; height: 8px;
    border-radius: 50%; flex-shrink: 0;
}
.status-active::before    { background: var(--success); }
.status-pending::before   { background: var(--warning); }
.status-draft::before     { background: #94a3b8; }
.status-sent::before      { background: var(--info); }
.status-accepted::before  { background: var(--success); }
.status-declined::before  { background: var(--danger); }
.status-paid::before      { background: var(--success); }
.status-overdue::before   { background: var(--danger); }
.status-completed::before { background: var(--success); }
.status-cancelled::before { background: var(--danger); }
.status-in_progress::before { background: var(--info); }

/* ===== TABLEAUX ===== */
.vic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.vic-table th {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.vic-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text);
    vertical-align: middle;
}
.vic-table tr:hover td { background: #f8fafc; }
.vic-table tr:last-child td { border-bottom: none; }

/* ===== STATS CARDS ===== */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-card .stat-change {
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 0.5rem;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.section-title-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ===== PAGINATION ===== */
.vic-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.vic-pagination a, .vic-pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: white;
}
.vic-pagination a:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.vic-pagination .active { background: linear-gradient(135deg,var(--primary),var(--primary-dk)); color: white; border-color: transparent; box-shadow: 0 4px 12px rgba(23,79,162,0.3); }

/* ===== ALERTES ===== */
.vic-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.vic-alert-success { background: #f0fdf4; border: 1px solid #a7f3d0; color: #065f46; }
.vic-alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.vic-alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.vic-alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ===== MODALS ===== */
.vic-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.vic-modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.vic-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.vic-empty-icon {
    width: 80px; height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #94a3b8;
}
.vic-empty h3 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 0.5rem; }
.vic-empty p  { font-size: 0.875rem; color: var(--text-muted); max-width: 360px; margin: 0 auto 1.5rem; }

/* ===== TIMELINE ===== */
.vic-timeline { position: relative; padding-left: 2rem; }
.vic-timeline::before {
    content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0;
    width: 2px; background: var(--border);
}
.vic-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.vic-timeline-item::before {
    content: ''; position: absolute; left: -1.65rem; top: 0.25rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary); border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

/* ===== PROGRESS ===== */
.vic-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}
.vic-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .vic-table { font-size: 0.8rem; }
    .vic-table th, .vic-table td { padding: 0.65rem 0.75rem; }
    .stat-card .stat-value { font-size: 1.4rem; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp   { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse     { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin      { to { transform: rotate(360deg); } }

.animate-fade-in  { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s ease; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
