/* ========================================
   1. PRODUCT CARDS
   ======================================== */

.product-card {
    border: 1px solid #e7eaec;
    border-radius: 12px;
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 0 1px rgba(26, 179, 148, 0.1);
    transform: translateY(-6px);
    border-color: #95B2C6;
}

.product-image {
    height: 240px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e7eaec;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease;
}

.product-card:hover .product-image {
    background: linear-gradient(135deg, #f0f2f4 0%, #e0e4e8 100%);
}

.product-image img {
    width: 256px;
    height: 256px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.product-info h6 {
    font-weight: 600;
    color: #2c3e50;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #95B2C6;
    letter-spacing: -0.5px;
}

.product-details {
    font-size: 0.85em;
    color: #6c757d;
    line-height: 1.6;
}

.product-details strong {
    color: #495057;
    font-weight: 600;
}

.product-status {
    margin-top: auto;
    padding-top: 12px;
}

.product-order-card {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
    padding: 15px 0;
}

.product-order-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 8px;
}

.product-order-details h6 {
    margin-bottom: 5px;
    font-weight: bold;
}

.product-order-details dl {
    margin: 0;
    font-size: 14px;
}

.product-order-price {
    margin-left: auto;
    text-align: right;
    font-weight: bold;
    font-size: 16px;
}

/* ========================================
   2. BADGES (Product Status)
   ======================================== */

.badge-active {
    background-color: #1ab394;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.badge-inactive {
    background-color: #ed5565;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.cart-badge {
    background: linear-gradient(135deg, #ed5565 0%, #da4453 100%);
    color: white;
    border-radius: 12px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin-left: 8px;
    padding: 5px;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(237, 85, 101, 0.3);
}

/* ========================================
   3. CART SYSTEM
   ======================================== */

.cart-button {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #95B2C6 0%, #95B2C6 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(149, 178, 198, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
}

.cart-button:hover {
    background: linear-gradient(135deg, #95B2C6 0%, #95B2C6 100%);
    color: white;
    transform: translateY(-1px);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 6px 25px rgba(26, 179, 148, 0.45);
}

.cart-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 179, 148, 0.4);
}

.cart-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 179, 148, 0.2), 0 4px 20px rgba(26, 179, 148, 0.35);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1050;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    top: 60px !important;
}

.cart-sidebar.open {
    right: 0;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-header {
    padding: 20px 25px;
    border-bottom: 2px solid #e7eaec;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Grosse croix de fermeture */
.cart-header .btn-close-cart {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.cart-header .btn-close-cart:hover {
    background: #dc3545;
    color: white;
} 

.cart-header h4 {
    font-weight: 600;
    color: #2c3e50;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
}

.cart-item:hover {
    background: #f8f9fa;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image i {
    font-size: 24px;
    color: #1ab394;
}

.cart-total {
    padding: 1rem !important;
    border-top: 2px solid #dee2e6;
    background: #f8f9fa;
    margin-bottom: 3rem !important;
}

.cart-total strong {
    font-size: 1.1rem !important;
    display: block;
    margin-bottom: 1rem !important;
}

.cart-total .btn {
    width: 100% !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Scrollbar personnalisée pour le panier */
.cart-items::-webkit-scrollbar {
    width: 8px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #1ab394;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #17a085;
}

/* ========================================
   4. BUTTONS (Products & Cart)
   ======================================== */

.btn-add-to-cart {
    background: linear-gradient(135deg, #95B2C6 0%, #95B2C6 100%);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(26, 179, 148, 0.2);
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #17a085 0%, #148f77 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 179, 148, 0.3);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

.btn-add-to-cart i {
    margin-right: 6px;
}

.toolbar-btn {
    border: 1px solid #d3d6d9;
    padding: 8px 16px;
    margin-left: 8px;
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.toolbar-btn:hover {
    background-color: #f8f9fa;
    border-color: #1ab394;
    color: #1ab394;
}

/* ========================================
   5. FORM CONTROLS (Products & Quantity)
   ======================================== */

.search-bar {
    margin-bottom: 20px;
}

.search-bar .input-group-append .btn {
    border-radius: 0 8px 8px 0;
    padding: 11px 16px;
    background: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
    transition: all 0.2s ease;
}

.search-bar .input-group-append .btn:hover {
    background: #1ab394;
    border-color: #1ab394;
    color: white;
}

.category-filter {
    margin-bottom: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
    margin: 10px 0;
    gap: 8px;
}

.quantity-control input {
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
}

.quantity-input.adjusted {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.quantity-input:focus {
    border-color: #1ab394;
    box-shadow: 0 0 0 0.2rem rgba(26, 179, 148, 0.15);
}

/* Masquer les spinners sur tous les navigateurs */
.quantity-input {
    -moz-appearance: textfield; /* Firefox */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari, Opera */
    margin: 0;
}

/* ========================================
   6. IMAGE ZOOM (Product Details)
   ======================================== */

.thumb-wrapper {
    display: inline-block;
    margin: 2px;
}

.thumb-img {
    max-width: 100px;
    cursor: zoom-in;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.thumb-img:hover {
    transform: scale(1.05);
}

#zoom-preview {
    display: none;
    position: fixed;
    z-index: 9999;
    background: white;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    padding: 8px;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* ========================================
   7. WIDGETS (Dashboard/Stats)
   ======================================== */

.widget.style1 {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 120px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.widget.style1:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.widget.style1 .row {
    width: 100%;
    justify-content: center;
    align-items: center;
}

.widget.style1 .col-4,
.widget.style1 .col-5,
.widget.style1 .col-7 {
    padding: 0 !important;
    text-align: center;
}

.widget.style1 i {
    margin: 0 auto;
}

/* ========================================
   8. TOOLBAR (Toggle/Actions)
   ======================================== */

.toolbar-container {
    text-align: right;
}

.toolbar-droite {
    display: inline-block;
    margin-left: 4px;
}

.toggle-btn {
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    user-select: none;
    margin-right: 8px;
    transition: color 0.2s ease;
}

.toggle-btn:hover {
    color: #1ab394;
}

.hidden-row {
    display: none;
}

/* ========================================
   9. BRAND SELECTOR (Sidebar)
   ======================================== */

.brand-selector {
    padding: 15px;
}

.brand-label {
    font-size: 11px;
    font-weight: 600;
    color: #676a6c;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.brand-selector-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.brand-selector-btn:hover {
    background: #f3f3f4;
    border-color: #1ab394;
}

.brand-selector-btn .brand-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f4;
    border-radius: 3px;
    overflow: hidden;
}

.brand-selector-btn .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-selector-btn .brand-logo i {
    font-size: 20px;
    color: #676a6c;
}

.brand-selector-btn .brand-info {
    flex: 1;
    text-align: left;
    min-width: 0;
    transition: all 0.3s ease;
}

.brand-selector-btn .brand-name {
    font-size: 13px;
    font-weight: 600;
    color: #676a6c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-selector-btn .dropdown-icon {
    font-size: 16px;
    color: #676a6c;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.brand-selector-btn[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.brand-dropdown-menu {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e7eaec;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
}

.brand-dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    width: 100%;
    text-align: left;
}

.brand-dropdown-item:hover {
    background: #f3f3f4;
}

.brand-dropdown-item.active {
    background: #1ab394;
    color: #fff;
}

.brand-dropdown-item.active .brand-logo i,
.brand-dropdown-item.active span {
    color: #fff;
}

.brand-dropdown-item .brand-logo {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f4;
    border-radius: 3px;
    overflow: hidden;
}

.brand-dropdown-item .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-dropdown-item .brand-logo i {
    font-size: 18px;
    color: #676a6c;
}

/* ========================================
   10. MINI NAVBAR MODE (Sidebar réduite)
   ======================================== */

body.mini-navbar .brand-selector {
    padding: 10px 0;
    text-align: center;
}

body.mini-navbar .brand-label {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
    display: none;
}

body.mini-navbar .brand-selector-btn {
    justify-content: center;
    padding: 8px;
    gap: 0;
    width: 50px;
    margin: 0 auto;
}

body.mini-navbar .brand-selector-btn .brand-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

body.mini-navbar .brand-selector-btn .dropdown-icon {
    opacity: 0;
    width: 0;
    display: none;
}

body.mini-navbar .brand-selector-btn .brand-logo {
    margin: 0;
    width: 34px;
    height: 34px;
}

body.mini-navbar .brand-dropdown-menu {
    position: fixed !important;
    left: 70px !important;
    width: 250px !important;
    transform: none !important;
}

/* Tooltip au survol en mode mini */
body.mini-navbar .brand-selector-btn {
    position: relative;
}

body.mini-navbar .brand-selector-btn::before {
    content: attr(data-brand-name);
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background: #2f4050;
    color: #fff;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.mini-navbar .brand-selector-btn::after {
    content: '';
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 7px 6px 0;
    border-color: transparent #2f4050 transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2001;
}

body.mini-navbar .brand-selector-btn:hover::before,
body.mini-navbar .brand-selector-btn:hover::after {
    opacity: 1;
}

body.mini-navbar #brandDropdownMenu {
    margin-left: 0 !important;
}

/* Animation de transition */
.brand-selector,
.brand-selector * {
    transition: all 0.3s ease;
}

/* ========================================
   11. ANIMATIONS
   ======================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   12. RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    /* Cart */
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-button {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Products */
    .product-card {
        margin-bottom: 15px;
    }

    /* Brand Selector - Désactiver le mode mini sur mobile */
    body.mini-navbar .brand-selector-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 12px;
        gap: 12px;
    }

    body.mini-navbar .brand-selector-btn .brand-info,
    body.mini-navbar .brand-selector-btn .dropdown-icon {
        opacity: 1;
        width: auto;
        display: block;
    }

    body.mini-navbar .brand-label {
        opacity: 1;
        height: auto;
        display: block;
    }

    body.mini-navbar .brand-selector-btn::before,
    body.mini-navbar .brand-selector-btn::after {
        display: none;
    }
}

/* Tablette */
@media (min-width: 576px) and (max-width: 991.98px) {
    .brand-dropdown-menu {
        max-height: 250px;
    }
}

/* SHOP */

.ibox{
    margin-top: 2rem;
}

body.modal-open {
    overflow: hidden;
    padding-right: 0; /* Évite le jump de la scrollbar */
}

body.modal-open .cart-sidebar {
    transform: translateX(100%);
    z-index: 1000 !important;
}

body.modal-open .cart-overlay {
    display: none !important;
}

.qty-minus,
.qty-plus {
    min-width: 38px;
    position: relative;
    color: transparent !important;
    user-select: none;
}

.qty-minus::after,
.qty-plus::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333 !important;
    font-size: 16px;
    font-weight: bold;
}

.qty-minus::after {
    content: '−';
}

.qty-plus::after {
    content: '+';
}

/* ========================================
   3. CART SIDEBAR (Panier)
   ======================================== */

.cart-sidebar {
    z-index: 1050;
}

.cart-overlay {
    z-index: 1040;
    cursor: pointer;
}

/* ========================================
   4. MODAL ORDER CONFIG
   ======================================== */

#modalOrderConfig.modal {
    z-index: 2040;
}

#modalOrderConfig .modal-backdrop,
.modal-backdrop.show {
    z-index: 2010 !important;
}

/* Structure de la modal */
#modalOrderConfig .modal-dialog {
    z-index: 2050;
    max-width: 550px;
    margin: 1.75rem auto;
}

#modalOrderConfig .modal-content {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Header */
#modalOrderConfig .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#modalOrderConfig .modal-header .close {
    color: #6c757d;
    opacity: 0.7;
    text-shadow: none;
    font-size: 1.5rem;
    font-weight: 400;
    transition: opacity 0.2s;
    padding: 0;
    margin: 0;
    order: 2;
}

#modalOrderConfig .modal-header .close:hover {
    opacity: 1;
    color: #495057;
}

#modalOrderConfig .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #343a40;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    order: 1;
}

#modalOrderConfig .modal-title i {
    font-size: 1.3rem;
    color: #6c757d;
}

/* Body */
#modalOrderConfig .modal-body {
    padding: 1.5rem;
    background: #ffffff;
}

/* ========================================
   5. ORDER SECTIONS
   ======================================== */

.order-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.order-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: block;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.section-icon.date {
    background: #e3f2fd;
    color: #1976d2;
}

.section-icon.delivery {
    background: #e8f5e9;
    color: #388e3c;
}

.section-icon.billing {
    background: #fff3e0;
    color: #f57c00;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #343a40;
    margin: 0 0 0.5rem 0;
}

.section-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.section-description {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

/* ========================================
   6. FORM CONTROLS (Modal)
   ======================================== */

#modalOrderConfig .form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    background: white;
}

#modalOrderConfig .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: 0;
}

#modalOrderConfig select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23495057' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 10px;
    padding-right: 2rem;
}

#modalOrderConfig .input-group-addon {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-right: none;
    color: #495057;
    border-radius: 4px 0 0 4px;
    padding: 0.5rem 0.75rem;
}

#modalOrderConfig .input-group .form-control {
    border-left: none;
    border-radius: 0 4px 4px 0;
}

#modalOrderConfig .input-group .form-control:focus {
    border-left: 1px solid #80bdff;
}

/* ========================================
   7. MODAL FOOTER
   ======================================== */

#modalOrderConfig .modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    gap: 0.5rem;
}

#modalOrderConfig .modal-footer .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#modalOrderConfig .modal-footer .btn-white {
    background: #ffffff;
    color: #6c757d;
    border: 1px solid #ced4da;
}

#modalOrderConfig .modal-footer .btn-white:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

#modalOrderConfig .modal-footer .btn-primary {
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
}

#modalOrderConfig .modal-footer .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

#modalOrderConfig .modal-footer .btn i {
    margin-right: 0.4rem;
}

/* ========================================
   8. ORDER DETAILS GRID
   ======================================== */

.order-details-grid {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.order-detail-row {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.order-detail-row:last-child {
    border-bottom: none;
}

.order-detail-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.order-detail-value {
    flex: 0 0 180px;
    color: #212529;
    font-size: 0.95rem;
}

.order-detail-value.empty {
    color: #adb5bd;
    font-style: italic;
}

.order-detail-value.highlight {
    color: #28a745;
    font-weight: 600;
}

.order-address-block-minimal {
    background: transparent;
    padding: 1rem 0 1rem 1.5rem;
    border-left: 3px solid #007bff;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #495057;
    transition: all 0.3s ease;
}
/* ========================================
   9. BUTTONS
   ======================================== */

.btn-add-to-cart {
    background: #1ab394;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 3px;
    transition: all 0.3s;
}

.btn-add-to-cart:hover {
    background: #18a689;
    color: white;
}

/* ========================================
   10. SIDEBAR NAVIGATION
   ======================================== */

.sidenav-menu {
    z-index: 2000;
}

/* Mode condensé - Masquer certains éléments */
[data-sidenav-size="condensed"] .brand-selector-wrapper,
[data-sidenav-size="condensed"] .sidenav-user .dropdown,
[data-sidenav-size="condensed"] .sidenav-menu img,
[data-sidenav-size="condensed"] .brand-selector {
    display: none;
}

[data-sidenav-size="condensed"] .sidenav-user {
    text-align: center;
    padding: 10px 0;
}

[data-sidenav-size="condensed"] .sidenav-user .sidenav-user-name,
[data-sidenav-size="condensed"] .sidenav-user .fs-12 {
    display: none;
}

.brand-code {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
    display: block;
}

/* ========================================
   11. RESPONSIVE - MOBILE (< 576px)
   ======================================== */

@media (max-width: 575.98px) {
    /* Modal */
    #modalOrderConfig .modal-dialog {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }

    #modalOrderConfig .modal-content {
        max-height: calc(100vh - 1rem);
    }

    #modalOrderConfig .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }

    #modalOrderConfig .modal-header {
        padding: 1rem;
    }

    #modalOrderConfig .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }

    #modalOrderConfig .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #modalOrderConfig .modal-footer .btn:last-child {
        margin-bottom: 0;
    }

    .section-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* Cart Sidebar */
    .cart-sidebar {
        width: calc(100% - 40px) !important;
        max-width: 100% !important;
        top: 60px !important;
        height: calc(100vh - 70px) !important;
        padding-top: 0 !important;
    }

    .cart-header .btn-close-cart {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border: 2px solid #dc3545;
        border-radius: 8px;
        color: #dc3545;
        font-size: 1.5rem;
        font-weight: bold;
        transition: all 0.2s ease;
        cursor: pointer;
        flex-shrink: 0;
    }

    .cart-header h4 {
        font-size: 1rem !important;
        margin: 0;
    }

    /* Bouton de fermeture visible */
    .cart-header .btn-light {
        padding: 0.5rem 0.7rem !important;
        background: #fff !important;
        border: 2px solid #dc3545 !important;
        border-radius: 8px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .cart-header .btn-light:active {
        background: #dc3545 !important;
        transform: scale(0.95);
    }

    .cart-header .btn-light i {
        font-size: 1.5rem !important;
        color: #dc3545 !important;
        font-weight: bold !important;
    }

    /* Items du panier */
    .cart-item {
        padding: 18px 20px;
        border-bottom: 1px solid #f1f1f1;
        display: flex;
        align-items: flex-end; /* ← CHANGÉ */
        gap: 12px; /* ← AJOUTÉ */
        transition: background 0.2s ease;
        position: relative;
    }

    /* Bouton suppression à droite */
    .cart-item .btn-outline-danger {
        flex-shrink: 0;
        align-self: flex-start;
        margin-left: 0 !important;
        width: 36px;
        height: 36px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .cart-item .btn-outline-danger i {
        font-size: 1.1rem;
    }

    .cart-item .btn-outline-danger:hover {
        background: #dc3545;
        color: white;
        border-color: #dc3545;
        transform: scale(1.1);
    }

    /* Zone scrollable */
    .cart-items {
        max-height: calc(100vh - 350px) !important;
        overflow-y: auto;
        padding: 0.5rem;
    }

    /* Footer du panier */
    .cart-total {
        padding: 1.5rem !important;
        border-top: 2px solid #dee2e6;
        background: #f8f9fa;
        margin-bottom: 1rem !important;
    }

    .cart-total strong {
        font-size: 1.1rem !important;
        display: block;
        margin-bottom: 1rem !important;
    }

    .cart-total .btn {
        width: 100% !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    .cart-total .btn:last-child {
        margin-bottom: 0 !important;
    }

    /* Overlay */
    .cart-overlay {
        background: rgba(0, 0, 0, 0.5) !important;
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }

    /* Order Details */
    .order-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-detail-label,
    .order-detail-value {
        flex: 1 1 100%;
    }

    .order-detail-value {
        margin-top: 0.25rem;
        padding-left: 1rem;
    }

    .order-address-block {
        font-size: 0.85rem;
    }

    /* Sidebar mobile */
    .sidenav-menu {
        padding-top: 70px;
        top: 0;
    }
}

/* ========================================
   12. RESPONSIVE - TABLETTE (576px - 767px)
   ======================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
    /* Modal plus large sur tablette */
    #modalOrderConfig .modal-dialog {
        max-width: 90%;
    }

    /* Cart moins large */
    .cart-sidebar {
        width: 400px !important;
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }

    .cart-overlay {
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }

    /* Sidebar */
    .sidenav-menu {
        padding-top: 70px;
    }

    /* Order details - 2 colonnes */
    .order-detail-label {
        flex: 0 0 40%;
    }

    .order-detail-value {
        flex: 0 0 60%;
    }
}

/* ========================================
   13. RESPONSIVE - DESKTOP (> 768px)
   ======================================== */

@media (min-width: 768px) {
    /* Sidebar en mode condensé */
    html[data-sidenav-size="condensed"] .sidenav-menu .scrollbar,
    html[data-sidenav-size="on-hover"] .sidenav-menu .scrollbar {
        padding-top: 80px;
    }

    html[data-sidenav-size="condensed"] .side-nav .side-nav-link,
    html[data-sidenav-size="on-hover"] .side-nav .side-nav-link {
        position: relative;
    }

    /* Modal centrée */
    #modalOrderConfig .modal-dialog {
        margin: 1.75rem auto;
    }

    /* Cart à droite */
    .cart-sidebar {
        top: 0;
        height: 100vh;
    }

    .cart-overlay {
        top: 0;
        height: 100vh;
    }
}

/* ========================================
   14. RESPONSIVE - GRANDS ÉCRANS (> 1200px)
   ======================================== */

@media (min-width: 1200px) {
    /* Modal encore plus centrée */
    #modalOrderConfig .modal-dialog {
        max-width: 600px;
    }

    /* Order details plus espacé */
    .order-details-grid {
        padding: 2rem;
    }

    .order-detail-label {
        flex: 0 0 250px;
    }

    .order-detail-value {
        flex: 0 0 300px;
    }
}

/* ========================================
   15. UTILITIES
   ======================================== */

/* Scrollbar personnalisée pour cart-items */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #1ab394;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #17a085;
}

/* Smooth transitions */
.cart-sidebar,
.cart-overlay,
#modalOrderConfig .modal-dialog {
    transition: all 0.3s ease;
}

/* Logout button topbar */
.logout-btn {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #dc3545 !important;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.logout-btn:hover {
    background: #c82333 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.logout-btn i {
    font-size: 1.1rem;
}

/* ========================================
   2. RESPONSIVE - MOBILE (< 576px)
   ======================================== */

@media (max-width: 575.98px) {
    .logout-btn {
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    /* Cacher le texte sur mobile */
    .logout-btn .logout-text {
        display: none;
    }
    
    /* Icône centrée */
    .logout-btn i {
        margin: 0;
        font-size: 1.3rem;
    }
    
    /* Zone de toucher plus grande sur mobile */
    .logout-btn::before {
        content: '';
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
    }
}

/* ========================================
   3. RESPONSIVE - TABLETTE (576px - 767px)
   ======================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
    .logout-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .logout-btn .logout-text {
        font-size: 0.85rem;
    }
    
    .logout-btn i {
        font-size: 1rem;
    }
}

/* ========================================
   4. RESPONSIVE - DESKTOP (> 768px)
   ======================================== */

@media (min-width: 768px) {
    .logout-btn {
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   5. ÉTATS FOCUS (Accessibilité)
   ======================================== */

.logout-btn:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.logout-btn:focus-visible {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

/* ========================================
   6. ANIMATION SUBTLE
   ======================================== */

@keyframes logout-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0);
    }
}

/* Animation au hover sur desktop uniquement */
@media (min-width: 768px) {
    .logout-btn:hover {
        animation: logout-pulse 1.5s infinite;
    }
}

/* Login page */
.password-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.password-input-wrapper .password-input {
    width: 100%;
    padding-right: 50px !important; /* Espace pour le bouton */
    border-radius: 0.375rem;
}

/* ========================================
   2. BOUTON TOGGLE (SANS BORDURE)
   ======================================== */

.password-toggle-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none !important; /* Supprimer TOUTES les bordures */
    border-radius: 0 0.375rem 0.375rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}

.password-toggle-btn:focus {
    outline: none;
}

/* ========================================
   3. ICÔNE - FORCER LA COULEUR NOIRE
   ======================================== */

.password-toggle-btn i,
.password-toggle-btn .fa-eye,
.password-toggle-btn .fa-eye-slash {
    font-size: 1.1rem !important;
    color: #212529 !important; /* NOIR - Forcé avec !important */
    transition: all 0.2s ease;
    pointer-events: none;
    display: inline-block;
    line-height: 1;
}

.password-toggle-btn:hover i,
.password-toggle-btn:hover .fa-eye,
.password-toggle-btn:hover .fa-eye-slash {
    color: #000000 !important; /* Encore plus noir au hover */
    transform: scale(1.1);
}

/* ========================================
   5. ÉTATS DU CHAMP INPUT
   ======================================== */

.password-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.password-input.is-invalid {
    border-color: #dc3545;
    padding-right: 50px !important;
}

/* ========================================
   6. RESPONSIVE - MOBILE (< 576px)
   ======================================== */

@media (max-width: 575.98px) {
    /* Bouton encore plus large et visible sur mobile */
    .password-toggle-btn {
        width: 50px !important;
        right: 1px;
    }
    
    /* Input avec encore plus d'espace à droite */
    .password-input-wrapper .password-input {
        padding-right: 55px !important;
    }
    
    /* Icône encore plus grande sur mobile */
    .password-toggle-btn i,
    .password-toggle-btn .ri-eye-line,
    .password-toggle-btn .ri-eye-off-line {
        font-size: 1.4rem !important;
    }
    
    /* Background plus visible au tap sur mobile */
    .password-toggle-btn:active {
        background: rgba(13, 110, 253, 0.1) !important;
    }
}

/* ========================================
   7. TABLETTE (576px - 767px)
   ======================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
    .password-toggle-btn {
        width: 48px;
    }
}

/* ========================================
   8. FIX POUR BOOTSTRAP
   ======================================== */

/* S'assurer que Bootstrap n'ajoute pas de bordure */
.password-toggle-btn.btn,
button.password-toggle-btn {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.password-toggle-btn:focus,
.password-toggle-btn:active:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* ========================================
   9. FIX INPUT-GROUP (si présent)
   ======================================== */

/* Si tu utilises encore .input-group, forcer ces styles */
.input-group .password-input-wrapper {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group .password-toggle-btn {
    border: none !important;
    margin-left: 0 !important;
}

/* ========================================
   10. DEBUG - VÉRIFIER SI REMIXICON EST CHARGÉ
   ======================================== */

/* Test : Si cette règle s'applique, RemixIcon n'est PAS chargé */
.ti-eye:not([class*="ti-"]) {
    background: red !important;
    color: white !important;
}

/* Detail order variable */
@media (max-width: 991.98px) {
    .table-accordion thead {
        display: none;
    }
    
    .table-accordion tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 2px solid #e7eaec;
        border-radius: 8px;
        background: white;
        overflow: hidden;
    }
    
    /* Header de la card (toujours visible) */
    .table-accordion .card-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: #f8f9fa;
        cursor: pointer;
        border-bottom: 1px solid #e7eaec;
    }
    
    .table-accordion .card-header-mobile:hover {
        background: #e9ecef;
    }
    
    .table-accordion .card-header-mobile .item-name {
        font-weight: 700;
        color: #1ab394;
    }
    
    .table-accordion .card-header-mobile .item-price {
        font-size: 1.1rem;
        font-weight: 700;
        color: #676a6c;
    }
    
    .table-accordion .card-header-mobile .expand-icon {
        transition: transform 0.3s ease;
    }
    
    .table-accordion .card-header-mobile.expanded .expand-icon {
        transform: rotate(180deg);
    }
    
    /* Détails (cachés par défaut) */
    .table-accordion .card-details-mobile {
        display: none;
        padding: 15px;
    }
    
    .table-accordion .card-details-mobile.show {
        display: block;
    }
    
    .table-accordion .card-details-mobile .detail-row {
        padding: 8px 0;
        border-bottom: 1px solid #f1f1f1;
    }
    
    .table-accordion .card-details-mobile .detail-row:last-child {
        border-bottom: none;
    }
    
    .table-accordion .card-details-mobile .detail-label {
        font-weight: 600;
        color: #676a6c;
        margin-bottom: 4px;
    }
    
    .table-accordion .card-details-mobile .detail-value {
        color: #212529;
    }
}

/* Dashboard manufacturer card */
.bg-primary-subtle { background-color: rgba(13, 110, 253, 0.1); }
    .bg-success-subtle { background-color: rgba(25, 135, 84, 0.1); }
    .bg-info-subtle { background-color: rgba(13, 202, 240, 0.1); }
    .bg-secondary-subtle { background-color: rgba(108, 117, 125, 0.1); }
    
    .hover-lift {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .hover-lift:hover {
        transform: translateY(-3px);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
    }
    
    /* Style pour les cartes cliquables */
    .card-clickable {
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .card-clickable:hover {
        border-color: rgba(0,0,0,.125) !important;
    }
    
    /* Assurer que le texte reste lisible dans les cartes cliquables */
    a .card-clickable .text-dark {
        color: #212529 !important;
    }
    
    a .card-clickable .text-muted {
        color: #6c757d !important;
    }
    
    .fs-xs { font-size: 0.75rem; }
    .ls-1 { letter-spacing: 0.05em; }


/* ALL PDFS */

.pagination .page-link {
    cursor: pointer;
}

.date-filter-btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.btn-group .btn {
    white-space: nowrap;
}

.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

#selectedCount {
    padding: 0.5rem 1rem;
}

/* manage manufacturer modal */
/* Custom Modal Styles */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    display: block;
    opacity: 1;
}

.custom-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.custom-modal-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.custom-modal-close:hover {
    color: #333;
}

.custom-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

/* Form styles inside modal */
.custom-modal .form-group {
    margin-bottom: 16px;
}

.custom-modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.custom-modal .form-group input,
.custom-modal .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-modal .form-group input:focus,
.custom-modal .form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.custom-modal .form-group input::placeholder {
    color: #adb5bd;
}


/* Drapeau */
.country-flag-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.country-flag {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.country-code {
    font-size: 0.85rem;
    font-weight: 500;
}