/**
 * Styles page Home — extrait de Custom-Head/Home.php
 * Ne pas éditer Custom-Head pour le CSS : modifier ce fichier.
 * Retiré après analyse usage : .highlighted, .fixed-product-img,
 * .color-picker*, .fade-slide-*, .filter-btn, doublons #alpha-nav / .cards-container
 */
.scheduled-delivery-indicator {
        width: 100%;
        height: 100%;
        background: #1fa81f;
    }
    #timeline {
        display: flex;
        font-family: Arial, sans-serif;
        margin-top: 20px;
        border: 1px solid #ccc;
        overflow-x: auto;
    }

    .timeline-header, .timeline-cell {
        width: 80px;
        border-right: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        cursor: pointer;
    }

    .timeline-header {
        background: #f0f0f0;
        font-weight: bold;
        height: 40px;
    }
    .timeline-cell {
        height: 60px;
        background: #fafafa;
        transition: background 0.3s;
    }
    .timeline-cell:hover {
        background: #e0f7ff;
    }
    .file-preview-container {
        width: 100% !important;
        border: 1px solid #ced4da;
        border-top: none;
        border-bottom-left-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
        background: #f8f9fa;
        max-height: 600px;
        overflow-y: auto;
        margin-top: -1px;
    }

    .file-preview-item {
        width: 100%;
        margin-bottom: 8px;
        background: white;
        border-radius: 0.375rem;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .file-preview-item:last-child {
        margin-bottom: 0;
    }

    .file-preview-header {
        padding: 10px 15px;
        background: #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .file-preview-filename {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 10px;
        font-size: 0.875rem;
        font-weight: 500;
    }

    .file-preview-content {
        width: 100%;
        display: block;
    }

    .file-preview-content iframe,
    .file-preview-content img {
        width: 100%;
        height: 350px;
        display: block;
        border: none;
        background: white;
    }

    .file-preview-content img {
        object-fit: contain;
    }

    .dropdown-menu {
        min-width: 230px;
        border: 1px solid #d0d7de;
        border-radius: 0.5rem;
        padding: 0.4rem 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        background-color: #fff;
    }


    .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.45rem 1rem;
        font-size: 0.9rem;
        font-weight: 500;
        color: #333;
    }

    .dropdown-item:hover {
        background-color: #e9f2ff;
        color: #0d6efd;
    }


    .dropdown-submenu {
        position: relative;
    }

    .dropdown-submenu>.dropdown-menu {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        margin-top: -0.25rem;
        border-radius: 0.5rem;
        min-width: 200px;
    }


    .dropdown-submenu:hover>.dropdown-menu {
        display: block;
    }


    .dropdown-menu-start .dropdown-submenu>.dropdown-menu {
        left: auto;
        right: 100%;
    }



    .grid-container {
        display: grid;
        gap: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        justify-content: center;
        /* 6×140 ≈ 840 px; tweak as needed */
        margin-inline: auto;
        /* centre the grid itself */
    }

    .product-card {
        /* already on every button via w-100 */
        max-width: 220px;
        /* never grow past 220 px */
        justify-self: center;
        /* centre card inside its track */
    }

    .grid-container .btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        height: 200px;
        padding: 10px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        background: #fff;
    }


    .fw-bold,
    .overflow-hidden {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #price-container {
        background: #fff;
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        animation: fadeIn .3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .price-input {
        width: 100%;
        padding: 10px;
        margin-top: 8px;
        border: 1px solid #ddd;
        border-radius: 6px;
    }

    .btn-save {
        background: #0d6efd;
        color: white;
        border: none;
        padding: 8px 16px;
        margin-top: 15px;
        border-radius: 8px;
    }

    #alpha-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0;
        margin: 0 0 20px 0;
        list-style: none;
    }

    #alpha-nav .nav-item {
        position: relative;
    }

    #alpha-nav .nav-link {
        display: inline-block;
        padding: 10px 20px;
        font-weight: 500;
        font-size: 0.95rem;
        color: #4b5563;
        /* gris anthracite doux */
        text-decoration: none;
        border-radius: 8px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    /* Indicateur animé (bordure du bas) */
    #alpha-nav .nav-link::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: #0d6efd;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    /* État actif */
    #alpha-nav .nav-link.active {
        color: #0d6efd;
        background: #f0f7ff;
        border-color: #0d6efd;
    }

    #alpha-nav .nav-link.active::after {
        width: 100%;
    }

    /* Survol */
    #alpha-nav .nav-link:hover {
        color: #0d6efd;
        background: #f0f7ff;
        border-color: #0d6efd;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
        transform: translateY(-2px);
    }

    #alpha-nav .nav-link:hover::after {
        width: 100%;
    }

    /* ====== RESPONSIVE ====== */
    @media (max-width: 768px) {
        #alpha-nav {
            flex-direction: column;
            gap: 10px;
        }

        #alpha-nav .nav-link {
            width: 100%;
            text-align: center;
        }
    }


    .action-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .action-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
    }

    .action-card h6 {
        font-size: 1rem;
        font-weight: 600;
        color: #1d4ed8;
        margin-top: 10px;
    }

    .action-card p {
        font-size: 0.85rem;
        color: #64748b;
        margin-top: 4px;
    }

    .accordion-item {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        background: #f9fafb;
        overflow: hidden;
    }

    .accordion-header {
        padding: 15px 20px;
        font-weight: 600;
        color: #1d4ed8;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background 0.2s;
    }

    .accordion-header:hover {
        background: #e0f2fe;
    }

    .accordion-content {
        padding: 10px 20px;
        display: none;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
    }

    .toggle-icon {
        font-size: 0.9rem;
        transition: transform 0.3s;
    }

    .toggle-icon.open {
        transform: rotate(90deg);
    }

    @media (max-width: 768px) {
        #alpha-nav {
            flex-direction: column;
            gap: 10px;
        }

        .row>.col-md-6 {
            padding-left: 0;
            padding-right: 0;
        }
    }

    .row>.col-md-6 {
        margin-bottom: 12px;
    }

    .row>.col-md-6 .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 500;
        font-size: 0.9rem;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        border-radius: 8px;
    }

    .row>.col-md-6 .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    body {
        font-family: 'Inter', sans-serif
    }

    .textColor {
        color: #2a5a94
    }

    .changeWidth {
        width: 36px
    }

.iconChange {
    position: relative;
    cursor: pointer;
}

/* Ligne sous l'icône (défaut) */
.iconChange::after {
    content: "";
    display: block;
    margin: auto;
    height: 3px;
    width: 0;
    background: transparent;
    transition: all .5s ease;
}

/* Hover — ligne visible uniquement si l'élément n'est pas actif */
.iconChange:not(.active):hover::after {
    width: 100%;
    background: #0d6efd;
}

/* Ligne active — toujours visible si clic */
.iconChange.active::after {
    width: 100% !important;
    background: #0d6efd !important;
}

/* Texte actif */
.iconChange.active .textColor {
    color: #0d6efd !important;
}

/* Icône active */
.iconChange.active i {
    color: #0d6efd !important;
    transform: translateX(-180%);
    transform-origin: right;
    transition: transform 0.5s ease-in-out, color 0.5s ease-in-out;
}

/* Hover sur icône uniquement si pas actif */
.iconChange:not(.active):hover i {
    transform: translateX(-180%);
    transform-origin: right;
    color: #0d6efd;
}

/* Icônes — transition générale */
.iconChange i {
    transition: transform 0.5s ease-in-out, color 0.5s ease-in-out;
}

/* Taille des icônes */
.iconHeight {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

    /* =====  icon slide  ===== */
  



    .smallFont {
        font-size: 15px
    }

    .navbar {
        background-color: #F0F8FF
    }

    .utility-nav {
        position: relative;
        padding-bottom: 1.85rem;
    }

    .utility-nav__inner {
        padding-right: 17rem;
    }

    .utility-nav__title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .module-switches {
        position: absolute;
        right: 1.25rem;
        bottom: 0;
        transform: translateY(50%);
        z-index: 1050;
        display: flex;
        gap: 0.35rem;
        flex-wrap: nowrap;
    }

    .module-switches .module-switch {
        position: static;
        transform: none;
        text-decoration: none;
    }

    .module-switch {
        position: absolute;
        right: 1.25rem;
        bottom: 0;
        transform: translateY(50%);
        z-index: 1050;
        width: 4.75rem;
        height: 3.5rem;
        padding: 0.35rem 0.25rem;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        border: 1px solid #b6d4fe;
        border-radius: 0;
        background: #fff;
        color: #0d6efd;
        box-shadow: 0 1px 3px rgba(13, 110, 253, 0.12), 0 2px 8px rgba(13, 110, 253, 0.08);
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        text-decoration: none;
    }

    .module-switch__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
        line-height: 1;
    }

    .module-switch__label {
        font-size: 0.625rem;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .module-switch:hover {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
        box-shadow: 0 2px 10px rgba(13, 110, 253, 0.35);
    }

    .module-switch:active {
        background: #0b5ed7;
        border-color: #0b5ed7;
    }

    .module-switch:focus-visible {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }

    .module-switch--accounting {
        color: #198754;
        border-color: #a3cfbb;
    }

    .module-switch--accounting:hover {
        background: #198754;
        color: #fff;
        border-color: #198754;
    }

    .module-switch--secondary {
        color: #6c757d;
        border-color: #ced4da;
    }

    .module-switch--secondary:hover {
        background: #6c757d;
        color: #fff;
        border-color: #6c757d;
    }

    .module-switch--stock.module-switch--active {
        background: #6c757d;
        color: #fff;
        border-color: #6c757d;
        box-shadow: 0 2px 10px rgba(108, 117, 125, 0.35);
    }

    .module-switch--cashier.module-switch--active {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
        box-shadow: 0 2px 10px rgba(13, 110, 253, 0.35);
    }

    .module-switch--active {
        pointer-events: none;
        cursor: default;
    }

    .module-switch--accounting.module-switch--active {
        background: #198754;
        color: #fff;
        border-color: #198754;
        box-shadow: 0 2px 10px rgba(25, 135, 84, 0.35);
    }

    .module-switch--cashier {
        color: #0d6efd;
        border-color: #b6d4fe;
    }

    .acct-topbar {
        min-height: 64px;
    }

    .acct-topbar__label {
        font-size: 0.85rem;
        font-weight: 500;
    }

    @media (max-width: 992px) {
        .utility-nav {
            padding-bottom: 0.75rem;
        }

        .utility-nav__inner {
            padding-right: 0;
            width: 100%;
            margin-bottom: 0.5rem;
        }

        .module-switches {
            position: static;
            transform: none;
            justify-content: flex-end;
            margin: 0 0.75rem 0.35rem auto;
            flex-wrap: wrap;
        }
    }

    @media (max-width: 480px) {
        .module-switches {
            justify-content: center;
            margin: 0.25rem auto;
        }

        .module-switches .module-switch {
            width: 4.25rem;
            height: 3.15rem;
        }

        .module-switch__label {
            font-size: 0.55rem;
        }
    }

    #secondNav {
        background: white;
        padding: 10px 0 0 0;


    }

    #secondNav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        margin-left: 20px
    }

    #secondNav li {
        margin-right: 20px
    }

    #secondNav li a {
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center
    }

    .accordion-item {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        background: #f9fafb;
        overflow: hidden;
        transition: all 0.2s;
    }

    .accordion-header {
        padding: 15px 20px;
        font-weight: 600;
        font-size: 1.1rem;
        color: #1d4ed8;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        user-select: none;
        transition: background 0.2s;
    }

    .accordion-header:hover {
        background: #e0f2fe;
    }

    .accordion-content {
        padding: 10px 20px;
        display: none;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
    }

    .category-badge {
        display: inline-block;
        background-color: #16a34a;
        color: white;
        padding: 5px 12px;
        border-radius: 50px;
        margin: 4px 4px 4px 0;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .add-badge {
        display: inline-block;
        color: white;
        padding: 5px 12px;
        border-radius: 50px;
        margin: 4px 4px 4px 0;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .toggle-icon {
        font-size: 0.9rem;
        transition: transform 0.3s;
    }

    .toggle-icon.open {
        transform: rotate(90deg);
    }

    .product-card {
        text-align: center;
        margin-bottom: 15px;
        padding: 10px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    }

    .cards-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        padding: 15px;
        margin-top: 20px;
    }

    /* Cards arrondies et modernes */
    .product-card {
        background: #ffffff;
        border-radius: 20px;
        padding: 18px;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
        border: 1px solid #e5e5e5;
        transition: all 0.3s ease;
        cursor: pointer;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    }

    .product-img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        margin-bottom: 10px;
    }

    .product-name {
        font-size: 1.1rem;
        font-weight: 700;
        color: #222;
    }

    .product-ref {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    /* Textarea et color picker */
    .etiquette-textarea {
        width: 100%;
        border-radius: 12px;
        margin-top: 10px;
        font-size: 0.95rem;
        padding: 8px;
        resize: none;
        border: 1px solid #ccc;
        transition: 0.2s;
    }

    .etiquette-textarea:focus {
        border-color: #666;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
    }

    /* Bouton imprimer */
    .print-btn {
        background: linear-gradient(45deg, #3b3b3b, #1c1c1c);
        color: #fff;
        border-radius: 12px;
        padding: 8px;
        font-size: 0.95rem;
        margin-top: 8px;
        width: 100%;
        transition: all 0.25s;
        border: none;
        font-weight: 600;
    }

    .print-btn:hover {
        background: linear-gradient(45deg, #000, #333);
        transform: translateY(-2px);
    }

    

    .category-card {
        background: #ffffff;
        border-radius: 20px;
        padding: 18px;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
        border: 1px solid #e5e5e5;
        transition: all 0.3s ease;
        cursor: pointer;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    }

    .category-icon {
        font-size: 42px;
        margin-bottom: 10px;
    }

    .category-name {
        font-size: 1.1rem;
        font-weight: 700;
        color: #222;
        margin-bottom: 12px;
    }

    .etiquette-textarea {
        width: 100%;
        border-radius: 12px;
        margin-top: 10px;
        font-size: 0.95rem;
        padding: 8px;
        resize: none;
        border: 1px solid #ccc;
        transition: 0.2s;
    }

    .etiquette-textarea:focus {
        border-color: #666;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
    }

    .print-btn {
        background: linear-gradient(45deg, #3b3b3b, #1c1c1c);
        color: #fff;
        border-radius: 12px;
        padding: 8px;
        font-size: 0.95rem;
        margin-top: 8px;
        width: 100%;
        border: none;
        font-weight: 600;
        transition: all 0.25s;
    }

    .print-btn:hover {
        background: linear-gradient(45deg, #643232, #333);
        transform: translateY(-2px);
    }

    .color-palette {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 10px;
    }

    .color-swatch {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        cursor: pointer;
        border: 2px solid #fff;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s;
    }

    .color-swatch:hover {
        transform: scale(1.2);
    }
     .barcode-control {
    background-color: #f8f9fa;
    border-radius: .5rem;
    padding: .75rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
  }

  /* Label */
  .barcode-label {
    font-weight: 600;
    color: #495057;
    margin-right: .75rem;
  }

  /* Input */
  .barcode-input {
    width: 120px;
    border: 2px solid #dee2e6;
    border-radius: .35rem;
    transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
  }
  .barcode-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 .2rem rgba(0,123,255,.25);
  }
    #reorderPoButton {
        background-color: white; /* fond blanc */
        color: #198754;          /* texte vert pour correspondre à btn-outline-success */
        border: 1px solid #198754; /* bordure verte */
    }

    #reorderPoButton:hover {
        background-color: #198754; /* fond vert au survol */
        color: white;               /* texte blanc au survol */
    }

/* ——— Historique achats / commandes ——— */
.sc-purchase-history .card-header small {
    opacity: 0.9;
    font-weight: normal;
}

.sc-kpi-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    height: 100%;
}

.sc-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    margin-bottom: 0.15rem;
}

.sc-kpi-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.sc-kpi-value.text-success { color: #198754 !important; }
.sc-kpi-value.text-warning { color: #fd7e14 !important; }
.sc-kpi-value.text-primary { color: #0d6efd !important; }

.sc-side-panel {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #fff;
}

.sc-side-panel .list-group-item {
    border-left: 0;
    border-right: 0;
}

.sc-side-panel .list-group-item:first-child {
    border-top: 0;
}

.sc-po-list-item .sc-po-ref {
    font-weight: 600;
    font-size: 0.85rem;
}

.sc-po-list-item .sc-po-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.sc-po-list-item .sc-po-amount {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.sc-table-hint {
    font-size: 0.85rem;
    color: #495057;
}

.sc-table-footer {
    font-size: 0.875rem;
    color: #495057;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.sc-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.sc-empty-state i {
    font-size: 2rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.5rem;
}

.sc-beta-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.65rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border-left: 3px solid #0d6efd;
}
