/* aw-pos.css — POS / caisse / impression ticket (extrait de app.css)
   Chargé après aw-ui / aw-grh. */

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   10. COMMANDE POS â€” catalogue bar / comptoir
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.commande-pos-tab {
    padding: 1rem 1.25rem 1.5rem !important;
}

.pos-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    min-height: 520px;
}

.pos-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.pos-catalog-panel,
.pos-cart-panel {
    border: 1px solid var(--rz-border-color);
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--rz-border-color);
    flex-wrap: wrap;
}

.pos-search {
    max-width: 260px;
    min-width: 180px;
}

.pos-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
    max-height: 560px;
    align-content: start;
}

.pos-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--rz-border-color);
    border-radius: 12px;
    padding: 0;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
    overflow: hidden;
    min-height: 210px;
}

.pos-product-card:hover {
    transform: scale(1.02);
    border-color: #00B193;
    box-shadow: 0 4px 16px rgba(0, 177, 147, 0.2);
}

.pos-product-card--active {
    border-color: #00B193;
    box-shadow: 0 0 0 3px rgba(0, 177, 147, 0.25);
}

.pos-qty-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    background: #00B193;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pos-product-card__img {
    height: 150px;
    background: var(--bs-tertiary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pos-product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-product-card__info {
    padding: 0.65rem 0.75rem 0.8rem;
}

.pos-product-card__name {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-card__price {
    margin-top: 0.25rem;
    font-weight: 700;
    color: #00B193;
    font-size: 0.95rem;
}

.pos-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bs-secondary-color);
}

.pos-empty i {
    font-size: 3rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.75rem;
}

.pos-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--rz-border-color);
}

.pos-cart-lines {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    min-height: 180px;
    max-height: 320px;
}

.pos-cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--rz-border-color);
}

.pos-cart-line:last-child {
    border-bottom: none;
}

.pos-cart-line__main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.pos-cart-line__thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.pos-cart-line__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pos-cart-line__qty {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.pos-cart-footer {
    padding: 1rem;
    border-top: 1px solid var(--aw-line, #e2e8f0);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.pos-cart-footer__actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pos-total-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 2px solid #00B193;
    border-radius: 8px;
    font-size: 1.1rem;
}

.pos-total-box strong {
    font-size: 1.35rem;
    color: #00B193;
}

.pos-print-root {
    display: none;
}

.pos-print-doc {
    padding: 24px;
    font-family: Arial, sans-serif;
    max-width: 80mm;
}

.pos-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 12px 0;
}

.pos-print-table th,
.pos-print-table td {
    border-bottom: 1px solid #ddd;
    padding: 4px 2px;
    text-align: left;
}

.pos-print-total {
    font-size: 16px;
    font-weight: bold;
    text-align: right;
    margin-top: 8px;
}

@media (max-width: 992px) {
    .pos-shell {
        grid-template-columns: 1fr;
    }
    .pos-catalog-grid {
        max-height: 380px;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }
    #pos-print-root,
    #pos-print-root * {
        visibility: visible !important;
    }
    #pos-print-root {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   SETTINGS PAGE â€” Lovable-inspired design
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.stg-page {
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 80px;
}
.stg-page--wide {
    max-width: 1200px;
}

.stg-card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,177,147,0.06);
    overflow: hidden;
}

/* Section header */
.stg-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 26px 20px 12px 20px;
}
.stg-section-icon {
    color: #00B193;
    font-size: 15px;
}
.stg-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(76, 110, 147, 0.55);
    white-space: nowrap;
}
.stg-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(0,177,147,0.2), transparent);
    margin-left: 4px;
}

/* Rows container */
.stg-rows {
    padding: 0 4px;
}
.stg-rows--last {
    padding-bottom: 8px;
}

/* Two-column grid */
.stg-rows--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.stg-rows--2col > .stg-row {
    border-bottom: none;
}
.stg-rows--2col > .stg-row:nth-child(odd) {
    border-right: 1px solid #eaf0ee;
}
@media (max-width: 860px) {
    .stg-page--wide { max-width: 100%; }
    .stg-rows--2col { grid-template-columns: 1fr; }
    .stg-rows--2col > .stg-row:nth-child(odd) { border-right: none; }
}

/* Single row */
.stg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    transition: background 0.15s;
}
.stg-row:hover {
    background: #f8fafa;
}
.stg-row--tall {
    align-items: flex-start;
}

.stg-row-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.stg-row-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5f2;
    color: #00B193;
    font-size: 17px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.stg-row:hover .stg-row-icon {
    background: #d5f0ea;
}

.stg-row-label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4C6E93;
    line-height: 1.3;
}
.stg-row-desc {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: #7a8f99;
    line-height: 1.3;
}

.stg-row-ctrl {
    flex-shrink: 0;
    margin-left: 20px;
}

.stg-input {
    background: #f8fafa;
    border-color: #d5e3df;
    font-size: 13px;
}
.stg-input:focus {
    border-color: #00B193;
    box-shadow: 0 0 0 2px rgba(0,177,147,0.15);
}

/* Sticky footer */
.stg-footer {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e0ebe8;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    z-index: 5;
}

.stg-footer-reset {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #ef4444;
    background: transparent;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.stg-footer-reset:hover {
    background: rgba(239,68,68,0.08);
    color: #dc2626;
}

.stg-footer-right {
    display: flex;
    gap: 10px;
}

.stg-footer-cancel {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #4C6E93;
    background: #f0f4f3;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.stg-footer-cancel:hover {
    background: #e4ecea;
}

.stg-footer-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #00B193, #00997d);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,177,147,0.25);
    transition: box-shadow 0.15s, transform 0.1s;
}
.stg-footer-save:hover {
    box-shadow: 0 4px 14px rgba(0,177,147,0.35);
}
.stg-footer-save:active {
    transform: scale(0.98);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   9. FACTURATION â€” Lovable-inspired layout
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.fact-shell {
    margin: 0;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--rz-base-100, #f8f9fb);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Header */
.fact-header {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    align-self: stretch;
    padding: 0.55rem 1rem; background: #fff;
    border-bottom: 1px solid var(--aw-line, #e5e7eb); flex-shrink: 0;
    gap: 0.75rem;
}
.fact-header .aw-object-head__title { font-size: 1.05rem; }
.fact-header .aw-object-head__eyebrow { font-size: 0.62rem; }
.fact-header-left { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.fact-back-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 0;
    border: 1px solid var(--rz-base-200, #e2e8f0); background: #fff;
    color: var(--rz-text-secondary-color, #64748b);
    cursor: pointer; transition: all 0.15s; padding: 0;
}
.fact-back-btn:hover { background: var(--rz-base-100, #f3f4f6); color: var(--rz-text-color); }
.fact-back-btn .rz-icon { font-size: 16px; }
.fact-header-brand { display: flex; align-items: center; gap: 10px; }
.fact-header-icon {
    width: 36px; height: 36px; border-radius: 0;
    background: #00B193; color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.fact-header-icon .rz-icon { font-size: 18px; }
.fact-header-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 600; color: var(--rz-text-secondary-color, #9ca3af);
    margin: 0; line-height: 1.2;
}
.fact-header-title {
    font-size: 15px; font-weight: 600; color: var(--rz-text-color, #1f2937);
    margin: 0; line-height: 1.3;
}
.fact-header-right { display: flex; align-items: center; gap: 8px; }
.fact-badge-mono {
    font-family: 'Consolas', 'Monaco', monospace; font-size: 11px;
    background: var(--rz-base-200, #e2e8f0); padding: 3px 10px; border-radius: 0;
    color: var(--rz-text-secondary-color, #64748b);
}
.fact-badge-draft {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 600; padding: 4px 12px; border-radius: 0;
    background: var(--rz-base-200, #e2e8f0); color: var(--rz-text-secondary-color, #64748b);
}

/* Two-column body */
.fact-body {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    align-self: stretch;
}

/* LEFT column */
.fact-left {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border-right: 1px solid var(--rz-base-200, #e5e7eb);
}

/* Client bar */
.fact-client-bar {
    padding: 10px 20px; border-bottom: 1px solid var(--rz-base-200, #e5e7eb); flex-shrink: 0;
}
.fact-client-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 0;
    background: var(--rz-base-100, #f8fafc); border: 1px solid var(--rz-base-200, #e2e8f0);
}
.fact-client-pill-name { font-size: 13px; font-weight: 500; color: var(--rz-text-color); }
.fact-client-pill-phone { font-size: 12px; color: var(--rz-text-secondary-color, #6b7280); }
.fact-client-pill-x {
    margin-left: auto; display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 0;
    border: none; background: transparent;
    color: var(--rz-text-secondary-color, #94a3b8); cursor: pointer;
    transition: all 0.15s; padding: 0;
}
.fact-client-pill-x:hover { background: rgba(166, 27, 12, 0.08); color: #da4f49; }
.fact-client-search {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 0;
    background: var(--rz-base-100, #f8fafc); border: 1px solid var(--rz-base-200, #e2e8f0);
}

/* Search bar */
.fact-search-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: #fff;
    border-bottom: 1px solid var(--rz-base-200, #e5e7eb); flex-shrink: 0;
}
.fact-search-wrapper { position: relative; flex: 1 1 auto; min-width: 0; height: 38px; }
.fact-search-icon-wrap {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; z-index: 1;
}
.fact-search-input {
    display: block; width: 100%; height: 38px; box-sizing: border-box;
    border-radius: 0; border: 1px solid var(--rz-base-200, #e2e8f0);
    padding: 0 14px 0 40px; font-size: 13px;
    background: var(--rz-base-100, #f8fafc);
    outline: none; color: var(--rz-text-color, #1e293b);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fact-search-input::placeholder { color: var(--rz-text-secondary-color, #94a3b8); }
.fact-search-input:focus {
    border-color: #00B193;
    box-shadow: 0 0 0 3px rgba(0, 177, 147, 0.1); background: #fff;
}
.fact-scanner-btn {
    display: flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 16px;
    border: none; border-radius: 0;
    background: #00B193; color: #fff;
    font-size: 13px; font-weight: 500; cursor: pointer;
    white-space: nowrap; transition: background 0.15s;
}
.fact-scanner-btn:hover { background: #009a7d; }
.fact-scanner-btn .rz-icon { font-size: 17px; }

/* Suggestions */
.fact-suggestions {
    position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px;
    max-height: 280px; overflow-y: auto; border-radius: 0;
    border: 1px solid var(--rz-base-200, #e2e8f0); background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); z-index: 30;
}
.fact-suggestion-item {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 10px 14px; border: none; background: none;
    text-align: left; cursor: pointer;
    border-bottom: 1px solid var(--rz-base-100, #f1f5f9); transition: background 0.1s;
}
.fact-suggestion-item:last-child { border-bottom: none; }
.fact-suggestion-item:hover { background: var(--rz-base-100, #f8fafc); }
.fact-suggestion-left { display: flex; align-items: center; gap: 10px; }
.fact-suggestion-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 0;
    background: var(--rz-base-200, #e2e8f0); flex-shrink: 0;
}
.fact-suggestion-icon .rz-icon { font-size: 16px; color: var(--rz-text-secondary-color, #64748b); }
.fact-suggestion-name { font-size: 13px; font-weight: 500; color: var(--rz-text-color, #1e293b); }
.fact-suggestion-meta { font-size: 11px; color: var(--rz-text-secondary-color, #94a3b8); }
.fact-suggestion-price { font-size: 13px; font-weight: 600; color: var(--rz-text-color); white-space: nowrap; }

/* Items area */
.fact-items-area {
    flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 12px 16px;
}
.fact-items-list { display: flex; flex-direction: column; gap: 8px; }

/* Item card */
.fact-item-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: 0;
    background: #fff; border: 1px solid var(--rz-base-200, #e2e8f0);
    box-shadow: 0 1px 4px -1px rgba(0,0,0,0.05); transition: box-shadow 0.15s;
}
.fact-item-card:hover { box-shadow: 0 2px 8px -2px rgba(0,0,0,0.1); }
.fact-item-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.fact-item-idx {
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 0;
    background: var(--rz-base-100, #f8fafc);
    font-size: 11px; font-weight: 700; color: var(--rz-text-secondary-color, #94a3b8); flex-shrink: 0;
}
.fact-item-info { flex: 1; min-width: 0; }
.fact-item-name {
    font-size: 13px; font-weight: 500; color: var(--rz-text-color, #1e293b);
    margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fact-item-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; color: var(--rz-text-secondary-color, #94a3b8); margin: 2px 0 0;
}
.fact-code-chip {
    display: inline-block; font-family: 'Consolas', 'Monaco', monospace; font-size: 10px;
    background: var(--rz-base-200, #e2e8f0); padding: 1px 6px; border-radius: 0;
    color: var(--rz-text-secondary-color, #64748b);
}
.fact-item-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.fact-item-total {
    font-size: 13px; font-weight: 600; color: var(--rz-text-color); white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.fact-item-total-block {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 88px;
}
.fact-item-total-equiv {
    font-size: 11px; font-weight: 500; color: #059669; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Qty controls */
.fact-qty { display: flex; align-items: center; gap: 2px; }
.fact-qty-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 0;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    background: #fff; color: var(--rz-text-secondary-color, #64748b);
    cursor: pointer; transition: all 0.15s; padding: 0;
}
.fact-qty-btn:hover:not(:disabled) { background: var(--rz-base-100, #f8fafc); color: var(--rz-text-color); }
.fact-qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.fact-qty-btn .rz-icon { font-size: 15px; }
.fact-qty-val,
.fact-qty-input {
    min-width: 44px; max-width: 72px; text-align: center; font-size: 14px; font-weight: 600;
    color: var(--rz-text-color); font-variant-numeric: tabular-nums;
}
.fact-qty-input {
    height: 28px; padding: 0 4px;
    border: 1px solid var(--rz-base-300, #cbd5e1); border-radius: 4px;
    background: var(--rz-base-background-color, #fff);
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.fact-qty-input:focus {
    border-color: var(--rz-primary, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.fact-rounding-row { font-size: 12px; color: #64748b; }

/* Delete */
.fact-del-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 0;
    border: none; background: transparent;
    color: var(--rz-text-secondary-color, #94a3b8);
    cursor: pointer; transition: all 0.15s; padding: 0;
}
.fact-del-btn:hover { background: rgba(166, 27, 12, 0.08); color: #da4f49; }
.fact-del-btn .rz-icon { font-size: 16px; }

/* Empty state */
.fact-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; padding: 40px 20px; gap: 8px; opacity: 0.5;
}
.fact-empty-circle {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 0;
    background: var(--rz-base-200, #e2e8f0); margin-bottom: 4px;
}
.fact-empty-circle .rz-icon { font-size: 24px; color: var(--rz-text-secondary-color, #94a3b8); }
.fact-empty-title { font-size: 14px; font-weight: 500; color: var(--rz-text-secondary-color); margin: 0; }
.fact-empty-hint { font-size: 12px; color: var(--rz-text-secondary-color); margin: 0; }

/* RIGHT column (sidebar) — sticky totals + actions */
.fact-right {
    width: 340px;
    display: flex;
    flex-direction: column;
    background: #fff;
    flex-shrink: 0;
    overflow: hidden;
    min-height: 0;
    border-left: 1px solid var(--aw-line, #cbd5e1);
}
.fact-right-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.fact-right-sticky {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid var(--aw-line, #cbd5e1);
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06);
    z-index: 2;
}
.fact-sb-section {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--aw-line, #e2e8f0);
}
.fact-sb-label {
    display: block; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--rz-text-secondary-color, #6b7280); margin-bottom: 8px;
}
.fact-sb-two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.fact-reduction-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.fact-loc-readonly {
    display: flex;
    align-items: center;
    min-height: var(--aw-control-h, 2.15rem);
    padding: 0 0.65rem;
    border: 1px solid #94a3b8;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--aw-ink, #0f172a);
    background: #f8fafc;
}
.fact-pct-badge {
    display: flex; align-items: center; justify-content: center;
    min-width: 28px; height: 28px; border-radius: 0;
    background: var(--rz-base-200, #e2e8f0);
    font-size: 12px; font-weight: 600; color: var(--rz-text-secondary-color, #64748b);
}

/* Totals */
.fact-sb-totals {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem 0.45rem;
}
.fact-sb-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.78rem; color: #475569;
}
.fact-sb-val {
    font-weight: 650;
    color: var(--aw-ink, #0f172a);
    font-variant-numeric: tabular-nums;
}
.fact-sb-divider { height: 1px; background: var(--aw-line, #e2e8f0); margin: 0.25rem 0; }
.fact-sb-net {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--aw-ink, #0f172a);
    align-items: baseline;
}
.fact-net-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007a68;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.fact-amount-words { padding: 2px 0; font-size: 11px; color: #777; font-style: italic; text-align: right; }
.fact-amount-equiv {
    padding: 0;
    font-size: 0.68rem;
    color: #64748b;
    text-align: right;
}

/* Actions pinned — always visible */
.fact-sb-actions {
    padding: 0.55rem 0.9rem 0.75rem;
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    background: var(--rz-base-50, #f8fafc);
}
.fact-sb-actions .rz-button {
    min-height: 2.35rem;
}
.fact-sb-actions__primary {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}
.fact-sb-actions__secondary {
    flex: 0 0 auto;
    white-space: nowrap;
}
/* Bouton Valider désactivé (0 article) : rester lisible */
.fact-sb-actions .fact-sb-actions__primary.rz-button.rz-state-disabled {
    opacity: 1;
    background: var(--rz-base-300, #dee2e6) !important;
    color: var(--rz-text-secondary-color, #64748b) !important;
    border-color: var(--rz-base-400, #ced4da) !important;
    cursor: not-allowed;
}
.fact-sb-actions .aw-rz-btn--ghost,
.fact-sb-actions .rz-button.rz-variant-outlined {
    background: #fff;
}

/* Responsive */
@media (min-width: 1400px) { .fact-right { width: 360px; } }
@media (max-width: 1100px) {
    .fact-right { width: 300px; }
    .fact-sb-section { padding: 0.6rem 0.75rem; }
    .fact-sb-totals, .fact-sb-actions { padding-left: 0.75rem; padding-right: 0.75rem; }
}
@media (max-width: 860px) {
    .fact-right { width: 270px; }
    .fact-header { padding: 8px 14px; }
    .fact-search-bar { padding: 8px 14px; }
    .fact-client-bar { padding: 8px 14px; }
    .fact-scanner-btn span:not(.rz-icon) { display: none; }
    .fact-scanner-btn { padding: 0 10px; min-width: auto; }
    .fact-items-area { padding: 8px 10px; }
    .fact-sb-actions { flex-wrap: wrap; }
    .fact-sb-actions__primary { width: 100%; flex: 1 1 100%; }
}
@media (max-width: 640px) {
    .fact-header-right { display: none; }
    .fact-right { width: 100%; max-width: none; max-height: 42vh; }
    .fact-body { flex-direction: column; }
    .fact-left { border-right: none; border-bottom: 1px solid var(--rz-base-200, #e5e7eb); }
    .fact-sb-two-cols { grid-template-columns: 1fr; gap: 6px; }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   10. IMPRESSION
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media print {
    /* â”€â”€ Masquer tout sauf le contenu du tableau â”€â”€ */
    .sidebar, .topbar, .topbar-actions, .topbar-user,
    .sb-footer, .fact-header, .fact-sb-actions,
    .fact-scanner-btn, .fact-back-btn,
    .topnav, .topnav--unified,
    .report-header, .report-toolbar,
    .nav-tabs, .hub-tabs-shell > .nav,
    .report-tabs-shell > .nav,


        display: block; font-size: 16px; font-weight: 700;
        margin-bottom: 8px; border-bottom: 2px solid #333; padding-bottom: 6px;
    }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    @page { margin: 15mm 12mm; }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   11. BOOTSTRAP BUTTONS OVERRIDES
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Square corners for all Bootstrap buttons */
.btn {
    border-radius: 0 !important;
}

/* Primary button - green */
.btn-primary {
    background-color: #00B193 !important;
    border-color: #00B193 !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #009a7d !important;
    border-color: #009a7d !important;
    color: #fff !important;
}

/* Secondary button - dark teal */
.btn-secondary {
    background-color: #4C6E93 !important;
    border-color: #4C6E93 !important;
    color: #fff !important;
}
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: #385472 !important;
    border-color: #385472 !important;
}

/* Danger button - accent red */
.btn-danger {
    background-color: #da4f49 !important;
    border-color: #da4f49 !important;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: #bd362f !important;
    border-color: #bd362f !important;
}

/* Outline primary - green outline */
.btn-outline-primary {
    color: #00B193 !important;
    border-color: #00B193 !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #00B193 !important;
    border-color: #00B193 !important;
    color: #fff !important;
}

/* Outline secondary - dark teal outline */
.btn-outline-secondary {
    color: #4C6E93 !important;
    border-color: #4C6E93 !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: #4C6E93 !important;
    border-color: #4C6E93 !important;
    color: #fff !important;
}

/* Badge overrides */
.badge {
    border-radius: 0 !important;
}

.bg-primary {
    background-color: #4C6E93 !important;
}

.bg-secondary {
    background-color: #00B193 !important;
}

.bg-danger {
    background-color: #da4f49 !important;
}

.text-primary {
    color: #4C6E93 !important;
}

.text-secondary {
    color: #00B193 !important;
}

.text-danger {
    color: #da4f49 !important;
}

/* Alert overrides */
.alert {
    border-radius: 0 !important;
}

/* Input/Form control square corners */
.form-control,
.form-select {
    border-radius: 0 !important;
}

/* Card square corners */
.card {
    border-radius: 0 !important;
}

/* Dropdown square corners */
.dropdown-menu {
    border-radius: 0 !important;
}

.dropdown-item {
    border-radius: 0 !important;
}

/* Modal square corners */
.modal-content {
    border-radius: 0 !important;
}

/* Input group square corners */
.input-group > .form-control,
.input-group > .form-select,
.input-group > .btn {
    border-radius: 0 !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FORCE REMOVE ALL RADIUS - NO ROUNDED ANYWHERE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Badge - absolutely no radius */
.badge,
.badge.rounded-pill {
    border-radius: 0 !important;
}

/* Dropdown items */
.dropdown-item,
.dropdown-menu {
    border-radius: 0 !important;
}

/* Alert boxes */
.alert {
    border-radius: 0 !important;
}

/* Pagination */
.pagination .page-link,
.page-link {
    border-radius: 0 !important;
}

/* List group items */
.list-group-item,
.list-group-item.active,
.list-group-item:first-child,
.list-group-item:last-child {
    border-radius: 0 !important;
}

/* Progress bar */
.progress,
.progress-bar {
    border-radius: 0 !important;
}

/* Carousel */
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators [data-bs-target] {
    border-radius: 0 !important;
}

/* Popovers */
.popover {
    border-radius: 0 !important;
}

/* Tooltips */
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow,
.bs-tooltip-top .tooltip-arrow,
.tooltip {
    border-radius: 0 !important;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Bootstrap nav-tabs â€” custom flat style
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.nav-tabs {
    border-bottom: 1px solid #e2e8f0;
    background: #f1f5f9;
    gap: 0;
}

.nav-tabs .nav-link {
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 2px solid transparent !important;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-tabs .nav-link:hover {
    color: #4C6E93;
    background: rgba(0, 177, 147, 0.06);
    border-bottom-color: #cbd5e1 !important;
}

.nav-tabs .nav-link.active {
    color: #00B193 !important;
    background: #ffffff !important;
    border-bottom: 2px solid #00B193 !important;
    box-shadow: none;
}

.nav-tabs .nav-link i {
    font-size: 0.85rem;
}

/* Nav pills */
.nav-pills .nav-link {
    border-radius: 0 !important;
}

/* Breadcrumb */
.breadcrumb {
    border-radius: 0 !important;
}

/* Avatar and img-thumbnail */
.avatar,
.img-thumbnail {
    border-radius: 0 !important;
}

/* Spinners */
.spinner-border,
.spinner-grow {
    border-radius: 0 !important;
}

/* Close button */
.btn-close {
    border-radius: 0 !important;
}

/* Form check inputs */
.form-check-input {
    border-radius: 0 !important;
}

/* Range slider */
.form-range {
    border-radius: 0 !important;
}

/* Offcanvas */
.offcanvas {
    border-radius: 0 !important;
}

/* Toasts */
.toast {
    border-radius: 0 !important;
}


}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   12. DARK MODE â€” Comprehensive overrides
   All [data-bs-theme="dark"] rules consolidated here
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Layout: Topbar â”€â”€ */
[data-bs-theme="dark"] .topbar {
    background: #0f172a;
    border-bottom-color: rgba(255,255,255,0.06);
}
[data-bs-theme="dark"] .topbar-page-name { color: #e2e8f0; }
[data-bs-theme="dark"] .topbar-date { color: #94a3b8; }
[data-bs-theme="dark"] .topbar-btn {
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
}
[data-bs-theme="dark"] .topbar-btn:hover {
    background: rgba(0,158,132,0.16);
    color: #5eead4;
}
[data-bs-theme="dark"] .topbar-user {
    border-left-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .topbar-user:hover { background: rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .topbar-user-name { color: #e2e8f0; }
[data-bs-theme="dark"] .topbar-user-role { color: #94a3b8; }
[data-bs-theme="dark"] .topbar-brand { color: #e2e8f0; }
[data-bs-theme="dark"] .topbar-avatar {
    background: rgba(0,158,132,0.22);
    color: #5eead4;
}
