﻿#bcd-erp {
    margin: 0;
    min-height: 100vh;
    display: flex;
    font-family: Arial, sans-serif;
    color: #152033;
    background: #f4f6fa;
}

#bcd-erp * {
    box-sizing: border-box;
}

#bcd-erp .erp-menu {
    width: 255px;
    min-height: 100vh;
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    background: #162338;
    color: #fff;
}

#bcd-erp .erp-marque {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 30px;
}

#bcd-erp .erp-marque strong {
    display: block;
    font-size: 18px;
}

#bcd-erp .erp-marque small {
    display: block;
    margin-top: 4px;
    color: #99a6bb;
}

#bcd-erp .erp-logo {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    background: #475be8;
}

#bcd-erp .erp-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#bcd-erp .erp-navigation a,
#bcd-erp .erp-admin {
    padding: 13px 14px;
    border-radius: 9px;
    color: #c3cddd;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

#bcd-erp .erp-navigation a:hover,
#bcd-erp .erp-admin:hover,
#bcd-erp .erp-navigation a.actif {
    color: #fff;
    background: #253554;
}

#bcd-erp .erp-admin {
    margin-top: auto;
    border: 1px solid #30415e;
}

#bcd-erp .erp-contenu {
    flex: 1;
    padding: 34px 38px;
}

#bcd-erp .erp-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

#bcd-erp .erp-fil {
    margin: 0 0 8px;
    color: #677690;
    font-size: 13px;
}

#bcd-erp h1 {
    margin: 0;
    font-size: 30px;
}

#bcd-erp .erp-utilisateur {
    padding: 12px 18px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(20, 31, 48, 0.08);
}

#bcd-erp .erp-introduction {
    margin-bottom: 24px;
    padding: 26px 30px;
    border-radius: 16px;
    color: #fff;
    background: #475be8;
}

#bcd-erp .erp-introduction h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

#bcd-erp .erp-introduction p {
    max-width: 720px;
    margin: 0;
    line-height: 1.55;
}

#bcd-erp .erp-indicateurs {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}

#bcd-erp .erp-indicateurs article,
#bcd-erp .erp-cartes article {
    padding: 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(20, 31, 48, 0.08);
    min-width: 0;
    container-type: inline-size;
}

#bcd-erp .erp-indicateurs span {
    display: block;
    margin-bottom: 18px;
    color: #66758e;
    font-size: 14px;
}

#bcd-erp .erp-indicateurs strong {
    display: block;
    margin-bottom: 12px;
    font-size: clamp(19px, 2.2vw, 31px);
    white-space: nowrap;
}

/* Taille basée sur la largeur réelle de la carte (navigateurs récents) :
   les gros montants se réduisent automatiquement au lieu de déborder. */
@supports (container-type: inline-size) {
    #bcd-erp .erp-indicateurs strong {
        font-size: clamp(16px, 11cqw, 31px);
    }
}

#bcd-erp .erp-indicateurs small {
    color: #8190a7;
}

#bcd-erp .erp-prochaines-etapes h2 {
    margin: 0 0 18px;
    font-size: 21px;
}

#bcd-erp .erp-cartes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

#bcd-erp .erp-cartes h3 {
    margin: 0 0 12px;
    font-size: 17px;
}

#bcd-erp .erp-cartes p {
    margin: 0;
    color: #66758e;
    line-height: 1.5;
}

#bcd-erp .erp-panneau {
    margin-bottom: 24px;
    padding: 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(20, 31, 48, 0.08);
}

#bcd-erp .erp-panneau h2 {
    margin-top: 0;
    font-size: 21px;
}

#bcd-erp .erp-panneau-entete {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

#bcd-erp .erp-note {
    color: #677690;
    line-height: 1.5;
}

#bcd-erp .erp-actions {
    margin: 18px 0 22px;
}

#bcd-erp .erp-recherche {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#bcd-erp input[type="search"],
#bcd-erp select {
    min-width: 300px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced6e2;
    border-radius: 8px;
    background: #fff;
    color: #152033;
    font: inherit;
}

#bcd-erp .erp-recherche-produits {
    justify-content: flex-end;
}

#bcd-erp .erp-produits-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 14px;
}

#bcd-erp .erp-produit {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e8edf5;
    border-radius: 10px;
    background: #fff;
}

#bcd-erp .erp-produit-image {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f6fa;
    color: #677690;
    font-weight: bold;
}

#bcd-erp .erp-produit-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#bcd-erp .erp-produit-corps {
    min-width: 0;
}

#bcd-erp .erp-produit h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

#bcd-erp .erp-produit-metas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #33415a;
    font-size: 13px;
}

#bcd-erp .erp-produit-metas span {
    padding: 5px 8px;
    border-radius: 8px;
    background: #f4f6fa;
}

#bcd-erp button {
    padding: 11px 17px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #475be8;
    font: inherit;
    cursor: pointer;
}

#bcd-erp .erp-table {
    overflow-x: auto;
}

#bcd-erp table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#bcd-erp th {
    text-align: left;
    color: #677690;
    font-weight: normal;
    background: #f4f6fa;
    white-space: nowrap;
}

#bcd-erp td,
#bcd-erp th {
    padding: 13px 12px;
    border-bottom: 1px solid #e9edf3;
    vertical-align: top;
}

#bcd-erp td {
    overflow-wrap: anywhere;
    max-width: 360px;
}

#bcd-erp td small,
#bcd-erp .erp-indicateurs small {
    color: #677690;
    line-height: 1.4;
}

#bcd-erp .erp-vide {
    text-align: center;
    padding: 32px;
    color: #677690;
}

#bcd-erp .erp-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 8px;
    white-space: nowrap;
    color: #354bcc;
    background: #edf0ff;
    font-size: 12px;
}

#bcd-erp .erp-badge-ok {
    color: #216e4e;
    background: #e9f7f0;
}

#bcd-erp .erp-badge-erreur {
    color: #a32636;
    background: #fff0f0;
}

#bcd-erp .erp-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
}

#bcd-erp .erp-messages {
    margin-bottom: 20px;
    padding: 8px 22px;
    border-radius: 12px;
    color: #216e4e;
    background: #e9f7f0;
}

@media (max-width: 1000px) {
    #bcd-erp .erp-indicateurs,
    #bcd-erp .erp-cartes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Présentation reprise du prototype local ERP Jeux */
#bcd-erp {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f6f7f9;
    color: #17202a;
}

#bcd-erp .erp-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: 286px;
    transition: transform 0.2s ease;
    padding: 22px 18px;
    overflow: auto;
    background: #101820;
    color: #fff;
}

#bcd-erp .erp-marque {
    gap: 12px;
    padding: 0 4px 18px;
}

#bcd-erp .erp-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fff;
    color: #101820;
    font-weight: 900;
    font-size: 14px;
}

#bcd-erp .erp-marque strong {
    font-size: 18px;
}

#bcd-erp .erp-marque small,
#bcd-erp .erp-nav-groupe > span {
    color: #9aa6b2;
    font-size: 12px;
}

#bcd-erp .erp-navigation {
    gap: 0;
}

#bcd-erp .erp-nav-groupe {
    margin-top: 14px;
}

#bcd-erp .erp-nav-groupe > span {
    display: block;
    padding: 10px 10px 6px;
    text-transform: uppercase;
}

#bcd-erp .erp-nav-entete {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    background: transparent;
    color: #dce4ec;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 7px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

#bcd-erp .erp-nav-entete:hover { background: #1e2b37; color: #fff; }

#bcd-erp .erp-nav-icone {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: #fff;
    flex-shrink: 0;
}

#bcd-erp .erp-nav-icone svg { width: 15px; height: 15px; }

#bcd-erp .erp-nav-icone-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    border: 2px solid #101820;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bcd-erp .erp-icone-accueil { background: #3b82f6; }
#bcd-erp .erp-icone-statistiques { background: #8b5cf6; }
#bcd-erp .erp-icone-ventes { background: #22c55e; }
#bcd-erp .erp-icone-service-client { background: #e11d48; }
#bcd-erp .erp-icone-clients { background: #d946ef; }
#bcd-erp .erp-icone-catalogue { background: #f97316; }
#bcd-erp .erp-icone-achats { background: #ec4899; }
#bcd-erp .erp-icone-comptabilite { background: #14b8a6; }
#bcd-erp .erp-icone-rh { background: #0ea5e9; }
#bcd-erp .erp-icone-logistique { background: #f59e0b; }
#bcd-erp .erp-icone-outils { background: #64748b; }
#bcd-erp .erp-icone-parametrage { background: #6366f1; }

#bcd-erp .erp-nav-libelle { flex: 1; }

#bcd-erp .erp-nav-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #7c8aa0;
    transition: transform 0.15s ease;
}

#bcd-erp .erp-nav-groupe.ouvert .erp-nav-chevron { transform: rotate(180deg); }

#bcd-erp .erp-nav-liens {
    display: none;
    padding: 2px 0 4px 10px;
    flex-direction: column;
    gap: 2px;
}

#bcd-erp .erp-nav-groupe.ouvert .erp-nav-liens { display: flex; }

#bcd-erp .erp-navigation a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 7px;
    color: #dce4ec;
    line-height: 20px;
}

#bcd-erp .erp-navigation a:hover,
#bcd-erp .erp-navigation a.actif {
    background: #1e2b37;
    color: #fff;
}

#bcd-erp .erp-nav-sous-icone {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #7c8aa0;
}
#bcd-erp .erp-nav-sous-icone svg { width: 16px; height: 16px; }
#bcd-erp .erp-navigation a:hover .erp-nav-sous-icone,
#bcd-erp .erp-navigation a.actif .erp-nav-sous-icone { color: #fff; }
#bcd-erp .erp-nav-badge { margin-left: auto; }

#bcd-erp .erp-ligne-a-confirmer { background: #fef2f2; }

#bcd-erp .erp-admin {
    display: none;
}

#bcd-erp .erp-contenu {
    margin-left: 286px;
    padding: 24px 28px 42px;
    width: calc(100% - 286px);
    transition: margin-left 0.2s ease, width 0.2s ease;
}

#bcd-erp .erp-bouton-repli { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0; border: 1px solid #e3e7eb; border-radius: 8px; background: #fff; color: #17202a; cursor: pointer; flex-shrink: 0; }

#bcd-erp .erp-table-achats th a { color: inherit; text-decoration: none; }
#bcd-erp .erp-table-achats th a:hover { color: #2364d8; }
#bcd-erp .erp-table-achats td, #bcd-erp .erp-table-achats th { white-space: nowrap; font-size: 13px; }
#bcd-erp .erp-table-achats .col-achat-nom { white-space: normal; max-width: 220px; }
#bcd-erp .erp-table-achats .col-achat-image { width: 48px; }
#bcd-erp .erp-ligne-estompee { opacity: 0.55; }

#bcd-erp .erp-conseil-achat { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border-radius: 8px; white-space: normal; min-width: 150px; }
#bcd-erp .erp-conseil-achat strong { font-size: 13px; }
#bcd-erp .erp-conseil-achat span { font-size: 11px; opacity: 0.85; }
#bcd-erp .erp-conseil-urgent { background: #fff0f0; color: #a32636; }
#bcd-erp .erp-conseil-saisonnier { background: #f3e8ff; color: #7c3aed; }
#bcd-erp .erp-conseil-a_commander { background: #fff7ed; color: #c2410c; }
#bcd-erp .erp-conseil-surstock { background: #ecfdf5; color: #047857; }
#bcd-erp .erp-conseil-ok { background: #f1f5f9; color: #475569; }

/* Module Inventaire, mobile-first */
#bcd-erp .erp-inventaire-depots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
#bcd-erp .erp-inventaire-depot-carte h3 { margin: 0 0 6px; }
#bcd-erp .erp-inventaire-barre { height: 10px; border-radius: 999px; background: #eef1f5; overflow: hidden; margin: 8px 0; }
#bcd-erp .erp-inventaire-barre-remplie { height: 100%; background: #16a34a; }
#bcd-erp .erp-inventaire-scan { text-align: center; }
#bcd-erp .erp-inventaire-saisie-geante { width: 100%; height: 56px; font-size: 22px; text-align: center; border: 2px solid #2563eb; border-radius: 12px; margin-bottom: 12px; box-sizing: border-box; }
#bcd-erp .erp-inventaire-bouton-geant { width: 100%; height: 54px; font-size: 17px; }
#bcd-erp .erp-inventaire-recents { display: flex; flex-wrap: wrap; gap: 8px; }
#bcd-erp .erp-inventaire-recap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; color: #475569; }
#bcd-erp [data-inventaire] [hidden] { display: none !important; }
#bcd-erp .erp-inventaire-saisie { margin-top: 12px; }
#bcd-erp .erp-inventaire-saisie-libelle { display: block; font-size: 13px; color: #64748b; margin-bottom: 4px; }
#bcd-erp .erp-inventaire-saisie-ligne { display: flex; gap: 8px; }
#bcd-erp .erp-inventaire-saisie-ligne .erp-inventaire-saisie-geante { flex: 1; min-width: 0; margin-bottom: 0; }
#bcd-erp .erp-inventaire-saisie-ligne button { min-width: 110px; height: 56px; font-size: 17px; }
#bcd-erp .erp-inventaire-message { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 17px; font-weight: 700; }
#bcd-erp .erp-inventaire-message:empty { display: none; }
#bcd-erp .erp-inventaire-message-ok { background: #dcfce7; color: #14532d; }
#bcd-erp .erp-inventaire-message-alerte { background: #ffedd5; color: #9a3412; }
#bcd-erp .erp-inventaire-message-erreur { background: #fee2e2; color: #991b1b; }
#bcd-erp .erp-inventaire-message-info { background: #f1f5f9; color: #334155; }
#bcd-erp .erp-inventaire-camera-boutons { display: flex; gap: 8px; }
#bcd-erp .erp-inventaire-camera-boutons [data-son] { width: 56px; height: 54px; font-size: 20px; flex-shrink: 0; }
#bcd-erp .erp-inventaire-video { position: relative; margin-top: 6px; border-radius: 12px; overflow: hidden; background: #000; }
#bcd-erp .erp-inventaire-video video { display: block; width: 100%; height: 130px; object-fit: cover; }
#bcd-erp .erp-inventaire-viseur { position: absolute; left: 5%; right: 5%; top: 8%; bottom: 8%; border: 3px solid rgba(34, 197, 94, .9); border-radius: 10px; pointer-events: none; }
#bcd-erp .erp-inventaire-viseur::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 2px solid rgba(239, 68, 68, .85); }
#bcd-erp .erp-inventaire-torche { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); font-size: 22px; }
#bcd-erp .erp-inventaire-torche[aria-pressed="true"] { background: #facc15; }
#bcd-erp .erp-inventaire-camera-etat { margin: 6px 0 0; font-size: 13px; color: #64748b; }
#bcd-erp .erp-inventaire-camera-etat:empty { display: none; }
#bcd-erp .erp-inventaire-alerte { border: 2px solid #f59e0b; }
#bcd-erp .erp-inventaire-carte-produit { display: block; border-width: 3px; border-style: solid; }
#bcd-erp .erp-inventaire-verdict { margin: 0 0 8px; padding: 6px 12px; border-radius: 10px; font-size: 19px; font-weight: 800; color: #fff; text-align: center; }
#bcd-erp .erp-inventaire-carte-corps { display: flex; gap: 16px; }
#bcd-erp .erp-inventaire-photo { flex-shrink: 0; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; color: #94a3b8; }
#bcd-erp .erp-inventaire-photo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
#bcd-erp .erp-inventaire-carte-infos { flex: 1; min-width: 0; }
#bcd-erp .erp-inventaire-carte-infos h3 { margin: 0 0 4px; font-size: 19px; }
#bcd-erp .erp-inventaire-ids { margin: 0; color: #475569; font-size: 14px; word-break: break-all; }
#bcd-erp .erp-inventaire-conforme { border-color: #16a34a; background: #f0fdf4; }
#bcd-erp .erp-inventaire-conforme .erp-inventaire-verdict { background: #16a34a; }
#bcd-erp .erp-inventaire-manquant, #bcd-erp .erp-inventaire-excedent { border-color: #dc2626; background: #fef2f2; }
#bcd-erp .erp-inventaire-manquant .erp-inventaire-verdict, #bcd-erp .erp-inventaire-excedent .erp-inventaire-verdict { background: #dc2626; }
#bcd-erp .erp-inventaire-inattendu { border-color: #ea580c; background: #fff7ed; }
#bcd-erp .erp-inventaire-inattendu .erp-inventaire-verdict { background: #ea580c; }
#bcd-erp .erp-inventaire-quantites { display: flex; gap: 24px; margin: 10px 0; }
#bcd-erp .erp-inventaire-quantites span { display: block; font-size: 12px; color: #6d7580; }
#bcd-erp .erp-inventaire-quantites strong { font-size: 30px; }
#bcd-erp .erp-inventaire-stepper { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0 0 8px; }
#bcd-erp .erp-inventaire-stepper form { margin: 0; }
#bcd-erp .erp-inventaire-stepper button { min-width: 52px; height: 48px; font-size: 20px; }
#bcd-erp .erp-inventaire-stepper-saisie { display: flex; gap: 6px; }
#bcd-erp .erp-inventaire-stepper-saisie input { width: 72px; height: 48px; font-size: 20px; text-align: center; box-sizing: border-box; }
#bcd-erp .erp-inventaire-recompter { display: flex; gap: 4px; }
#bcd-erp .erp-inventaire-recompter input { width: 60px; }
#bcd-erp tr.erp-inventaire-ligne-conforme:not([data-compte="0"]) td:first-child { box-shadow: inset 5px 0 #16a34a; }
#bcd-erp tr.erp-inventaire-ligne-manquant:not([data-compte="0"]) td:first-child, #bcd-erp tr.erp-inventaire-ligne-excedent td:first-child { box-shadow: inset 5px 0 #dc2626; }
#bcd-erp tr.erp-inventaire-ligne-inattendu td:first-child { box-shadow: inset 5px 0 #ea580c; }
#bcd-erp .erp-ligne-surlignee { outline: 2px solid #2563eb; }
@keyframes erp-inventaire-flash { from { box-shadow: 0 0 0 8px rgba(37, 99, 235, .55); } to { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
#bcd-erp .erp-inventaire-flash { animation: erp-inventaire-flash .7s ease-out; }
/* Inventaires partiels (2026-09-24) : liste, onglets, trois parties de l'écran de comptage, vignettes photo. */
#bcd-erp .erp-inventaire-creer { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
#bcd-erp .erp-inventaire-creer label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; }
#bcd-erp .erp-inventaire-creer input, #bcd-erp .erp-inventaire-creer select { font-size: 16px; padding: 8px; }
#bcd-erp .erp-inventaire-liste { display: grid; gap: 12px; }
#bcd-erp .erp-inventaire-session { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
#bcd-erp .erp-inventaire-session h3, #bcd-erp .erp-inventaire-session p { margin: 0 0 4px; }
#bcd-erp .erp-inventaire-session .erp-actions-bas { gap: 8px; margin: 0; }
#bcd-erp .erp-inventaire-titre { margin: 4px 0 8px; }
#bcd-erp .erp-inventaire-onglets { gap: 6px; margin-bottom: 10px; }
#bcd-erp .erp-inventaire-onglets .erp-bouton-departement { padding: 6px 10px; font-size: 14px; min-height: 0; }
#bcd-erp .erp-inventaire-consigne { text-align: center; letter-spacing: .08em; font-size: 20px; margin: 0 0 8px; }
#bcd-erp .erp-inventaire-vignette { width: 64px; }
#bcd-erp .erp-inventaire-vignette img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 6px; display: block; }
#bcd-erp .erp-inventaire-table td { vertical-align: middle; }
#bcd-erp .erp-inventaire-partie-attendus { border-left: 6px solid #16a34a; }
#bcd-erp .erp-inventaire-partie-non_attendus { border-left: 6px solid #ea580c; }
#bcd-erp .erp-inventaire-partie-a_scanner { border-left: 6px solid #94a3b8; }
#bcd-erp .erp-inventaire-partie h3 { margin: 0 0 8px; }
#bcd-erp .erp-inventaire-resultats { list-style: none; margin: 10px 0; padding: 0; max-height: 50vh; overflow-y: auto; }
#bcd-erp .erp-inventaire-resultats label { display: flex; gap: 10px; align-items: center; padding: 8px; border-bottom: 1px solid #e2e8f0; cursor: pointer; }
#bcd-erp .erp-inventaire-resultats input[type="radio"] { width: 22px; height: 22px; flex-shrink: 0; }
#bcd-erp .erp-inventaire-resultats label:has(input:checked) { background: #dcfce7; }
#bcd-erp #inventaire-anomalie label { display: block; margin: 8px 0; }
#bcd-erp #inventaire-anomalie details { margin-top: 12px; }
/* Ergonomie terrain (2026-09-24) : fil d'Ariane, zone de scan compacte et collante, saisie manuelle repliée. */
#bcd-erp .erp-entete:has(.erp-inventaire-fil) { margin-bottom: 8px; gap: 8px; }
#bcd-erp .erp-entete h1.erp-inventaire-fil { min-width: 0; }
#bcd-erp .erp-inventaire-fil { font-size: 20px; line-height: 1.3; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
#bcd-erp .erp-inventaire-fil a { color: inherit; text-decoration: none; }
#bcd-erp .erp-inventaire-fil > a:first-child { font-size: 24px; }
#bcd-erp .erp-inventaire-fil small { color: #64748b; font-size: 15px; font-weight: 600; }
#bcd-erp .erp-inventaire-fil-sep { color: #94a3b8; }
#bcd-erp .erp-inventaire-scan-collant { position: sticky; top: 0; z-index: 20; padding: 8px 10px; margin-bottom: 8px; }
#bcd-erp .erp-inventaire-scan .erp-inventaire-bouton-geant { height: 44px; font-size: 16px; }
#bcd-erp .erp-inventaire-camera-boutons [data-son] { height: 44px; width: 48px; }
#bcd-erp .erp-inventaire-camera { margin-bottom: 0; }
#bcd-erp .erp-inventaire-manuel { margin-top: 6px; text-align: left; }
#bcd-erp .erp-inventaire-manuel summary { cursor: pointer; color: #475569; font-size: 14px; padding: 4px 0; }
#bcd-erp .erp-inventaire-manuel .erp-inventaire-saisie { margin-top: 6px; }
#bcd-erp .erp-inventaire-scan .erp-inventaire-message { margin-top: 6px; padding: 6px 10px; font-size: 15px; }
#bcd-erp .erp-inventaire-recap { margin: 0 0 8px; font-size: 13px; gap: 6px; }
#bcd-erp .erp-inventaire-ailleurs { margin: 4px 0; font-size: 13px; color: #9a3412; }
#bcd-erp .erp-inventaire-carte-produit .erp-inventaire-quantites { margin: 6px 0; }
@media (max-width: 600px) {
    #bcd-erp .erp-inventaire-carte-corps { flex-direction: column; align-items: center; text-align: center; }
    #bcd-erp .erp-inventaire-photo { width: 100%; max-width: 260px; height: 190px; }
    #bcd-erp .erp-inventaire-quantites, #bcd-erp .erp-inventaire-stepper { justify-content: center; }
}

#bcd-erp .erp-achat-layout { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
#bcd-erp .erp-achat-resume { position: sticky; top: 18px; background: #f7f9fc; border: 1px solid #dbe3ec; border-radius: 10px; padding: 16px; }
#bcd-erp .erp-achat-resume h3 { margin: 0 0 10px; font-size: 15px; }
#bcd-erp .erp-achat-resume p { margin: 0 0 8px; font-size: 14px; color: #475569; }
@media (max-width: 1100px) {
    #bcd-erp .erp-achat-layout { grid-template-columns: 1fr; }
    #bcd-erp .erp-achat-resume { position: static; }
}

@media (min-width: 901px) {
    #bcd-erp .erp-bouton-repli { display: inline-flex; }
    #bcd-erp.erp-menu-reduit .erp-menu { transform: translateX(-100%); }
    #bcd-erp.erp-menu-reduit .erp-contenu { margin-left: 0; width: 100%; }
}

#bcd-erp .erp-entete {
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}

#bcd-erp .erp-fil {
    margin: 0 0 5px;
    color: #6d7580;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

#bcd-erp h1 {
    font-size: 32px;
    line-height: 1.1;
}

#bcd-erp .erp-recherche-globale {
    flex: 0 1 560px;
}

#bcd-erp .erp-recherche-globale input {
    width: 100%;
    height: 42px;
    border: 1px solid #e3e7eb;
    border-radius: 7px;
    padding: 0 12px;
    background: #fff;
    color: #17202a;
    font: inherit;
}

#bcd-erp .erp-panneau,
#bcd-erp .erp-indicateurs article,
#bcd-erp .erp-cartes article,
#bcd-erp .erp-table,
#bcd-erp .erp-liste {
    border: 1px solid #e3e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(29, 38, 51, 0.08);
}

#bcd-erp .erp-entete-titre { display: flex; align-items: center; gap: 10px; }
#bcd-erp .erp-bouton-menu { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0; border: 1px solid #e3e7eb; border-radius: 8px; background: #fff; color: #17202a; cursor: pointer; flex-shrink: 0; }
#bcd-erp .erp-bouton-menu svg { width: 20px; height: 20px; }
#bcd-erp .erp-menu-fond { display: none; }

@media (max-width: 900px) {
    #bcd-erp .erp-bouton-menu { display: inline-flex; }

    #bcd-erp .erp-menu {
        position: fixed;
        z-index: 1100;
        top: 0; bottom: 0; left: 0;
        width: min(82vw, 300px);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, .35);
    }

    #bcd-erp.erp-menu-ouvert .erp-menu { transform: translateX(0); }

    #bcd-erp .erp-menu-fond {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        background: rgba(15, 23, 42, .5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    #bcd-erp.erp-menu-ouvert .erp-menu-fond { opacity: 1; pointer-events: auto; }

    #bcd-erp .erp-contenu {
        margin-left: 0;
        width: 100%;
        padding: 14px 14px 32px;
    }

    #bcd-erp .erp-entete {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #bcd-erp h1 { font-size: 22px; }

    #bcd-erp .erp-recherche-globale { flex: none; width: 100%; }

    /* KPI / indicateurs : une colonne */
    #bcd-erp .erp-indicateurs,
    #bcd-erp .erp-cartes,
    #bcd-erp .erp-dashboard-kpis,
    #bcd-erp .erp-dashboard-grid-2,
    #bcd-erp .erp-dashboard-grid-70-30,
    #bcd-erp .erp-dashboard-grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Barres de filtres / recherche : empilées, pleine largeur */
    #bcd-erp .erp-filtre-periode,
    #bcd-erp .erp-stats-filtres,
    #bcd-erp .erp-cases-produits,
    #bcd-erp .erp-cases-fournisseurs,
    #bcd-erp .erp-analyse-recherches,
    #bcd-erp .erp-analyse-cases,
    #bcd-erp .erp-onglets-departement {
        flex-wrap: wrap;
    }

    #bcd-erp .erp-filtre-header,
    #bcd-erp .erp-analyse-recherche-champ input {
        min-width: 0;
        flex: 1 1 auto;
    }

    #bcd-erp .erp-bouton-departement { min-width: 0; flex: 1 1 auto; height: 44px; padding: 0 12px; font-size: 13px; }

    /* Formulaire d'édition fournisseur : une colonne */
    #bcd-erp .erp-edition-grille { grid-template-columns: 1fr; }
    #bcd-erp .erp-edition-entete { display: none; }
    #bcd-erp .erp-edition-ligne { display: block; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eef1f5; }
    #bcd-erp .erp-edition-ligne label { margin-bottom: 4px; }
    #bcd-erp .erp-edition-ligne input, #bcd-erp .erp-edition-ligne select { margin-bottom: 6px; }
    #bcd-erp .erp-edition-double, #bcd-erp .erp-edition-triple { grid-column: auto; }
    #bcd-erp .erp-modal-fournisseur { width: calc(100vw - 20px); }

    #bcd-erp .erp-formulaire-grille { grid-template-columns: 1fr; }

    /* Tables larges : scroll horizontal garanti, jamais de débordement de page */
    #bcd-erp .erp-table-scroll,
    #bcd-erp .erp-table-produits,
    #bcd-erp .erp-table-fournisseurs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #bcd-erp .erp-panneau,
    #bcd-erp .erp-page-entete-simple {
        padding: 14px;
    }

    #bcd-erp .erp-page-entete-simple { flex-direction: column; align-items: stretch; gap: 12px; }

    #bcd-erp .erp-modal-boite { width: calc(100vw - 20px); left: 10px; right: 10px; transform: none; top: 12px; max-height: calc(100vh - 24px); }
}

@media (max-width: 480px) {
    #bcd-erp .erp-retours-photos { flex-direction: column; }
    #bcd-erp .erp-analyse-cases,
    #bcd-erp .erp-cases-fournisseurs,
    #bcd-erp .erp-cases-produits { flex-direction: column; align-items: flex-start; gap: 8px; }
}

#bcd-erp .erp-logo {
    overflow: hidden;
    background: #fff;
}

#bcd-erp .erp-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#bcd-erp .erp-barre-outils {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

#bcd-erp .erp-filtres-commandes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

#bcd-erp .erp-filtres-commandes label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6d7580;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

#bcd-erp .erp-filtres-commandes input,
#bcd-erp .erp-filtres-commandes select {
    width: auto;
    min-width: 120px;
    height: 42px;
    border: 1px solid #e3e7eb;
    border-radius: 7px;
    padding: 0 12px;
    background: #fff;
    color: #17202a;
}

#bcd-erp .erp-filtres-commandes input[type="search"] {
    min-width: 260px;
}

#bcd-erp .erp-filtres-commandes button,
#bcd-erp .erp-bouton-secondaire {
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    padding: 0 14px;
    background: #2364d8;
    color: #fff;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

#bcd-erp .erp-bouton-secondaire {
    display: inline-flex;
    align-items: center;
    background: #edf2f7;
    color: #516071;
}

#bcd-erp .erp-compteurs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#bcd-erp .erp-compteurs span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #edf4ff;
    color: #516071;
    font-size: 12px;
    font-weight: 850;
}

#bcd-erp .erp-table-large {
    overflow: auto;
}

#bcd-erp .erp-table-large table {
    min-width: 1320px;
}

#bcd-erp .erp-table th {
    color: #6d7580;
    font-size: 12px;
    text-transform: uppercase;
}

#bcd-erp .erp-table td,
#bcd-erp .erp-table th {
    vertical-align: middle;
}

#bcd-erp .erp-badge-info {
    background: #eaf1ff;
    color: #2364d8;
}

#bcd-erp .erp-montant {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 5px;
    background: #51bd7a;
    color: #fff;
    font-weight: 850;
}

#bcd-erp .erp-fil {
    display: none;
}

#bcd-erp .erp-commandes-form {
    margin: 0;
}

#bcd-erp .erp-ligne-filtres th {
    background: #fff;
    border-top: 1px solid #19aee6;
}

#bcd-erp .erp-ligne-filtres input {
    width: 100%;
    min-width: 110px;
    height: 34px;
    border: 1px solid #b9c9d6;
    border-radius: 0;
    padding: 0 8px;
    background: #fff;
    color: #17202a;
    font-size: 13px;
}

#bcd-erp .erp-montant-neutre {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 5px;
    background: #eef3f7;
    color: #607080;
    font-weight: 850;
}

#bcd-erp .erp-lien-table {
    color: #2364d8;
}

#bcd-erp .erp-table-large table {
    min-width: 1780px;
}


/* Compactage de la grille Commandes */
#bcd-erp .erp-contenu {
    padding-left: 20px;
    padding-right: 20px;
}

#bcd-erp .erp-commandes {
    padding: 14px 14px 18px;
}

#bcd-erp .erp-table-commandes {
    border-radius: 8px;
}

#bcd-erp .erp-table-commandes table {
    min-width: 1540px;
    table-layout: fixed;
}

#bcd-erp .erp-table-commandes th,
#bcd-erp .erp-table-commandes td {
    padding: 9px 7px;
    font-size: 13px;
    line-height: 1.15;
}

#bcd-erp .erp-table-commandes th {
    font-size: 11px;
    white-space: nowrap;
}

#bcd-erp .erp-table-commandes .erp-ligne-filtres th {
    padding: 6px 5px;
}

#bcd-erp .erp-table-commandes .erp-ligne-filtres input {
    min-width: 0;
    height: 30px;
    padding: 0 7px;
    font-size: 12px;
}

#bcd-erp .erp-table-commandes .erp-ligne-filtres select {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    height: 30px;
    padding: 0 7px;
    font-size: 12px;
    border: 1px solid #d3dde8;
    border-radius: 5px;
    background: #fff;
}

#bcd-erp .erp-table-commandes .col-commande { width: 78px; }
#bcd-erp .erp-table-commandes .col-date { width: 58px; }
#bcd-erp .erp-table-commandes .col-client { width: 128px; }
#bcd-erp .erp-table-commandes .col-score { width: 92px; }
#bcd-erp .erp-table-commandes .col-canal { width: 78px; font-size: 12px; }
#bcd-erp .erp-table-commandes .col-marketplace { width: 126px; }
#bcd-erp .erp-table-commandes .col-transporteur { width: 118px; font-size: 12px; }
#bcd-erp .erp-table-commandes .col-suivi { width: 110px; }
#bcd-erp .erp-table-commandes .col-statut { width: 180px; }
#bcd-erp .erp-table-commandes .col-paiement { width: 108px; font-size: 12px; }
#bcd-erp .erp-table-commandes .col-total-ht { width: 86px; text-align: right; }
#bcd-erp .erp-table-commandes .col-total-ttc { width: 92px; text-align: right; }
#bcd-erp .erp-table-commandes .col-marge { width: 86px; text-align: right; }
#bcd-erp .erp-table-commandes .col-rembourse { width: 112px; text-align: right; }
#bcd-erp .erp-table-commandes .col-retour { width: 88px; text-align: center; }
#bcd-erp .erp-table-commandes .col-facture { width: 86px; }

#bcd-erp .erp-table-commandes .col-date span,
#bcd-erp .erp-table-commandes .col-date small {
    display: block;
    white-space: nowrap;
}

#bcd-erp .erp-table-commandes .col-date small,
#bcd-erp .erp-table-commandes small {
    color: #697789;
    font-size: 11px;
}

#bcd-erp .erp-table-commandes .erp-badge {
    padding: 4px 7px;
    font-size: 11px;
}

#bcd-erp .erp-table-commandes .erp-montant,
#bcd-erp .erp-table-commandes .erp-montant-neutre {
    padding: 5px 7px;
    white-space: nowrap;
}


/* Gain de largeur et filtre de p?riode dans l'en-t?te Commandes */
#bcd-erp .erp-contenu {
    padding-left: 8px;
    padding-right: 8px;
}

#bcd-erp .erp-entete {
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

#bcd-erp .erp-entete h1 {
    min-width: 220px;
}

#bcd-erp .erp-filtre-periode {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

#bcd-erp .erp-filtre-periode label {
    color: #6d7580;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

#bcd-erp .erp-filtre-periode select {
    height: 42px;
    min-width: 160px;
    border: 1px solid #e3e7eb;
    border-radius: 7px;
    padding: 0 12px;
    background: #fff;
    color: #17202a;
    font-weight: 650;
}

#bcd-erp .erp-recherche-globale {
    width: min(520px, 34vw);
}

#bcd-erp .erp-recherche-globale input {
    width: 100%;
}

#bcd-erp .erp-commandes {
    padding: 8px 8px 14px;
}

#bcd-erp .erp-table-commandes table {
    min-width: 1500px;
}

#bcd-erp .erp-table-commandes th,
#bcd-erp .erp-table-commandes td {
    padding-left: 5px;
    padding-right: 5px;
}

#bcd-erp .erp-table-commandes .col-commande { width: 66px; }
#bcd-erp .erp-table-commandes .col-date { width: 58px; }
#bcd-erp .erp-table-commandes .col-client { width: 126px; }
#bcd-erp .erp-table-commandes .col-canal { width: 70px; }
#bcd-erp .erp-table-commandes .col-marketplace { width: 118px; }
#bcd-erp .erp-table-commandes .col-transporteur { width: 112px; }
#bcd-erp .erp-table-commandes .col-suivi { width: 104px; }
#bcd-erp .erp-table-commandes .col-statut { width: 170px; }
#bcd-erp .erp-table-commandes .col-paiement { width: 102px; }
#bcd-erp .erp-table-commandes .col-total-ht { width: 78px; }
#bcd-erp .erp-table-commandes .col-total-ttc { width: 84px; }
#bcd-erp .erp-table-commandes .col-marge { width: 78px; }
#bcd-erp .erp-table-commandes .col-rembourse { width: 106px; }
#bcd-erp .erp-table-commandes .col-retour { width: 78px; }
#bcd-erp .erp-table-commandes .col-facture { width: 78px; }


#bcd-erp .erp-compteurs-resultats {
    justify-content: flex-end;
    margin: -2px 0 8px;
}

#bcd-erp .erp-cases-produits {
    display: flex;
    align-items: center;
    gap: 16px;
}

#bcd-erp .erp-case-divers {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    line-height: 1;
}
#bcd-erp .erp-case-divers input {
    cursor: pointer;
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: #2563eb;
}

#bcd-erp .erp-champ-formulaire { margin-bottom: 18px; }
#bcd-erp .erp-champ-formulaire label { display: block; margin-bottom: 4px; }
#bcd-erp .erp-champ-formulaire textarea {
    font: inherit; border: 1px solid #d7dee6; border-radius: 8px; padding: 8px 10px; resize: vertical;
}
#bcd-erp .erp-aide-formulaire { color: #64748b; font-size: 12px; margin: 4px 0 8px; }


#bcd-erp .erp-effacer-filtres {
    height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dce3ec;
    border-radius: 7px;
    background: #fff;
    color: #516071;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

#bcd-erp .erp-effacer-filtres:hover {
    color: #2364d8;
    border-color: #b9c9f5;
}


#bcd-erp .erp-lien-commande {
    color: #152033;
    text-decoration: none;
}

#bcd-erp .erp-lien-commande:hover {
    color: #2364d8;
    text-decoration: underline;
}


#bcd-erp .erp-pagination-commandes {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8edf3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: #516071;
    font-size: 13px;
}

#bcd-erp .erp-pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#bcd-erp .erp-pagination-lien,
#bcd-erp .erp-pagination-fleche {
    min-width: 24px;
    color: #2364d8;
    text-align: center;
    text-decoration: none;
    font-weight: 750;
}

#bcd-erp .erp-pagination-fleche {
    font-size: 24px;
    line-height: 1;
}

#bcd-erp .erp-pagination-desactive {
    color: #b7c0cb;
}

#bcd-erp .erp-pagination-page {
    width: 58px;
    height: 38px;
    border: 1px solid #c8d5e2;
    border-radius: 0;
    padding: 0 8px;
    color: #2364d8;
    font-weight: 750;
}

#bcd-erp .erp-pagination-info {
    color: #152033;
    white-space: nowrap;
}

#bcd-erp .erp-pagination-lignes {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#bcd-erp .erp-pagination-lignes select {
    height: 38px;
    min-width: 72px;
    border: 1px solid #c8d5e2;
    border-radius: 0;
    padding: 0 8px;
    background: #fff;
}


#bcd-erp .erp-badge-etat {
    color: #fff;
    font-weight: 850;
}

#bcd-erp .etat-bleu { background: #2f9be6; color: #fff; }
#bcd-erp .etat-cyan { background: #35cbe9; color: #053545; }
#bcd-erp .etat-vert { background: #00b875; color: #fff; }
#bcd-erp .etat-vert-fonce { background: #008a00; color: #fff; }
#bcd-erp .etat-turquoise { background: #00b894; color: #fff; }
#bcd-erp .etat-rouge { background: #ff0000; color: #fff; }
#bcd-erp .etat-corail { background: #ff5a45; color: #fff; }
#bcd-erp .etat-violet { background: #a247ff; color: #fff; }
#bcd-erp .etat-indigo { background: #2211a8; color: #fff; }
#bcd-erp .etat-orange-clair { background: #ffc65a; color: #3d2a00; }
#bcd-erp .etat-orange { background: #ff8a00; color: #251500; }
#bcd-erp .etat-jaune { background: #ffff00; color: #222; }
#bcd-erp .etat-jaune-clair { background: #ffd36a; color: #3d2a00; }
#bcd-erp .etat-lilas { background: #c6a5ff; color: #251150; }
#bcd-erp .etat-noir { background: #242424; color: #fff; }
#bcd-erp .etat-marron { background: #7b4a00; color: #fff; }


#bcd-erp .erp-indicateurs-clients {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

#bcd-erp .erp-clients {
    padding: 8px 8px 14px;
}

#bcd-erp .erp-table-clients {
    border-radius: 8px;
    overflow: auto;
}

#bcd-erp .erp-table-clients table {
    min-width: 1320px;
    table-layout: fixed;
}

#bcd-erp .erp-table-clients th,
#bcd-erp .erp-table-clients td {
    padding: 9px 7px;
    font-size: 13px;
    line-height: 1.18;
    vertical-align: middle;
}

#bcd-erp .erp-table-clients th {
    color: #6d7580;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

#bcd-erp .erp-table-clients small {
    color: #697789;
    font-size: 11px;
}

#bcd-erp .erp-table-clients .col-client-id { width: 70px; }
#bcd-erp .erp-table-clients .col-client-nom { width: 150px; }
#bcd-erp .erp-table-clients .col-client-contact { width: 210px; }
#bcd-erp .erp-table-clients .col-client-adresse { width: 230px; }
#bcd-erp .erp-table-clients .col-client-ville { width: 150px; }
#bcd-erp .erp-table-clients .col-client-commandes { width: 92px; text-align: center; }
#bcd-erp .erp-table-clients .col-client-total { width: 110px; text-align: right; }
#bcd-erp .erp-table-clients .col-client-derniere { width: 105px; }
#bcd-erp .erp-table-clients .col-client-creation { width: 105px; }
#bcd-erp .erp-table-clients .col-client-tag { width: 130px; }
#bcd-erp .erp-table-clients .col-client-statut { width: 86px; }


#bcd-erp .erp-table-clients th a {
    color: inherit;
    text-decoration: none;
}

#bcd-erp .erp-table-clients th a:hover {
    color: #2364d8;
}

#bcd-erp .erp-table-clients .erp-ligne-filtres th {
    padding: 6px 5px;
    background: #fff;
    border-top: 1px solid #19aee6;
}

#bcd-erp .erp-table-clients .erp-ligne-filtres input {
    width: 100%;
    min-width: 0;
    height: 30px;
    border: 1px solid #b9c9d6;
    border-radius: 0;
    padding: 0 7px;
    background: #fff;
    color: #17202a;
    font-size: 12px;
}

#bcd-erp .erp-table-clients table {
    min-width: 1460px;
}

#bcd-erp .erp-table-clients .col-client-id { width: 68px; }
#bcd-erp .erp-table-clients .col-client-nom { width: 135px; }
#bcd-erp .erp-table-clients .col-client-societe { width: 145px; }
#bcd-erp .erp-table-clients .col-client-contact { width: 200px; }
#bcd-erp .erp-table-clients .col-client-adresse { width: 210px; }
#bcd-erp .erp-table-clients .col-client-ville { width: 138px; }
#bcd-erp .erp-table-clients .col-client-commandes { width: 88px; text-align: center; }
#bcd-erp .erp-table-clients .col-client-total { width: 106px; text-align: right; }
#bcd-erp .erp-table-clients .col-client-derniere { width: 105px; }
#bcd-erp .erp-table-clients .col-client-creation { width: 105px; }
#bcd-erp .erp-table-clients .col-client-tag { width: 120px; }
#bcd-erp .erp-table-clients .col-client-score { width: 112px; }
#bcd-erp .erp-table-clients .col-client-mails { width: 64px; text-align: center; }


#bcd-erp .erp-table-clients .col-client-score { width: 112px; }
#bcd-erp .erp-badge-score { margin-top: 3px; color: #fff; background: #64748b; }
#bcd-erp .score-vip { background: #7c3aed; }
#bcd-erp .score-tres_fidele { background: #16a34a; }
#bcd-erp .score-actif { background: #2563eb; }
#bcd-erp .score-nouveau { background: #0ea5e9; }
#bcd-erp .score-a_relancer { background: #f59e0b; color: #3d2a00; }
#bcd-erp .score-dormant { background: #94a3b8; color: #17202a; }
#bcd-erp .score-prospect { background: #eab308; color: #3d2a00; }


#bcd-erp .erp-produits { padding: 8px 8px 14px; }
#bcd-erp .erp-barre-produits { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#bcd-erp .erp-table-produits { border-radius: 8px; overflow: auto; }
#bcd-erp .erp-table-produits table { min-width: 1740px; table-layout: fixed; }
#bcd-erp .erp-table-produits th, #bcd-erp .erp-table-produits td { padding: 8px 7px; font-size: 12px; line-height: 1.15; vertical-align: middle; }
#bcd-erp .erp-table-produits th { color: #6d7580; font-size: 11px; text-transform: uppercase; white-space: nowrap; }
#bcd-erp .erp-table-produits th a { color: inherit; text-decoration: none; }
#bcd-erp .erp-table-produits th a:hover { color: #2364d8; }
#bcd-erp .erp-table-produits .erp-ligne-filtres th { padding: 6px 5px; background: #fff; border-top: 1px solid #19aee6; }
#bcd-erp .erp-table-produits .erp-ligne-filtres input { width: 100%; min-width: 0; height: 30px; border: 1px solid #d3dde8; border-radius: 5px; padding: 0 7px; font-size: 12px; }
#bcd-erp .erp-table-produits .col-prod-image { width: 58px; }
#bcd-erp .erp-table-produits .col-prod-image img, #bcd-erp .erp-image-vide { width: 36px; height: 36px; object-fit: contain; display: inline-grid; place-items: center; border-radius: 5px; background: #eef3f7; color: #607080; font-size: 10px; font-weight: 800; }
#bcd-erp .erp-table-produits .col-prod-id { width: 58px; text-align: left; }
#bcd-erp .erp-table-produits .col-prod-nom { width: 210px; }
#bcd-erp .erp-table-produits .col-prod-ref { width: 125px; }
#bcd-erp .erp-table-produits .col-prod-ean { width: 120px; }
#bcd-erp .erp-table-produits .col-prod-fournisseur { width: 115px; }
#bcd-erp .erp-table-produits .col-prod-categorie { width: 155px; }
#bcd-erp .erp-table-produits .col-prod-analytique { width: 105px; }
#bcd-erp .erp-table-produits .col-prod-emplacement { width: 115px; }
#bcd-erp .erp-table-produits .col-prod-num { width: 92px; text-align: right; }
#bcd-erp .erp-table-produits .col-prod-stock { width: 78px; }
#bcd-erp .erp-table-produits .col-prod-stock-dispo { width: 112px; font-weight: 800; }
#bcd-erp .erp-table-produits .col-prod-prix { width: 92px; text-align: right; }
#bcd-erp .erp-table-produits .col-prod-marge { width: 85px; text-align: center; }
#bcd-erp .erp-table-produits .col-prod-actif { width: 78px; text-align: center; }
#bcd-erp .erp-table-produits .col-prod-precommande { width: 96px; text-align: center; white-space: nowrap; }
#bcd-erp .erp-table-produits .col-prod-fiche { width: 78px; text-align: center; }
#bcd-erp .erp-badge-neutre { background: #eef3f7; color: #334155; }

#bcd-erp .erp-filtre-header { height: 38px; min-width: 150px; border: 1px solid #d9e1ea; border-radius: 6px; padding: 0 12px; font-size: 14px; background: #fff; }
#bcd-erp a.erp-filtre-header { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; min-width: 0; }
#bcd-erp a.erp-filtre-header.erp-filtre-actif { background: #183153; color: #fff; border-color: #183153; }



#bcd-erp .erp-table-produits .erp-filtre-minmax { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
#bcd-erp .erp-table-produits .erp-ligne-filtres select { width: 100%; min-width: 0; height: 30px; border: 1px solid #d3dde8; border-radius: 5px; padding: 0 6px; font-size: 12px; background: #fff; }


#bcd-erp .erp-filtre-produits { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#bcd-erp .erp-filtre-produits .erp-filtre-header { min-width: 170px; max-width: 260px; }
#bcd-erp .erp-filtre-produits .erp-select-header { min-width: 105px; max-width: 120px; }


#bcd-erp .erp-nav-badge { float: right; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 800; }
#bcd-erp .erp-filtre-bouton { text-align: left; cursor: pointer; color: #1f2937; }
#bcd-erp .erp-modal[hidden] { display: none; }
#bcd-erp .erp-modal { position: fixed; inset: 0; z-index: 1000; }
#bcd-erp .erp-modal-fond { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
#bcd-erp .erp-modal-boite { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 48px); background: #fff; border-radius: 8px; box-shadow: 0 20px 60px rgba(15,23,42,.25); display: flex; flex-direction: column; overflow: hidden; }
#bcd-erp .erp-modal-boite header { display: flex; justify-content: space-between; gap: 16px; padding: 16px; border-bottom: 1px solid #e5ebf2; }
#bcd-erp .erp-modal-boite h2 { margin: 0 0 4px; font-size: 20px; }
#bcd-erp .erp-modal-boite p { margin: 0; color: #718096; font-size: 13px; }
#bcd-erp .erp-modal-boite header button { width: 32px; height: 32px; flex: 0 0 32px; padding: 0; border: 1px solid #dbe3ec; border-radius: 6px; background: #fff; color: #334155; font-size: 20px; line-height: 1; cursor: pointer; }
#bcd-erp .erp-modal-boite header button:hover { background: #f1f5f9; color: #0f172a; }
#bcd-erp .erp-modal-recherche { margin: 14px 16px; height: 38px; border: 1px solid #dbe3ec; border-radius: 6px; padding: 0 12px; }
#bcd-erp .erp-modal-liste { overflow: auto; padding: 0 16px 12px; min-height: 280px; }
#bcd-erp .erp-modal-item { display: block; width: 100%; border: 0; background: #fff; text-align: left; padding: 8px 8px; border-radius: 6px; font-weight: 700; cursor: pointer; }
#bcd-erp .erp-modal-item:hover, #bcd-erp .erp-modal-item.selectionne { background: #eef4ff; color: #1d4ed8; }
#bcd-erp .erp-modal-item small { color: #7a8594; margin-left: 6px; }
#bcd-erp .erp-modal-boite footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #e5ebf2; }
#bcd-erp .erp-bouton-principal, #bcd-erp .erp-bouton-secondaire { border-radius: 6px; padding: 9px 14px; font-weight: 700; cursor: pointer; }
#bcd-erp .erp-bouton-principal { background: #2563eb; color: #fff; border: 1px solid #2563eb; }
#bcd-erp .erp-bouton-secondaire { background: #fff; color: #1f2937; border: 1px solid #dbe3ec; }
#bcd-erp .erp-page-entete-simple { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
#bcd-erp .erp-page-entete-simple h2 { margin: 0 0 4px; font-size: 22px; }
#bcd-erp .erp-page-entete-simple p { margin: 0; color: #718096; }
#bcd-erp .erp-alerte-badge { background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: 7px 12px; font-weight: 800; }
#bcd-erp .erp-table-analytique table { width: 100%; }
#bcd-erp .erp-table-analytique th, #bcd-erp .erp-table-analytique td { padding: 10px; border-bottom: 1px solid #e6edf5; text-align: left; }
#bcd-erp .erp-table-analytique input { width: 100%; height: 34px; border: 1px solid #d3dde8; border-radius: 5px; padding: 0 9px; }
#bcd-erp .erp-table-analytique small { display: block; color: #7a8594; font-weight: 500; margin-top: 2px; }
#bcd-erp .erp-ligne-a-assigner { background: #fff7ed; }
#bcd-erp .erp-actions-bas { display: flex; justify-content: flex-end; padding-top: 14px; }
#bcd-erp .erp-analytique-a-faire { margin-bottom: 26px; padding: 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; }
#bcd-erp .erp-analytique-a-faire h3 { margin: 0 0 10px; font-size: 15px; color: #9a3412; }
#bcd-erp .erp-analytique-a-faire table { background: transparent; }
#bcd-erp .erp-form-inline { display: flex; gap: 8px; align-items: center; }
#bcd-erp .erp-form-inline input { height: 34px; border: 1px solid #d3dde8; border-radius: 5px; padding: 0 9px; flex: 1; min-width: 140px; }
#bcd-erp .erp-analytique > h3 { margin: 26px 0 10px; font-size: 15px; color: #2d3748; }

#bcd-erp .erp-cases-fournisseurs { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#bcd-erp .erp-table-fournisseurs .col-four-nom { width: 260px; }
#bcd-erp .erp-table-fournisseurs td, #bcd-erp .erp-table-fournisseurs th { vertical-align: top; }
#bcd-erp .erp-ligne-sous-marque .col-four-nom { padding-left: 22px; background: #f8fafc; }
#bcd-erp .erp-ligne-sous-marque { background: #fbfcfe; }
#bcd-erp .erp-table-fournisseurs summary { cursor: pointer; list-style: none; }
#bcd-erp .erp-table-fournisseurs summary::-webkit-details-marker { display: none; }
#bcd-erp .erp-table-fournisseurs summary::before { content: '▸ '; color: #94a3b8; }
#bcd-erp .erp-table-fournisseurs details[open] summary::before { content: '▾ '; }
#bcd-erp .erp-contact-ligne { font-size: 12px; margin-bottom: 3px; white-space: nowrap; }
#bcd-erp .erp-formulaire-fournisseur { margin-top: 10px; padding: 12px; background: #f8fafc; border-radius: 8px; }
#bcd-erp .erp-formulaire-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
#bcd-erp .erp-formulaire-grille label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; font-weight: 600; }
#bcd-erp .erp-formulaire-grille label.erp-formulaire-large { grid-column: 1 / -1; }
#bcd-erp .erp-formulaire-grille input, #bcd-erp .erp-formulaire-grille select { height: 34px; border: 1px solid #d3dde8; border-radius: 6px; padding: 0 9px; font-size: 13px; font-weight: 400; color: #1f2937; }
#bcd-erp .erp-formulaire-grille textarea { border: 1px solid #d3dde8; border-radius: 6px; padding: 8px 9px; font: inherit; font-size: 13px; font-weight: 400; color: #1f2937; resize: vertical; }
#bcd-erp .erp-formulaire-grille input:disabled, #bcd-erp .erp-formulaire-grille select:disabled, #bcd-erp .erp-formulaire-grille textarea:disabled { background: #f8fafc; color: #1f2937; }
#bcd-erp .erp-formulaire-grille label small { font-weight: 400; color: #7a8594; }
#bcd-erp .erp-formulaire-grille label.erp-case-a-cocher { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 34px; font-size: 13px; color: #1f2937; }
#bcd-erp .erp-formulaire-grille label.erp-case-a-cocher input { width: 18px; height: 18px; padding: 0; }
#bcd-erp .erp-champ-invalide input, #bcd-erp .erp-champ-invalide select, #bcd-erp .erp-champ-invalide textarea { border-color: #dc2626; }
#bcd-erp .erp-champ-message-erreur { color: #b91c1c; font-weight: 600; font-size: 12px; }
#bcd-erp .erp-messages-erreur { color: #991b1b; background: #fee2e2; }

#bcd-erp .erp-onglets-departement { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
#bcd-erp .erp-bouton-departement {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 160px; height: 52px; padding: 0 22px; border-radius: 10px;
    background: #f1f5f9; color: #334155; font-size: 15px; font-weight: 800;
    text-decoration: none; border: 2px solid transparent; transition: all 0.15s ease;
}
#bcd-erp .erp-bouton-departement:hover { background: #e2e8f0; }
#bcd-erp .erp-bouton-departement-actif, #bcd-erp .erp-bouton-departement-actif:hover { background: #183153; color: #fff; }

#bcd-erp .erp-table-zebree tbody tr:nth-child(even) { background: #f8fafc; }
#bcd-erp .erp-table-zebree tbody tr.erp-ligne-sous-marque:nth-child(even) { background: #f1f5f9; }
#bcd-erp .erp-table-fournisseurs .col-four-abrev { width: 100px; }
#bcd-erp .erp-table-fournisseurs .col-four-action { width: 44px; }
#bcd-erp .erp-cellule-sav { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
#bcd-erp .erp-bouton-crayon {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    padding: 0; box-sizing: border-box;
    border: 1px solid #d9e1ea; border-radius: 7px; background: #fff; color: #475569; cursor: pointer;
}
#bcd-erp .erp-bouton-crayon:hover { background: #eef2f7; color: #183153; }
#bcd-erp .erp-bouton-crayon svg { width: 15px; height: 15px; }

#bcd-erp .erp-modal-fournisseur { width: min(900px, calc(100vw - 28px)); }
#bcd-erp .erp-modal-fournisseur #fournisseur-edition-form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#bcd-erp .erp-modal-fournisseur .erp-edition-grille { overflow-y: auto; padding: 16px 20px; }
#bcd-erp .erp-edition-grille { display: grid; grid-template-columns: 190px repeat(3, 1fr); gap: 6px 10px; align-items: center; }
#bcd-erp .erp-edition-entete { display: contents; }
#bcd-erp .erp-edition-entete span { font-size: 11px; text-transform: uppercase; font-weight: 800; color: #6d7580; padding-bottom: 4px; border-bottom: 2px solid #e2e8f0; }
#bcd-erp .erp-edition-ligne { display: contents; }
#bcd-erp .erp-edition-ligne label { font-size: 12px; font-weight: 700; color: #334155; }
#bcd-erp .erp-edition-ligne input, #bcd-erp .erp-edition-ligne select { height: 34px; border: 1px solid #d3dde8; border-radius: 6px; padding: 0 8px; font-size: 13px; width: 100%; }
#bcd-erp .erp-edition-ligne input:disabled { background: #f1f5f9; color: #a1acb8; border-style: dashed; }
#bcd-erp .erp-edition-double { grid-column: span 2; }
#bcd-erp .erp-edition-triple { grid-column: span 3; }
#bcd-erp .erp-modal-fournisseur footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid #eef1f5; }

#bcd-erp .erp-analyse-recherches { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
#bcd-erp .erp-analyse-recherche { flex: 1; min-width: 280px; }
#bcd-erp .erp-analyse-recherche label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 6px; }
#bcd-erp .erp-analyse-recherche-champ { display: flex; gap: 8px; }
#bcd-erp .erp-analyse-recherche-champ input { flex: 1; height: 46px; border: 1px solid #d9e1ea; border-radius: 8px; padding: 0 14px; font-size: 15px; }
#bcd-erp .erp-analyse-resultats { margin: 10px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#bcd-erp .erp-analyse-resultats p { margin: 0; font-size: 13px; color: #64748b; width: 100%; }
#bcd-erp .erp-analyse-resultats a.erp-pill { text-decoration: none; }
#bcd-erp .erp-analyse-selection { margin-top: 18px; padding-top: 18px; border-top: 1px solid #eef1f5; }
#bcd-erp .erp-analyse-selection h3 { margin: 0 0 12px; }
#bcd-erp .erp-analyse-selection h3 small { color: #94a3b8; font-weight: 400; margin-left: 8px; }
#bcd-erp .erp-analyse-cases { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
#bcd-erp .erp-analyse-graphique { height: 340px; }

/* ================= RETOURS EXPEDITEUR ================= */
#bcd-erp #retours-app { max-width: 720px; margin: 0 auto; }
#bcd-erp .erp-cache { display: none; }
#bcd-erp .erp-retours-flash { background: #dcfce7; color: #166534; padding: 14px; border-radius: 14px; text-align: center; font-weight: 600; margin-bottom: 16px; }
#bcd-erp .erp-retours-recherche { display: flex; gap: 8px; margin-bottom: 20px; }
#bcd-erp .erp-bouton-danger { color: #b91c1c; border-color: #fecaca; }
#bcd-erp .erp-bouton-danger:hover { background: #fef2f2; }
#bcd-erp .erp-transfert-cible { margin: 0 0 8px; font-size: 16px; }
#bcd-erp .erp-reco-quantite { width: 72px; text-align: right; }
#bcd-erp .erp-transfert-emplacement { display: inline-block; margin-left: 6px; font-size: 13px; }
#bcd-erp .erp-transfert-emplacement form { display: flex; gap: 4px; margin-top: 4px; }
#bcd-erp .erp-transfert-emplacement input { width: 110px; }
#bcd-erp .erp-transfert-cible strong { display: inline-block; padding: 2px 10px; border-radius: 8px; background: #dbeafe; color: #1e3a8a; font-size: 18px; }
#bcd-erp .erp-retours-aide { margin: -4px 0 16px; font-size: 13px; color: #64748b; }
#bcd-erp .erp-retours-revenir { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 13px; font-weight: 600; text-decoration: none; }
#bcd-erp .erp-retours-revenir:hover, #bcd-erp .erp-retours-revenir:focus-visible { background: #e2e8f0; color: #1e293b; }
#bcd-erp .erp-retours-commande h2 small { font-size: 14px; font-weight: 500; color: #64748b; }
#bcd-erp .erp-retours-recherche input { flex: 1; padding: 14px; font-size: 16px; border-radius: 14px; border: 1px solid #d9e1ea; }
#bcd-erp .erp-retours-recherche button { padding: 0 18px; font-size: 18px; border-radius: 14px; background: #2563eb; color: #fff; border: none; cursor: pointer; }
#bcd-erp .erp-retours-commande { background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 26px; box-shadow: 0 6px 18px rgba(0,0,0,.08); border: 1px solid #eef1f5; }
#bcd-erp .erp-retours-commande h2 { margin: 0; font-size: 20px; }
#bcd-erp .erp-retours-client { margin: 8px 0 16px; font-size: 14px; color: #475569; }
#bcd-erp #retours-app label { font-size: 14px; margin-top: 12px; display: block; color: #334155; }
#bcd-erp #retours-app select, #bcd-erp #retours-app textarea { width: 100%; padding: 12px 14px; font-size: 15px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; margin-top: 4px; }
#bcd-erp #retours-app textarea { min-height: 80px; resize: vertical; }
#bcd-erp .erp-retours-btn-mass { width: 100%; padding: 14px; border-radius: 18px; border: none; background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; font-weight: 700; font-size: 15px; margin: 16px 0 20px; cursor: pointer; }
#bcd-erp .erp-retours-produit { background: #f8fafc; border-radius: 18px; padding: 14px; margin-bottom: 16px; border: 1px solid #e2e8f0; }
#bcd-erp .erp-retours-vignette { display: flex; justify-content: center; margin-bottom: 10px; }
#bcd-erp .erp-retours-vignette img { max-width: 90px; max-height: 90px; border-radius: 12px; object-fit: contain; background: #fff; padding: 6px; border: 1px solid #e2e8f0; }
#bcd-erp .erp-retours-produit h3 { margin: 0 0 6px; font-size: 16px; }
#bcd-erp .erp-retours-meta { font-size: 13px; color: #64748b; margin-bottom: 4px; }
#bcd-erp .erp-retours-qte { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
#bcd-erp .erp-retours-qte button { width: 40px; height: 40px; border-radius: 50%; border: none; font-size: 20px; background: #2563eb; color: #fff; cursor: pointer; flex-shrink: 0; }
#bcd-erp .erp-retours-qte-input { flex: 1; text-align: center; font-size: 17px; padding: 10px; border-radius: 12px; border: 1px solid #cbd5e1; }
#bcd-erp .erp-retours-photos { display: flex; gap: 8px; margin-top: 12px; }
#bcd-erp .erp-retours-photo-btn { flex: 1; padding: 12px; border-radius: 12px; text-align: center; font-weight: 600; font-size: 13px; cursor: pointer; }
#bcd-erp .erp-retours-photo-camera { background: #dbeafe; color: #1e40af; }
#bcd-erp .erp-retours-photo-galerie { background: #dcfce7; color: #166534; }
#bcd-erp .erp-retours-photo-btn input { display: none; }
#bcd-erp .erp-retours-lien-ajout { display: block; margin: 10px 0 16px; font-size: 14px; color: #2563eb; font-weight: 700; text-decoration: none; cursor: pointer; }
#bcd-erp .erp-retours-lien-ajout:hover { text-decoration: underline; }
#bcd-erp .erp-retours-divers { border: 2px dashed #cbd5e1; background: #fefce8; }
#bcd-erp .erp-retours-btn-submit { width: 100%; padding: 16px; font-size: 17px; font-weight: 700; border-radius: 22px; border: none; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; margin-top: 10px; cursor: pointer; }
#bcd-erp .erp-analyse-bloc { margin-top: 22px; }
#bcd-erp .erp-analyse-selection .erp-periode-boutons { display: inline-flex; margin: 4px 0 18px; }


#bcd-erp .erp-modal-item { color: #1f2937; }
#bcd-erp .erp-modal-libelle { color: #1f2937; font-weight: 800; }
#bcd-erp .erp-modal-chevron { display: inline-block; width: 14px; color: #2563eb; font-weight: 900; }
#bcd-erp .erp-modal-item.selectionne .erp-modal-libelle, #bcd-erp .erp-modal-item:hover .erp-modal-libelle { color: #1d4ed8; }


#bcd-erp .erp-modal-item.niveau-categorie-2 .erp-modal-libelle { font-weight: 900; }
#bcd-erp .erp-modal-item.niveau-categorie-3 .erp-modal-libelle,
#bcd-erp .erp-modal-item.niveau-categorie-4 .erp-modal-libelle,
#bcd-erp .erp-modal-item.niveau-categorie-5 .erp-modal-libelle { font-weight: 650; }
#bcd-erp .erp-modal-item.niveau-categorie-0 .erp-modal-libelle,
#bcd-erp .erp-modal-item.niveau-categorie-1 .erp-modal-libelle { font-weight: 800; }

#bcd-erp .erp-modal-item[hidden] { display: none !important; }


#bcd-erp .erp-contenu > header { gap: 14px; }
#bcd-erp .erp-contenu > header h1 { flex: 0 0 auto; margin-right: 6px; }
#bcd-erp .erp-contenu > header .erp-filtre-produits { flex: 1 1 auto; justify-content: flex-start; }
#bcd-erp .erp-export-csv { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 800; color: #1f2937; }
#bcd-erp .erp-export-csv:hover { color: #2563eb; border-color: #9bb8f5; }


#bcd-erp .erp-effacer-filtres.erp-effacer-inactif { background: #f4f6f8; color: #8a95a3; border-color: #e1e7ef; }
#bcd-erp .erp-effacer-filtres.erp-effacer-inactif:hover { color: #667085; border-color: #d8e0ea; }
#bcd-erp .erp-effacer-filtres.erp-effacer-actif { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
#bcd-erp .erp-effacer-filtres.erp-effacer-actif:hover { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }


#bcd-erp .erp-filtre-periode { flex: 1 1 auto; margin-left: 0; }
#bcd-erp .erp-filtre-periode .erp-effacer-filtres { margin-left: auto; }
#bcd-erp .erp-entete h1 { min-width: 0; }


#bcd-erp .erp-badge-marge-mauvaise { background: #fee2e2; color: #b91c1c; }
#bcd-erp .erp-badge-marge-moyenne { background: #ffedd5; color: #c2410c; }
#bcd-erp .erp-badge-marge-bonne { background: #dbeafe; color: #1d4ed8; }
#bcd-erp .erp-badge-marge-excellente { background: #fef3c7; color: #a16207; }

#bcd-erp .erp-stats-filtres { gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
#bcd-erp .erp-entete .erp-recherche-globale { order: 1; }
#bcd-erp .erp-entete .erp-stats-filtres { order: 2; flex: 1 1 100%; margin-left: 0; }
#bcd-erp .erp-stats-filtres select,
#bcd-erp .erp-stats-filtres input { height: 38px; border: 1px solid #dbe3ec; border-radius: 6px; padding: 0 12px; background: #fff; min-width: 120px; }
#bcd-erp .erp-stats-filtres input[type="number"] { width: 110px; min-width: 90px; }
#bcd-erp .erp-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 10px; border-radius: 999px; background: #edf4ff; color: #183153; font-size: 12px; font-weight: 800; }
#bcd-erp .erp-pill-alerte { background: #fef2f2; color: #b91c1c; }
#bcd-erp .erp-pill-actif { background: #dcfce7; color: #166534; }
#bcd-erp .erp-filtre-separateur { display: inline-flex; align-items: center; color: #8190a7; font-size: 12px; font-weight: 700; }
#bcd-erp .erp-stats-filtres input[type="date"] { width: 150px; min-width: 130px; }
#bcd-erp .erp-stats-page { padding: 0; overflow: hidden; }
#bcd-erp .erp-table-scroll { overflow: auto; }
#bcd-erp .erp-table-stats { width: 100%; border-collapse: collapse; background: #fff; }
#bcd-erp .erp-table-stats th { padding: 12px 10px; background: #f7f9fc; border-bottom: 1px solid #dbe3ec; color: #627086; font-size: 11px; font-weight: 900; text-transform: uppercase; }
#bcd-erp .erp-table-stats td { padding: 12px 10px; border-bottom: 1px solid #e5ebf2; vertical-align: middle; }
#bcd-erp .erp-table-stats .nombre { text-align: right; white-space: nowrap; }
#bcd-erp .erp-table-stats th,
#bcd-erp .erp-table-stats td { white-space: nowrap; overflow-wrap: normal; word-break: normal; max-width: none; }
#bcd-erp .erp-stats-thumb { width: 38px; height: 38px; object-fit: contain; border-radius: 5px; background: #eef3f8; }
#bcd-erp .erp-badge-orange { background: #ffedd5; color: #c2410c; }
#bcd-erp .erp-badge-vert { background: #d1fae5; color: #047857; }
#bcd-erp .erp-badge-rouge { background: #fee2e2; color: #dc2626; }
#bcd-erp .erp-courbe-card { padding: 22px; }
#bcd-erp .erp-sales-curve { display: block; width: 100%; height: min(520px, calc(100vh - 240px)); min-height: 360px; }
#bcd-erp .erp-curve-grid { stroke: #d8e1ec; stroke-width: 1; }
#bcd-erp .erp-curve-axis { fill: #667085; font-size: 13px; }
#bcd-erp .erp-curve-area { fill: rgba(37, 99, 235, .10); }
#bcd-erp .erp-curve-line { fill: none; stroke: #2563eb; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
#bcd-erp .erp-curve-dot { fill: #fff; stroke: #2563eb; stroke-width: 3; }

#bcd-erp .erp-table-stats img.erp-stats-thumb,
#bcd-erp img.erp-stats-thumb {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    border-radius: 5px;
    background: #eef3f8;
}

#bcd-erp .erp-courbe-card { min-height: 520px; }
#bcd-erp .erp-sales-curve { width: 100%; height: 500px; overflow: visible; }
#bcd-erp .erp-curve-grid-x { stroke-dasharray: 4 6; opacity: .55; }
#bcd-erp .erp-curve-axis { font-size: 15px; font-weight: 500; }

#bcd-erp .erp-dashboard-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#bcd-erp .erp-fraicheur-donnees { margin: -6px 0 8px; text-align: right; font-size: 12px; color: #94a3b8; }
#bcd-erp .erp-fraicheur-donnees.ancienne { color: #c2410c; font-weight: 700; }
#bcd-erp .erp-indicateur-ligne-entete { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
#bcd-erp .erp-indicateur-ligne-entete span { margin-bottom: 0; min-width: 0; overflow-wrap: break-word; }
#bcd-erp .erp-indicateur-ligne-entete .erp-periode-boutons { padding: 2px; flex-shrink: 0; }
#bcd-erp .erp-indicateur-ligne-entete .erp-periode-boutons button { padding: 3px 7px; font-size: 10px; }
#bcd-erp .erp-dashboard-grid { display: grid; gap: 14px; margin-top: 14px; }
#bcd-erp .erp-dashboard-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#bcd-erp .erp-dashboard-grid-70-30 { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
#bcd-erp .erp-dashboard-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#bcd-erp .erp-dashboard-card { padding: 16px; overflow: hidden; }
#bcd-erp .erp-dashboard-card h2 { margin: 0 0 12px; font-size: 18px; }
#bcd-erp .erp-carte-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
#bcd-erp .erp-carte-entete h2 { margin: 0; }
#bcd-erp .erp-periode-boutons, #bcd-erp .erp-mode-boutons { display: flex; gap: 4px; background: #f1f5f9; border-radius: 999px; padding: 3px; }
#bcd-erp .erp-periode-boutons button, #bcd-erp .erp-mode-boutons button,
#bcd-erp .erp-periode-boutons a, #bcd-erp .erp-mode-boutons a { border: none; background: transparent; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #64748b; cursor: pointer; text-decoration: none; }
#bcd-erp .erp-periode-boutons button.actif, #bcd-erp .erp-mode-boutons button.actif,
#bcd-erp .erp-periode-boutons a.actif, #bcd-erp .erp-mode-boutons a.actif { background: #fff; color: #1d4ed8; box-shadow: 0 1px 3px rgba(15, 23, 42, .18); }
#bcd-erp .erp-periode-plage { display: block; margin-bottom: 10px; color: #94a3b8; font-size: 12px; }
#bcd-erp .erp-channel-canvas-wrap { position: relative; height: 340px; padding: 22px 4px 4px; }
#bcd-erp .erp-channel-canvas-wrap.compact { height: 290px; }
#bcd-erp .erp-channel-note { position: absolute; top: 2px; right: 6px; font-size: 11px; color: #94a3b8; z-index: 1; }
#bcd-erp .canal-1 { background: #2e86de; } #bcd-erp .canal-2 { background: #ffd84d; } #bcd-erp .canal-3 { background: #ff9f2e; } #bcd-erp .canal-4 { background: #56b867; } #bcd-erp .canal-5 { background: #9bdcf0; } #bcd-erp .canal-6 { background: #9aa3ad; } #bcd-erp .canal-7 { background: #7c3aed; } #bcd-erp .canal-8 { background: #ef4444; }
#bcd-erp .erp-dashboard-list { display: grid; gap: 16px; }
#bcd-erp .erp-dashboard-row { display: grid; grid-template-columns: 190px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
#bcd-erp .erp-dashboard-list .erp-dashboard-row { padding-bottom: 12px; border-bottom: 1px solid #eef2f7; }
#bcd-erp .erp-dashboard-list .erp-dashboard-row:last-child { padding-bottom: 0; border-bottom: none; }
#bcd-erp .erp-dashboard-row-catalogue span { line-height: 1.7; }
#bcd-erp .erp-canal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
/* Canaux de vente dépliables : une ligne par canal, détail par mode de paiement */
#bcd-erp .erp-dashboard-list > .erp-canal-details { padding-bottom: 12px; border-bottom: 1px solid #eef2f7; }
#bcd-erp .erp-dashboard-list > .erp-canal-details:last-of-type { padding-bottom: 0; border-bottom: none; }
#bcd-erp .erp-canal-details .erp-dashboard-row { padding-bottom: 0; border-bottom: none; }
#bcd-erp .erp-canal-ligne { grid-template-columns: minmax(0, 1fr) auto; }
#bcd-erp .erp-canal-ligne > strong { min-width: 0; overflow-wrap: anywhere; }
#bcd-erp .erp-canal-ligne > span { text-align: right; white-space: nowrap; }
#bcd-erp .erp-canal-details > summary { cursor: pointer; list-style: none; }
#bcd-erp .erp-canal-details > summary::-webkit-details-marker { display: none; }
#bcd-erp .erp-canal-chevron { display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 1px; border-right: 1.5px solid #94a3b8; border-bottom: 1.5px solid #94a3b8; transform: rotate(-45deg); transition: transform .18s ease; vertical-align: middle; }
#bcd-erp .erp-canal-details[open] .erp-canal-chevron { transform: rotate(45deg); }
#bcd-erp .erp-canal-details { interpolate-size: allow-keywords; }
#bcd-erp .erp-canal-details::details-content { block-size: 0; overflow: hidden; transition: block-size .2s ease, content-visibility .2s allow-discrete; }
#bcd-erp .erp-canal-details[open]::details-content { block-size: auto; }
#bcd-erp .erp-canal-paiements { display: grid; gap: 6px; padding: 8px 0 0 30px; }
#bcd-erp .erp-canal-paiement { font-size: 12px; color: #64748b; }
#bcd-erp .erp-canal-paiement > strong { font-weight: 600; }
#bcd-erp .erp-canal-paiement em.positif, #bcd-erp .erp-canal-paiement em.negatif { padding: 2px 6px; }
#bcd-erp .erp-dot-moderne { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #ff9f2e; }
#bcd-erp .erp-traitements-groupe { margin-bottom: 28px; }
#bcd-erp .erp-traitements-groupe h2 { margin: 0 0 12px; font-size: 17px; }
#bcd-erp .erp-traitements-type { margin: 16px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; display: inline-block; padding: 3px 10px; border-radius: 6px; }
#bcd-erp .erp-type-sql { background: #edf4ff; color: #183153; }
#bcd-erp .erp-type-ftp { background: #fff7ed; color: #9a3412; }
#bcd-erp .erp-type-api { background: #fff7ed; color: #9a3412; }
#bcd-erp .erp-type-index { background: #f5f3ff; color: #5b21b6; }
#bcd-erp .erp-statut-termine { background: #d1fae5; color: #047857; }
#bcd-erp .erp-statut-erreur { background: #fee2e2; color: #dc2626; }
#bcd-erp .erp-statut-en_cours { background: #fef3c7; color: #92400e; }
#bcd-erp .erp-statut-jamais_lance { background: #e2e8f0; color: #475569; }
#bcd-erp .erp-alertes-list { display: grid; gap: 12px; }
#bcd-erp .erp-alertes-list .erp-dashboard-row em { font-style: normal; font-weight: 800; color: #0f172a; }
#bcd-erp .erp-dashboard-row small { grid-column: 2 / 4; color: #64748b; }
#bcd-erp .erp-dashboard-row em.positif { background: #d1fae5; color: #047857; border-radius: 999px; padding: 4px 8px; font-style: normal; font-weight: 800; }
#bcd-erp .erp-dashboard-row em.negatif { background: #fee2e2; color: #dc2626; border-radius: 999px; padding: 4px 8px; font-style: normal; font-weight: 800; }
#bcd-erp .erp-bar-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 8px; align-items: center; margin: 9px 0; font-size: 13px; }
#bcd-erp .erp-bar-row strong { white-space: nowrap; text-align: right; }
#bcd-erp .erp-bar-row div { height: 8px; background: #e7edf4; border-radius: 99px; overflow: hidden; }
#bcd-erp .erp-bar-row i { display: block; height: 100%; background: #2563eb; border-radius: 99px; }
#bcd-erp .erp-bar-row.violet i { background: #7c3aed; }
#bcd-erp .erp-badge-bleu { background: #dbeafe; color: #1d4ed8; }
@media (max-width: 1400px) { #bcd-erp .erp-dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } #bcd-erp .erp-dashboard-grid-2, #bcd-erp .erp-dashboard-grid-70-30, #bcd-erp .erp-dashboard-grid-3 { grid-template-columns: 1fr; } }

#bcd-erp #retours-app .erp-onglets-departement { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
#bcd-erp #retours-recherche-input { min-width: 0; width: 100%; }
#bcd-erp #retours-recherche-etat { color: #475569; font-size: 14px; }
#bcd-erp .erp-retours-resultats { background: #fff; padding: 18px; border: 1px solid #dbe3ec; border-radius: 14px; margin-bottom: 20px; }
#bcd-erp .erp-retours-resultats h2 { margin: 0 0 8px; font-size: 20px; }
#bcd-erp .erp-retours-resultats ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 12px 0 0; }
#bcd-erp .erp-retours-resultats li a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 10px; color: #183153; text-decoration: none; overflow-wrap: anywhere; }
#bcd-erp .erp-retours-resultats li a:hover,
#bcd-erp .erp-retours-resultats li a:focus-visible { background: #eff6ff; outline: 2px solid #2563eb; }
#bcd-erp .erp-retours-ouvrir { color: #2563eb; font-weight: 700; font-size: 13px; }
#bcd-erp #retours-detail .erp-retours-commande,
#bcd-erp #retours-resultats { scroll-margin-top: 24px; }
@media (max-width: 600px) {
    #bcd-erp .erp-retours-resultats ul { grid-template-columns: minmax(0, 1fr); }
    #bcd-erp .erp-retours-resultats { padding: 12px; }
}
#bcd-erp .erp-retours-pieces { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
#bcd-erp .erp-retours-pieces a { display: flex; flex-direction: column; gap: 6px; max-width: 180px; }
#bcd-erp .erp-retours-pieces img { width: 160px; height: 120px; object-fit: contain; border: 1px solid #dbe3ec; border-radius: 8px; }

/* Order columns grow with their contents; scrolling stays inside the table. */
#bcd-erp .erp-commandes { min-width: 0; max-width: 100%; }
#bcd-erp .erp-table-commandes { max-width: 100%; overflow-x: auto; }
#bcd-erp .erp-table-commandes table { width: max-content; min-width: 100%; table-layout: auto; }
#bcd-erp .erp-table-commandes th,
#bcd-erp .erp-table-commandes td {
    width: auto; white-space: nowrap; overflow-wrap: normal; word-break: normal;
    padding-left: 10px; padding-right: 10px;
}
#bcd-erp .erp-table-commandes .col-date { width: auto; min-width: 100px; }
#bcd-erp .erp-table-commandes .col-client { width: auto; min-width: 180px; }
#bcd-erp .erp-table-commandes .col-statut { width: auto; min-width: 180px; }
#bcd-erp .erp-table-commandes .col-paiement { width: auto; min-width: 160px; }
#bcd-erp .erp-table-commandes .erp-badge { white-space: nowrap; }
#bcd-erp .erp-table-commandes .erp-ligne-filtres input { width: 100%; box-sizing: border-box; }

/* Supplier layout: keep these overrides after the shared desktop styles. */
#bcd-erp .erp-fournisseurs-contenu { min-width: 0; max-width: 100%; }
#bcd-erp .erp-fournisseurs-entete { flex-wrap: wrap; }
#bcd-erp .erp-fournisseurs-entete .erp-stats-filtres { flex-wrap: wrap; }
#bcd-erp .erp-edition-champ { display: contents; }
#bcd-erp .erp-edition-champ .erp-edition-departement { display: none; }
#bcd-erp .erp-modal-fournisseur input,
#bcd-erp .erp-modal-fournisseur select { min-width: 0; box-sizing: border-box; }

@media (max-width: 1440px) {
    #bcd-erp .erp-fournisseurs-contenu .erp-table-scroll { max-width: 100%; }
    #bcd-erp .erp-table-fournisseurs { min-width: 1200px; }
    #bcd-erp .erp-table-fournisseurs .col-four-nom { min-width: 160px; }
    #bcd-erp .erp-table-fournisseurs .col-four-action { position: sticky; right: 0; background: #f8fafc; z-index: 1; }
    #bcd-erp .erp-table-fournisseurs .erp-bouton-crayon { width: 44px; height: 44px; }
}

@media (min-width: 901px) {
    #bcd-erp .erp-fournisseurs-contenu .erp-table-scroll { width: 100%; overflow-x: auto; }
    #bcd-erp .erp-table-fournisseurs { width: max-content; min-width: 100%; table-layout: auto; }
    #bcd-erp .erp-table-fournisseurs td,
    #bcd-erp .erp-table-fournisseurs th { white-space: nowrap; overflow-wrap: normal; word-break: normal; max-width: none; }
    #bcd-erp .erp-table-fournisseurs .col-four-nom { min-width: 220px; }
}

@media (max-width: 900px) {
    #bcd-erp .erp-fournisseurs-entete { flex-direction: column; align-items: stretch; }
    #bcd-erp .erp-fournisseurs-entete .erp-stats-filtres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #bcd-erp .erp-fournisseurs-entete .erp-filtre-bouton { white-space: normal; height: auto; min-height: 44px; text-align: center; justify-content: center; }
    #bcd-erp .erp-fournisseurs-contenu .erp-onglets-departement { display: flex; flex-wrap: wrap; gap: 6px; }
    #bcd-erp .erp-table-fournisseurs.erp-fournisseurs-cartes { display: block; min-width: 0; width: 100%; overflow: visible; }
    #bcd-erp .erp-fournisseurs-cartes thead { display: none; }
    #bcd-erp .erp-fournisseurs-cartes tbody { display: grid; gap: 14px; }
    #bcd-erp .erp-fournisseurs-cartes .erp-ligne-fournisseur { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #dbe3ec; border-radius: 10px; background: #fff; overflow: hidden; }
    #bcd-erp .erp-fournisseurs-cartes .erp-ligne-sous-marque { margin-left: 12px; border-left: 3px solid #94a3b8; }
    #bcd-erp .erp-table-fournisseurs.erp-fournisseurs-cartes td { display: block; width: auto; min-width: 0; max-width: none; padding: 10px 12px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
    #bcd-erp .erp-fournisseurs-cartes td::before { content: attr(data-label); display: block; margin-bottom: 5px; font-size: 11px; font-weight: 700; color: #64748b; }
    #bcd-erp .erp-table-fournisseurs.erp-fournisseurs-cartes .col-four-nom { grid-column: 1 / -1; background: #eef2f7; font-size: 16px; }
    #bcd-erp .erp-fournisseurs-cartes .col-four-nom::before,
    #bcd-erp .erp-fournisseurs-cartes .col-four-action::before { display: none; }
    #bcd-erp .erp-table-fournisseurs.erp-fournisseurs-cartes .col-four-action { position: static; grid-column: 1 / -1; text-align: right; }
    #bcd-erp .erp-modal-fournisseur { left: 10px; right: 10px; top: 10px; transform: none; width: auto; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
    #bcd-erp .erp-modal-fournisseur .erp-edition-grille { display: block; padding: 12px; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-entete { display: none; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-ligne { display: block; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #e2e8f0; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-ligne > label { display: block; margin-bottom: 8px; font-size: 14px; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-champ { display: block; margin-top: 8px; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-departement { display: block; color: #64748b; margin-bottom: 4px; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-ligne input,
    #bcd-erp .erp-modal-fournisseur .erp-edition-ligne select { height: 44px; font-size: 16px; margin-bottom: 0; }
    #bcd-erp .erp-modal-fournisseur .erp-edition-ligne input:disabled { display: none; }
    #bcd-erp .erp-modal-fournisseur footer { padding: 12px; flex-wrap: wrap; }
    #bcd-erp .erp-modal-fournisseur footer button { min-height: 44px; flex: 1; }
}

@media (max-width: 480px) {
    #bcd-erp .erp-fournisseurs-cartes .erp-ligne-fournisseur { grid-template-columns: minmax(0, 1fr); }
    #bcd-erp .erp-fournisseurs-entete .erp-stats-filtres { grid-template-columns: minmax(0, 1fr); }
}

/* Écran Flux : une seule grille de colonnes pour toutes les familles (table-layout fixe). Les largeurs
   ne dépendent jamais du contenu ; Message absorbe l'espace restant. En dessous de la largeur minimale,
   le conteneur .erp-table-scroll défile horizontalement au lieu de compresser les colonnes. */
#bcd-erp .erp-table-flux { table-layout: fixed; width: 100%; min-width: 1320px; }
#bcd-erp .erp-table-flux .erp-flux-col-traitement { width: 240px; }
#bcd-erp .erp-table-flux .erp-flux-col-onglets { width: 140px; }
#bcd-erp .erp-table-flux .erp-flux-col-cron { width: 170px; }
#bcd-erp .erp-table-flux .erp-flux-col-statut { width: 110px; }
#bcd-erp .erp-table-flux .erp-flux-col-execution { width: 155px; }
#bcd-erp .erp-table-flux .erp-flux-col-duree { width: 80px; }
#bcd-erp .erp-table-flux .erp-flux-col-lignes { width: 80px; }
#bcd-erp .erp-table-flux .erp-flux-col-action { width: 100px; }
#bcd-erp .erp-table-flux th { overflow: hidden; text-overflow: ellipsis; }
#bcd-erp .erp-table-flux td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
#bcd-erp .erp-table-flux td:nth-child(4),
#bcd-erp .erp-table-flux td:nth-child(5),
#bcd-erp .erp-table-flux td:nth-child(6),
#bcd-erp .erp-table-flux td:nth-child(7) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bcd-erp .erp-flux-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 4px; }
#bcd-erp .erp-flux-entete h2 { margin: 0; }
#bcd-erp .erp-flux-cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: #627086; }
#bcd-erp .erp-flux-cycle form { margin: 0; }
#bcd-erp .erp-flux-cycle-message { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Comptes : connexion, 2FA, bloc du compte connecté, fiche utilisateur (droits / affichage) */
#bcd-erp .erp-compte { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 22px; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; color: #9aa6b2; }
#bcd-erp .erp-compte-nom { flex-basis: 100%; color: #dce4ec; font-weight: 600; }
#bcd-erp .erp-compte a, #bcd-erp .erp-compte button { padding: 0; border: none; background: none; color: #9aa6b2; font: inherit; text-decoration: underline; cursor: pointer; }
#bcd-erp .erp-compte a:hover, #bcd-erp .erp-compte button:hover { color: #fff; }
#bcd-erp .erp-compte form { margin: 0; }
#bcd-erp.erp-page-connexion { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; box-sizing: border-box; }
#bcd-erp .erp-connexion { width: 100%; max-width: 420px; padding: 28px; border-radius: 12px; background: #fff; box-shadow: 0 1px 4px rgba(20, 31, 48, 0.08); }
#bcd-erp .erp-connexion .erp-marque { display: flex; align-items: center; padding: 0 0 18px; }
#bcd-erp .erp-connexion .erp-marque small { display: block; }
#bcd-erp .erp-connexion h1 { margin: 0 0 12px; font-size: 20px; }
#bcd-erp .erp-connexion .erp-formulaire-grille { grid-template-columns: 1fr; margin: 12px 0; }
#bcd-erp .erp-connexion .erp-formulaire-grille input { height: 40px; font-size: 16px; }
#bcd-erp .erp-connexion .erp-bouton-principal { height: 40px; }
#bcd-erp .erp-connexion-aide { color: #64748b; font-size: 13px; margin: 12px 0; }
#bcd-erp .erp-connexion-aide code { font-size: 14px; letter-spacing: 1px; word-break: break-all; }
#bcd-erp .erp-connexion-etapes { padding-left: 20px; font-size: 14px; line-height: 1.5; }
#bcd-erp .erp-connexion-qr { display: flex; justify-content: center; margin: 12px 0; }
#bcd-erp .erp-connexion-qr svg { width: 220px; height: 220px; }
#bcd-erp .erp-droits { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 10px 0; }
#bcd-erp .erp-droits-rubrique { margin: 0; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; }
#bcd-erp .erp-droits-rubrique legend { padding: 0 4px; font-weight: 700; font-size: 13px; text-transform: uppercase; color: #475569; }
#bcd-erp .erp-droits-case { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
#bcd-erp .erp-droits-case input { width: 16px; height: 16px; }
#bcd-erp .erp-droits-affichage { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Achats : planning des achats (Commandes fournisseurs) ===== */
#bcd-erp .erp-achats-onglets .erp-bouton-departement { height: 40px; min-width: 0; font-size: 14px; }
#bcd-erp .erp-planning-compteurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
#bcd-erp .erp-planning-compteurs > * { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; background: #fff; box-shadow: 0 1px 4px rgba(20, 31, 48, .07); border-left: 4px solid #cbd5e1; color: inherit; text-decoration: none; }
#bcd-erp .erp-planning-compteurs strong { font-size: 24px; line-height: 1.1; }
#bcd-erp .erp-planning-compteurs span { font-size: 12px; color: #64748b; font-weight: 700; }
#bcd-erp .erp-planning-compteurs small { font-size: 10px; color: #94a3b8; }
#bcd-erp .erp-planning-compteurs .compteur-retard { border-left-color: #dc2626; }
#bcd-erp .erp-planning-compteurs .compteur-retard strong { color: #dc2626; }
#bcd-erp .erp-planning-compteurs .compteur-aujourdhui { border-left-color: #ea580c; }
#bcd-erp .erp-planning-compteurs .compteur-aujourdhui strong { color: #ea580c; }
#bcd-erp .erp-planning-compteurs .compteur-pa { border-left-color: #d97706; }
#bcd-erp .erp-planning-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
#bcd-erp .erp-planning-recherche input { height: 32px; border-radius: 999px; padding: 0 14px; min-width: 200px; }
#bcd-erp .erp-planning-navigation { display: flex; align-items: center; gap: 6px; margin-left: auto; }
#bcd-erp .erp-planning-navigation a { padding: 5px 11px; border-radius: 999px; background: #f1f5f9; color: #334155; font-weight: 700; font-size: 13px; text-decoration: none; }
#bcd-erp .erp-planning-navigation a.actif { background: #183153; color: #fff; }
#bcd-erp .erp-planning-navigation span { font-size: 13px; color: #64748b; font-weight: 600; margin-left: 6px; }
#bcd-erp .erp-planning-retards { margin-bottom: 14px; padding: 12px; border-radius: 14px; background: #fef2f2; }
#bcd-erp .erp-planning-retards h2 { margin: 0 0 10px; font-size: 15px; color: #b91c1c; }
#bcd-erp .erp-planning-retards h2 span { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 12px; }
#bcd-erp .erp-planning-retards-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
#bcd-erp .erp-planning-semaine { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
#bcd-erp .erp-planning-jour { padding: 8px; border-radius: 14px; background: #f8fafc; min-height: 160px; display: grid; gap: 8px; align-content: start; }
#bcd-erp .erp-planning-jour.aujourdhui { background: #fff7ed; box-shadow: inset 0 0 0 2px #fdba74; }
#bcd-erp .erp-planning-jour h3 { display: flex; align-items: baseline; gap: 6px; margin: 2px 4px 2px; font-size: 14px; }
#bcd-erp .erp-planning-jour h3 span { color: #94a3b8; font-weight: 600; font-size: 12px; }
#bcd-erp .erp-planning-jour h3 em { margin-left: auto; font-style: normal; font-size: 11px; color: #64748b; background: #e2e8f0; border-radius: 999px; padding: 1px 7px; }
#bcd-erp .erp-planning-vide { margin: 0 4px; color: #cbd5e1; }
#bcd-erp .erp-planning-carte { position: relative; padding: 9px 10px; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(20, 31, 48, .08); border-left: 4px solid #3b82f6; font-size: 12px; display: grid; gap: 3px; }
#bcd-erp .erp-planning-carte.etat-retard { border-left-color: #dc2626; }
#bcd-erp .erp-planning-carte.etat-aujourdhui { border-left-color: #ea580c; }
#bcd-erp .erp-planning-carte.etat-traite { border-left-color: #16a34a; background: #f0fdf4; opacity: .9; }
#bcd-erp .erp-planning-carte header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
#bcd-erp .erp-planning-carte header a { color: #0f172a; text-decoration: none; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
#bcd-erp .erp-planning-carte p { margin: 0; line-height: 1.35; }
#bcd-erp .erp-planning-statut { font-weight: 700; color: #1d4ed8; }
#bcd-erp .etat-retard .erp-planning-statut { color: #dc2626; }
#bcd-erp .etat-aujourdhui .erp-planning-statut { color: #ea580c; }
#bcd-erp .etat-traite .erp-planning-statut { color: #15803d; }
#bcd-erp .erp-planning-infos { color: #64748b; }
#bcd-erp .erp-planning-motifs { color: #334155; font-weight: 600; }
#bcd-erp .erp-planning-note { color: #475569; font-style: italic; }
#bcd-erp .erp-planning-pa { color: #b45309; font-weight: 700; }
#bcd-erp .erp-planning-commentaire { color: #94a3b8; }
#bcd-erp .erp-planning-resp { flex-shrink: 0; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #e2e8f0; color: #334155; }
#bcd-erp .erp-planning-resp.resp-0 { background: #ede9fe; color: #6d28d9; }
#bcd-erp .erp-planning-resp.resp-1 { background: #dbeafe; color: #1d4ed8; }
#bcd-erp .erp-planning-resp.resp-2 { background: #dcfce7; color: #15803d; }
#bcd-erp .erp-planning-resp.resp-3 { background: #fce7f3; color: #be185d; }
#bcd-erp .erp-planning-resp.resp-4 { background: #ccfbf1; color: #0f766e; }
#bcd-erp .erp-planning-resp.resp-5 { background: #fef3c7; color: #b45309; }
#bcd-erp .erp-planning-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
#bcd-erp .erp-planning-actions form { margin: 0; }
#bcd-erp .erp-planning-bouton { display: inline-block; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 7px; padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer; text-decoration: none; list-style: none; }
#bcd-erp .erp-planning-bouton:hover { background: #f1f5f9; }
#bcd-erp .erp-planning-bouton.principal { background: #183153; border-color: #183153; color: #fff; }
#bcd-erp .erp-planning-menu > summary::-webkit-details-marker { display: none; }
#bcd-erp .erp-planning-menu[open] .erp-planning-panneau { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; padding: 10px; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); display: grid; gap: 10px; min-width: 220px; }
#bcd-erp .erp-planning-panneau form { display: grid; gap: 5px; }
#bcd-erp .erp-planning-panneau form + form { border-top: 1px solid #eef2f7; padding-top: 8px; }
#bcd-erp .erp-planning-panneau input, #bcd-erp .erp-planning-panneau select, #bcd-erp .erp-planning-panneau textarea { font-size: 12px; padding: 4px 6px; width: 100%; box-sizing: border-box; }
#bcd-erp .erp-planning-cases { display: flex; flex-wrap: wrap; gap: 2px 10px; }
#bcd-erp .erp-planning-cases label { display: inline-flex; gap: 4px; align-items: center; font-weight: 500; }
#bcd-erp .erp-planning-cases input { width: auto; }
#bcd-erp .erp-planning-a-planifier { margin-top: 16px; }
#bcd-erp .erp-planning-a-planifier summary { cursor: pointer; }
#bcd-erp .erp-planning-planifier { display: flex; gap: 6px; align-items: center; }
@media (max-width: 1100px) { #bcd-erp .erp-planning-semaine { grid-template-columns: 1fr; } #bcd-erp .erp-planning-navigation { margin-left: 0; } }
#bcd-erp .erp-a-recevoir { cursor: help; border-bottom: 1px dotted #94a3b8; }
#bcd-erp .erp-a-recevoir.retard { color: #dc2626; font-weight: 700; border-bottom-color: #dc2626; }
#bcd-erp .erp-planning-ruptures a { color: #dc2626; font-weight: 700; text-decoration: none; }
#bcd-erp .erp-planning-ruptures a:hover { text-decoration: underline; }
#bcd-erp .erp-table-precommandes .erp-stats-thumb { width: 44px; height: 44px; object-fit: contain; }
#bcd-erp .erp-texte-erreur, #bcd-erp .erp-texte-erreur strong { color: #dc2626; }

/* Comptabilité > Échéances et paiements */
#bcd-erp .erp-ech-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#bcd-erp .erp-ech-kpis small a { color: #1d4ed8; font-weight: 700; }
#bcd-erp .erp-ech-kpis article.erp-ech-alerte { box-shadow: inset 4px 0 0 #dc2626, 0 1px 5px rgba(20, 31, 48, 0.08); }
#bcd-erp .erp-ech-negatif { color: #dc2626; }
#bcd-erp .erp-ech-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 6px; }
#bcd-erp .erp-ech-entete h3 { margin: 0; }
#bcd-erp .erp-ech-navigation { display: flex; flex-wrap: wrap; gap: 8px; }
#bcd-erp .erp-ech-mois { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
#bcd-erp .erp-ech-carte { display: flex; flex-direction: column; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; min-width: 0; }
#bcd-erp .erp-ech-carte.erp-ech-courant { border-color: #93c5fd; box-shadow: 0 0 0 2px #dbeafe; }
#bcd-erp .erp-ech-carte > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #e2e8f0; font-size: 15px; }
#bcd-erp .erp-ech-liste { list-style: none; margin: 0; padding: 4px 0; max-height: 460px; overflow-y: auto; flex: 1; }
#bcd-erp .erp-ech-liste li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto 28px; align-items: center; gap: 8px; padding: 6px 14px; font-size: 13px; border-bottom: 1px solid #f1f5f9; }
#bcd-erp .erp-ech-liste li.erp-vide { display: block; }
#bcd-erp .erp-ech-date { color: #64748b; font-variant-numeric: tabular-nums; }
#bcd-erp .erp-ech-fournisseur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#bcd-erp .erp-ech-fournisseur em { color: #64748b; font-weight: 400; }
#bcd-erp .erp-ech-montant { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
#bcd-erp .erp-ech-etat { text-align: center; color: #047857; font-size: 12px; white-space: nowrap; }
#bcd-erp .erp-ech-etat input { width: 16px; height: 16px; cursor: pointer; }
#bcd-erp .erp-ech-payee { opacity: 0.55; }
#bcd-erp .erp-ech-payee .erp-ech-montant { text-decoration: line-through; }
#bcd-erp .erp-ech-retard, #bcd-erp .erp-ech-retard td { background: #fef2f2; }
#bcd-erp .erp-ech-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; background: #eef3f7; color: #334155; }
#bcd-erp .erp-ech-mode-traite { background: #fce7f3; color: #be185d; }
#bcd-erp .erp-ech-mode-prelevement { background: #ffedd5; color: #c2410c; }
#bcd-erp .erp-ech-mode-virement { background: #dbeafe; color: #1d4ed8; }
#bcd-erp .erp-ech-mode-cheque { background: #d1fae5; color: #047857; }
#bcd-erp .erp-ech-mode-carte { background: #e0f2fe; color: #0369a1; }
#bcd-erp .erp-ech-mode-autre { background: #ede9fe; color: #6d28d9; }
#bcd-erp .erp-ech-mode-aucun { background: #fee2e2; color: #dc2626; }
/* Catalogue > Produits : fiche produit (popup) */
#bcd-erp .erp-fiche-lien { color: inherit; text-decoration: none; }
#bcd-erp .erp-fiche-lien:hover strong { color: #1d4ed8; text-decoration: underline; }
#bcd-erp .erp-fiche-boite { width: min(760px, calc(100vw - 28px)); overflow-y: auto; }
#bcd-erp .erp-fiche-chargement { padding: 24px; color: #64748b; }
#bcd-erp .erp-fiche-onglets { display: flex; gap: 4px; padding: 8px 16px 0; border-bottom: 1px solid #e5ebf2; }
#bcd-erp .erp-fiche-onglets button { padding: 7px 12px; border-radius: 6px 6px 0 0; background: transparent; color: #64748b; font-size: 13px; font-weight: 700; border-bottom: 2px solid transparent; }
#bcd-erp .erp-fiche-onglets button.actif { color: #1d4ed8; border-bottom-color: #1d4ed8; background: #f8fafc; }
#bcd-erp .erp-fiche-panneau { padding: 12px 16px 18px; }
#bcd-erp [data-fiche-panneau][hidden] { display: none; }  /* la synthèse (display: grid) ne doit pas réapparaître sous les autres onglets */
#bcd-erp .erp-fiche-historique h3 { font-size: 14px; margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#bcd-erp .erp-fiche-historique h3:first-child { margin-top: 0; }
#bcd-erp .erp-fiche-historique h3 small { color: #64748b; font-weight: 400; }
#bcd-erp .erp-fiche-table { font-size: 12px; }
#bcd-erp .erp-fiche-table td small { display: block; color: #64748b; font-size: 11px; }
#bcd-erp .erp-fiche-table td.nombre small { display: inline; font-weight: 700; }
#bcd-erp .erp-fiche-table .erp-prix-hausse { color: #b91c1c; }
#bcd-erp .erp-fiche-table .erp-prix-baisse { color: #047857; }
#bcd-erp .erp-fiche-inchange { color: #cbd5e1; }
#bcd-erp .erp-fiche-prochaine { border: 1px solid #e5ebf2; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: #f8fafc; }
#bcd-erp .erp-fiche-prochaine h3 { margin: 0 0 8px; }
#bcd-erp .erp-fiche-prochaine-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#bcd-erp .erp-fiche-prochaine-grille div { display: flex; flex-direction: column; gap: 2px; }
#bcd-erp .erp-fiche-prochaine-grille small { color: #64748b; font-size: 12px; }
#bcd-erp .erp-fiche-prochaine-grille strong { font-size: 15px; }
@media (max-width: 640px) { #bcd-erp .erp-fiche-prochaine-grille { grid-template-columns: 1fr; } }
#bcd-erp .erp-fiche-prix-actuel td { font-weight: 700; background: #f8fafc; }
#bcd-erp .erp-fiche-prix-initial td { color: #64748b; }
#bcd-erp .erp-fiche-entete { align-items: flex-start; }
#bcd-erp .erp-fiche-entete > div:nth-child(2) { flex: 1; min-width: 0; }
#bcd-erp .erp-fiche-entete h2 { font-size: 17px; line-height: 1.3; }
#bcd-erp .erp-fiche-image img, #bcd-erp .erp-fiche-image .erp-image-vide { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; border: 1px solid #e5ebf2; display: flex; align-items: center; justify-content: center; }
#bcd-erp .erp-fiche-corps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 16px 18px; }
#bcd-erp .erp-fiche-diagnostics { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
#bcd-erp .erp-fiche-diag { padding: 5px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; }
#bcd-erp .erp-fiche-diag-rouge { background: #fee2e2; color: #b91c1c; }
#bcd-erp .erp-fiche-diag-orange { background: #ffedd5; color: #c2410c; }
#bcd-erp .erp-fiche-diag-bleu { background: #dbeafe; color: #1d4ed8; }
#bcd-erp .erp-fiche-diag-vert { background: #d1fae5; color: #047857; }
#bcd-erp .erp-fiche-diag-gris { background: #f1f5f9; color: #475569; }
#bcd-erp .erp-fiche-tuile { border: 1px solid #e5ebf2; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#bcd-erp .erp-fiche-large { grid-column: 1 / -1; }
#bcd-erp .erp-fiche-tuile h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
#bcd-erp .erp-fiche-tuile small { color: #64748b; font-size: 12px; }
#bcd-erp .erp-fiche-valeur { font-size: 26px; line-height: 1.1; color: #0f172a; }
#bcd-erp .erp-fiche-info { cursor: help; text-transform: none; }
#bcd-erp .erp-fiche-jauge { height: 7px; background: #e5ebf2; border-radius: 99px; overflow: hidden; }
#bcd-erp .erp-fiche-jauge span { display: block; height: 100%; background: #10b981; }
#bcd-erp .erp-fiche-jauge span.bas { background: #f97316; }
#bcd-erp .erp-fiche-ventes-chiffres { display: flex; justify-content: space-between; gap: 6px; }
#bcd-erp .erp-fiche-ventes-chiffres div { display: flex; flex-direction: column; }
#bcd-erp .erp-fiche-ventes-chiffres strong { font-size: 20px; }
#bcd-erp .erp-fiche-graphique { width: 100%; height: 120px; display: block; }
#bcd-erp .erp-fiche-axe { stroke: #cbd5e1; stroke-width: 1; }
#bcd-erp .erp-fiche-mois { font-size: 9px; fill: #94a3b8; }
#bcd-erp .erp-fiche-ventes { fill: none; stroke: #2563eb; stroke-width: 2; vector-effect: non-scaling-stroke; }
#bcd-erp .erp-fiche-stock { fill: none; stroke: #94a3b8; stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
#bcd-erp .erp-fiche-rupture { fill: #dc2626; }
#bcd-erp .erp-fiche-legende { margin: 0; font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#bcd-erp .erp-fiche-legende span { display: inline-block; width: 14px; height: 3px; margin-left: 8px; }
#bcd-erp .erp-fiche-legende .l-ventes { background: #2563eb; margin-left: 0; }
#bcd-erp .erp-fiche-legende .l-stock { background: repeating-linear-gradient(90deg, #94a3b8 0 4px, transparent 4px 7px); }
#bcd-erp .erp-fiche-legende .l-rupture { background: #dc2626; height: 6px; }
#bcd-erp .erp-fiche-depots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#bcd-erp .erp-fiche-depot { display: flex; flex-direction: column; gap: 2px; }
#bcd-erp .erp-fiche-qte { font-size: 20px; font-weight: 700; }
@media (max-width: 640px) {
    #bcd-erp .erp-fiche-corps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #bcd-erp .erp-fiche-depots { grid-template-columns: 1fr; }
}
/* Achats > Commandes fournisseurs : suppression */
#bcd-erp .erp-cf-actions { width: 1%; white-space: nowrap; text-align: right; }
#bcd-erp .erp-bouton-supprimer { padding: 4px 8px; background: #fff; color: #b91c1c; border: 1px solid #fecaca; border-radius: 6px; font-size: 14px; line-height: 1; }
#bcd-erp .erp-bouton-supprimer:hover { background: #fef2f2; border-color: #f87171; }
/* Paramétrage > Permaban */
#bcd-erp .erp-permaban-formulaire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; align-items: end; }
#bcd-erp .erp-permaban-formulaire label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
#bcd-erp .erp-permaban-large { grid-column: 1 / -1; }
@media (max-width: 700px) { #bcd-erp .erp-permaban-formulaire { grid-template-columns: 1fr; } }
/* Ventes > Commandes : récapitulatif en popup */
#bcd-erp .erp-nb-commandes { color: #64748b; font-size: 11px; white-space: nowrap; }
#bcd-erp .erp-recap-lien { cursor: pointer; color: inherit; text-decoration: none; }
#bcd-erp a.erp-recap-lien span { color: #1d4ed8; text-decoration: underline dotted; }
#bcd-erp .erp-recap-image img { width: 36px; height: 36px; object-fit: contain; }
#bcd-erp .erp-recap-manquante td:nth-child(2) { color: #b91c1c; }
#bcd-erp .erp-recap-colis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
#bcd-erp .erp-recap-colis article { border: 1px solid #e5ebf2; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
#bcd-erp .erp-recap-colis small { color: #64748b; }
#bcd-erp .erp-recap-colis ul { margin: 6px 0 0; padding-left: 16px; }
#bcd-erp .erp-recap-suivis { margin: 4px 0; font-weight: 700; }
/* Ventes > En attente */
#bcd-erp .erp-attente-option { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
#bcd-erp .erp-attente-table td { vertical-align: top; }
#bcd-erp .erp-attente-table td small { display: block; color: #64748b; font-size: 11px; }
#bcd-erp .erp-attente-commande { white-space: nowrap; }
#bcd-erp .erp-attente-longue { color: #b91c1c !important; font-weight: 700; }
#bcd-erp .erp-attente-client { min-width: 170px; max-width: 240px; }
#bcd-erp .erp-attente-client a { display: block; font-size: 12px; word-break: break-all; }
#bcd-erp .erp-attente-panier { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 320px; }
#bcd-erp .erp-attente-panier li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 3px 6px; border-radius: 6px; }
#bcd-erp .erp-attente-panier img, #bcd-erp .erp-attente-panier .erp-image-vide { width: 32px; height: 32px; object-fit: contain; flex: 0 0 32px; border-radius: 4px; font-size: 9px; display: flex; align-items: center; justify-content: center; }
#bcd-erp .erp-attente-panier li.manquant { background: #fef2f2; color: #b91c1c; }
#bcd-erp .erp-attente-panier li.precommande { background: #fff7ed; }
#bcd-erp .erp-attente-panier li.reserve { color: #334155; }
#bcd-erp .erp-attente-qte { font-weight: 700; }
#bcd-erp .erp-attente-sku { color: #64748b; font-size: 11px; }
#bcd-erp li.manquant .erp-attente-sku { color: #b91c1c; font-weight: 700; }
#bcd-erp .erp-attente-etat { font-size: 12px; margin-top: 2px; color: inherit; }
#bcd-erp .erp-attente-precommande { color: #c2410c; }
#bcd-erp .erp-attente-stock-veille { color: #7f1d1d; text-decoration: underline; }
#bcd-erp .erp-attente-statut { white-space: nowrap; }
#bcd-erp .erp-attente-statut .erp-badge { display: inline-block; margin-bottom: 3px; }
#bcd-erp .erp-attente-vue-backorder { background: #fee2e2; color: #b91c1c; }
#bcd-erp .erp-attente-vue-partial { background: #ffedd5; color: #c2410c; }
#bcd-erp .erp-attente-vue-onhold { background: #e0e7ff; color: #4338ca; }
#bcd-erp .erp-attente-vue-imprevue { background: #7f1d1d; color: #fff; }
#bcd-erp .erp-attente-vue-arrivage { background: #dbeafe; color: #1d4ed8; }
#bcd-erp .erp-attente-paye { background: #d1fae5; color: #047857; cursor: help; }
#bcd-erp .erp-attente-boutique { margin-top: 4px; padding: 4px 8px; border-radius: 6px; background: #dbeafe; color: #1d4ed8; font-weight: 800; font-size: 13px; border-left: 4px solid #1d4ed8; }
#bcd-erp .erp-attente-vue-boutique { background: #1d4ed8; color: #fff; }
#bcd-erp .erp-attente-client small { display: block; }
#bcd-erp tr.erp-attente-imprevue td:first-child { box-shadow: inset 4px 0 0 #b91c1c; }
/* Comptabilité > Mandats et VIR */
#bcd-erp .erp-mdt-table td { vertical-align: top; }
#bcd-erp .erp-mdt-table input, #bcd-erp .erp-mdt-table select, #bcd-erp .erp-mdt-table textarea { font-size: 12px; padding: 3px 5px; }
#bcd-erp .erp-mdt-table small { display: block; color: #64748b; font-size: 11px; }
#bcd-erp .erp-mdt-commande { white-space: nowrap; }
#bcd-erp .erp-mdt-client { min-width: 160px; max-width: 260px; }
#bcd-erp .erp-mdt-livre { color: #047857; }
#bcd-erp .erp-mdt-retour { color: #dc2626; }
#bcd-erp .erp-mdt-facture { white-space: nowrap; }
#bcd-erp .erp-mdt-pdf { padding: 2px 8px; font-size: 11px; }
#bcd-erp .erp-mdt-cases label { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; cursor: pointer; }
#bcd-erp .erp-mdt-cases label small { display: inline; }
#bcd-erp .erp-mdt-annulee { margin-top: 4px; color: #64748b; }
#bcd-erp .erp-mdt-suggestions summary { cursor: pointer; display: inline-block; margin-top: 3px; }
#bcd-erp .erp-mdt-suggestions ul { margin: 4px 0 0; padding: 0; list-style: none; max-width: 340px; white-space: normal; }
#bcd-erp .erp-mdt-suggestions li { padding: 4px 0; border-top: 1px solid #e2e8f0; }
#bcd-erp .erp-mdt-suggestions button { padding: 2px 8px; font-size: 11px; margin-top: 2px; }
#bcd-erp .erp-mdt-attente_livraison { background: #fef3c7; color: #b45309; }
#bcd-erp .erp-mdt-commentaire { width: 220px; min-height: 26px; resize: vertical; }
#bcd-erp .erp-mdt-statut { white-space: nowrap; }
#bcd-erp .erp-mdt-a_deposer { background: #ffedd5; color: #c2410c; }
#bcd-erp .erp-mdt-a_relancer { background: #fee2e2; color: #dc2626; }
#bcd-erp .erp-mdt-attente { background: #dbeafe; color: #1d4ed8; }
#bcd-erp .erp-mdt-payee { background: #d1fae5; color: #047857; }
#bcd-erp .erp-mdt-annulee { background: #f1f5f9; color: #64748b; }
#bcd-erp tr.erp-mdt-envoi { opacity: .55; }
#bcd-erp tr.erp-mdt-ok td { background: #ecfdf5; transition: background .3s; }
#bcd-erp .erp-ech-totaux { padding: 10px 14px; border-top: 1px solid #e2e8f0; background: #f8fafc; border-radius: 0 0 12px 12px; }
#bcd-erp .erp-ech-totaux div { display: grid; grid-template-columns: minmax(0, 1fr) 30px auto; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
#bcd-erp .erp-ech-totaux div span:nth-child(2) { color: #64748b; text-align: right; }
#bcd-erp .erp-ech-totaux b { text-align: right; font-variant-numeric: tabular-nums; }
#bcd-erp .erp-ech-totaux .erp-ech-total { margin-top: 6px; padding-top: 8px; border-top: 1px solid #cbd5e1; font-size: 14px; }
#bcd-erp .erp-ech-totaux .erp-ech-reste b { color: #1d4ed8; }
#bcd-erp .erp-ech-periode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
#bcd-erp .erp-ech-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
#bcd-erp .erp-ech-colonnes .erp-panneau { min-width: 0; }
#bcd-erp .erp-ech-reprise { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
#bcd-erp .erp-ech-details { margin-top: 12px; }
#bcd-erp .erp-ech-details summary { cursor: pointer; font-weight: 700; color: #334155; }
#bcd-erp .erp-ech-ventes { margin-top: 14px; }
#bcd-erp .erp-ech-top { margin: 6px 0 0; padding-left: 20px; }
#bcd-erp .erp-ech-top li span { display: inline-block; min-width: 60%; }
#bcd-erp .erp-ech-graphique { position: relative; height: 300px; }
#bcd-erp .erp-ech-graphique-bas { height: 220px; }
#bcd-erp .erp-ech-categories { margin-top: 12px; }
#bcd-erp .erp-ech-banques { display: grid; gap: 10px; margin-bottom: 14px; }
#bcd-erp .erp-ech-banque { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; }
#bcd-erp .erp-ech-banque small { grid-column: 1 / -1; color: #64748b; }
#bcd-erp .erp-ech-banque label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; }
#bcd-erp .erp-ech-banque input { min-width: 0; width: 100%; }
#bcd-erp .erp-ech-solde { font-weight: 800; font-variant-numeric: tabular-nums; }
#bcd-erp .erp-ech-completer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#bcd-erp .erp-ech-calculee { font-style: italic; }
#bcd-erp .erp-ech-banque-vu { display: inline-flex; padding: 1px 6px; border-radius: 999px; background: #d1fae5; color: #047857; font-size: 11px; font-weight: 800; white-space: nowrap; }
@media (max-width: 1100px) {
    #bcd-erp .erp-ech-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #bcd-erp .erp-ech-mois, #bcd-erp .erp-ech-colonnes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    #bcd-erp .erp-ech-kpis { grid-template-columns: minmax(0, 1fr); }
    #bcd-erp .erp-ech-liste li { grid-template-columns: 38px minmax(0, 1fr) auto 24px; }
    #bcd-erp .erp-ech-liste li .erp-ech-tag { display: none; }
}

/* Barre de défilement horizontale flottante des tableaux larges (js/defilement_tableaux.js) */
#bcd-erp .erp-defilement-flottant { position: fixed; bottom: 0; z-index: 900; height: 17px; overflow-x: auto; overflow-y: hidden; background: rgba(255, 255, 255, .95); box-shadow: 0 -1px 0 #dbe3ec; }
#bcd-erp .erp-defilement-flottant[hidden] { display: none; }
#bcd-erp .erp-defilement-flottant > div { height: 1px; }

/* Ventes > SAV (sav_tableau.html, sav_commande.html) : une couleur par type d'action (services/sav.COULEURS_TYPES) */
#bcd-erp .erp-sav-type { color: #fff; }
#bcd-erp .erp-sav-type-reclamation_fabricant { background: #7c3aed; }
#bcd-erp .erp-sav-type-litige_transporteur { background: #b91c1c; }
#bcd-erp .erp-sav-type-renvoi_produit { background: #2563eb; }
#bcd-erp .erp-sav-type-etiquette_retour { background: #0891b2; }
#bcd-erp .erp-sav-type-autre { background: #6b7280; }
#bcd-erp .erp-sav-type-close { opacity: .55; }
#bcd-erp .erp-sav-kpi-types ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
#bcd-erp .erp-sav-kpi-types a { text-decoration: none; }
#bcd-erp .erp-sav-table td small, #bcd-erp .erp-sav-source { display: block; color: #677690; }
#bcd-erp .erp-sav-statut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#bcd-erp .erp-sav-statut button, #bcd-erp .erp-sav-action button { padding: 4px 10px; font-size: 12px; }
#bcd-erp .erp-sav-fil { margin: 0 0 10px; }
#bcd-erp .erp-sav-infos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0; }
#bcd-erp .erp-sav-infos dt { color: #677690; }
#bcd-erp .erp-sav-infos dd { margin: 0; overflow-wrap: anywhere; }
#bcd-erp .erp-sav-liens { display: flex; flex-wrap: wrap; gap: 8px; }
#bcd-erp .erp-sav-liens a { text-decoration: none; }
#bcd-erp .erp-sav-retour { margin: 4px 0; padding: 6px 10px; border-radius: 8px; background: #ecfdf5; color: #065f46; }
#bcd-erp .erp-sav-action { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid #e5ebf2; }
#bcd-erp .erp-sav-action small { color: #677690; margin-left: 6px; }
#bcd-erp .erp-sav-action-close { opacity: .7; }
#bcd-erp .erp-sav-commentaire { padding: 6px 10px; border-radius: 8px; background: #f6f7f9; font-size: 13px; }
#bcd-erp .erp-sav-formulaire { display: grid; grid-template-columns: minmax(0, 2fr) minmax(90px, 140px); gap: 10px 14px; align-items: end; }
#bcd-erp .erp-sav-formulaire label { display: grid; gap: 4px; }
#bcd-erp .erp-sav-large, #bcd-erp .erp-sav-boutons { grid-column: 1 / -1; }
#bcd-erp .erp-sav-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
#bcd-erp .erp-sav-bouton { font-weight: 700; }
@media (max-width: 700px) { #bcd-erp .erp-sav-formulaire { grid-template-columns: 1fr; } }
