/*############################################################################################################
//  Droits d'auteur © 2022-2023 P.ink, l'ancre d'une vie Tous droits réservés, en collaboration avec OptimalC
//  Style aligné sur le reste de l'application (palette charbon / gris, #a6c2cb, etc.)
//############################################################################################################*/

/* Zone d'actions (boutons de type de rapport) */
.commande-actions {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.5rem 0;
    padding: 0;
    width: 100%;
}

/* Barre de filtres */
.commande-filter {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.5rem 0;
    padding: 0.25rem 0;
    width: 100%;
    background-color: var(--op-deep-blue);
    color: #FAFAFA;
    border-radius: 0.25rem;
    padding: 0.5rem;
}

/* Boutons (alignés sur docInput / palette) */
.commande-btn.docInput {
    min-width: 8rem;
    height: 32px;
    line-height: 28px;
    padding: 0 1rem;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 0 1px #EDEDED;
    background-color: var(--op-deep-blue);
    color: #FAFAFA;
    border: 1px solid #FAFAFA;
    border-radius: 0.25rem;
    cursor: pointer;
    outline: 0;
}

.commande-btn.docInput:hover {
    filter: brightness(1.1);
}

/* Conteneur du tableau */
.commande-listing {
    width: 100%;
    flex: 1 1 auto;
}

.commande-template {
    overflow: auto;
    width: 100%;
    background-color: #A7A7A7;
    border: 1px solid #FFFFFF;
    border-radius: 0.25rem;
}

/* Tableau (même style que table.Listing) - largeurs de colonnes pour aligner en-têtes et cellules */
table.commandeTable {
    margin: 0;
    padding: 0;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: transparent;
}

table.commandeTable .col-puce { width: 2.5rem; min-width: 2.5rem; }
table.commandeTable .col-nom { width: 12%; }
table.commandeTable .col-no { width: 6%; }
table.commandeTable .col-nomanuf { width: 10%; }
table.commandeTable .col-magasin { width: 8%; }
table.commandeTable .col-emplacement { width: 6%; }
table.commandeTable .col-num { width: 3.5rem; min-width: 3.5rem; }
table.commandeTable .col-commentaire { width: 18%; }
table.commandeTable .col-option { width: 2.5rem; min-width: 2.5rem; }

table.commandeTable > thead > tr > th {
    height: 28px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
    vertical-align: middle;
    background-color: var(--op-deep-blue);
    color: #FAFAFA;
    border: 1px solid #FFFFFF;
    border-collapse: collapse;
}

table.commandeTable > tbody > tr > td,
.commande-template table#resultTable > tbody > tr > td {
    padding: 0 4px;
    font-size: 14px;
    line-height: 24px;
    vertical-align: middle;
    background-color: #a6c2cb !important;
    color: #212121;
    border: 1px solid #FFFFFF;
}

/* Alignement du contenu par colonne : icônes et options au centre, texte à gauche, chiffres au centre */
table.commandeTable > tbody > tr > td:nth-child(1),
table.commandeTable > tbody > tr > td:nth-child(5),
table.commandeTable > tbody > tr > td:nth-child(7),
table.commandeTable > tbody > tr > td:nth-child(14),
table.commandeTable > tbody > tr > td:nth-child(15),
table.commandeTable > tbody > tr > td:nth-child(16),
table.commandeTable > tbody > tr > td:nth-child(17),
table.commandeTable > tbody > tr > td:nth-child(18) {
    text-align: center;
}

table.commandeTable > tbody > tr > td:nth-child(9),
table.commandeTable > tbody > tr > td:nth-child(10),
table.commandeTable > tbody > tr > td:nth-child(11),
table.commandeTable > tbody > tr > td:nth-child(12) {
    text-align: center;
}

table.commandeTable > tbody > tr > td:nth-child(9) input,
table.commandeTable > tbody > tr > td:nth-child(10) input,
table.commandeTable > tbody > tr > td:nth-child(11) input,
table.commandeTable > tbody > tr > td:nth-child(12) input {
    text-align: center;
}

table.commandeTable > tbody > tr:hover > td {
    background-color: var(--op-blue-85);
    color: #FFFFFF;
}

/* Champs de formulaire dans le tableau */
.commande-template input {
    height: 26px;
    padding: 0 4px;
    font-size: 13px;
    line-height: 20px;
    border: 1px solid var(--op-deep-blue);
    border-radius: 0.2rem;
    background-color: #FAFAFA;
    color: #212121;
    box-sizing: border-box;
}

.commande-template input.Min,
.commande-template input.Max,
.commande-template input.QtyHand,
.commande-template input.QtyOrder {
    width: 4rem;
    text-align: center;
}

.commande-template input.NoManufacturier {
    width: 10rem;
}

/* Boutons d'action dans les cellules (icônes) */
.linkButton {
    height: 28px;
    width: 28px;
    min-width: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--op-deep-blue);
    color: #FAFAFA;
    border: 1px solid #FAFAFA;
    border-radius: 0.25rem;
    cursor: pointer;
}

.linkButton:hover {
    filter: brightness(1.15);
}

.linkButton::before {
    color: #FAFAFA;
    font-size: 16px;
    font-weight: 400;
    font-family: "FontAwesome";
    content: "\F129";
}

/* Icônes des boutons d'action (Réceptionner, Relocaliser, etc.) */
.Receptionner::before {
    font-size: 18px;
    font-weight: 400;
    font-family: "FontAwesome";
    content: "\F1d8";
}

.Relocaliser::before {
    font-size: 18px;
    font-weight: 400;
    font-family: "FontAwesome";
    content: "\F069";
}

.Editer::before {
    font-size: 18px;
    font-weight: 400;
    font-family: "FontAwesome";
    content: "\F040";
}

.Desactiver::before {
    font-size: 18px;
    font-weight: 400;
    font-family: "FontAwesome";
    content: "\F1F8";
}

.Consommer::before {
    font-size: 18px;
    font-weight: 400;
    font-family: "FontAwesome";
    content: "\F0f5";
}
