/* =====================================================================
   ZARAN-T COLIS EXPRESS - Thème CRM
   Couleurs de la charte : rouge / bordeaux du logo
   ===================================================================== */
:root {
    --zt-red:        #B01E2A;
    --zt-red-dark:   #8A141E;
    --zt-red-light:  #E4485380;
    --zt-bg:         #f4f5f7;
    --zt-sidebar:    #1d1d24;
    --zt-sidebar-2:  #26262f;
    --zt-text:       #2b2b30;
}

* { box-sizing: border-box; }

body {
    background: var(--zt-bg);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--zt-text);
    margin: 0;
}

/* ---- Boutons / accents Bootstrap override ---- */
.btn-primary,
.bg-primary { background-color: var(--zt-red) !important; border-color: var(--zt-red) !important; }
.btn-primary:hover { background-color: var(--zt-red-dark) !important; border-color: var(--zt-red-dark) !important; }
.btn-outline-primary { color: var(--zt-red); border-color: var(--zt-red); }
.btn-outline-primary:hover { background-color: var(--zt-red); border-color: var(--zt-red); }
.text-primary { color: var(--zt-red) !important; }
a { color: var(--zt-red); }
.page-link { color: var(--zt-red); }
.page-item.active .page-link { background-color: var(--zt-red); border-color: var(--zt-red); }

/* ---- Layout ---- */
.zt-wrapper { display: flex; min-height: 100vh; }

.zt-sidebar {
    width: 250px;
    background: var(--zt-sidebar);
    color: #cfcfd6;
    flex-shrink: 0;
    position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1030;
    transition: transform .25s ease;
}
.zt-sidebar .brand {
    padding: 18px 16px;
    background: #fff;
    text-align: center;
    border-bottom: 3px solid var(--zt-red);
}
.zt-sidebar .brand img { max-width: 160px; height: auto; }

.zt-sidebar .nav-section {
    font-size: .70rem; text-transform: uppercase; letter-spacing: .08em;
    color: #6d6d7a; padding: 16px 20px 6px;
}
.zt-sidebar a.nav-link {
    color: #cfcfd6; padding: 10px 20px; display: flex; align-items: center;
    gap: 12px; font-size: .92rem; border-left: 3px solid transparent;
}
.zt-sidebar a.nav-link:hover { background: var(--zt-sidebar-2); color: #fff; }
.zt-sidebar a.nav-link.active {
    background: var(--zt-sidebar-2); color: #fff;
    border-left-color: var(--zt-red);
}
.zt-sidebar a.nav-link i { width: 20px; text-align: center; }

.zt-main { flex: 1; margin-left: 250px; display: flex; flex-direction: column; min-width: 0; }

.zt-topbar {
    background: #fff; height: 62px; display: flex; align-items: center;
    justify-content: space-between; padding: 0 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 1020;
}
.zt-topbar .toggle { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--zt-red); }
.zt-content { padding: 24px; flex: 1; }

/* ---- Cartes de statistiques ---- */
.stat-card {
    border: none; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.stat-card .stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
}
.stat-card .stat-value { font-size: 1.55rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: #7a7a86; font-size: .82rem; }

.card { border: none; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.card-header { background: #fff; border-bottom: 1px solid #eee; font-weight: 600; }

.page-title { font-weight: 700; color: var(--zt-red-dark); }

/* ---- Pipeline / phases ---- */
.pipeline-badge { font-size: .78rem; }

/* ---- Table ---- */
.table thead th { background: #faf1f1; color: var(--zt-red-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Barre de progression commission ---- */
.commission-step {
    border: 1px solid #eee; border-radius: 10px; padding: 12px; text-align: center;
}
.commission-step.ok { border-color: #198754; background: #f0fbf4; }
.commission-step.ko { border-color: #f2d2d2; background: #fdf5f5; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .zt-sidebar { transform: translateX(-100%); }
    .zt-sidebar.open { transform: translateX(0); }
    .zt-main { margin-left: 0; }
    .zt-topbar .toggle { display: inline-block; }
}

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--zt-red-dark), var(--zt-red)); padding: 20px; }
.login-card { max-width: 420px; width: 100%; background: #fff; border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.login-card .login-head { text-align: center; padding: 30px 30px 10px; }
.login-card .login-head img { max-width: 210px; }
.login-body { padding: 10px 34px 34px; }
