/* Oshibori Stock : design system « Oshibori Design SaaS » (refonte du 12 octobre 2026).
   Charte Oshibori Concept : Raleway seule, blanc dominant, or #D1B780 pour l'action principale (texte noir),
   or profond #8C7340 pour les liens, angles vifs, filets fins, ni ombre ni dégradé. Inspirations : Shopify, Stripe, HubSpot, Mixpanel. */
[hidden] { display: none !important; }
:root {
  --or: #D1B780; --or-doc: #C5B790; --or-fonce: #8C7340;
  --noir: #000; --encre: #3D3D3D; --gris: #6E6E6E; --gris-froid: #DFE3E4;
  --ecru: #EBE7DB; --ecru-clair: #FBF8F1; --gris-clair: #F6F6F6; --blanc: #fff;
  --filet: #E6E6E6; --filet-doux: #EFEFEF; --champ: #D6D6D6;
  --rouge: #A8261B; --rouge-fond: #FBECEA; --orange: #9A4A06; --orange-fond: #FCF1E3; --vert: #1E6B41; --vert-fond: #E9F4EE; --vert-barre: #2F7D52;
  --rayon: 0;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Raleway', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 400; font-size: 14px; line-height: 1.5;
  color: var(--encre); background: var(--blanc); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--noir); margin: 0; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 500; letter-spacing: .01em; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
h3 { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
a { color: var(--or-fonce); }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.discret { color: var(--gris); font-size: 12.5px; }
.or { color: var(--or-fonce); }
.sous-titre { margin: 6px 0 0; font-size: 14px; color: var(--gris); }

/* ---------------------------------------------------------------- coque : menu latéral + zone de travail */
.coque { display: flex; min-height: 100vh; }
.entete {
  flex: none; width: 240px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 24px; padding: 22px 14px 18px;
  background: var(--gris-clair); border-right: 1px solid var(--filet);
}
.entete .haut { display: flex; flex-direction: column; gap: 18px; }
.marque { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.marque-embleme { height: 30px; width: auto; }
.marque-mot { height: 24px; width: auto; }
.module { position: relative; }
.module-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; position: relative;
  background: var(--blanc); border: 1px solid var(--filet); padding: 9px 30px 9px 12px; cursor: pointer; font: inherit; color: var(--noir); text-align: left;
}
.module-btn:hover, .module-btn[aria-expanded="true"] { border-color: var(--or); background: var(--blanc); }
.module-btn small { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--or-fonce); font-weight: 600; }
.module-btn b { font-size: 14px; font-weight: 600; }
.module-btn .chevron { position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 1.5px solid var(--encre); border-bottom: 1.5px solid var(--encre); transform: rotate(45deg); transition: transform .15s; }
.module-btn[aria-expanded="true"] .chevron { transform: rotate(-135deg); margin-top: -2px; }
.badge-test { margin-left: 8px; font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--blanc); background: var(--rouge); padding: 1px 6px; }
.module-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--blanc); border: 1px solid var(--filet); border-top: 2px solid var(--or); padding: 6px; z-index: 40; display: grid; gap: 2px; }
.module-menu button { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 10px 12px; min-height: 0; font: inherit; cursor: pointer; color: var(--noir); white-space: normal; }
.module-menu button:hover { background: var(--ecru-clair); }
.module-menu button b { font-weight: 600; font-size: 14px; }
.module-menu button span { font-size: 12px; color: var(--gris); font-weight: 400; }
.module-menu button.actif { background: var(--ecru); }
.module-menu button:disabled { cursor: default; opacity: .55; }
.menu-nouveau { left: auto; right: 0; }

.onglets { display: flex; flex-direction: column; gap: 2px; }
.onglets a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none; color: var(--encre); font-size: 14px; font-weight: 500; }
.onglets a svg { flex: none; }
.onglets a:hover { background: var(--blanc); color: var(--noir); }
.onglets a.actif { background: var(--ecru); color: var(--noir); font-weight: 600; }

.lat-pied { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 10px; }
.synchro { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gris); }
.synchro .point { width: 8px; height: 8px; background: var(--vert-barre); flex: none; }
.moi { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--noir); color: var(--blanc); font-size: 12px; font-weight: 600; }
.moi-txt { display: flex; flex-direction: column; min-width: 0; }
.moi-txt b { font-size: 13px; font-weight: 600; color: var(--noir); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moi-txt small { font-size: 12px; color: var(--gris); }
.lat-pied select.qui { width: 100%; }

.zone { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.barre-haut { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 32px; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.barre-haut .espace { flex: 1 1 auto; }
.recherche-g { position: relative; flex: 1 1 320px; max-width: 560px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--filet); background: var(--gris-clair); color: var(--gris); }
.recherche-g:focus-within { border-color: var(--or); background: var(--blanc); }
.recherche-g input { flex: 1 1 auto; min-width: 0; min-height: 0; border: 0; background: transparent; padding: 0; font-size: 14px; color: var(--noir); outline: none; }
.recherche-g input:focus { outline: none; }
.recherche-g kbd { font: inherit; font-size: 11px; font-weight: 600; color: var(--gris); border: 1px solid var(--champ); background: var(--blanc); padding: 1px 6px; }
.recherche-g .suggestions { top: calc(100% + 4px); }
.nouveau { position: relative; }

main { width: 100%; max-width: 1320px; margin: 0 auto; padding-inline: 32px; padding-block: 28px 72px; display: flex; flex-direction: column; gap: 24px; counter-reset: etape; }
.titre-vue { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.titre-vue .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.filet { height: 1px; background: var(--or); border: 0; margin: 0; }
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Sous-onglets : soulignés, comme des onglets de page */
.sous-onglets { display: flex; gap: 28px; flex-wrap: wrap; border-bottom: 1px solid var(--filet); margin-top: -8px; }
.sous-onglets a { padding: 4px 0 12px; text-decoration: none; color: var(--gris); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sous-onglets a:hover { color: var(--noir); }
.sous-onglets a.actif { color: var(--noir); font-weight: 600; border-bottom-color: var(--noir); }

/* ---------------------------------------------------------------- boutons et champs */
button, .bouton {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer;
  border: 1px solid var(--noir); background: var(--noir); color: var(--blanc); padding: 0 16px; min-height: 40px; border-radius: 0;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
button:hover, .bouton:hover { background: var(--encre); border-color: var(--encre); }
button.second, .bouton.second { background: var(--blanc); color: var(--noir); border-color: var(--champ); }
button.second:hover, .bouton.second:hover { border-color: var(--noir); background: var(--blanc); }
button.or, .bouton.or { background: var(--or); color: var(--noir); border-color: var(--or); }
button.or:hover, .bouton.or:hover { background: var(--or-doc); border-color: var(--or-doc); }
button.danger { background: var(--blanc); color: var(--rouge); border-color: var(--rouge); }
button.danger:hover { background: var(--rouge-fond); }
button.lien { background: none; border: 0; min-height: 0; color: var(--or-fonce); padding: 2px 0; font-size: 13.5px; text-decoration: underline; text-underline-offset: 2px; }
button.lien:hover { background: none; color: var(--noir); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.petit, .bouton.petit { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--encre); letter-spacing: 0; text-transform: none; min-width: 0; }
label.case { flex-direction: row; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
label.case input { width: 16px; height: 16px; accent-color: var(--noir); flex: none; }
input, select, textarea {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--noir); background: var(--blanc); border: 1px solid var(--champ);
  border-radius: 0; padding: 0 12px; min-height: 40px; width: 100%; min-width: 0;
}
textarea { padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--or); outline-offset: -1px; border-color: var(--or); }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: auto; accent-color: var(--noir); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
textarea.mail { min-height: 220px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 400; }
.form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
.form .large { grid-column: 1 / -1; }
.form.adresses { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.form.adresses textarea { min-height: 130px; }
.barre { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.barre > label { flex: 1 1 160px; }

/* Filtres du stock : segments + champ */
.barre-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.segments { display: flex; flex-wrap: wrap; border: 1px solid var(--filet); }
.segments button { min-height: 36px; padding: 0 14px; border: 0; border-left: 1px solid var(--filet); background: var(--blanc); color: var(--noir); font-weight: 500; }
.segments button:first-child { border-left: 0; }
.segments button:hover { background: var(--gris-clair); }
.segments button span { color: var(--gris); font-weight: 500; }
.segments button.actif { background: var(--noir); color: var(--blanc); font-weight: 600; }
.segments button.actif span { color: var(--ecru); }
.filtre-q { flex: 1 1 220px; max-width: 340px; }
.filtre-q input { min-height: 36px; }

/* ---------------------------------------------------------------- tableaux (style Stripe) */
.tableau { overflow-x: auto; border: 1px solid var(--filet); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--filet); white-space: nowrap; background: var(--blanc); }
td { padding: 12px 16px; border-bottom: 1px solid var(--filet-doux); vertical-align: middle; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.cliquable { cursor: pointer; }
tbody tr.cliquable:hover td { background: var(--ecru-clair); }
tr.groupe td { background: var(--gris-clair) !important; color: var(--encre); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--filet); }
td.ref { font-weight: 600; color: var(--noir); white-space: nowrap; }
td.ref .sous { font-size: 12px; font-weight: 400; color: var(--gris); margin-top: 2px; }
td .sous { font-size: 12px; color: var(--gris); margin-top: 2px; }
td.qte { font-size: 15px; font-weight: 600; color: var(--noir); }
td.qte.fort { font-size: 17px; }
td.qte small { font-size: 11px; font-weight: 600; color: var(--gris); margin-left: 3px; }
td.qte.neg, td.neg { color: var(--rouge); }
.zero { color: #B0B0B0; font-weight: 500; }
.vide { padding: 28px; text-align: center; color: var(--gris); border: 1px dashed var(--champ); }

/* Étiquettes de statut : toujours un mot, jamais la couleur seule */
.etq { display: inline-block; padding: 3px 8px; font-size: 11px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; background: var(--gris-clair); color: var(--encre); }
.etq.brouillon, .etq.inactif, .etq.arret { background: var(--blanc); color: var(--gris); border: 1px solid var(--champ); padding: 2px 7px; }
.etq.envoye, .etq.envoyee, .etq.info { background: var(--ecru); color: var(--or-fonce); }
.etq.pris, .etq.reponse, .etq.charge, .etq.attention { background: var(--orange-fond); color: var(--orange); }
.etq.recu, .etq.confirmee, .etq.ok, .etq.livree { background: var(--vert-fond); color: var(--vert); }
.etq.annule, .etq.annulee, .etq.critique { background: var(--rouge-fond); color: var(--rouge); }

/* Chiffres clés, alertes, cartes */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.chiffre { padding: 18px 20px; border: 1px solid var(--filet); }
.chiffre b { display: block; font-size: 28px; font-weight: 500; color: var(--noir); font-variant-numeric: tabular-nums; }
.chiffre span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); font-weight: 600; }
.chiffre.rouge b { color: var(--rouge); }
.alertes { display: flex; flex-direction: column; border: 1px solid var(--filet); }
.alerte { display: grid; grid-template-columns: 100px 170px 1fr; gap: 12px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--filet-doux); }
.alerte:last-child { border-bottom: 0; }
.alerte .ref a { color: var(--noir); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--or); }
.carte { border: 1px solid var(--filet); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; background: var(--blanc); min-width: 0; }
.carte .tete { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.carte .tete b { color: var(--noir); font-weight: 600; }
.carte .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cartes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ligne { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--filet); text-decoration: none; color: var(--noir); font-weight: 600; }
.ligne:hover { border-color: var(--or); background: var(--ecru-clair); }
.ligne + .ligne { margin-top: 8px; }
.ligne .l-info { font-variant-numeric: tabular-nums; color: var(--encre); white-space: nowrap; font-weight: 500; }
.ligne .l-titre { min-width: 0; }
pre.bloc { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 12.5px; color: var(--encre); background: var(--gris-clair); padding: 10px 12px; }

/* ---------------------------------------------------------------- BP */
.lignes-bp { display: flex; flex-direction: column; gap: 10px; }
.ligne-bp { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr auto; gap: 10px; align-items: end; }
.calcul { display: flex; gap: 28px; flex-wrap: wrap; padding: 16px 18px; border: 1px solid var(--filet); background: var(--blanc); }
.calcul div { display: flex; flex-direction: column-reverse; gap: 4px; }
.calcul b { font-size: 24px; font-weight: 600; color: var(--noir); font-variant-numeric: tabular-nums; }
.calcul span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); font-weight: 600; }
.qte-pal { display: flex; gap: 0; }
.qte-pal input { text-align: center; font-weight: 600; border-left: 0; border-right: 0; }
.qte-pal button { min-width: 40px; padding: 0 12px; font-size: 18px; line-height: 1; background: var(--gris-clair); color: var(--noir); border: 1px solid var(--champ); }
.qte-pal button:hover { background: var(--ecru); }
.l-pal { color: var(--or-fonce); font-weight: 600; }
.choix { display: flex; gap: 0; margin-bottom: 6px; flex-wrap: wrap; border: 1px solid var(--champ); width: max-content; max-width: 100%; }
.choix button { background: var(--blanc); color: var(--noir); border: 0; border-left: 1px solid var(--champ); min-height: 36px; padding: 0 14px; font-size: 13px; font-weight: 600; }
.choix button:first-child { border-left: 0; }
.choix button:hover { background: var(--gris-clair); }
.choix button.actif { background: var(--noir); color: var(--blanc); }
.choix.grand button { font-size: 14px; min-height: 42px; padding: 0 18px; }
.type-bp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 8px; }
.type-bp button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; min-height: 0; text-align: left; border: 1px solid var(--champ); background: var(--blanc); color: var(--noir); white-space: normal; }
.type-bp button b { font-size: 15px; font-weight: 600; }
.type-bp button span { font-size: 13px; color: var(--gris); font-weight: 400; }
.type-bp button.actif { border: 2px solid var(--noir); padding: 17px; background: var(--blanc); color: var(--noir); }
.type-bp button.actif span { color: var(--gris); }
.type-bp button:hover { background: var(--blanc); border-color: var(--noir); }
.bp-mode-paris .ligne-bp > label:has(.l-dlu) { display: none; }
.bp-mode-paris .ligne-bp { grid-template-columns: 2fr 1.5fr 1fr auto; }
section.etape { margin-top: 8px; padding: 22px 24px; border: 1px solid var(--filet); }
section.etape > h2::before, section.etape .reco-tete h2::before { counter-increment: etape; content: counter(etape); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 12px; background: var(--noir); color: var(--blanc); font-size: 13px; vertical-align: 1px; }
.reco-carte { padding: 22px 24px; border: 1px solid var(--or); background: var(--ecru-clair); gap: 14px; }
.reco-carte .reco-tete h2::before { background: var(--or); color: var(--noir); }
.reco-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.reco-tete p { margin: 6px 0 0 38px; font-size: 13px; color: var(--gris); }
.reco-tout { background: var(--or); border-color: var(--or); color: var(--noir); }
.reco-groupe { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--filet); }
.reco-groupe h3 { color: var(--noir); padding: 10px 14px; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.reco-ligne { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--blanc); border-bottom: 1px solid var(--filet-doux); }
.reco-ligne:last-child { border-bottom: 0; }
.reco-ligne.lent { background: transparent; }
.reco-groupe:has(.lent) { border-style: dashed; border-color: #B0B0B0; }
.reco-ligne.lent .vignette { opacity: .6; }
.reco-ref { display: flex; flex-direction: column; min-width: 0; }
.reco-ref b { color: var(--noir); font-size: 14px; }
.reco-ref span, .reco-chiffre span { font-size: 11px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reco-chiffre { display: flex; flex-direction: column; min-width: 0; font-variant-numeric: tabular-nums; }
.reco-chiffre b { color: var(--noir); font-size: 15px; }
button.reco { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 120px; padding: 6px 14px; background: var(--or); border: 1px solid var(--or); color: var(--noir); font-size: 13px; }
button.reco small { font-weight: 500; font-size: 11px; }
button.reco:hover { background: var(--or-doc); border-color: var(--or-doc); color: var(--noir); }
button.reco.second { background: var(--vert-fond); border-color: var(--vert-barre); color: var(--vert); }
.reco-alerte { padding: 12px 14px; background: var(--orange-fond); color: var(--orange); font-size: 13px; }
.reco-rien { margin: 0; font-size: 13px; color: var(--gris); }

/* ---------------------------------------------------------------- couverture, DLU, pastilles */
.pastille { display: inline-block; align-self: flex-start; padding: 3px 8px; font-weight: 600; font-size: 12px !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pastille.rouge { background: var(--rouge-fond); color: var(--rouge) !important; }
.pastille.orange { background: var(--orange-fond); color: var(--orange) !important; }
.pastille.vert { background: transparent; color: var(--noir) !important; padding-left: 0; }
.pastille.gris { background: var(--gris-clair); color: var(--gris) !important; }
.prev { display: flex; align-items: center; gap: 10px; }
.jauge { position: relative; display: inline-block; flex: none; width: 96px; height: 6px; background: var(--filet-doux); }
.jauge i { display: block; height: 100%; background: var(--vert-barre); }
.jauge i.orange { background: #C27A2C; } .jauge i.rouge { background: var(--rouge); } .jauge i.gris { background: #B0B0B0; }
.jauge em { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--or-fonce); }
.tend { font-weight: 700; font-size: 15px; line-height: 1; }
.tend.hausse { color: var(--vert); } .tend.baisse { color: var(--orange); }
.dlu { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--noir); }
.dlu.orange { color: var(--orange); } .dlu.rouge { color: var(--rouge); }
.rouge-txt { color: var(--rouge) !important; }
td.prev-col, td.dlu-col { white-space: nowrap; }
.illimite { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--vert); }
.lien-odoo { font-weight: 600; color: var(--or-fonce); text-decoration: underline; text-underline-offset: 2px; }
.synthese { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.synth-bloc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 16px; border: 1px solid var(--or); background: var(--ecru-clair); min-width: 0; }
.synth-bloc h3 { flex: 1 0 100%; color: var(--noir); }
.synth-item { padding: 4px 10px; font-size: 12px; background: var(--blanc); border: 1px solid var(--filet); }
.synth-item.rouge { background: var(--rouge-fond); color: var(--rouge); border-color: transparent; }
.synth-item.orange { background: var(--orange-fond); color: var(--orange); border-color: transparent; }
button.lots { background: none; border: 0; min-height: 0; color: var(--noir); font-size: 15px; font-weight: 600; padding: 0; display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; border-bottom: 1px solid var(--or); }
button.lots:hover { background: none; color: var(--or-fonce); }
button.lots span { font-size: 11px; font-weight: 600; color: var(--or-fonce); }

/* Vignette produit */
.ref-photo { display: flex; align-items: center; gap: 12px; }
.ref-photo > div { min-width: 0; }
.vignette { width: 40px; height: 40px; flex: none; object-fit: contain; background: var(--blanc); border: 1px solid var(--filet); padding: 2px; }
.vignette.vide { display: inline-block; background: var(--gris-clair); }

/* ---------------------------------------------------------------- fenêtres, panneau de détail, notifications */
dialog { border: 1px solid var(--filet); border-top: 2px solid var(--or); border-radius: 0; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--encre); background: var(--blanc); }
dialog::backdrop { background: rgba(20, 18, 14, .32); }
dialog .contenu { padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: calc(100vh - 128px); }
dialog .contenu > h2 { font-size: 20px; font-weight: 600; }
dialog .pied { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 24px; border-top: 1px solid var(--filet); background: var(--blanc); flex-wrap: wrap; }
dialog.tiroir { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); height: 100vh; max-height: 100vh; border-top: 0; border-left: 1px solid var(--filet); }
dialog.tiroir[open] { display: flex; flex-direction: column; }
dialog.tiroir form { display: flex; flex-direction: column; height: 100%; }
dialog.tiroir .contenu { flex: 1 1 auto; max-height: none; }
dialog.tiroir .pied { justify-content: flex-start; }
dialog.tiroir::backdrop { background: rgba(20, 18, 14, .18); }
.mail-tete { display: grid; grid-template-columns: 56px 1fr; gap: 6px 10px; align-items: center; font-size: 13px; }
.mail-tete span { color: var(--gris); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.avert { padding: 12px 14px; background: var(--orange-fond); color: var(--orange); font-size: 13px; }
.avert.rouge { background: var(--rouge-fond); color: var(--rouge); }
.avert.vert { background: var(--vert-fond); color: var(--vert); }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--noir); color: var(--blanc); padding: 12px 18px; font-size: 13px; z-index: 60; max-width: calc(100vw - 32px); }
#toast.erreur { background: var(--rouge); }
.chargement { color: var(--gris); padding: 40px 0; text-align: center; letter-spacing: .2em; font-size: 11px; text-transform: uppercase; }
.signature { border: 1px solid var(--filet); padding: 14px 16px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background: var(--blanc); overflow-x: auto; }

/* Recherche Odoo dans un champ, et recherche universelle */
.suggestions { position: absolute; z-index: 45; top: 100%; left: 0; right: 0; background: var(--blanc); border: 1px solid var(--or); max-height: 340px; overflow-y: auto; }
.suggestions button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 0; background: var(--blanc); color: var(--noir); border: 0; border-bottom: 1px solid var(--filet-doux); padding: 10px 12px; font-size: 13.5px; text-align: left; white-space: normal; }
.suggestions button:hover { background: var(--ecru-clair); }
.suggestions button span { font-size: 12px; font-weight: 400; color: var(--gris); }
.suggestions .aucun { padding: 10px 12px; color: var(--gris); font-size: 13px; }

/* Connexion */
.connexion { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding-inline: 16px; }
.connexion p { max-width: 420px; color: var(--gris); }
.logo-complet { width: 230px; max-width: 70vw; height: auto; }
.titre-module { display: grid; gap: 4px; }
.titre-module small { font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--or-fonce); font-weight: 600; }
.titre-module b { font-size: 26px; font-weight: 600; color: var(--noir); }

/* ---------------------------------------------------------------- enlèvements par jour */
.filtres-enl { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.jour { margin-top: 12px; }
.jour-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--gris-clair); color: var(--noir); padding: 10px 14px; font-size: 14px; font-weight: 600; margin: 0 0 8px; border-bottom: 1px solid var(--filet); }
.jour-titre::first-letter { text-transform: uppercase; }
.jour-titre span { font-size: 12.5px; font-weight: 500; color: var(--gris); }
.jour.aujourdhui .jour-titre { background: var(--ecru); }
.jour.aujourdhui .jour-titre span { color: var(--or-fonce); }
.jour.route .jour-titre { background: var(--blanc); border: 1px dashed var(--champ); }
.enl { display: grid; grid-template-columns: 76px 1fr auto auto auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--filet); background: var(--blanc); }
.enl + .enl { margin-top: 6px; }
.enl-lieu { font-weight: 700; font-size: 12px; letter-spacing: .1em; text-align: center; padding: 6px 0; border: 1px solid var(--noir); }
.enl-lieu.dyad { background: var(--noir); color: var(--blanc); }
.enl-lieu.paris { background: var(--blanc); color: var(--noir); border-color: var(--or); }
.enl-corps { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--noir); }
.enl-corps b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.enl-pal { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.enl-pal small { font-size: 12px; font-weight: 500; }

/* ---------------------------------------------------------------- films : Fichier échange */
.echange-etat { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--filet); background: var(--blanc); color: var(--encre); font-size: 13.5px; margin-bottom: 12px; }
.echange-etat b { color: var(--noir); }
.echange-etat b.or { color: var(--or-fonce); font-size: 15px; }
.nf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.nf .choix { margin-top: 4px; }
.nf-titre { margin: 16px 0 6px; }
.tab-defil { overflow-x: auto; max-width: 100%; }
table.ligne-echange { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
table.ligne-echange th { background: var(--gris-clair); color: var(--noir); font-size: 10.5px; padding: 6px 8px; border-bottom: 1px solid var(--filet); }
table.ligne-echange td { border: 1px solid var(--filet); padding: 6px 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.ligne-echange td.fort { font-weight: 700; font-size: 14px; }
.liste-films { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.liste-films button { display: grid; grid-template-columns: 90px 90px 1fr auto auto; gap: 10px; align-items: center; text-align: left; min-height: 0; background: var(--blanc); color: var(--noir); border: 1px solid var(--filet); padding: 10px 12px; font-size: 13px; font-weight: 600; white-space: normal; }
.liste-films button:hover, .liste-films button.actif { border-color: var(--or); background: var(--ecru-clair); }
.liste-films button .or { color: var(--or-fonce); font-weight: 700; }
#nf-r-liste { margin-top: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }


/* Panneau de détail : tableaux plus serrés ; zone défilante sans contour au focus */
dialog.tiroir th, dialog.tiroir td { padding: 8px 10px; font-size: 13px; }
dialog.tiroir td { white-space: nowrap; }
.tableau:focus { outline: none; }

/* ---------------------------------------------------------------- téléphone : barre d'onglets en bas */
@media (max-width: 860px) {
  .coque { flex-direction: column; }
  .entete { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--filet); overflow: visible; }
  .entete .haut { flex-direction: row; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
  .marque { padding: 0; }
  .marque-mot { display: none; }
  .module-btn { width: auto; padding: 6px 28px 6px 10px; }
  .module-btn small { font-size: 9px; }
  .module-btn b { font-size: 13px; }
  .lat-pied { margin: 0; padding: 0; flex-direction: row; align-items: center; gap: 10px; }
  .lat-pied .synchro, .lat-pied .moi-txt, .lat-pied > a.discret { display: none; }
  .onglets { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; flex-direction: row; gap: 0; background: var(--blanc); border-top: 1px solid var(--filet); padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .onglets a { flex: 1 1 0; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--gris); text-align: center; }
  .onglets a.actif { background: none; color: var(--noir); }
  .onglets a.actif svg { color: var(--or-fonce); }
  .barre-haut { position: static; padding: 10px 16px; }
  .recherche-g { flex: 1 1 auto; }
  .barre-haut .espace { display: none; }
  #btn-nouveau { padding: 0 14px; }
  .titre-vue .actions { margin-left: 0; }
  .titre-vue .actions button, .titre-vue .actions .bouton { min-height: 36px; padding: 0 12px; font-size: 12.5px; }
  .recherche-g kbd { display: none; }
  main { padding-inline: 16px; padding-block: 20px 110px; gap: 18px; }
  h1 { font-size: 24px; }
  .sous-onglets { gap: 18px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .sous-onglets a { white-space: nowrap; }
  .alerte { grid-template-columns: 1fr; gap: 2px; }
  .type-bp { grid-template-columns: 1fr; }
  .ligne { grid-template-columns: 1fr auto; } .ligne .l-info { grid-column: 1 / -1; }
  .enl { grid-template-columns: 64px 1fr auto; } .enl > :nth-child(n+4) { grid-column: 2 / -1; justify-self: start; }
  .nf { grid-template-columns: 1fr; }
  .liste-films button { grid-template-columns: 1fr 1fr; }
  td, th { padding: 10px 8px; }
  td.ref { white-space: normal; font-size: 13.5px; }
  td.qte.fort { font-size: 15.5px; }
  .vignette { width: 34px; height: 34px; } .ref-photo { gap: 8px; }
  .jauge { width: 56px; }
  section.etape, .reco-carte { padding: 16px; }
  .reco-ligne { grid-template-columns: 36px minmax(0, 1fr) auto; row-gap: 4px; }
  .reco-ligne > .vignette, .reco-ligne > button.reco { grid-row: span 2; }
  .reco-ligne .reco-chiffre { display: none; }
  .reco-ligne .reco-chiffre:last-of-type { display: flex; flex-direction: row; gap: 6px; align-items: center; grid-column: 2; }
  .reco-ligne button.reco { min-width: 0; }
  .reco-tete p { margin-left: 0; }
  .ligne-bp { grid-template-columns: 1fr 1fr; padding-bottom: 12px; border-bottom: 1px solid var(--filet); }
  .ligne-bp > :first-child, .ligne-bp > :nth-child(2) { grid-column: 1 / -1; }
  .bp-mode-paris .ligne-bp { grid-template-columns: 1fr 1fr; }
  dialog.tiroir { width: 100vw; }
}
