@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
:root{ --sidebar-w:260px; --sidebar-collapsed-w:72px; }
.topbar{ display:flex; align-items:center; gap:.5rem; padding:.5rem .75rem; position:sticky; top:0; z-index:1050; }
.app-layout{ display:flex; min-height:calc(100vh - 44px); }
.sidebar{ width:var(--sidebar-w); background:#0d6efd; color:#fff; padding:.75rem .5rem 1rem; transition:width .2s, transform .2s; }
.sidebar-header{ display:flex; align-items:center; justify-content:space-between; padding:.25rem .25rem .5rem; margin-bottom:.25rem; }
.sidebar .brand{ font-weight:600; }
.sidebar-nav .nav-link{ color:rgba(255,255,255,.9); border-radius:.5rem; padding:.5rem .6rem; display:flex; align-items:center; gap:.6rem; }
.sidebar-nav .nav-link:hover{ background:rgba(255,255,255,.15); color:#fff; }
.sidebar-nav .nav-link.active{ background:rgba(0,0,0,.2); color:#fff; }
.sidebar-nav .icon{ width:1.25rem; text-align:center; }
.sidebar-nav .text{ white-space:nowrap; }
.content{ flex:1 1 auto; background:#f8f9fa; }

@media(min-width:992px){
  .sidebar{ position:sticky; top:0; height:calc(100vh - 44px); }
  .app-layout.collapsed .sidebar{ width:var(--sidebar-collapsed-w); }
  .app-layout.collapsed .sidebar .brand{ display:none; }
  .app-layout.collapsed .sidebar .nav-link{ justify-content:center; padding-left:.5rem; padding-right:.5rem; }
  .app-layout.collapsed .sidebar .nav-link .text{ display:none; }
}

@media(max-width:991.98px){
  .sidebar{ position:fixed; top:44px; left:0; bottom:0; transform:translateX(-100%); z-index:1051; overflow-y:auto; }
  .sidebar.open{ transform:translateX(0); }
  .backdrop{ position:fixed; inset:44px 0 0 0; background:rgba(0,0,0,.4); z-index:1050; }
}






/* Monte tous les popups Syncfusion au-dessus de tout */
.e-popup, .e-ddl.e-popup, [id$="_popup"].e-popup {
    z-index: 999999 !important;
}

    /* Si un thème/animation laisse l'opacité à 0, on neutralise */
    .e-popup.e-control.e-ddl.e-popup {
        opacity: 1 !important;
    }

.e-fade, .e-animation {
    animation: none !important;
}

/* Évite que des conteneurs parent créent un contexte de pile qui masque le popup */
.dx-popup, .dxbl-popup, .dxbl-drawer, .dxbl-overlay,
.sf-dialog, .e-dialog, .e-dlg-container {
    /* rien à forcer ici, mais au besoin baisse leur z-index */
}

/* Si ton layout a overflow hidden, autorise la sortie */
.ddl-wrap, .layout-content, .dxbl-content, .container, .row {
    overflow: visible !important;
}
/* Barre haute sticky */
.cart-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,.8);
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .cart-toolbar .left {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .cart-toolbar .right {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .cart-toolbar .order-title {
        font-weight: 700;
        font-size: 20px;
        color: #10a39c; /* vert/teal */
    }

    .cart-toolbar .toggles {
        display: flex;
        gap: 14px;
    }

    .cart-toolbar .toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border: 1px solid #e7e7e7;
        border-radius: 14px;
        background: #fff;
    }

        .cart-toolbar .toggle .pill {
            background: #ff2c70;
            color: #fff;
            border-radius: 12px;
            padding: 0 8px;
            margin-left: 6px;
            font-weight: 600;
            font-size: 12px;
        }

    .cart-toolbar .icons {
        display: flex;
        gap: 10px;
        font-size: 18px;
        align-items: center;
    }

        .cart-toolbar .icons .view {
            font-size: 20px;
        }

.btn-back .icon {
    margin-right: 6px;
}

/* Grille catalogue responsive */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px 4px;
}

/* Carte produit */
.item-card {
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

    .item-card .img-wrap {
        height: 150px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #f1f1f1;
        border-radius: 10px;
        background: #fafafa;
        margin-bottom: 10px;
    }

    .item-card img {
        max-height: 130px;
        max-width: 90%;
        object-fit: contain;
    }

    /* Code/nom/prix + stock */
    .item-card .meta {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
        margin-top: 6px;
    }

        .item-card .meta .left .code {
            font-size: 12px;
            color: #444;
        }

        .item-card .meta .left .name {
            font-size: 14px;
            color: #111;
        }

        .item-card .meta .left .price {
            font-size: 14px;
            font-weight: 700;
            margin-top: 2px;
        }

        .item-card .meta .right.in-stock {
            font-size: 13px;
            color: #05a39c;
            white-space: nowrap;
        }

/* Contrôles quantité */
.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.btn-round {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 36px;
    text-align: center;
    transition: transform .05s;
}

    .btn-round:hover {
        transform: translateY(-1px);
    }

    .btn-round.plus {
        border-color: #08a39c;
        color: #08a39c;
    }



/* Pied */
.footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px 28px;
}

    .footer-actions .total {
        font-size: 18px;
    }

.order-title {
    font-weight: 700;
    font-size: 20px;
    color: #10a39c;
}

.catalog-grid .item-card {
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.img-wrap {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f1f1;
    border-radius: 10px;
    background: #fafafa;
    margin-bottom: 10px;
    cursor: pointer;
}

    .img-wrap img {
        max-height: 140px;
        max-width: 92%;
        object-fit: contain;
    }

.meta .code {
    font-size: 12px;
    color: #666;
}

.meta .name {
    font-size: 14px;
    color: #111;
}

.meta .price {
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}

.meta .stock {
    font-size: 13px;
    color: #05a39c;
    white-space: nowrap;
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.btn-round .dxbl-button__text {
    font-size: 20px;
}

.btn-round {
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
}

    .btn-round.plus {
        border-color: #08a39c;
        color: #08a39c;
    }

.qty {
    min-width: 42px;
    text-align: center;
    font-weight: 700;
    font-size: 22px;
    color: #08a39c;
}

.footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px 24px;
}

    .footer-actions .total {
        font-size: 18px;
    }

/* Popup détail */
.detail-wrap {
    display: flex;
    gap: 16px;
}

    .detail-wrap .left {
        flex: 0 0 260px;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

.detail-img {
    width: 100%;
    max-width: 240px;
    max-height: 260px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.detail-wrap .right {
    flex: 1;
}

.d-line {
    margin-bottom: 6px;
}

    .d-line.stock {
        color: #05a39c;
    }

.edit-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
}

    .edit-line label {
        width: 100px;
        color: #555;
    }

.edit-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 1.05rem;
}
}








html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

        .main .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }





.sidebar-header {
    position: relative;
    padding: 1rem;
    background-color: #222;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.societe-libelle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    pointer-events: none;
}

.sidebar.open .societe-libelle {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
.dxbl-dropdown-menu-container,
.dxbl-combobox-popup,
.dxi-dropdown-menu-container {
    /* Doit être supérieur au ZIndex="2000" de votre DxPopup.
    */
    z-index: 2001 !important;
    /* 'fixed' permet à l'élément de s'ancrer par rapport 
      à la fenêtre du navigateur, et non par rapport 
      au parent 'overflow' de la popup.
    */
    position: fixed !important;
}
        

