/* =========================================
   World Vision Niger - Gestion des Actifs
   Styles Principaux
   ========================================= */

:root {
    --wv-orange: #F26522;
    --wv-red:    #C0272D;
    --wv-dark:   #2C3E50;
    --sidebar-w: 255px;
    --sidebar-collapsed-w: 0px;
}

/* ---- COULEURS WV ---- */
.bg-wv       { background: linear-gradient(135deg, var(--wv-dark) 0%, #1a252f 100%) !important; }
.text-wv     { color: var(--wv-orange) !important; }
.btn-wv      { background-color: var(--wv-orange); border-color: var(--wv-orange); color: #fff; }
.btn-wv:hover{ background-color: #d9551a; border-color: #d9551a; color: #fff; }

/* ---- LAYOUT ---- */
body { overflow-x: hidden; }

.wrapper { min-height: calc(100vh - 56px); }

/* ---- SIDEBAR ---- */
#sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    max-width: var(--sidebar-w);
    min-height: calc(100vh - 56px);
    transition: all .25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}
#sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
}
#sidebar .nav-link {
    color: rgba(255,255,255,.75);
    border-radius: 8px;
    margin: 1px 0;
    padding: .45rem .75rem;
    font-size: .875rem;
    transition: all .2s;
    white-space: nowrap;
}
#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    color: #fff;
    background: rgba(242, 101, 34, .25);
    border-left: 3px solid var(--wv-orange);
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

/* ---- MAIN CONTENT ---- */
#mainContent { transition: all .25s ease; min-width: 0; }

/* ---- CARDS ---- */
.card { border: none; box-shadow: 0 .125rem .5rem rgba(0,0,0,.08); border-radius: 12px; }
.card-header { background: transparent; border-bottom: 1px solid rgba(0,0,0,.07); }

/* ---- STAT CARDS ---- */
.stat-card { border-radius: 12px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12) !important; }
.stat-card .stat-icon {
    width: 55px; height: 55px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}

/* ---- BADGES ---- */
.badge { font-weight: 500; letter-spacing: .02em; }

/* ---- TABLES ---- */
.table { font-size: .875rem; }
.table th { font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; border-bottom-width: 1px; }
.table-hover tbody tr:hover { background-color: rgba(242,101,34,.04); }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input { border-radius: 8px; border: 1px solid #dee2e6; padding: .3rem .6rem; font-size: .85rem; }
.dataTables_info { font-size: .8rem; color: #6c757d; }

/* ---- FORMS ---- */
.form-control, .form-select { border-radius: 8px; font-size: .875rem; border-color: #e0e6ed; }
.form-control:focus, .form-select:focus { border-color: var(--wv-orange); box-shadow: 0 0 0 .2rem rgba(242,101,34,.2); }
.form-label { font-weight: 500; font-size: .85rem; color: #495057; }
.required-star { color: var(--wv-red); }
.input-group-text { border-color: #e0e6ed; background: #f8f9fa; }

/* ---- BUTTONS ---- */
.btn { border-radius: 8px; font-size: .875rem; font-weight: 500; }
.btn-sm { padding: .25rem .6rem; font-size: .8rem; }

/* ---- PAGE HEADER ---- */
.page-header { padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid #e9ecef; }
.page-header h1, .page-header h2 { font-size: 1.4rem; font-weight: 700; color: var(--wv-dark); }

/* ---- ASSET QR ---- */
.qr-container { text-align: center; padding: 1rem; }
.qr-container img { max-width: 150px; border: 2px solid #eee; border-radius: 8px; padding: 5px; }

/* ---- STATUS TIMELINE ---- */
.timeline { position: relative; padding: 0; list-style: none; }
.timeline:before { content:''; position:absolute; top:0; bottom:0; left:22px; width:2px; background:#e9ecef; }
.timeline-item { position: relative; padding-left: 55px; margin-bottom: 1.5rem; }
.timeline-icon {
    position: absolute; left: 0; top: 0;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; border: 3px solid #fff; box-shadow: 0 0 0 2px #e9ecef;
}

/* ---- PRINT ---- */
@media print {
    #sidebar, .navbar, .btn, .no-print { display: none !important; }
    #mainContent { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #dee2e6 !important; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991.98px) {
    #sidebar { position: fixed; top: 56px; left: -var(--sidebar-w); z-index: 1030; transition: left .25s ease; }
    #sidebar.show { left: 0; }
}

/* ---- ALERTS ---- */
.alert { border: none; border-radius: 10px; border-left: 4px solid; }
.alert-success { border-left-color: #198754; background: rgba(25,135,84,.1); }
.alert-danger   { border-left-color: #dc3545; background: rgba(220,53,69,.1); }
.alert-warning  { border-left-color: #ffc107; background: rgba(255,193,7,.1); }
.alert-info     { border-left-color: #0dcaf0; background: rgba(13,202,240,.1); }

/* ---- NOTIFICATION DROPDOWN ---- */
.notif-item { padding: .6rem 1rem; border-bottom: 1px solid #f0f0f0; cursor:pointer; }
.notif-item:hover { background: #f8f9fa; }
.notif-item.unread { background: rgba(242,101,34,.05); }
.notif-item .notif-time { font-size: .75rem; color: #adb5bd; }

/* ---- LOGIN PAGE ---- */
.login-wrapper { min-height: 100vh; background: linear-gradient(135deg, var(--wv-dark) 0%, #1a252f 100%); }
.login-card { border-radius: 16px; max-width: 420px; }

/* ---- SCANNING ---- */
.scan-area { border: 2px dashed var(--wv-orange); border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: background .2s; }
.scan-area:hover { background: rgba(242,101,34,.05); }

/* ---- COLORS ---- */
.text-orange { color: var(--wv-orange) !important; }
.bg-orange-soft { background: rgba(242,101,34,.1) !important; }
.bg-success-soft { background: rgba(25,135,84,.1) !important; }
.bg-warning-soft { background: rgba(255,193,7,.1) !important; }
.bg-danger-soft  { background: rgba(220,53,69,.1)  !important; }
.bg-info-soft    { background: rgba(13,202,240,.1)  !important; }
.bg-primary-soft { background: rgba(13,110,253,.1)  !important; }
