/* ==========================================================================
   CONFIG & ANIMATIONS
   ========================================================================== */
:root {
    --bg-light: #f8fafd;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

body { background-color: var(--bg-light); }

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

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(46, 213, 115, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 213, 115, 0); }
}

/* ==========================================================================
   WELCOME SECTION
   ========================================================================== */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.welcome-text h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #111;
}

.welcome-text p { color: #777; font-size: 17px; margin-top: 5px; }

.live-status-pill {
    background: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

.pulse {
    width: 10px;
    height: 10px;
    background: #2ed573;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ==========================================================================
   DASHBOARD GRID (4 EN LIGNE)
   ========================================================================== */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.card-box {
    background: #fff;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.icon-green { background: #eefdf4; color: #2ed573; }
.icon-blue { background: #eff6ff; color: #3b82f6; }
.icon-yellow { color: #f1c40f; }

.card-data .number { font-size: 34px; font-weight: 800; color: #111; display: block; }
.card-data .label { font-size: 12px; font-weight: 700; color: #aaa; text-transform: uppercase; }

.big-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 180px; }
.card-header h3 { font-size: 17px; font-weight: 700; }

.empty-msg { font-size: 13px; color: #bbb; font-style: italic; margin: 15px 0; }
.btn-action {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: #f8fafd;
    color: #555;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-action:hover { background: #111; color: #fff; }

/* ==========================================================================
   INSIGHTS SECTION (2ÈME LIGNE)
   ========================================================================== */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.6fr;
    gap: 25px;
}

.insight-card {
    background: #fff;
    padding: 30px;
    border-radius: 28px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.04);
}

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

.insight-header h3 { font-size: 18px; font-weight: 800; }
.badge { background: #eefdf4; color: #2ed573; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }

/* Progression Circulaire */
.circular-progress {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#2ed573 0deg, #f0f0f0 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 15px;
}
.circular-progress::before {
    content: "";
    position: absolute;
    width: 65px;
    height: 65px;
    background: #fff;
    border-radius: 50%;
}
.progress-value { position: relative; font-weight: 800; color: #111; }

.progress-text strong { display: block; font-size: 16px; color: #111; }
.progress-text p { font-size: 14px; color: #888; }

/* Activity List */
.activity-item.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #ccc;
}
.activity-item.empty i { font-size: 40px; margin-bottom: 10px; opacity: 0.3; }

/* Tip Card Special */
.tip-card { background: linear-gradient(135deg, #111 0%, #333 100%); color: #fff; display: flex; align-items: center; }
.tip-content i { font-size: 24px; color: #2ed573; margin-bottom: 15px; }
.tip-content h4 { font-size: 17px; margin-bottom: 10px; }
.tip-content p { font-size: 14px; opacity: 0.8; line-height: 1.5; }

/* Animations delays */
[class*="anim-"] { opacity: 0; animation: slideUp 0.6s ease forwards; }
.anim-1 { animation-delay: 0.1s; }
.anim-2 { animation-delay: 0.2s; }
.anim-3 { animation-delay: 0.3s; }
.anim-4 { animation-delay: 0.4s; }
.anim-5 { animation-delay: 0.5s; }
.anim-6 { animation-delay: 0.6s; }
.anim-7 { animation-delay: 0.7s; }
.anim-8 { animation-delay: 0.8s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .dashboard-wrapper { grid-template-columns: repeat(2, 1fr); }
    .insights-grid { grid-template-columns: 1fr 1fr; }
    .tip-card { grid-column: span 2; }
}

@media (max-width: 768px) {
    .dashboard-wrapper, .insights-grid { grid-template-columns: 1fr; }
    .tip-card { grid-column: span 1; }
    .welcome-section { flex-direction: column; align-items: flex-start; gap: 20px; }
}