/* BOTTEGA SUPPLY — thème Bottega Renzini (charte « Corporate Identity » : BROWN, LIGHT IVORY, DARK RED en secondaire),
   au-dessus du socle style.css de Solid Coaching */
:root {
  --bg: #f8f1e2; --card: #fffcf5; --ink: #2b1a10; --muted: #7a6656; --line: #e7dcc6;
  --head: #4b2a17; --head-ink: #f6ead0; --brand: #d8b98a;
  --accent: #5e3520; --accent-ink: #f6ead0; --accent-soft: #f1e4cc;
  --red: #7d1d2c; --red-soft: #f6e1e1;
  --gold: #9a6b2a; --gold-soft: #f6ebd5;
  --good: #3f6b2f; --bad: #9e2230; --warn: #9a5b00; --warn-soft: #fbefd6;
  --radius: 14px; --shadow: 0 1px 2px rgba(75,42,23,.06), 0 6px 20px rgba(75,42,23,.06);
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1a120c; --card: #24190f; --ink: #f3e7d0; --muted: #b39e86; --line: #3a2a1c; --head: #120c07;
    --accent: #d8b98a; --accent-ink: #24190f; --accent-soft: #3a2817; --red: #e07a86; --red-soft: #3b1a1d; --gold-soft: #33261a; --warn-soft: #33260f; --shadow: none; }
}
body { background: var(--bg); }
h1, h2 { font-family: var(--titre); letter-spacing: 0; }
h1 { font-weight: 700; color: var(--head); }
@media (prefers-color-scheme: dark) { h1 { color: var(--ink); } }
.topbar { height: 64px; box-shadow: 0 2px 0 var(--red); }
.brand { gap: .55rem; }
.brand-logo { height: 42px; width: auto; }
.brand-sub { color: var(--brand); font-weight: 600; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; }
.logo-login { width: min(420px, 90%); height: auto; margin: 0 0 1rem; }
.login-hero p { color: var(--muted); }
.nav a { color: #e9d9bd; }
.nav a:hover { color: #fff; background: rgba(246,234,208,.08); }
.nav a.on { color: #fff; background: rgba(246,234,208,.12); box-shadow: inset 0 -2px 0 var(--brand); }
.nav .nav-out { color: #b89f80; }
.btn { border-radius: 10px; letter-spacing: .01em; }
.btn.danger { color: var(--red); border-color: var(--red); }
.card { border-radius: var(--radius); }
.card.alert { border-color: var(--red); background: var(--red-soft); }
.tabs a.on { border-color: var(--red); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi-lib, .tbl th, .inv-cat { letter-spacing: .12em; }
.flash-ok { background: #eef3e4; color: #3f5a24; }
.vue-comme-band { background: var(--red); }
.vue-comme-band .btn { color: var(--red); background: #fff; }
.onglets a.on { color: var(--accent); background: var(--accent-soft); }
@media (prefers-color-scheme: dark) { .onglets a.on { color: var(--accent); } }
.foot { letter-spacing: .04em; }
/* liseré tricolore discret sous les titres de carte */
.card > h2:first-child, .card > .head h2 { padding-bottom: .15rem; }
.action-g svg { color: var(--red) !important; }

/* sélecteur de boutique dans l'en-tête */
.boutique-sel { margin: 0; min-width: 0; }
.boutique-sel select { margin: 0; padding: 5px 8px; border-radius: 8px; font-size: .85rem; max-width: 220px; background: rgba(246,234,208,.1); color: #f6ead0; border: 1px solid rgba(246,234,208,.3); }
.boutique-sel select option { color: #111; background: #fff; }
.boutique-sel span { font-size: .85rem; color: #d9d4c7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 46vw; }

/* chiffres */
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.in-num { width: 5.2em; text-align: right; margin: 0; padding: .4rem .45rem; }
.in-sel { width: auto; margin: 0; padding: .35rem .45rem; font-size: .85rem; }
.off { opacity: .55; }
.inline-h { display: inline; margin: 0; }
details > summary { cursor: pointer; }
.kpi.link { color: inherit; text-decoration: none; display: block; }
.kpi.link:hover { border-color: var(--accent); }
.narrow { max-width: 620px; }
.show-sm { display: none; }
@media (max-width: 760px) { .show-sm { display: inline; } .tbl .badge { white-space: nowrap; } }

/* statuts */
.st-brouillon { background: var(--line); }
.st-a_valider { background: var(--red-soft); color: var(--red); }
.st-validee { background: var(--accent-soft); color: var(--accent); }
.st-envoyee { background: #e6eefb; color: #2856a6; }
.st-partielle { background: var(--warn-soft); color: var(--warn); }
.st-recue, .st-cloturee { background: #e5f5ea; color: #155f34; }
.st-annulee { background: #fde8e6; color: #962a22; }
.mv-consommation { background: #fde8e6; color: #962a22; }
.mv-reception { background: #e5f5ea; color: #155f34; }
.mv-inventaire { background: #e6eefb; color: #2856a6; }
.mv-correction, .mv-transfert { background: var(--line); }
.role-superadmin { background: var(--head); color: #fff; } .role-admin { background: var(--gold-soft); color: var(--gold); } .role-vendeur { background: var(--accent-soft); color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .st-recue, .st-cloturee, .mv-reception { background: #13301f; color: #8fe0ae; } .st-annulee, .mv-consommation { background: #3a1714; color: #f3a69f; }
  .st-envoyee, .mv-inventaire { background: #172840; color: #9cc0f2; }
}

/* accueil : grandes actions */
.actions-grandes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 18px; }
.action-g { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 14px 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; color: var(--ink); font-weight: 700; text-align: center; text-decoration: none !important; box-shadow: var(--shadow); }
.action-g svg { width: 30px; height: 30px; color: var(--accent); }
.action-g:active, .action-g:hover { border-color: var(--accent); background: var(--accent-soft); }
.liste-f li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.liste-f li:last-child { border: 0; }

/* conso : recherche et liste d'articles tactile */
.filtre-art { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 8px 0 4px; }
.filtre-art input[type=search] { font-size: 1.05rem; padding: .75rem .9rem; margin: 0 0 8px; }
.filtre-art .chips { margin-bottom: 4px; }
.liste-art { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.liste-art li a { display: flex; flex-direction: column; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.liste-art li:last-child a { border-bottom: 0; }
.liste-art li a:active, .liste-art li a:hover { background: var(--accent-soft); }
.liste-art li a > span:first-child { font-weight: 600; }
.tuiles { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; }
.tuile { flex: none; max-width: 180px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 600; font-size: .88rem; text-decoration: none !important; border: 1px solid transparent; }
.tuile:active, .tuile:hover { border-color: var(--accent); }
.annuler { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px 0 10px; }

/* carte de saisie */
.saisie { border: 2px solid var(--accent); box-shadow: 0 8px 26px rgba(75,42,23,.12); }
.saisie-t { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.saisie-t strong { font-size: 1.15rem; }
.stepper { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.stepper button { width: 58px; height: 58px; flex: none; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.9rem; font-weight: 700; cursor: pointer; }
.stepper button:active { background: var(--accent-soft); border-color: var(--accent); }
.stepper input { width: 110px; height: 58px; margin: 0; text-align: center; font-size: 1.6rem; font-weight: 800; }
.stepper .unite { color: var(--muted); font-weight: 600; }
.rapides { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rapides .chip { padding: 8px 16px; font-size: 1rem; background: var(--card); cursor: pointer; }

/* inventaire */
.liste-inv { list-style: none; margin: 0 0 12px; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.liste-inv li { border-bottom: 1px solid var(--line); }
.liste-inv li:last-child { border: 0; }
.liste-inv label { display: flex; align-items: center; gap: 12px; padding: 9px 14px; margin: 0; font-weight: 500; }
.inv-nom { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.liste-inv input { width: 92px; flex: none; margin: 0; text-align: right; font-size: 1.1rem; font-weight: 700; padding: .55rem .6rem; }
.liste-inv input:not(:placeholder-shown) { border-color: var(--accent); background: var(--accent-soft); }
.inv-cat { padding: 7px 14px !important; background: var(--bg); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.barre-valider { position: sticky; bottom: 0; z-index: 6; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 10px 0 12px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) { body:has(.onglets) .barre-valider { bottom: calc(80px + env(safe-area-inset-bottom)); } .barre-valider .btn.big { flex: 1; justify-content: center; } }

/* réception */
.bl-photos { display: flex; gap: 10px; overflow-x: auto; margin: 0 0 12px; }
.bl-photos img { height: 150px; width: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
.bl-pdf { display: flex; align-items: center; justify-content: center; width: 110px; height: 150px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-weight: 700; text-align: center; }
.rec-ligne { padding: 12px 14px; margin-bottom: 10px; }
.rec-ligne.inconnu { border-color: var(--warn); background: var(--warn-soft); }
.rec-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 10px; }
.rec-grid label { font-size: .82rem; font-weight: 600; margin-bottom: 6px; }
.rec-grid .check { align-self: end; }
.file-btn { cursor: pointer; }
.si-sans-cmd { }
.drop { display: block; }

/* fiches */
.offre { padding: 10px 0; border-bottom: 1px solid var(--line); }
.offre:last-of-type { border-bottom: 0; }
.offre-form { margin-top: 8px; padding: 12px; background: var(--bg); border-radius: 10px; }
.jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 10px; }
.jour { background: var(--bg); border-radius: 10px; padding: 8px; }
.jour.on { background: var(--accent-soft); }
.jour label { margin-bottom: 4px; }
.jour input, .jour select { padding: .35rem .4rem; font-size: .85rem; }
.empl { margin-bottom: 8px; }
.empl input[name=nom] { flex: 1 1 200px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 .85rem; padding: 8px 12px; }

@media (max-width: 980px) { .jours { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
  .actions-grandes { grid-template-columns: 1fr 1fr; }
  .rec-grid { grid-template-columns: 1fr 1fr; } .rec-grid .rec-art { grid-column: 1 / -1; }
  .jours { grid-template-columns: repeat(2, 1fr); }
  .topbar { gap: .6rem; padding: 0 14px; }
  .brand-sub { display: none; }
  .brand-logo { height: 36px; }
  .grid3 { grid-template-columns: 1fr; }
}
@media print { .topbar, .onglets, .foot, .actions, .barre-valider { display: none !important; } }

/* menu : burger dès que la barre ne tient plus sur une ligne */
@media (max-width: 1320px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--head); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-open .nav { display: flex; }
  .nav .nav-user { margin-left: 0; }
  .boutique-sel { margin-left: auto; }
  .burger { margin-left: 0; }
}
.filters select, .filters input { min-width: 0; max-width: 100%; }

.copie { display: flex; gap: 8px; margin: 6px 0 10px; }
.copie input { margin: 0; flex: 1; font-size: .85rem; }

/* import de tarifs */
#progression { margin-top: 12px; }
.barre { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
tr.tl-hausse td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.tl-baisse td:first-child { box-shadow: inset 3px 0 0 var(--good); }
tr.tl-nouveau td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
