/* ============================================================
   DJSON ERP — BUSINESS CONTROL SYSTEM
   Thème premium : bleu nuit / bleu profond / doré / blanc
   ============================================================ */

:root {
    --navy-950: #060F26;
    --navy-900: #081A3A;
    --navy-800: #0A1F44;
    --navy-700: #0E2A5C;
    --navy-600: #14356E;
    --navy-500: #1B4290;
    --gold: #F5B301;
    --gold-soft: #FFD34D;
    --gold-deep: #C98F00;
    --bg: #F2F5FA;
    --card: #FFFFFF;
    --text: #16223A;
    --text-muted: #64748B;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #D97706;
    --info: #0284C7;
    --sidebar-w: 264px;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(8, 26, 58, .08);
    --shadow-hover: 0 16px 40px rgba(8, 26, 58, .14);
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4, h5, .font-display {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
}

a { text-decoration: none; }

/* ---------------- SIDEBAR ---------------- */
.djson-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 55%, #0B2350 100%);
    color: #CBD5E1;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}

.djson-sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.djson-sidebar .brand .tagline {
    font-size: .58rem;
    letter-spacing: .18em;
    color: var(--gold-soft);
    text-transform: uppercase;
}

.djson-sidebar .brand .title {
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    letter-spacing: .04em;
    line-height: 1.1;
}

.djson-menu {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 24px;
}

.djson-menu::-webkit-scrollbar { width: 5px; }
.djson-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.djson-menu .section {
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(203,213,225,.45);
    margin: 14px 10px 6px;
    font-weight: 700;
}

.djson-menu a.item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #B9C4D8;
    font-size: .885rem;
    margin-bottom: 2px;
    transition: background .15s, color .15s, transform .1s;
}

.djson-menu a.item i { width: 20px; text-align: center; font-size: .95rem; opacity: .85; }

.djson-menu a.item:hover { background: rgba(255,255,255,.06); color: #fff; }

.djson-menu a.item.active {
    background: linear-gradient(90deg, rgba(245,179,1,.16), rgba(245,179,1,.03));
    color: var(--gold-soft);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}

.djson-sidebar .sidebar-foot {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,.07);
    font-size: .72rem;
    color: rgba(203,213,225,.5);
}

/* ---------------- HEADER ---------------- */
.djson-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 64px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #E4E9F2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
}

.djson-header .searchbox {
    flex: 1;
    max-width: 440px;
    position: relative;
}

.djson-header .searchbox input {
    width: 100%;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    padding: 9px 16px 9px 40px;
    font-size: .88rem;
    background: #F6F8FC;
    transition: border .15s, box-shadow .15s;
}

.djson-header .searchbox input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245,179,1,.12);
    background: #fff;
}

.djson-header .searchbox i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
}

.icon-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid #E4E9F2;
    background: #fff;
    color: var(--navy-800);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.icon-btn:hover { border-color: var(--gold); color: var(--gold-deep); }

.icon-btn .badge {
    position: absolute;
    top: -6px; right: -6px;
    font-size: .58rem;
    padding: 3px 6px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
}

.user-chip:hover { background: #F3F6FB; }

.avatar {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
    color: var(--gold-soft);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    letter-spacing: .03em;
}

/* ---------------- LAYOUT ---------------- */
.djson-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.djson-content { padding: 24px 26px 40px; flex: 1; }

.djson-footer {
    padding: 14px 26px;
    font-size: .75rem;
    color: var(--text-muted);
    border-top: 1px solid #E4E9F2;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title h1 { font-size: 1.35rem; margin: 0; color: var(--navy-800); }
.page-title .subtitle { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }

/* ---------------- CARTES & KPI ---------------- */
.card-djson {
    background: var(--card);
    border: 1px solid #E7ECF4;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
}

.card-djson:hover { box-shadow: var(--shadow-hover); }

.card-djson .card-head {
    padding: 16px 20px;
    border-bottom: 1px solid #EEF2F8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-djson .card-head h5 {
    margin: 0;
    font-size: .95rem;
    color: var(--navy-800);
    font-weight: 600;
}

.kpi-card {
    background: var(--card);
    border: 1px solid #E7ECF4;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: rise .45s ease both;
}

.kpi-card::after {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,179,1,.13), transparent 70%);
}

.kpi-card .kpi-icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 12px;
}

.kpi-icon.gold { background: linear-gradient(135deg, #F5B301, #FFCE3D); box-shadow: 0 8px 18px rgba(245,179,1,.35); }
.kpi-icon.navy { background: linear-gradient(135deg, var(--navy-700), var(--navy-500)); box-shadow: 0 8px 18px rgba(14,42,92,.3); }
.kpi-icon.green { background: linear-gradient(135deg, #15803D, #22C55E); box-shadow: 0 8px 18px rgba(34,197,94,.3); }
.kpi-icon.red { background: linear-gradient(135deg, #B91C1C, #F87171); box-shadow: 0 8px 18px rgba(239,68,68,.3); }
.kpi-icon.blue { background: linear-gradient(135deg, #1D4ED8, #38BDF8); box-shadow: 0 8px 18px rgba(56,189,248,.3); }
.kpi-icon.purple { background: linear-gradient(135deg, #6D28D9, #A78BFA); box-shadow: 0 8px 18px rgba(167,139,250,.3); }

.kpi-card .kpi-label {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.kpi-card .kpi-value {
    font-size: 1.42rem;
    font-weight: 700;
    color: var(--navy-800);
    margin: 4px 0 6px;
    font-variant-numeric: tabular-nums;
}

.kpi-card .kpi-sub { font-size: .76rem; color: var(--text-muted); }

.trend-up { color: var(--success); font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------- BOUTONS ---------------- */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    border: none;
    color: #3A2A00;
    font-weight: 600;
    border-radius: 11px;
    padding: 9px 18px;
    box-shadow: 0 8px 18px rgba(245,179,1,.3);
    transition: transform .12s, box-shadow .12s;
}

.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(245,179,1,.4); color: #3A2A00; }

.btn-navy {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 11px;
    padding: 9px 18px;
}

.btn-navy:hover { color: var(--gold-soft); }

.btn-soft { background: #EEF2F8; border: none; color: var(--navy-800); border-radius: 10px; font-weight: 600; }
.btn-soft:hover { background: #E2E9F5; }

/* ---------------- TABLES ---------------- */
.table-djson { margin: 0; font-size: .875rem; }

.table-djson thead th {
    background: #F6F8FC;
    color: #475569;
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid #E7ECF4;
    padding: 12px 16px;
    white-space: nowrap;
}

.table-djson tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #F1F4F9;
    color: #334155;
}

.table-djson tbody tr { transition: background .12s; }
.table-djson tbody tr:hover { background: #F8FAFF; }

.table-djson .money { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--navy-800); white-space: nowrap; }

.badge-soft { padding: 5px 11px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; }
.badge-soft.success { background: #DCFCE7; color: #15803D; }
.badge-soft.warning { background: #FEF3C7; color: #B45309; }
.badge-soft.danger { background: #FEE2E2; color: #B91C1C; }
.badge-soft.info { background: #E0F2FE; color: #0369A1; }
.badge-soft.primary { background: #E0E7FF; color: #4338CA; }
.badge-soft.secondary { background: #E2E8F0; color: #475569; }
.badge-soft.dark { background: #1E293B; color: #F8FAFC; }
.badge-soft.gold { background: #FEF9C3; color: #A16207; }

/* Achats liés au stock initial (ouverture) : ligne surlignée dorée */
.table-djson tr.stock-initial-row > td { background: #FFFBEB !important; }
.table-djson tr.stock-initial-row td:first-child { border-left: 4px solid #F5B301; }

/* ---------------- FORMULAIRES ---------------- */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #DDE4EE;
    padding: 10px 14px;
    font-size: .9rem;
    background: #FBFCFE;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245,179,1,.12);
    background: #fff;
}

.form-label { font-size: .8rem; font-weight: 600; color: #3B4A63; margin-bottom: 5px; }
.form-text { font-size: .72rem; }

/* ---------------- PAGINATION ---------------- */
.pagination .page-link {
    border: none;
    color: var(--navy-700);
    font-weight: 600;
    border-radius: 9px !important;
    margin: 0 3px;
    min-width: 34px;
    text-align: center;
}

.pagination .page-item.active .page-link { background: var(--navy-800); color: var(--gold-soft); }
.pagination .page-link:focus { box-shadow: none; }

/* ---------------- LOGIN PREMIUM ---------------- */
.auth-bg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(245,179,1,.14), transparent 60%),
        radial-gradient(800px 500px at -10% 110%, rgba(56,130,246,.18), transparent 60%),
        linear-gradient(155deg, var(--navy-900) 0%, var(--navy-800) 45%, #0C2657 100%);
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(245,179,1,.12);
    top: -220px; right: -160px;
    box-shadow: 0 0 90px rgba(245,179,1,.08) inset;
}

.auth-bg::after {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.06);
    bottom: -160px; left: -120px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    padding: 38px 34px;
    color: #E2E8F0;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    animation: rise .5s ease both;
    position: relative;
    z-index: 2;
}

.auth-card .welcome { font-size: .95rem; color: #B9C4D8; }
.auth-card h1.brand-name { color: #fff; font-weight: 700; letter-spacing: .05em; font-size: 1.7rem; margin: 6px 0 2px; }
.auth-card .brand-tag { color: var(--gold-soft); font-size: .68rem; letter-spacing: .3em; font-weight: 700; }

.auth-card .form-control {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.16);
    color: #F1F5F9;
    border-radius: 12px;
    padding: 12px 44px 12px 16px;
}

.auth-card .form-control::placeholder { color: #7C8BA5; }
.auth-card .form-control:focus { background: rgba(255,255,255,.1); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245,179,1,.15); color: #fff; }
.auth-card .form-control:-webkit-autofill { -webkit-text-fill-color: #fff; transition: background-color 9999s; }
.auth-card label { color: #A9B6CC; font-size: .78rem; font-weight: 600; letter-spacing: .03em; }
.auth-card .input-icon { position: relative; }
.auth-card .input-icon i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #7C8BA5; font-size: .85rem; }

.auth-foot { margin-top: 26px; text-align: center; font-size: .72rem; color: #64748B; position: relative; z-index: 2; }
.auth-foot a { color: #8FA1BC; }

/* ---------------- TOASTS ---------------- */
.toast-stack {
    position: fixed;
    top: 76px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-djson {
    min-width: 300px;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(8,26,58,.18);
    border: 1px solid #E7ECF4;
    padding: 13px 16px;
    display: flex;
    gap: 11px;
    align-items: flex-start;
    animation: slideIn .3s ease both;
    font-size: .85rem;
}

.toast-djson i { margin-top: 2px; }
.toast-djson.success i, .toast-djson.success b { color: var(--success); }
.toast-djson.danger i, .toast-djson.danger b { color: var(--danger); }
.toast-djson.warning i, .toast-djson.warning b { color: var(--warning); }
.toast-djson.info i, .toast-djson.info b { color: #0284C7; }

@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ---------------- TIMELINE CARGO ---------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: #E2E8F0; }
.timeline .tl-item { position: relative; padding-bottom: 20px; }
.timeline .tl-item::before {
    content: '';
    position: absolute;
    left: -23px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #CBD5E1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #E2E8F0;
}
.timeline .tl-item.done::before { background: var(--gold); box-shadow: 0 0 0 2px rgba(245,179,1,.35); }
.timeline .tl-item .tl-date { font-size: .72rem; color: var(--text-muted); }
.timeline .tl-item .tl-title { font-weight: 600; font-size: .86rem; color: var(--navy-800); }

/* ---------------- DIVERS ---------------- */
.chart-box { position: relative; min-height: 280px; }

.skeleton {
    background: linear-gradient(90deg, #EEF2F8 25%, #F8FAFD 50%, #EEF2F8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s infinite;
    border-radius: 8px;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 1px dashed #D6DEEC;
    color: var(--navy-700);
    font-size: .78rem;
    font-weight: 600;
    transition: all .15s;
    background: #fff;
    min-width: 110px;
}

.quick-action i { font-size: 1.1rem; color: var(--gold-deep); }
.quick-action:hover { border-color: var(--gold); background: #FFFBEE; transform: translateY(-2px); }

.search-result-item { padding: 10px 14px; border-bottom: 1px solid #F1F4F9; display: block; }
.search-result-item:hover { background: #F8FAFF; }

.modal-content { border-radius: 16px; border: none; }
.modal-header { border-bottom: 1px solid #EEF2F8; }
.modal-footer { border-top: 1px solid #EEF2F8; }
.modal-title { font-size: 1rem; font-weight: 700; color: var(--navy-800); }

.dropdown-menu { border-radius: 14px; border: 1px solid #E7ECF4; box-shadow: 0 18px 50px rgba(8,26,58,.14); padding: 8px; }
.dropdown-item { border-radius: 9px; font-size: .86rem; padding: 8px 12px; }
.dropdown-item:hover { background: #F5F8FD; }

.notif-item { padding: 11px 14px; border-bottom: 1px solid #F1F4F9; font-size: .84rem; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #FFFBEE; }

/* ---------------- RESPONSIVE ---------------- */
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(6,15,38,.55); z-index: 1035; display: none; }

@media (max-width: 991.98px) {
    .djson-sidebar { transform: translateX(-100%); }
    .djson-sidebar.show { transform: none; }
    .sidebar-backdrop.show { display: block; }
    .djson-main { margin-left: 0; }
    .djson-content { padding: 16px 14px 30px; }
    .djson-header { padding: 0 12px; }
    .kpi-card .kpi-value { font-size: 1.2rem; }
    .page-title h1 { font-size: 1.15rem; }
    .table-responsive { border-radius: 12px; }
}

@media (max-width: 575.98px) {
    .djson-header .searchbox { display: none; }
    .auth-card { padding: 30px 22px; }
    .btn-gold, .btn-navy { width: 100%; }
}

/* ---------------- IMPRESSION / PDF ---------------- */
@media print {
    .djson-sidebar, .djson-header, .djson-footer, .toast-stack, .no-print, .sidebar-backdrop { display: none !important; }
    .djson-main { margin: 0 !important; }
    .djson-content { padding: 0 !important; }
    body { background: #fff; }
    .card-djson { box-shadow: none; border: 1px solid #ccc; }
    .print-only { display: block !important; }
}

.print-only { display: none; }
/* ---------------- MULTI-PAYS : CHIP SÉLECTION ---------------- */
.country-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .25rem .75rem .75rem;
    padding: .6rem .75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15,23,42,.05), rgba(201,162,39,.08));
    border: 1px solid rgba(201,162,39,.35);
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}
.country-chip:hover { border-color: var(--gold); transform: translateY(-1px); text-decoration: none; }

/* ---------------- MULTI-PAYS : BADGE CODE PAYS ---------------- */
/* Les emojis drapeaux ne se rendent pas sous Windows : badge monogramme */
.country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    color: var(--gold, #c9a227);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .5px;
    flex: none;
}
.country-flag.sm { width: 30px; height: 30px; font-size: .64rem; border-radius: 9px; }
.country-flag.lg { width: 64px; height: 64px; font-size: 1.05rem; border-radius: 16px; }

/* ---------------- COMPTABILITÉ : KPI UNIFORMES + BANDEAU RÉSULTAT ---------------- */
.kpi-uniform .kpi-label { display: block; min-height: 2.3em; }
.kpi-uniform .kpi-value { white-space: nowrap; font-size: 1.12rem; margin: 6px 0 0; }
.kpi-uniform .kpi-value .cur { font-size: .6em; font-weight: 700; color: var(--text-muted); }
.kpi-uniform .kpi-value.neg { color: var(--danger); }
.kpi-uniform .kpi-value .kpi-compact { font-variant-numeric: tabular-nums; }

.result-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0A1F44, #14356E);
    border-radius: var(--radius);
    padding: 20px 26px;
    box-shadow: 0 14px 30px rgba(10,31,68,.22);
    animation: rise .45s ease both;
}
.result-banner .rb-label { color: #FFD34D; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.result-banner .rb-sub { color: rgba(255,255,255,.65); font-size: .8rem; margin-top: 3px; }
.result-banner .rb-amount { font-size: 2rem; font-weight: 800; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-banner .rb-amount .cur { font-size: .5em; font-weight: 700; color: rgba(255,255,255,.7); }
.result-banner .rb-amount.neg { color: #FF9B9B; }

/* ---------------- POINT DE VENTE (POS) ---------------- */
.pos-layout { display: flex; gap: 16px; align-items: flex-start; }
.pos-left { flex: 1 1 auto; min-width: 0; }
.pos-cart {
    flex: 0 0 430px;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: linear-gradient(180deg, #0F2547, #14356E);
    color: #F5F7FB;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 16px 34px rgba(10, 31, 68, .35);
}
.pos-cart .kpi-label { color: #9FB3D9; display: inline-block; }
.pos-search { font-size: 1.05rem; padding: 12px 14px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-tile {
    background: var(--card);
    border: 1px solid #E7ECF4;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 96px;
    text-align: left;
    transition: border-color .12s, transform .12s, box-shadow .12s;
}
.pos-tile:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(10,31,68,.12); }
.pos-tile.out { opacity: .55; }
.pos-tile .pt-name { font-weight: 600; font-size: .82rem; line-height: 1.25; color: var(--navy-800); }
.pos-tile .pt-price { font-weight: 800; color: var(--navy-800); font-size: .95rem; }
.pos-tile .pt-stock { font-size: .68rem; color: var(--text-muted); }
.pos-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px 118px 92px 38px;
    gap: 6px;
    align-items: center;
    background: rgba(255,255,255,.07);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
}
.pos-line .pl-name { font-size: .78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-cart input, .pos-cart select {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    border-radius: 8px;
    min-height: 44px;
    padding: 4px 8px;
}
.pos-cart input::placeholder { color: rgba(255,255,255,.5); }
.pos-cart input:focus, .pos-cart select:focus { background: rgba(255,255,255,.16); color: #fff; outline: none; }
.pos-cart .form-select {
    background-color: rgba(255, 255, 255, .1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    min-height: 44px;
    padding: 4px 32px 4px 8px;
}
.pos-cart .form-select:focus { background-color: rgba(255,255,255,.16); color: #fff; outline: none; }
.pos-cart .form-select option { color: #16223A; background: #fff; }
.pos-btn {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.1);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: .8rem;
    padding: 6px 8px;
}
.pos-btn:hover { background: rgba(255,255,255,.18); }
.pos-btn.active { background: var(--gold); border-color: var(--gold); color: #0F172A; }
.pos-total {
    background: rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 1.55rem;
    font-weight: 800;
    text-align: right;
    color: #FFD34D;
    font-variant-numeric: tabular-nums;
}
.pos-paygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pos-line .pl-price, .pos-line .pl-qtyin { text-align: right; }
@media (max-width: 991.98px) {
    .pos-layout { flex-direction: column; }
    .pos-cart { position: static; flex: 1 1 auto; max-height: none; width: 100%; }
}

/* ---------------- PRODUITS : IMAGES ---------------- */
.prod-thumb {
    width: 36px; height: 36px;
    border-radius: 9px;
    object-fit: cover;
    flex: none;
    border: 1px solid #E7ECF4;
    background: #fff;
}
.prod-thumb-ph {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: #EEF2F9;
    color: #94A3B8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex: none;
}
.pos-tile .pt-img {
    width: 100%;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 4px;
    background: #EEF2F9;
}
