/* ==========================================================================
   VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
    --pearl-grey: #f4f7f9;       /* Fond de page */
    --pure-white: #ffffff;       /* Cartes et containers */
    --brand-color: #4f46e5;      /* Indigo Premium */
    --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --text-dark: #1e293b;        /* Titres */
    --text-muted: #64748b;       /* Paragraphes */
    --success: #10b981;
    --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --elevated-shadow: 0 20px 40px rgba(79, 70, 229, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
body {
    background-color: var(--pearl-grey);
    color: var(--text-dark);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Vivant Animé */
.animated-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 40%);
    animation: bgMove 15s ease infinite alternate;
}

@keyframes bgMove {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(2%, 2%); }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background: var(--brand-gradient);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.profile-pill {
    background: var(--pure-white);
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.profile-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--soft-shadow);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: var(--brand-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* ==========================================================================
   DASHBOARD TABS (NAVIGATION HAUTE)
   ========================================================================== */
.dashboard-nav-container {
    background: var(--pure-white);
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.nav-pills-wrapper {
    background: #f1f5f9;
    border-radius: 100px;
    display: inline-flex;
}

.nav-pill-item {
    padding: 10px 24px;
    border-radius: 100px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.nav-pill-item:hover {
    color: var(--brand-color);
}

.nav-pill-item.active {
    background: var(--pure-white);
    color: var(--brand-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================================================
   CARDS & CONTAINERS (PREMIUM LIGHT)
   ========================================================================== */
.card-premium {
    background: var(--pure-white);
    border-radius: 24px;
    border: none;
    padding: 2rem;
    box-shadow: var(--soft-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 1.5rem;
}

.bg-blue-light { background: #eff6ff; color: #3b82f6; }
.bg-indigo-light { background: #eef2ff; color: #4f46e5; }
.bg-purple-light { background: #f5f3ff; color: #8b5cf6; }

/* ==========================================================================
   PROTOCOLE & TASKS
   ========================================================================== */
.task-item-card {
    background: var(--pure-white);
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
}

.task-item-card:hover {
    transform: scale(1.01);
    box-shadow: var(--soft-shadow);
}

.task-completed {
    background: #f8fafc;
    opacity: 0.7;
}

/* Custom Checkbox */
.checkbox-wrapper {
    position: relative;
    width: 26px;
    height: 26px;
}

.task-checkbox {
    opacity: 0;
    position: absolute;
}

.task-checkbox + label {
    position: absolute;
    top: 0; left: 0;
    width: 26px; height: 26px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.task-checkbox:checked + label {
    background: var(--brand-color);
    border-color: var(--brand-color);
}

.task-checkbox:checked + label::after {
    content: '\F26E'; /* Bootstrap icon check */
    font-family: 'bootstrap-icons';
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */
.btn-primary {
    background: var(--brand-gradient);
    border: none;
    color: white;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevated-shadow);
    filter: brightness(1.1);
}

.shadow-elevated {
    box-shadow: var(--elevated-shadow);
}

.form-control, .form-select {
    border-radius: 12px;
    transition: var(--transition);
}

.custom-range::-webkit-slider-thumb {
    background: var(--brand-color);
    border: 4px solid white;
    box-shadow: var(--soft-shadow);
    cursor: pointer;
    width: 20px; height: 20px;
    -webkit-appearance: none;
    border-radius: 50%;
}

/* ==========================================================================
   LANDING SPECIALS
   ========================================================================== */
.promo-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand-color);
    font-weight: 800;
    font-size: 12px;
    border-radius: 100px;
    letter-spacing: 1px;
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-success-light { background: #ecfdf5; }

/* ==========================================================================
   ONBOARDING & MODALS
   ========================================================================== */
.onboarding-icon {
    width: 80px;
    height: 80px;
    background: var(--pure-white);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--brand-color);
    box-shadow: var(--soft-shadow);
}

/* Animations */
.animate__animated {
    animation-duration: 0.8s;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .display-3 { font-size: 2.5rem; }
    .card-premium { padding: 1.5rem; }
    .nav-pill-item span { display: none; } /* Icônes seules sur mobile */
    .nav-pill-item i { font-size: 20px; margin: 0 !important; }
}