#quickorder-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.quickorder-search {
    margin-bottom: 30px;
}

.quickorder-search .form-group label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.quickorder-search .input-group {
    display: flex;
}

#product-reference {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
}

#search-product {
    padding: 12px 25px;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

#search-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

#search-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#search-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#search-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.product-quick-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    align-items: center;
}

.product-quick-image {
    flex-shrink: 0;
}

.product-quick-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.product-quick-info {
    flex: 1;
}

.product-quick-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.product-reference {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #2fb5d2;
    margin: 10px 0;
}

.product-stock {
    font-size: 14px;
    margin: 5px 0;
}

.stock-value {
    font-weight: 600;
}

.stock-value.in-stock {
    color: #28a745;
}

.stock-value.out-of-stock {
    color: #dc3545;
}

.product-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #e9ecef;
}

#product-quantity {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    font-size: 16px;
}

.btn-add-cart {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .product-quick-card {
        flex-direction: column;
        text-align: center;
    }
    
    .product-quick-actions {
        width: 100%;
    }
}

#cart-summary-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

#cart-summary-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

#cart-empty-message {
    text-align: center;
    padding: 30px;
    font-size: 16px;
}

#cart-table-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#cart-table {
    margin-bottom: 0;
    width: 100%;
}

#cart-table thead {
    background-color: #f8f9fa;
}

#cart-table thead th {
    font-weight: 600;
    padding: 15px 10px;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
    text-align: center;
}

#cart-table tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    text-align: center;
}

.cart-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* Placeholder quand le produit n'a pas de photo */
.cart-no-image {
    display: block;
    background-color: #ffffff;
    border-radius: 4px;
}

.cart-product-name {
    font-weight: 600;
    font-size: 14px;
    text-align: left;
}

.cart-product-ref {
    color: #666;
    font-size: 12px;
    text-align: left;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: #e9ecef;
}

.btn-remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-remove-item:hover {
    background: #c82333;
}

.cart-total-row {
    background-color: #f8f9fa;
    font-size: 18px;
}

.cart-total-row td {
    padding: 15px 10px;
}

#cart-total {
    color: #2fb5d2;
    font-size: 20px;
}

.cart-actions {
    padding: 20px;
    text-align: right;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.cart-actions .btn {
    padding: 12px 25px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cart-actions .btn-danger {
    margin-right: auto; /* Positionner à gauche */
}

/* Responsive */
@media (max-width: 768px) {
    #cart-table {
        font-size: 12px;
    }
    
    #cart-table thead th,
    #cart-table tbody td {
        padding: 8px 5px;
    }
    
    .cart-product-image {
        width: 40px;
        height: 40px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cart-actions .btn-danger {
        margin-right: 0;
        order: -1; /* Mettre en premier sur mobile */
    }
}

.tax-label {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

.tax-label-header {
    font-size: 11px;
    color: #666;
    font-weight: normal;
}

.cart-tax-info {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.product-price .tax-label {
    display: inline-block;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}
/* Input de quantité éditable dans le panier */
.cart-qty-input-editable {
    width: 80px;
    text-align: center;
    border: 2px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    cursor: text;
    transition: all 0.2s;
}

.cart-qty-input-editable:hover {
    border-color: #2fb5d2;
}

.cart-qty-input-editable:focus {
    outline: none;
    border-color: #2fb5d2;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.2);
    background: #fffef8;
}

.cart-qty-input-editable:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Retirer les flèches des inputs number */
.cart-qty-input-editable {
    -moz-appearance: textfield;
}

.cart-qty-input-editable::-webkit-outer-spin-button,
.cart-qty-input-editable::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* Layout pour la recherche et l'import */
.search-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.input-group {
    flex: 1;
}

.import-section {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-import, .btn-template {
    white-space: nowrap;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-import {
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-import:hover {
    background: #218838;
}

.btn-template {
    background: #6c757d;
    color: white;
    border: none;
    transition: all 0.2s;
}

.btn-template:hover {
    background: #5a6268;
}

/* Barre de progression */
#import-progress {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2fb5d2, #1a8ca0);
    transition: width 0.3s ease;
    width: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.progress-text {
    text-align: center;
    margin: 0;
    font-weight: 600;
    color: #333;
}

/* Résultats d'importation */
#import-results {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

#import-results h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.import-summary-item {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.import-summary-item.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.import-summary-item.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.import-summary-item.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }
    
    .import-section {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-import, .btn-template {
        width: 100%;
        justify-content: center;
    }
}

.cart-qty-input-editable.updating {
    border-color: #2fb5d2;
    background-color: #fffef8;
}

@keyframes pulse {
    0%, 100% {
        border-color: #2fb5d2;
    }
    50% {
        border-color: #1a8ca0;
    }
}

.cart-qty-input-editable.updating {
    animation: pulse 1s ease-in-out infinite;
}

#cart-mini-wrapper {
    transition: transform 0.2s ease;
}
/* ── Message de notification avec bouton fermeture ──────────────────────── */
#search-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.qo-msg-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.6;
    transition: opacity 0.15s;
    color: inherit;
}

.qo-msg-close:hover {
    opacity: 1;
}

/* ── Modale de confirmation import ──────────────────────────────────────── */
.qo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: qo-fade-in 0.15s ease;
}

@keyframes qo-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.qo-modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 32px 28px 24px;
    max-width: 440px;
    width: calc(100% - 40px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: qo-slide-up 0.2s ease;
}

@keyframes qo-slide-up {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.qo-modal-msg {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin: 0 0 24px;
    text-align: center;
}

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

.qo-modal-actions .btn {
    min-width: 140px;
    padding: 10px 20px;
}

/* ── Bouton fermeture de la modale ──────────────────────────────────────── */
.qo-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 2px 6px;
    transition: color 0.15s;
}

.qo-modal-close:hover {
    color: #333;
}

.qo-modal-box {
    position: relative; /* nécessaire pour le positionnement absolu du bouton */
}

/* Produit commandable même en rupture de stock */
.stock-value.out-of-stock-allowed {
    color: #e67e22;
    font-weight: 600;
}
.stock-value.out-of-stock-allowed::after {
    content: ' (sur commande)';
    font-weight: normal;
    font-size: 0.85em;
}
