/* =========================================================
   MODIFIER LES PRODUITS
   Fichier : modifier-produits.css
   Ciblage volontairement basé sur les IDs
   ========================================================= */


/* ---------------------------------------------------------
   SECTION PRINCIPALE
   --------------------------------------------------------- */

#section-modifier-produits {
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
}


/* ---------------------------------------------------------
   EN-TÊTE DE LA SECTION
   --------------------------------------------------------- */

#section-modifier-produits > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

#titre-modifier-produits {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}


/* ---------------------------------------------------------
   FIL D'ARIANE
   --------------------------------------------------------- */

#section-modifier-produits nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
}

#section-modifier-produits nav a {
    text-decoration: none;
}

#section-modifier-produits nav span {
    opacity: 0.75;
}


/* ---------------------------------------------------------
   ÉTAT VIDE
   --------------------------------------------------------- */

#etat-vide-modifier-produits {
    width: 100%;
    box-sizing: border-box;
    padding: 50px 24px;
    text-align: center;
    border: 1px solid rgba(128, 128, 128, 0.25);
    border-radius: 12px;
}

#etat-vide-modifier-produits > div {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 16px;
}

#etat-vide-modifier-produits h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

#etat-vide-modifier-produits p {
    margin: 0;
    font-size: 14px;
    opacity: 0.75;
}


/* ---------------------------------------------------------
   LISTE DES PRODUITS À MODIFIER
   --------------------------------------------------------- */

#liste-modifier-produits {
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   TABLEAU
   --------------------------------------------------------- */

#liste-modifier-produits table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

#liste-modifier-produits thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    white-space: nowrap;
}

#liste-modifier-produits tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
    vertical-align: middle;
    font-size: 14px;
}


/* ---------------------------------------------------------
   LIGNES
   --------------------------------------------------------- */

#lignes-modifier-produits tr {
    transition: background-color 0.15s ease;
}

#lignes-modifier-produits tr:hover {
    background-color: rgba(128, 128, 128, 0.06);
}


/* ---------------------------------------------------------
   COLONNE ACTION
   --------------------------------------------------------- */

#liste-modifier-produits th:last-child,
#liste-modifier-produits td:last-child {
    width: 110px;
    text-align: center;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   BOUTONS D'ACTION CRÉÉS DANS
   #lignes-modifier-produits
   --------------------------------------------------------- */

#lignes-modifier-produits button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

/* ✏️ et 🗑️ côte à côte, bien séparés (comme dans « Liste des produits ») */
#lignes-modifier-produits td:last-child button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 1rem;
    vertical-align: middle;
}

#lignes-modifier-produits td:last-child button + button {
    margin-left: 10px;
}

#lignes-modifier-produits button:hover {
    opacity: 0.75;
}

#lignes-modifier-produits button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 768px) {

    #section-modifier-produits {
        padding: 16px;
    }

    #section-modifier-produits > header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    #titre-modifier-produits {
        font-size: 24px;
    }

    #etat-vide-modifier-produits {
        padding: 40px 16px;
    }

    #liste-modifier-produits {
        overflow-x: auto;
    }
}
/* Colonne Stock (modifier-produits.js) */
#lignes-modifier-produits td.mp-stock-epuise { color: #b42318; font-weight: 600; }
#lignes-modifier-produits td.mp-stock-bas { color: #b45309; font-weight: 600; }


/* ================= BARRE DE RECHERCHE ================= */

#section-modifier-produits .mp-recherche {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0 0 16px;
}

#section-modifier-produits .mp-recherche[hidden],
#section-modifier-produits .mp-aucun[hidden],
#section-modifier-produits tr[hidden] {
    display: none !important;
}

#section-modifier-produits .mp-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

#section-modifier-produits .mp-loupe {
    position: absolute;
    left: 12px;
    top: 21px;
    transform: translateY(-50%);
    font-size: .85rem;
    opacity: .6;
    pointer-events: none;
}

#section-modifier-produits .mp-recherche input {
    flex: 1 1 280px;
    min-width: 0;
    min-height: 42px;
    padding: 8px 12px 8px 36px;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: .95rem;
    box-sizing: border-box;
}

#section-modifier-produits .mp-recherche input:focus {
    outline: none;
    border-color: #244d9b;
    box-shadow: 0 0 0 3px rgba(36, 77, 155, .15);
}

#section-modifier-produits .mp-compteur {
    color: #718096;
    font-size: .85rem;
    white-space: nowrap;
}

#section-modifier-produits .mp-aucun {
    margin: 0;
    padding: 24px 12px;
    color: #718096;
    text-align: center;
}

