/* Produits (menu Magasin › Produits) : liste lisible, par numéro de produit. */
.recherche { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--espace-3) var(--espace-5); margin: var(--espace-5) 0 var(--espace-4); padding: var(--espace-4) var(--espace-5); }
.recherche__champ { flex: 1 1 320px; margin: 0; }
.recherche__champ .lf-champ__saisie { width: 100%; box-sizing: border-box; font-size: 16px; }
.tri { display: inline-flex; align-items: center; gap: 2px; margin: -6px -8px; padding: 6px 8px; border: 0; border-radius: 6px;
    background: none; font: inherit; color: inherit; cursor: pointer; }
.tri:hover { background: var(--piste); color: var(--encre); }
.tri:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
th[aria-sort] .tri { color: var(--encre); font-weight: 600; }
.tri__fleche { font-variant-numeric: tabular-nums; }
.recherche__option { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--encre-douce); }
.recherche__total { margin: 0 0 0 auto; min-height: 44px; display: flex; align-items: center; font-weight: 500; font-variant-numeric: tabular-nums; }

.liste { padding: 0; overflow: hidden; }
.produits td { vertical-align: top; }
.col-photo { width: 56px; }
.col-id { width: 72px; }
.col-prix { width: 130px; }
.col-action { width: 110px; text-align: right; }
.produits--lecture .col-action { display: none; }
.numero { font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.col-nom .nom { font-size: 16px; line-height: 22px; }
/* Aperçu de la fiche : le nom et la photo l'ouvrent, pour tout le monde */
.ouvrir { display: block; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ouvrir.nom { color: var(--encre); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--duree-rapide); }
.ouvrir.nom:hover { text-decoration-color: currentColor; }
.ouvrir:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.ouvrir--photo:hover .photo { border-color: var(--encre-douce); }
.col-nom .lf-badge { margin-top: 6px; }
.col-prix { font-weight: 500; }
.ligne--absente td { color: var(--encre-douce); }
.ligne--absente .photo { opacity: .55; }

.photo { display: block; object-fit: contain; background: #fff; border: 1px solid var(--ligne); border-radius: 8px; }
.photo--petite { width: 56px; height: 56px; }
.photo--grande { width: 120px; height: 120px; flex: none; }
.photo--vide { display: grid; place-items: center; box-sizing: border-box; padding: 4px; background: var(--surface-douce); color: var(--encre-douce); font-size: 10px; line-height: 12px; text-align: center; }

.puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.puce { padding: 3px 9px; border-radius: var(--arrondi-pastille); background: var(--piste); font-size: 13px; line-height: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.puce--plus { background: transparent; border: 1px dashed var(--ligne); color: var(--encre-douce); }
.col-declinaisons .lf-sous { margin-top: 6px; }

.pages { display: flex; align-items: center; justify-content: center; gap: var(--espace-4); padding: var(--espace-4); border-top: 1px solid var(--ligne); font-variant-numeric: tabular-nums; }

/* Fiche (bouton « Modifier ») */
.fiche { width: min(820px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.fiche__fermer { position: absolute; top: 14px; right: 14px; margin: 0; }
.fiche .lf-fenetre__titre { padding-right: 48px; }
.fiche__tete { display: flex; gap: var(--espace-5); align-items: flex-start; margin-top: var(--espace-4); }
.fiche__infos { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--espace-4); margin: 0; font-size: 14px; }
.fiche__infos dt { color: var(--encre-douce); }
.fiche__infos dd { margin: 0; font-weight: 500; }
.fiche__sous-titre { margin: var(--espace-5) 0 var(--espace-2); font-size: 15px; }
.fiche__defile { overflow-x: auto; border: 1px solid var(--ligne); border-radius: 10px; }
.fiche__table td, .fiche__table th { padding-top: 10px; padding-bottom: 10px; }
.fiche__table .code { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* RG-PR5 · Stock : dépôt neutre et séparé, puis une colonne par boutique, à sa couleur */
.fiche__table tbody .declinaison { font-size: 15px; font-weight: 500; color: var(--encre); background: none; }
.fiche__table .col-prix-fiche { white-space: nowrap; }
.stock-col { text-align: center !important; padding-left: 6px !important; padding-right: 6px !important; }
.stock-etiquette { display: inline-block; min-width: 64px; padding: 3px 10px; border-radius: var(--arrondi-pastille); font-size: 13px; font-weight: 600; color: var(--encre); }
.stock-col--depot .stock-etiquette { background: var(--piste); }
.stock-col--boutique .stock-etiquette { background: var(--couleur); color: #1c1917; }
.stock-val { text-align: center !important; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stock-val--depot { background: var(--surface-douce); }
.stock-val--boutique { background: color-mix(in srgb, var(--couleur) 22%, transparent); }
.stock-val--zero { color: #b8b2aa; font-weight: 400; }
.stock-col--separe { border-right: 3px solid var(--ligne); }
.fiche__table tfoot th, .fiche__table tfoot td { border-top: 2px solid var(--ligne); }
.fiche__table tfoot th { text-align: left; font-weight: 600; }
.historique { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.historique li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.historique__date { color: var(--encre-douce); font-variant-numeric: tabular-nums; min-width: 120px; }
.fiche__note { margin-top: var(--espace-5); }

/* Téléphone : chaque produit devient une carte */
@media (max-width: 700px) {
    .recherche__total { margin-left: 0; }
    /* les en-têtes triables restent, en bandeau : un toucher trie (RG-PR4) */
    .produits thead { display: block; border-bottom: 1px solid var(--ligne); }
    .produits thead tr { display: flex; gap: 8px; padding: 10px 16px; border-top: 0; }
    .produits thead th { display: none; padding: 0 !important; background: none; }
    .produits thead th[data-tri] { display: block; }
    .produits thead .tri { margin: 0; padding: 8px 12px; border: 1px solid var(--ligne); border-radius: var(--arrondi-pastille); }
    .produits thead th[aria-sort] .tri { border-color: var(--encre); }
    .produits, .produits tbody, .produits tr { display: block; }
    .produits tr { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 12px; padding: 14px 16px; border-top: 1px solid var(--ligne); }
    .produits td { display: block; padding: 0 !important; border: 0; }
    .produits .col-photo { grid-row: span 3; }
    .produits .col-id { grid-column: 2; }
    .produits .col-nom { grid-column: 2 / -1; }
    .produits .col-declinaisons { grid-column: 2 / -1; }
    .produits .col-prix { grid-column: 3; grid-row: 1; text-align: right; width: auto; }
    .produits .col-action { grid-column: 2 / -1; text-align: left; width: auto; margin-top: 6px; }
    .produits .lf-vide { grid-column: 1 / -1; }
    .fiche__tete { flex-direction: column; }
}

/* RG-P3 · Prix site / caisse (prix.js) */
.prix > * + * { margin-top: var(--espace-4); }
.prix-regle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--espace-3) var(--espace-5); padding: 14px 18px; overflow: visible; }
.prix-regle p { margin: 0; max-width: 560px; font-size: 14px; line-height: 20px; color: #44403c; }
.prix-regle strong { color: var(--encre); }
.prix-regle__releve { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-3); }
.prix-limites { display: block; margin: 0; padding-left: 34px; font-size: 13px; line-height: 19px; }
.prix-limites li + li { margin-top: 2px; }
.prix-chiffre { text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit; }
.prix-chiffre:hover { box-shadow: var(--ombre-carte-survol); }
.prix-chiffre--actif { box-shadow: 0 0 0 2px var(--encre); }
.prix-chiffre__alerte { color: var(--rouge); }
.prix-sous { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--piste); border-radius: 10px; box-shadow: var(--ombre-piste); }
.prix-sous__onglet { min-height: 36px; padding: 7px 14px; border: 0; border-radius: var(--arrondi-bouton); background: none; font: 500 14px/20px var(--font-interface); color: var(--encre-douce); cursor: pointer; }
.prix-sous__onglet[aria-selected="true"] { background: var(--surface); color: var(--encre); font-weight: 600; box-shadow: 0 0 0 1px #1c191712, 0 1px 2px #1c19171a; }
.prix-panneau > * + * { margin-top: var(--espace-4); }
.prix-defile { overflow-x: auto; }
.prix-table { min-width: 880px; }
.prix-table td { vertical-align: top; }
.prix-sous-ligne { display: block; margin-top: 2px; font-size: 12px; }
.prix-action { text-align: right; white-space: nowrap; }
.prix-ecart { font-weight: 600; }
.prix-ecart--haut { color: var(--alerte-fonce); }
.prix-ecart--bas { color: #1e3a8a; }
.prix-badge--bas { background: #eaf1fb; color: #1e3a8a; }
.prix-replie { padding: 14px 18px; font-size: 14px; line-height: 20px; overflow: visible; }
.prix-replie summary, .prix-nc__cas summary { cursor: pointer; font-weight: 500; }
.prix-liste { list-style: none; margin: var(--espace-3) 0 0; padding: 0; }
.prix-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--espace-3); padding: 8px 0; border-top: 1px solid var(--ligne); }
.prix-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--espace-3); }
.prix-gammes { display: flex; flex-direction: column; gap: 10px; }
.prix-gamme { padding: 14px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; overflow: visible; }
.prix-gamme__tete { align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-4); }
.prix-gamme__nom { flex: 1 1 240px; min-width: 0; }
.prix-gamme__nom h3 { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; }
.prix-gamme__prix { display: flex; gap: 18px; margin: 0; font-size: 14px; }
.prix-gamme__prix dt { font-size: 12px; color: var(--encre-douce); }
.prix-gamme__prix dd { margin: 0; }
.prix-statuts { display: flex; gap: 4px; padding: 3px; background: var(--piste); border-radius: 9px; box-shadow: var(--ombre-piste); }
.prix-statut { min-height: 36px; padding: 7px 12px; border: 0; border-radius: 7px; background: none; font: 500 14px/20px var(--font-interface); color: var(--encre-douce); cursor: pointer; }
.prix-statut[aria-pressed="true"] { background: var(--surface); font-weight: 600; color: var(--encre); box-shadow: 0 0 0 1px #1c191712, 0 1px 2px #1c19171a; }
.prix-statut--voulu[aria-pressed="true"] { color: var(--succes-fonce); }
.prix-statut--corriger[aria-pressed="true"] { color: var(--rouge-fonce); }
.prix-note { align-self: stretch; margin: 0; padding: 10px 12px; border-radius: var(--arrondi-bouton); font-size: 13px; line-height: 19px; }
.prix-note--voulu { background: var(--succes-clair); color: var(--succes-fonce); }
.prix-note--corriger { background: var(--erreur-clair); color: var(--rouge-fonce); }
.prix-voir { padding-left: 0; }
.prix-produits { align-self: stretch; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 24px; font-size: 13px; }
.prix-produits li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.prix-produits .prix-avec-photo { flex: 1 1 auto; }
.prix-produits__prix { white-space: nowrap; color: #44403c; }
.prix-vide { padding: 20px 18px; }
.prix-nc { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--espace-4); align-items: start; }
.prix-nc__cas { padding: 16px 18px; overflow: visible; }
.prix-nc__cas summary { display: flex; flex-direction: column; gap: 4px; list-style: none; }
.prix-nc__cas summary::-webkit-details-marker { display: none; }
.prix-nc__cas .lf-chiffre__note { font-weight: 400; }
.prix-a-faire__ligne { display: block; white-space: nowrap; }
.prix-a-faire__ligne + .prix-a-faire__ligne { margin-top: 2px; }
.prix-col-photo { width: 44px; padding-right: 0; }
.prix-table th:nth-child(2), .prix-table td:nth-child(2) { min-width: 180px; }
.prix-table td:nth-child(3) { min-width: 150px; }
.prix-table td:nth-child(3) .lf-badge { white-space: normal; border-radius: 10px; }
.prix-photo { display: block; flex: none; width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--ligne); border-radius: 6px; }
.prix-photo--vide { display: grid; place-items: center; box-sizing: border-box; padding: 2px; background: var(--surface-douce); color: var(--encre-douce); font-size: 9px; line-height: 10px; text-align: center; }
.prix-avec-photo { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* Produits › Données (relevé Hiboutik, import de secours, photos ; styles communs : /lafabrik/outils-donnees.css) */
.donnees-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--espace-5); align-items: start; }
