/* ===== WRAPPER ===== */

/* Sur la page app, supprimer le padding du container et bloquer le scroll body */
body:has(.app-wrapper) {
    overflow: hidden;
}

.container:has(.app-wrapper) {
    padding: 0;
}

.app-wrapper {
    height: calc(100vh - 56px); /* 56px = hauteur du header */
    display: flex;
    flex-direction: column;
}

/* ===== TOP BAR ===== */
.top-bar {
    width: 100%;
    display: flex;
    flex-direction: column;

    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #eee;

    box-sizing: border-box;
}

.top-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mode-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-bar {
    display: flex;
    gap: 10px;
}

.mode-btn {
    height: 56px;
    padding: 0 22px;
    border: 3px solid transparent;
    border-radius: 10px;
    background: #f0f2f5;
    color: #555;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mode-btn[data-mode="in"].active    { background: #e8f4fd; color: #0070cc; border-color: #00a8ff; }
.mode-btn[data-mode="out"].active   { background: #fdecea; color: #c0392b; border-color: #e74c3c; }
.mode-btn[data-mode="kit"].active   { background: #eaf3fd; color: #1a6fb5; border-color: #2980b9; }
.mode-btn[data-mode="kit-in"].active { background: #eafaf1; color: #1e8449; border-color: #27ae60; }
.mode-btn-inventory                 { background: #1a2a4a; color: #a8c8ff; }
.mode-btn-inventory.active          { background: #1a2a4a; color: #fff;    border-color: #4a90d9; }
.mode-sep { display: inline-block; width: 1px; height: 36px; background: #ccc; align-self: center; margin: 0 4px; }

.mode-extra-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 12px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.mode-extra-toggle:hover {
    color: #555;
    border-color: #aaa;
    background: #f5f5f5;
}

.mode-extra-toggle .icon {
    width: 15px;
    height: 15px;
    transition: transform 0.2s;
}

.mode-extra-toggle.open .icon {
    transform: rotate(180deg);
}

.mode-extra {
    display: none;
    gap: 10px;
    padding-top: 10px;
    flex-wrap: wrap;
}

.mode-extra.open {
    display: flex;
}

.destination-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.destination-arrow {
    width: 18px;
    height: 18px;
    color: #aaa;
    flex-shrink: 0;
}

#selected-kit-name.destination-name--clickable {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

#selected-kit-name.destination-name--clickable:hover {
    opacity: 0.7;
}

.kit-btn {
    height: 48px;
    padding: 0 18px;
    border-radius: 8px;
    border: none;
    background: #273c75;
    color: white;
    font-size: 15px;
    font-weight: 600;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

#selected-kit-name {
    font-size: 22px;
    font-weight: 700;
    color: #273c75;
    padding: 4px 10px;
    border-left: 4px solid #273c75;
}

/* ===== MODAL KIT — colonnes ===== */
.kit-columns {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-top: 10px;
}

.kit-column {
    min-width: 180px;
    flex: 1;
    background: #f9fafc;
    border-radius: 10px;
    padding: 10px;
}

.kit-column-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    color: #555;
}

.kit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kit-item {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 16px;
    min-height: 64px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s;
}

.kit-item:hover, .kit-item:active {
    background: #eef6ff;
    border-color: #c5e8ff;
}

/* ===== MAIN ===== */
.app-main {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

.app-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-right {
    width: 40%;
    background: white;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* ===== SCAN INPUT ===== */
/* scan row = input + bouton saisie manuelle */
.scan-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.scan-input-row #test-scan { flex: 1; }

.manual-trigger-btn {
    flex-shrink: 0;
    background: #f5f7fa;
    border: 2px dashed #c5d8e8;
    border-radius: 10px;
    width: 48px;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.manual-trigger-btn:hover,
.manual-trigger-btn:active { background: #e8f4ff; border-color: #00a8ff; color: #00a8ff; }

#test-scan {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    border: 2px dashed #c5e8ff;
    border-radius: 10px;
    background: #f7fbff;
    box-sizing: border-box;
    outline: none;
    text-align: center;
    color: #888;
    transition: border-color 0.15s, background 0.15s;
}

#test-scan:focus {
    border-color: #00a8ff;
    border-style: solid;
    background: #eef6ff;
    color: #333;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-image-box {
    height: 180px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
}

.product-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    font-size: 16px;
    line-height: 1.6;
}

.product-info h2 {
    font-size: 22px;
    margin: 0 0 6px;
}

.product-info .expiry-ok    { color: #1e8449; font-weight: 600; }
.product-info .expiry-warn  { color: #d68910; font-weight: 600; }
.product-info .expiry-late  { color: #c0392b; font-weight: 600; }

/* ===== QUANTITÉ ===== */
.qty-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.qty-box button {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, opacity 0.15s;
}

.qty-box button:active {
    transform: scale(0.91);
    opacity: 0.8;
}

.qty-main {
    width: 72px;
    height: 72px;
    font-size: 34px;
    background: #00a8ff;
    color: white;
}

.qty-minor {
    width: 52px;
    height: 52px;
    font-size: 18px;
    background: #74b9ff;
    color: white;
}

#quantity {
    font-size: 44px;
    font-weight: bold;
    min-width: 90px;
    text-align: center;
    background: #f7f9fc;
    border: 2px solid #e0e6ef;
    border-radius: 12px;
    padding: 6px 16px;
    line-height: 1;
}

/* ===== HISTORIQUE ===== */
#history-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.history-box {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid #eee;
    margin-top: 10px;
    min-height: 0;
}


.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid #eee;
    background: #fafafa;
    position: sticky;
    top: 0;
}

.history-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.product-main {
    font-weight: bold;
}

.product-sub {
    font-size: 11px;
    color: #666;
}

.flow {
    font-size: 12px;
}

.qty {
    font-weight: bold;
}

.date {
    font-size: 11px;
    color: #999;
}

/* ===== ACTIONS (Valider / Annuler) ===== */
.actions-app {
    display: flex;
    gap: 12px;
}

.actions-app .btn {
    flex: 1;
    height: 68px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s, transform 0.1s;
}

.actions-app .btn:active {
    opacity: 0.85;
    transform: scale(0.98);
}

/* ===== MODAL FERMETURE ===== */
.modal-content .btn-danger,
.modal-content .btn-secondary {
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ===== TOAST DE FEEDBACK ===== */
.app-notif {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.app-notif.show   { opacity: 1; }

.app-notif.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.app-notif.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.app-notif.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ===== MODAL CONFIRMATION ===== */
.confirm-modal-content {
    width: 360px;
    text-align: center;
}

#confirm-modal-message {
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 24px;
    color: #374151;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-modal-actions .btn {
    min-width: 130px;
    padding: 12px 20px;
    font-size: 16px;
}

/* ===== MODAL PÉREMPTION ===== */
.expiry-modal {
    width: 340px;
    text-align: center;
}

.expiry-error {
    color: #e84118;
    font-size: 14px;
    min-height: 20px;
    margin-bottom: 8px;
    font-weight: 500;
}

.expiry-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0 6px;
    font-size: 28px;
}

.expiry-sep {
    color: #999;
    font-weight: 300;
}

.expiry-field {
    width: 80px;
    padding: 10px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    text-align: center;
    color: #aaa;
    background: #f8f8f8;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    letter-spacing: 2px;
}

.expiry-field.active {
    border-color: #00a8ff;
    background: #fff;
    color: #111;
}

.expiry-field.filled {
    color: #111;
    background: #fff;
}

.expiry-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 16px;
}

.exp-key {
    height: 64px;
    font-size: 24px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: #f0f0f0;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s;
}

.exp-key:active {
    background: #d0d0d0;
}

.exp-key-back {
    background: #ffe0e0;
    color: #c0392b;
}

.exp-key-back:active {
    background: #ffb3b3;
}

.exp-key-ok {
    background: #d4edda;
    color: #1a7a32;
}

.exp-key-ok:active {
    background: #a8d5b5;
}

.expiry-cancel {
    width: 100%;
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    touch-action: manipulation;
    user-select: none;
}

/* ===== MODAL KIT (grande) ===== */
.modal-content.verylarge {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
}

/* ===== WIZARD — voir /css/wizard.css (chargé globalement) ===== */


/* ===== SAISIE MANUELLE ===== */
.manual-modal-content {
    width: 480px;
    max-width: 96vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.manual-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.manual-back-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 34px; height: 34px;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.manual-back-btn:hover { background: #f0f0f0; }

.manual-breadcrumb {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manual-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #bbb;
    cursor: pointer;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    touch-action: manipulation;
}
.manual-close-btn:hover { background: #f5f5f5; color: #666; }

.manual-step {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    -webkit-overflow-scrolling: touch;
}

/* Grille catégories */
.manual-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.manual-cat-btn {
    padding: 22px 14px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 72px;
    text-align: center;
    transition: opacity 0.15s, transform 0.1s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.manual-cat-btn:active { opacity: 0.82; transform: scale(0.96); }

/* Champ de recherche */
.manual-search {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 12px;
    outline: none;
    background: #fafafa;
    transition: border-color 0.15s;
}
.manual-search:focus { border-color: #00a8ff; background: #fff; }

/* Liste types / produits */
.manual-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 6px;
    border-radius: 10px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}
.manual-list-item:last-child { border-bottom: none; }
.manual-list-item:hover  { background: #f8f9fb; }
.manual-list-item:active { background: #eef4ff; }

.manual-list-img {
    width: 42px; height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.manual-list-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.manual-list-sub {
    font-size: 12px;
    color: #bbb;
}

.manual-list-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.manual-list-mfg {
    font-size: 11px;
    color: #888;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 1px 6px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manual-list-arrow {
    color: #ccc;
    font-size: 18px;
    font-weight: 300;
}

/* ===== LED FEEDBACK ===== */
.app-led {
    height: 12px;
    width: 100%;
    background: #e8eaf0;
    flex-shrink: 0;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.app-led.led-on {
    transition: background 0.1s ease, box-shadow 0.1s ease;
}

.app-led.led-success {
    background: #2ecc71;
    box-shadow: 0 0 16px 4px rgba(46, 204, 113, 0.65), 0 0 32px rgba(46, 204, 113, 0.3);
}

.app-led.led-warning {
    background: #f39c12;
    box-shadow: 0 0 16px 4px rgba(243, 156, 18, 0.65), 0 0 32px rgba(243, 156, 18, 0.3);
}

.app-led.led-error {
    background: #e74c3c;
    box-shadow: 0 0 16px 4px rgba(231, 76, 60, 0.65), 0 0 32px rgba(231, 76, 60, 0.3);
}

/* ===== MODE INVENTAIRE ===== */

#inventory-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.inv-start-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    color: #666;
    font-size: 15px;
}

#inv-session {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.inv-header {
    padding: 10px 14px 8px;
    border-bottom: 1px solid #e0e4ea;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#inv-session-label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.inv-progress-bar-wrap {
    height: 8px;
    background: #e0e4ea;
    border-radius: 4px;
    overflow: hidden;
}

.inv-progress-bar {
    height: 100%;
    background: #2ecc71;
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}

#inv-progress-label {
    font-size: 13px;
    color: #888;
    text-align: right;
}

.inv-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inv-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
}


/* ===== Panneaux inventaire (magasin + kit) — layout ====================== */

#inventory-panel,
#kit-inventory-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.inv-refs-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 6px 8px;
}

.inv-footer {
    flex-shrink: 0;
    padding: 8px 12px;
    border-top: 1px solid #e0e4ea;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}
.inv-activated-label { font-size: 13px; color: #555; flex: 1; }

/* Barre de progression */
.inv-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid #e0e4ea;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}
.inv-progress-bar-wrap {
    height: 7px;
    background: #e0e4ea;
    border-radius: 4px;
    overflow: hidden;
}
.inv-progress-bar {
    height: 100%;
    background: #2ecc71;
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}
#inv-progress-label,
#ki-progress-label  { font-size: 12px; color: #888; text-align: right; }
#ki-panel-kit-name  { font-size: 13px; font-weight: 700; color: #1e2a3a; }

/* Séparateur de catégorie */
.inv-cat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #555;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 4px 8px;
    margin: 8px 0 3px;
}
.inv-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Carte de référence ─────────────────────────────────────────────────── */
.inv-ref-card {
    background: #fff;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    margin-bottom: 5px;
    overflow: hidden;
}
.inv-ref-card.inv-ref-inactive {
    opacity: .65;
    background: #f9fafb;
}

/* Ligne titre (header de la carte) */
.inv-ref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    gap: 8px;
}
.inv-ref-info  { flex: 1; min-width: 0; }
.inv-ref-name  { font-size: 13px; font-weight: 700; color: #1e2a3a; display: block; }
.inv-ref-sub   { font-size: 11px; color: #888; margin-top: 1px; display: block; }

/* Bouton "Activer manuellement" */
.inv-activate-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    background: #f0f4ff;
    border: 1px dashed #93c5fd;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s;
    font-family: inherit;
}
.inv-activate-btn:hover { background: #dbeafe; }

/* Bouton "Annuler" (désactiver) */
.inv-deactivate-btn {
    flex-shrink: 0;
    padding: 3px 8px;
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s;
}
.inv-deactivate-btn:hover { background: #fef2f2; }

/* ── Lots ───────────────────────────────────────────────────────────────── */
.inv-batches {
    border-top: 1px solid #f0f0f0;
    padding: 2px 10px 4px;
}
.inv-no-batches {
    font-size: 12px;
    color: #bbb;
    text-align: center;
    padding: 6px 0 4px;
    margin: 0;
}

.inv-batch-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
}
.inv-batch-row:last-child { border-bottom: none; }

.inv-batch-info { flex: 1; min-width: 0; }
.inv-batch-main {
    display: block;
    font-weight: 600;
    color: #1e2a3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.inv-batch-exp  { display: block; font-size: 11px; color: #888; }
.inv-batch-orig { font-size: 11px; color: #aaa; white-space: nowrap; flex-shrink: 0; }

.inv-batch-qty {
    width: 52px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 3px 4px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    flex-shrink: 0;
}

/* ── Formulaire ajout de lot ────────────────────────────────────────────── */
.inv-add-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px 10px 7px;
    background: #f9fafb;
    border-top: 1px solid #e0e4ea;
}
.inv-add-form input,
.inv-add-form select {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 4px 6px;
    font-size: 12px;
    background: #fff;
    font-family: inherit;
}
.inv-add-lot     { flex: 1; min-width: 60px; }
.inv-add-expiry  { width: 120px; }
.inv-add-exp-btn {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 4px 6px;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}
.inv-add-exp-btn:hover { background: #f0f4ff; }
.inv-add-qty     { width: 48px; text-align: center; }

/* ── Divers ─────────────────────────────────────────────────────────────── */
.inv-empty { padding: 24px; text-align: center; color: #aaa; font-size: 14px; }

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }

/* Éléments legacy encore utilisés */
.inv-ok   { color: #27ae60; font-weight: 700; }
.inv-warn { color: #e67e22; font-weight: 700; }
.inv-diff { color: #e74c3c; font-weight: 700; }

/* === Modal hors-stock === */
.oos-modal-content { width: 340px; text-align: center; }
.oos-icon          { font-size: 40px; margin-bottom: 8px; }
.oos-title         { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.oos-info          { font-size: 15px; margin-bottom: 8px; }
.oos-hint          { font-size: 13px; color: #888; margin-bottom: 20px; }
.oos-actions       { display: flex; gap: 12px; justify-content: center; }
.btn-warning       { background: #f39c12; color: white; border: none; border-radius: 8px; padding: 10px 20px; font-size: 15px; cursor: pointer; }
.btn-warning:hover { background: #d68910; }

/* === Modal seuil kit === */
.threshold-modal-content { width: 360px; text-align: center; }
.threshold-icon          { font-size: 40px; margin-bottom: 8px; }
.threshold-title         { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.threshold-info          { font-size: 15px; margin-bottom: 4px; }
.threshold-hint          { font-size: 13px; color: #888; margin-bottom: 8px; }
.threshold-removals-list { list-style: none; padding: 0; margin: 0 0 16px; text-align: left; font-size: 13px; }
.threshold-removals-list li { padding: 3px 0; border-bottom: 1px solid #eee; }
.threshold-actions       { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* === Modal raison sortie === */
.reason-modal-content { width: 320px; }
.reason-title         { font-size: 17px; font-weight: 700; margin: 0 0 16px; text-align: center; }
.reason-buttons       { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.reason-btn           { width: 100%; padding: 14px 20px; font-size: 16px; border-radius: 10px; border: none; cursor: pointer; font-weight: 500; }
.reason-btn-primary   { background: #2980b9; color: #fff; }
.reason-btn-primary:hover { background: #2471a3; }
.reason-btn-orange    { background: #e67e22; color: #fff; }
.reason-btn-orange:hover  { background: #d35400; }
.reason-btn-red       { background: #e74c3c; color: #fff; }
.reason-btn-red:hover     { background: #c0392b; }
.reason-btn-purple    { background: #8e44ad; color: #fff; }
.reason-btn-purple:hover  { background: #7d3c98; }
.reason-cancel        { display: flex; justify-content: center; }
