/* =====================================================================
   Afritech - interface moderne (novembre 2026)
   Menu a la couleur d'origine (#2B3445), pages claires, cartes arrondies.
   Ne change que l'apparence : aucune fonction n'est touchee.
   ===================================================================== */
:root {
  --af-ink: #0f172a; --af-mut: #64748b; --af-line: #e8edf3; --af-bg: #f4f6f9;
  --af-acc: #4E97FD; --af-acc-soft: #e0edff; --af-side: #2B3445; --af-side2: #373F50;
}
body { background: var(--af-bg); color: var(--af-ink); }
.layout-content { background: var(--af-bg); }
.layout-content .content-section { padding: 22px 28px 0; }
.af-ic { width: 18px; height: 18px; flex: none; }

/* ---------------- menu de gauche ---------------- */
.sidebar-content.af-side { background: var(--af-side); padding: 18px 12px 12px; display: flex; flex-direction: column; overflow: hidden; border: 0; }
.af-side .scroll-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; position: relative; }
.af-side .scroll-nav::-webkit-scrollbar { width: 4px; }
.af-side .scroll-nav::-webkit-scrollbar-thumb { background: #46516a; border-radius: 4px; }
.af-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 16px; min-height: 52px; }
.af-brand-logo { width: 100px; max-width: 150px; max-height: 64px; height: auto; object-fit: contain; flex: none; }
.af-sp-brand { flex: 1; }
.sidebar-content.compact .af-brand-logo { width: 44px; }
.sidebar-content.compact:hover .af-brand-logo { width: 100px; }
.af-brand-img { background: #fff; border-radius: 10px; padding: 4px; width: 42px; height: 42px; object-fit: contain; }
.af-brand-txt { flex: 1; min-width: 0; line-height: 1.15; }
.af-brand-txt b { display: block; color: #fff; font-weight: 600; font-size: 17px; letter-spacing: 1.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-brand-txt small { color: #a7b1c2; font-size: 11px; white-space: nowrap; }
.af-side-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #46516a; background: transparent; color: #c5cdd9; align-items: center; justify-content: center; padding: 0; flex: none; }
.af-side-btn .af-ic { width: 15px; height: 15px; }
.af-side-btn:hover { color: #fff; background: var(--af-side2); }
.af-side .af-sec { font-size: 10.5px; letter-spacing: 1.4px; color: #8792a6; font-weight: 600; padding: 14px 12px 6px; text-transform: uppercase; list-style: none; }
.af-side .nav-item, .af-side .collapse-button { height: auto; padding: 9px 12px; margin-bottom: 2px !important; border-radius: 10px; color: #EBEFF4; font-size: 14px; }
.af-side .collapse-button { margin-bottom: 2px; }
.af-side .nav-item .item-name, .af-side .collapse-button .item-name { margin: 0 0 0 12px; }
.af-side .collapse-button .af-ic, .af-side .nav-item > .af-ic { color: #c5cdd9; }
.af-side .collapse-button.collapse-active .af-ic, .af-side .nav-item.active > .af-ic, .af-side .nav-item:hover > .af-ic, .af-side .collapse-button:hover .af-ic { color: var(--af-acc); }
.af-side .collapse-icon { width: 14px !important; height: 14px !important; opacity: .55; }
.af-side .collapse-content > .list-group { margin: 2px 0 6px 21px; border-left: 1px solid #45506a; padding-left: 10px; }
.af-side .nav-item.child-nav { padding: 7px 12px; font-size: 13.5px; color: #c5cdd9; }
.af-side .nav-item.child-nav .prefix { display: none; }
.af-side .nav-item.child-nav .item-name { margin-left: 0; }
.af-side .nav-item.child-nav.active { color: var(--af-acc); background: var(--af-side2); font-weight: 600; }
.af-side .list-group { padding: 0; }
.af-side li { list-style: none; }
.af-user { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: #323c50; border: 1px solid #46516a; border-radius: 14px 14px 0 0; border-bottom: 0; padding: 11px 12px 8px; color: #fff; text-decoration: none; }
.af-user:hover { color: #fff; background: #36415a; }
.af-av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #4E97FD, #1d5fd1); color: #fff; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; padding: 0; overflow: hidden; }
.af-av img { width: 100%; height: 100%; object-fit: cover; }
.af-user-txt { min-width: 0; line-height: 1.25; }
.af-user-txt b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-user-txt small { color: #a7b1c2; font-size: 11.5px; white-space: nowrap; }
.af-online { display: flex; align-items: center; gap: 7px; background: #323c50; border: 1px solid #46516a; border-top: 0; border-radius: 0 0 14px 14px; padding: 0 12px 10px 14px; font-size: 11.5px; color: #c5cdd9; }
.af-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); flex: none; }
.af-online.off .af-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.af-cur { margin-left: auto; color: #8792a6; }
/* menu reduit */
.sidebar-content.compact .af-brand-txt, .sidebar-content.compact .af-sec, .sidebar-content.compact .af-user-txt, .sidebar-content.compact .af-online-txt, .sidebar-content.compact .af-cur { display: none; }
.sidebar-content.compact .af-brand { justify-content: center; }
.sidebar-content.compact .af-user, .sidebar-content.compact .af-online { justify-content: center; }
.sidebar-content.compact .compact-button { display: none !important; }
.sidebar-content.compact:hover .af-brand-txt, .sidebar-content.compact:hover .af-user-txt, .sidebar-content.compact:hover .af-online-txt, .sidebar-content.compact:hover .af-cur { display: block; }
.sidebar-content.compact:hover .af-sec { display: list-item; }
.sidebar-content.compact:hover .compact-button { display: flex !important; }

/* ---------------- haut de l'ecran ---------------- */
.layout-content .layout-header.af-top { background: #fff; border: 0; border-bottom: 1px solid var(--af-line); border-radius: 0 !important; box-shadow: none; padding: 12px 28px; margin-bottom: 0 !important; gap: 12px; }
.af-top-left, .af-top-right { display: flex; align-items: center; gap: 10px; }
.af-top-left { flex: 1; min-width: 0; }
.af-icb { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--af-line); background: #fff; color: #475569; display: inline-flex; align-items: center; justify-content: center; padding: 0; position: relative; flex: none; }
.af-icb:hover { background: #f8fafc; color: var(--af-ink); }
#mobileSidebarToggle { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--af-line); background: #fff; }
.af-search { position: relative; display: flex; align-items: center; gap: 10px; background: var(--af-bg); border: 1px solid transparent; border-radius: 12px; padding: 0 14px; height: 42px; width: 100%; max-width: 440px; color: #94a3b8; }
.af-search:focus-within { background: #fff; border-color: var(--af-acc); box-shadow: 0 0 0 4px rgba(78,151,253,.12); }
.af-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 14px; color: var(--af-ink); }
.af-search kbd { font-size: 11px; border: 1px solid #d9e0e8; border-radius: 5px; padding: 0 6px; color: #94a3b8; background: #fff; font-family: inherit; box-shadow: none; }
.af-search-res { display: none; position: absolute; top: 48px; left: 0; width: 100%; min-width: 340px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--af-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.14); padding: 6px; z-index: 1000; }
.af-search-res.show { display: block; }
.af-sr-h { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #94a3b8; padding: 8px 10px 4px; }
.af-sr-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--af-ink); text-decoration: none; }
.af-sr-i:hover, .af-sr-i.sel { background: #f1f6ff; color: var(--af-ink); }
.af-sr-i .af-ic { color: #94a3b8; width: 16px; height: 16px; }
.af-sr-i b { display: block; font-size: 13.5px; font-weight: 600; }
.af-sr-i small { color: var(--af-mut); font-size: 12px; }
.af-sr-none { padding: 14px; color: var(--af-mut); font-size: 13px; text-align: center; }
.af-low { align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: #fef2f2; color: #b91c1c; font-weight: 600; font-size: 13px; border: 1px solid #fecaca; white-space: nowrap; text-decoration: none; }
.af-low:hover { color: #991b1b; background: #fee2e2; }
.af-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 11px; padding: 0 15px; height: 40px; font-weight: 600; font-size: 14px; border: 1px solid var(--af-line); background: #fff; color: var(--af-ink); text-decoration: none; white-space: nowrap; }
.af-btn:hover { background: #f8fafc; color: var(--af-ink); }
.af-btn-dark { background: var(--af-ink); border-color: var(--af-ink); color: #fff; }
.af-btn-dark:hover { background: #1e293b; color: #fff; }
.af-btn-pri { background: var(--af-acc); border-color: var(--af-acc); color: #fff; }
.af-btn-pri:hover { background: #3b86ee; color: #fff; }
.af-bell-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.af-av-top { width: 40px; height: 40px; cursor: pointer; }
.af-menu { border: 1px solid var(--af-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.14); padding: 6px; min-width: 230px; }
.af-menu .dropdown-item { border-radius: 9px; padding: 8px 12px; font-size: 14px; display: flex; align-items: center; gap: 10px; color: var(--af-ink); }
.af-menu .dropdown-item .af-ic { color: #64748b; width: 17px; height: 17px; }
.af-menu .dropdown-item i { font-size: 17px !important; color: #64748b; margin-right: 0 !important; }
.af-menu .dropdown-item:hover { background: #f1f6ff; }
.af-menu-h { padding: 8px 12px 10px; border-bottom: 1px solid var(--af-line); margin-bottom: 4px; line-height: 1.3; }
.af-menu-h b { display: block; font-size: 14px; }
.af-menu-h small { color: var(--af-mut); font-size: 12px; }
.af-sub-list { display: none; padding: 2px 0 4px 26px; margin: 0; max-height: 220px; overflow: auto; }
.af-sub.open .af-sub-list { display: block; }
.af-sub-list .dropdown-item { font-size: 13px; padding: 6px 10px; }
.af-sub-list .flag-icon { width: 18px; }
.af-alerts { width: 320px; }
.af-alerts-h { font-weight: 600; font-size: 14px; padding: 8px 12px 6px; }
.af-alert { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--af-ink); text-decoration: none; }
.af-alert:hover { background: #f8fafc; color: var(--af-ink); }
.af-alert b { display: block; font-size: 13.5px; }
.af-alert small { color: var(--af-mut); font-size: 12px; }
.af-alert-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.af-c-warn { background: #fff6e0; color: #b45309; } .af-c-red { background: #fee2e2; color: #b91c1c; } .af-c-blue { background: var(--af-acc-soft); color: #1d5fd1; } .af-c-green { background: #dcfce7; color: #15803d; } .af-c-violet { background: #f1ecfd; color: #6d28d9; } .af-c-orange { background: #ffedd5; color: #c2410c; }
.af-alert-none { padding: 14px 12px; color: var(--af-mut); font-size: 13px; }
@media (max-width: 991px) { .layout-content .layout-header.af-top { padding: 10px 14px; } .af-search { max-width: none; } .af-search kbd { display: none; } }
@media (max-width: 575px) { .af-search { display: none; } .layout-content .content-section { padding: 16px 14px 0; } }

/* ---------------- titres de page ---------------- */
.content-section > .breadcrumb, .content-section .breadcrumb:first-child { background: transparent; padding: 4px 0 0; margin-bottom: 14px; }
.content-section .breadcrumb h1 { font-size: 26px; font-weight: 600; color: var(--af-ink); margin: 0; }
.content-section .breadcrumb ul li { font-size: 14px; color: var(--af-mut); }
.content-section .separator-breadcrumb { display: none; }

/* ---------------- cartes, tableaux, boutons ---------------- */
.content-section .card { border: 1px solid var(--af-line); border-radius: 16px; box-shadow: none; }
.content-section .card-header { background: #fff; border-bottom: 1px solid var(--af-line); border-radius: 16px 16px 0 0 !important; }
.content-section .table > thead > tr > th, .content-section table.dataTable thead th { font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: #8a96a8; font-weight: 600; background: #fafbfd; border-bottom: 1px solid var(--af-line) !important; border-top: 0 !important; padding: 12px 12px; white-space: nowrap; }
.content-section .table > tbody > tr > td { padding: 11px 12px; border-color: #d5dbe3; vertical-align: middle; font-size: 14px; }
.content-section .table-hover > tbody > tr:hover > * { background: #f8fbff; --bs-table-accent-bg: #f8fbff; }
.content-section .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: transparent; }
.content-section .dataTables_wrapper .dataTables_filter input, .content-section .dataTables_wrapper .dataTables_length select { border: 1px solid #dfe5ec; border-radius: 10px; height: 40px; padding: 0 12px; font-size: 14px; min-width: 220px; }
.content-section .dataTables_wrapper .dataTables_length select { min-width: 74px; }
.content-section .dataTables_wrapper .dataTables_info { color: var(--af-mut); font-size: 13px; padding-top: 14px; }
.content-section .dataTables_wrapper .dataTables_paginate { padding-top: 10px; }
.content-section .dataTables_wrapper .page-item .page-link { border: 0; border-radius: 9px !important; margin: 0 2px; color: #475569; font-weight: 600; min-width: 34px; text-align: center; }
.content-section .dataTables_wrapper .page-item.active .page-link { background: var(--af-ink); color: #fff; }
.content-section .dt-buttons .btn, .content-section .dt-buttons .dt-button { border-radius: 10px !important; }
.content-section .btn { border-radius: 10px; font-weight: 600; }
.content-section .btn-rounded { border-radius: 10px !important; }
.content-section .btn-primary { background: var(--af-acc); border-color: var(--af-acc); }
.content-section .btn-outline-primary { color: #1d5fd1; border-color: #c7dcfb; }
.content-section .btn-outline-primary:hover { background: var(--af-acc); border-color: var(--af-acc); color: #fff; }
.content-section .form-control, .content-section .form-select, .modal .form-control, .modal .form-select { border-radius: 10px; border-color: #dfe5ec; min-height: 40px; }
.content-section .form-control:focus, .modal .form-control:focus { border-color: var(--af-acc); box-shadow: 0 0 0 4px rgba(78,151,253,.12); }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 30px 60px rgba(15,23,42,.2); }
.modal-header { border-bottom: 1px solid var(--af-line); }
.modal-footer { border-top: 1px solid var(--af-line); }
.dropdown-menu { border-radius: 12px; border-color: var(--af-line); box-shadow: 0 14px 34px rgba(15,23,42,.12); }
.app-footer { background: transparent; border-top: 1px solid var(--af-line); margin-top: 24px; padding: 16px 28px; }
.app-footer .logo { display: none; }

/* bouton Action des listes : plus discret */
.content-section table .btn-group .dropdown-toggle, .content-section table .dropdown > .btn { border-radius: 9px; }

/* ---------------- haut des listes : chiffres et onglets ---------------- */
.af-hero { margin-bottom: 16px; }
.af-hero-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.af-hero-head h1 { font-size: 26px; font-weight: 600; margin: 0; color: var(--af-ink); }
.af-hero-head p { margin: 2px 0 0; color: var(--af-mut); font-size: 14px; }
.af-hero-head .af-sp { flex: 1; }
.af-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.af-k { background: #fff; border: 1px solid var(--af-line); border-radius: 16px; padding: 15px 17px; display: flex; gap: 13px; align-items: flex-start; text-decoration: none; color: inherit; min-width: 0; }
a.af-k:hover { border-color: #c7dcfb; color: inherit; }
.af-k-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.af-k small { color: var(--af-mut); font-size: 12.5px; display: block; }
.af-k b { display: block; font-weight: 600; font-size: 20px; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-k b i { font-style: normal; font-size: 12px; color: var(--af-mut); font-weight: 600; }
.af-k em { font-style: normal; font-size: 12px; color: var(--af-mut); }
.af-k .af-skel { display: inline-block; width: 90px; height: 18px; border-radius: 6px; background: linear-gradient(90deg, #eef2f6, #f8fafc, #eef2f6); background-size: 200% 100%; animation: afsk 1.2s infinite; }
@keyframes afsk { to { background-position: -200% 0; } }
.af-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 14px; }
.af-tab { padding: 7px 13px; border-radius: 10px; color: #475569; font-weight: 600; font-size: 13.5px; cursor: pointer; border: 1px solid transparent; background: transparent; text-decoration: none; }
.af-tab:hover { background: #fff; border-color: var(--af-line); color: var(--af-ink); }
.af-tab span { background: #eef2f6; color: #64748b; border-radius: 10px; padding: 1px 7px; font-size: 11.5px; margin-left: 5px; }
.af-tab.on { background: var(--af-ink); color: #fff; }
.af-tab.on span { background: rgba(255,255,255,.18); color: #fff; }
@media (max-width: 1199px) { .af-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .af-kpis { grid-template-columns: 1fr; } .af-hero-head h1 { font-size: 22px; } }

/* statuts : comme la mise a jour deja faite (centres, pastilles pleines) */
.af-st-col { text-align: center !important; }
.badge.af-st { display: inline-block; min-width: 92px; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 0 !important; white-space: nowrap; }
.badge.af-st-warning { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.af-st-success { background: #dcfce7 !important; color: #15803d !important; }
.badge.af-st-info { background: #ffedd5 !important; color: #c2410c !important; }
.badge.af-st-secondary { background: #ede9fe !important; color: #6d28d9 !important; }

/* cellules des listes */
.af-cell-main { font-weight: 600; color: var(--af-ink); white-space: nowrap; }
td .af-cell-main + .af-cell-sub { }
.af-wrap .af-cell-main { white-space: normal; min-width: 150px; max-width: 240px; }
.af-cell-sub { color: var(--af-mut); font-size: 12.5px; margin-top: 1px; white-space: nowrap; }
.af-amt { white-space: nowrap; font-weight: 600; }
.af-zero { color: #a0aab8; font-weight: 500; }
.af-due { color: #dc2626; font-weight: 600; }
.af-who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.af-who-a { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none; }
.af-act-col { width: 1%; white-space: nowrap; }
.af-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.af-acts .dropdown { display: inline-block; }
.af-ab, .af-acts .af-more { width: 34px; height: 34px; border-radius: 10px !important; border: 1px solid var(--af-line) !important; background: #fff !important; color: #64748b !important; display: inline-flex !important; align-items: center; justify-content: center; padding: 0 !important; }
.af-ab:hover, .af-acts .af-more:hover { background: #f1f6ff !important; color: var(--af-ink) !important; border-color: #c7dcfb !important; }
.af-acts .af-more::after { display: none !important; }
.af-ab .af-ic, .af-acts .af-more .af-ic { width: 16px; height: 16px; pointer-events: none; }
.af-acts .dropdown-menu { min-width: 240px; }
.af-acts .dropdown-menu .dropdown-item { border-radius: 8px; padding: 7px 12px; font-size: 13.5px; }
.content-section table.dataTable tfoot th, .content-section .af-dt-total th { font-size: 12.5px; padding: 10px 12px; white-space: nowrap; text-align: right; }
.content-section .af-dt-total th:first-child, .content-section .af-dt-total th:nth-child(2) { text-align: left; }
@media (max-width: 1500px) { .af-hide-md { display: none !important; } }
.af-client { display: flex; align-items: center; gap: 10px; }
.af-client .avatar { width: 36px; height: 36px; margin: 0 !important; flex: none; }
.af-client .avatar img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.content-section table .badge:not(.af-st) { border-radius: 20px; padding: 6px 12px; font-weight: 600; font-size: 12px; border: 0; }
.content-section table .badge.badge-success:not(.af-st) { background: #dcfce7; color: #15803d; }
.content-section table .badge.badge-warning:not(.af-st) { background: #fff6e0; color: #b45309; }
.content-section table .badge.badge-danger:not(.af-st) { background: #fee2e2; color: #b91c1c; }
.content-section table .badge.badge-info:not(.af-st) { background: #e0edff; color: #1d5fd1; }
.content-section table .badge.badge-primary:not(.af-st) { background: #e0edff; color: #1d5fd1; }
.af-prod .avatar, .af-prod img { border-radius: 10px !important; }
.af-prod img { width: 40px; height: 40px; object-fit: cover; }

/* ---------------- formulaires (vente, achat, proforma...) ---------------- */
.content-section .form-control, .content-section .form-select { background-color: #fff; }
.content-section label { font-weight: 600; color: #475569; font-size: 13px; }
.content-section .v-select .vs__dropdown-toggle { min-height: 40px; border-radius: 10px; border-color: #dfe5ec; background: #fff; }
.content-section .autocomplete-input { background-color: #fff !important; border: 1px solid #dfe5ec !important; border-radius: 12px !important; height: 48px; box-shadow: none !important; }
.content-section .autocomplete-input:focus { border-color: var(--af-acc) !important; box-shadow: 0 0 0 4px rgba(78,151,253,.12) !important; }
.content-section .autocomplete-result-list { border-radius: 12px !important; border: 1px solid var(--af-line) !important; box-shadow: 0 18px 40px rgba(15,23,42,.14) !important; }
.content-section .table:not(.dataTable) td .badge.badge-success { background: transparent; color: var(--af-ink); font-size: 14px; font-weight: 600; padding: 0; white-space: normal; text-align: left; }
.content-section .table:not(.dataTable) > thead > tr > th { font-size: 11.5px; }
/* resume des montants (TVA, remise, livraison, total) */
.content-section .offset-md-9 .table-sm, .content-section .offset-md-8 .table-sm { background: #f8fafc; border-radius: 14px; overflow: hidden; border: 1px solid var(--af-line); }
.content-section .offset-md-9 .table-sm td, .content-section .offset-md-8 .table-sm td { border: 0; padding: 9px 14px; background: transparent !important; box-shadow: none !important; color: #475569; font-size: 14px; }
.content-section .offset-md-9 .table-sm td:last-child, .content-section .offset-md-8 .table-sm td:last-child { text-align: right; color: var(--af-ink); font-weight: 600; white-space: nowrap; }
.content-section .offset-md-9 .table-sm tr:last-child td, .content-section .offset-md-8 .table-sm tr:last-child td { border-top: 1px dashed #d5dce5; font-size: 18px; font-weight: 600; color: var(--af-ink); padding-top: 12px; padding-bottom: 12px; }
.content-section form button[type="submit"].btn-primary { padding: 11px 26px; font-size: 15px; border-radius: 12px; box-shadow: 0 6px 16px rgba(78,151,253,.25); }
.content-section .input-group-text { border-radius: 0 10px 10px 0; background: #f8fafc; border-color: #dfe5ec; }
@media (min-width: 992px) { .content-section .offset-md-9 { margin-left: 66.666%; flex: 0 0 33.333%; max-width: 33.333%; } }
.content-section .v-select .vs__search, .content-section .v-select .vs__search:focus { background: transparent !important; border: 0 !important; box-shadow: none !important; }
#nprogress .spinner { display: none !important; }
#nprogress .bar { background: var(--af-acc) !important; height: 3px !important; }
.af-nav-badge { margin-left: auto; background: #f5c518; color: #1a1a1a; font-size: 11px; font-weight: 600; border-radius: 20px; padding: 1px 8px; line-height: 1.5; }
.af-nav-badge-red { background: #fecaca; color: #b91c1c; }
.sidebar-content.compact .af-nav-badge { display: none; }
.sidebar-content.compact:hover .af-nav-badge { display: inline; }
.af-k-act { cursor: pointer; }
.af-k-act:hover { border-color: #c7dcfb; }
.af-k.on { border-color: var(--af-acc); box-shadow: 0 0 0 3px rgba(78,151,253,.15); }
#af_pay_modal .table th, #af_pay_modal .table td { padding: 10px 14px; font-size: 13.5px; }
#af_pay_modal tfoot th { background: #f8fafc; }
.af-acts .af-ab-wa { background: #25d366 !important; border-color: #25d366 !important; color: #fff !important; }
.af-acts .af-ab-wa:hover { background: #1fb457 !important; color: #fff !important; }

.af-ini { width: 36px; height: 36px; font-size: 12.5px; }
.af-nowrap { white-space: nowrap; }
/* sauf le petit resume des montants (libelle a gauche, montant a droite) */
.content-section .offset-md-9 .table-sm td:first-child, .content-section .offset-md-8 .table-sm td:first-child { text-align: left !important; }
.content-section .offset-md-9 .table-sm td:last-child, .content-section .offset-md-8 .table-sm td:last-child { text-align: right !important; }

/* listes : colonnes centrees (ventes, achats, clients, fournisseurs, produits...) */
.content-section table.dataTable thead th, .content-section table.dataTable tbody td, .content-section table.dataTable tfoot th { text-align: center !important; vertical-align: middle; }
.content-section table.dataTable .af-client, .content-section table.dataTable .af-who { justify-content: center; }
.content-section table.dataTable .af-client > div { text-align: left; }
.content-section table.dataTable .af-acts { justify-content: center; }

/* listes plus serrees : nom du client sur une ligne, moins de marge par ligne */
.content-section table.dataTable > tbody > tr > td { padding-top: 7px; padding-bottom: 7px; padding-left: 10px; padding-right: 10px; }
.af-wrap .af-cell-main { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.af-cell-sub { margin-top: 0; }
@media (max-width: 1500px) {
 .content-section table.dataTable > thead > tr > th, .content-section table.dataTable > tbody > tr > td, .content-section table.dataTable > tfoot > tr > th { padding-left: 5px !important; padding-right: 5px !important; }
 .content-section table.dataTable > tbody > tr > td { font-size: 12.5px; }
 .content-section table.dataTable .af-cell-sub { font-size: 11.5px; }
 .content-section table.dataTable > thead > tr > th { font-size: 10.5px; letter-spacing: .02em; }
 .af-wrap .af-cell-main { max-width: 180px; }
 .af-acts .af-ab, .af-acts .af-more { width: 28px !important; height: 28px !important; }
 .af-acts { gap: 3px !important; }
 .badge.af-st { min-width: 0 !important; padding: 5px 9px !important; font-size: 11px !important; }
}
@media (max-width: 1300px) { .af-cur { display: none; } }
@media (max-width: 1300px) {
 .content-section table.dataTable > tfoot > tr > th { font-size: 11px; }
 .af-wrap .af-cell-main { min-width: 110px; max-width: 160px; }
 .content-section table.dataTable .af-cell-main { font-size: 12px; }
}
.content-section table.dataTable .af-wrap .af-cell-main { margin-left: auto; margin-right: auto; }
@media (max-width: 1300px) { .af-k b { font-size: 17px; } .af-k { padding: 13px 14px; gap: 10px; } }
.content-section table .badge.af-mini { padding: 1px 7px !important; font-size: 10.5px !important; border-radius: 6px; vertical-align: 1px; }
/* colonnes avec rond / photo + nom : alignees a gauche pour que les ronds soient bien les uns sous les autres */
.content-section table.dataTable thead th.af-left, .content-section table.dataTable tbody td.af-left, .content-section table.dataTable tfoot th.af-left { text-align: left !important; }
.content-section table.dataTable td.af-left .af-client { justify-content: flex-start; }
.content-section table.dataTable td.af-left .af-cell-main { margin-left: 0; margin-right: 0; }

/* ---- menu de gauche reduit : une colonne d'icones propre, le detail s'ouvre a cote ---- */
.layout-sidebar.compact { overflow: visible !important; }
.sidebar-content.compact, .sidebar-content.compact:hover { width: 80px !important; padding: 16px 10px 12px; }
.sidebar-content.compact .item-name, .sidebar-content.compact:hover .item-name,
.sidebar-content.compact .collapse-icon, .sidebar-content.compact:hover .collapse-icon,
.sidebar-content.compact .af-sec, .sidebar-content.compact:hover .af-sec,
.sidebar-content.compact .af-user-txt, .sidebar-content.compact:hover .af-user-txt,
.sidebar-content.compact .af-online-txt, .sidebar-content.compact:hover .af-online-txt,
.sidebar-content.compact .af-cur, .sidebar-content.compact:hover .af-cur,
.sidebar-content.compact .af-nav-badge, .sidebar-content.compact:hover .af-nav-badge,
.sidebar-content.compact .af-sp-brand { display: none !important; }
.sidebar-content.compact .collapse-content { display: none !important; }
.sidebar-content.compact .collapse-button, .sidebar-content.compact:hover .collapse-button,
.sidebar-content.compact .nav-item, .sidebar-content.compact:hover .nav-item { justify-content: center !important; padding: 11px 0 !important; }
.sidebar-content.compact .collapse-button > div, .sidebar-content.compact .nav-item { width: 100%; justify-content: center; }
.sidebar-content.compact .af-ic { margin: 0 !important; width: 21px; height: 21px; }
.sidebar-content.compact #menu > li.af-fly-cur > .collapse-button, .sidebar-content.compact #menu > li.af-fly-cur > a.nav-item { background: rgba(255, 255, 255, .09); border-radius: 12px; }
.sidebar-content.compact .af-brand, .sidebar-content.compact:hover .af-brand { flex-direction: column; justify-content: center; gap: 10px; padding: 0 0 12px; }
.sidebar-content.compact .af-brand-logo, .sidebar-content.compact:hover .af-brand-logo { width: 46px; }
.sidebar-content.compact .compact-button, .sidebar-content.compact:hover .compact-button { display: flex !important; }
.sidebar-content.compact .af-user, .sidebar-content.compact .af-online { justify-content: center; }
.af-fly { position: fixed; z-index: 1060; min-width: 210px; max-width: 280px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 14px 36px -12px rgba(15, 23, 42, .35); padding: 8px; display: none; }
.af-fly.on { display: block; }
.af-fly-t { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; padding: 6px 10px 6px; }
.af-fly-a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 9px; color: #1f2937 !important; font-size: 14px; text-decoration: none !important; }
.af-fly-a:hover { background: #f1f6ff; color: #1d4ed8 !important; }
.af-fly-a.act { color: #2563eb !important; background: #eff6ff; font-weight: 600; }
.af-fly-one { font-weight: 600; }
.af-fly-b { font-size: 11px; background: #fee2e2; color: #b91c1c; border-radius: 10px; padding: 1px 7px; }

/* ---- detail d'un achat : tableau net, chiffres alignes a droite, GNF en petit dessous ---- */
.af-dt { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.af-dt thead th { background: #f8fafc; color: #64748b; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 0 !important; border-bottom: 1px solid #cbd3dd !important; padding: 10px 12px !important; white-space: nowrap; }
.af-dt tbody td { border: 0 !important; border-bottom: 1px solid #d5dbe3 !important; padding: 9px 12px !important; vertical-align: middle; }
.af-dt tbody tr:hover td { background: #fafcff; }
.af-dt .af-dt-p { min-width: 220px; }
.af-dt .af-dt-p small { display: block; color: #94a3b8; font-size: 12px; margin-top: 2px; }
.af-dt .af-dt-q { text-align: center; white-space: nowrap; }
.af-dt .af-dt-n { text-align: right; white-space: nowrap; }
.af-dt td.af-dt-n small { display: block; color: #94a3b8; font-size: 11.5px; margin-top: 1px; }
.af-dt td.af-dt-t { font-weight: 600; }

/* ---- la barre du haut (recherche, Nouveau, Point de vente...) reste en place quand on descend ---- */
.layout-content > .layout-header.af-top { position: sticky; top: 0; z-index: 45; }
.af-dt th.af-dt-q, .af-dt td.af-dt-q, .af-dt th.af-dt-n, .af-dt td.af-dt-n { width: 1%; padding-left: 28px !important; }
.af-dt td.af-dt-n, .af-dt th.af-dt-n { min-width: 130px; }
