/* ===== Base ===== */
:root {
  --bg: #f7f2ea;
  --card: #ffffff;
  --ink: #2a211a;
  --muted: #7b6d60;
  --line: #e7ddcf;
  --soft: #f3ece2;
  --green: #2f5d3a;
  --green-2: #3f7a4c;
  --green-soft: #e4efe3;
  --red: #b42318;
  --orange: #c2570c;
  --pink: #f6c9d0;
  --yellow: #fff3a6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 4px 14px rgba(60, 40, 20, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 16px/1.45 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.ok { color: var(--green-2); }
.center { text-align: center; }
.r { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
ul.plain { padding-left: 1.1em; margin: 0 0 .8em; }
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ===== Boutons & champs ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .55em 1.1em; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: 600 .95rem var(--font); text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 36px; padding: .35em .8em; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-paid { background: var(--green-soft); border-color: #b9d6b8; color: var(--green); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: #fdecea; }
.btn-light { background: #fff; color: var(--green); border-color: #fff; }
.btn-accent { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.linklike { background: none; border: 0; padding: 0; color: var(--green); font: inherit; text-decoration: underline; cursor: pointer; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn.danger:hover { background: #fdecea; color: var(--red); border-color: #f5c2bd; }

input, select, textarea {
  font: 16px var(--font); color: var(--ink); background: #fff; border: 1px solid #d9cdbd;
  border-radius: 9px; padding: .55em .7em; width: 100%; min-height: 44px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc49f; outline-offset: 0; border-color: var(--green-2); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); flex: none; }
.field { display: flex; flex-direction: column; gap: .3em; margin-bottom: .9em; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.check { display: flex; align-items: center; gap: .6em; margin: .4em 0 .9em; cursor: pointer; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 0 1em; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
}
@media (min-width: 980px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ===== Cartes, tags, messages ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: .6em; }
.card-head h2 { margin: 0; }
.card-alert { border-color: #c7d7fb; background: #f5f8ff; }
.card-ok { border-color: #b9d6b8; background: var(--green-soft); }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15em .55em; border-radius: 99px; background: var(--soft); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.tag-ok { background: var(--green-soft); color: var(--green); }
.tag-off { background: #eee; color: #777; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: .2em .7em; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, white); border: 1px solid color-mix(in srgb, var(--c) 30%, white); vertical-align: middle; white-space: nowrap; }
.flash { padding: .8em 1em; border-radius: 10px; margin-bottom: 14px; background: var(--green-soft); border: 1px solid #b9d6b8; color: var(--green); font-weight: 600; }
.flash-err { background: #fdecea; border-color: #f5c2bd; color: var(--red); }
.note-box { background: #fffbe6; border: 1px solid #f1e3a0; border-radius: 10px; padding: .7em .9em; font-size: .92rem; }
.warn { color: var(--red); font-weight: 600; }

/* ===== Mise en page gestion ===== */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--green); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; margin-right: auto; }
.brand small { display: block; font-weight: 500; font-size: .72rem; opacity: .75; letter-spacing: .04em; text-transform: uppercase; }
.brand-mark { font-size: 26px; width: 40px; height: 40px; border-radius: 12px; background: var(--pink); display: grid; place-items: center; }
.menu-btn { display: none; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu-btn .ic { width: 24px; height: 24px; }
.mainnav { display: flex; flex-wrap: wrap; gap: 2px; }
.mainnav a { color: #e8f0e8; text-decoration: none; padding: .5em .7em; border-radius: 9px; font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: .4em; }
.mainnav a .ic { width: 17px; height: 17px; }
.mainnav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.mainnav a.on { background: rgba(255, 255, 255, .2); color: #fff; }
.mainnav a.nav-cta { background: var(--yellow); color: var(--ink); }
@media (min-width: 1081px) and (max-width: 1500px) { .mainnav a .ic { display: none; } .mainnav a { padding: .5em .6em; font-size: .86rem; } }
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 120px; }
.tabbar { display: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-head .sub { display: block; font-size: .95rem; color: var(--muted); font-weight: 500; margin-top: .2em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cols-2 { display: grid; gap: 0 16px; }
@media (min-width: 860px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .mainnav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0;
    background: var(--green); padding: 6px 10px 14px; box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
  }
  .nav-open .mainnav { display: flex; }
  .mainnav a { padding: .8em .8em; font-size: 1rem; }
  .mainnav a.nav-cta { margin: 4px 0; }
}
@media (max-width: 720px) {
  h1 { font-size: 1.35rem; }
  .wrap { padding: 14px 12px 150px; }
  .card { padding: 14px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600; }
  .tabbar a.on { color: var(--green); }
  .tabbar a.tab-cta .ic { background: var(--green); color: #fff; border-radius: 12px; width: 40px; height: 30px; padding: 4px 9px; margin-top: -2px; }
}

/* ===== Accueil ===== */
.hello h1 { margin-bottom: .1em; }
.hello { margin-bottom: 14px; }
.quick { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
@media (min-width: 860px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick-btn { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.quick-btn .ic { width: 26px; height: 26px; color: var(--green); margin-bottom: 6px; }
.quick-btn span { font-size: .82rem; color: var(--muted); }
.quick-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.quick-btn.primary .ic, .quick-btn.primary span { color: #fff; opacity: .9; }
.pickups { display: grid; gap: 8px; margin-bottom: 12px; }
.pickup { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--soft); border-radius: 10px; }
.pickup-l { display: flex; flex-direction: column; }
.pickup-n { text-align: center; text-decoration: none; color: var(--ink); min-width: 70px; }
.pickup-n b { display: block; font-size: 1.5rem; color: var(--green); line-height: 1; }
.pickup-n small { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { text-decoration: none; color: var(--c); padding: .35em .8em; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 30%, white); background: color-mix(in srgb, var(--c) 8%, white); font-size: .88rem; }

/* ===== Listes de commandes ===== */
.filters { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; padding-bottom: 6px; }
.filters .field { flex: 1 1 160px; }
.filters .field.grow { flex: 2 1 240px; }
.filters .btn, .filters .check { margin-bottom: .9em; }
.list-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 2px 10px; }
.list-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.olist { display: flex; flex-direction: column; gap: 8px; }
.orow { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
a.orow:hover, .o-main:hover { background: #fffdf9; }
.card .orow { background: #fff; }
.o-id { font-size: .8rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.o-who { display: flex; flex-direction: column; min-width: 0; }
.o-who small, .o-pick small, .o-tot small { color: var(--muted); display: block; }
.o-pick { font-size: .9rem; }
.o-tot { font-weight: 700; text-align: right; white-space: nowrap; }
.orow > .o-pick { grid-column: 2; }
.orow > .o-st, .orow > .o-tot { grid-column: 2; text-align: left; }
@media (min-width: 720px) {
  a.orow { grid-template-columns: 64px 1.4fr 1fr auto; }
  .orow > .o-pick, .orow > .o-st, .orow > .o-tot { grid-column: auto; }
  .orow > .o-tot { text-align: right; }
}
.orow-full, .camp-row { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
.o-main { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.o-main .o-pick { grid-column: 2 / 4; }
.o-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px 12px; border-top: 1px dashed var(--line); }
.o-actions form { margin: 0; }
.status-sel { width: auto; min-height: 36px; padding: .3em .6em; font-weight: 700; font-size: .88rem; color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, white); background: color-mix(in srgb, var(--c) 7%, white); }
@media (min-width: 860px) {
  .orow-full, .camp-row { grid-template-columns: 1fr auto; align-items: center; }
  .o-main { grid-template-columns: 64px 1.3fr 1fr 150px; }
  .o-main .o-pick { grid-column: auto; }
  .o-actions { border-top: 0; padding: 8px 14px; justify-content: flex-end; }
}
.camp-row .o-main { grid-template-columns: 1fr auto; }
.is-off { opacity: .55; }

/* ===== Formulaire de commande ===== */
.order-form h2 { margin-bottom: .4em; }
.og-jump { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; margin-bottom: 4px; scrollbar-width: thin; }
.og-jump a { flex: none; text-decoration: none; padding: .35em .8em; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.og-jump a.off { opacity: .5; text-decoration: line-through; }
.og-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.og-title { font-size: 1.1rem; color: var(--green); }
.og-note { color: var(--red); font-size: .88rem; font-weight: 600; }
.og-sub { font-size: .85rem; color: var(--muted); margin: 12px 0 6px; }
.og-colis { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.og-pack { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fffdf8; transition: border-color .15s, background .15s; }
.og-pack.on { border-color: var(--green-2); background: var(--green-soft); }
.og-pack-l { display: flex; flex-direction: column; line-height: 1.2; }
.og-pack-l span { font-size: .85rem; color: var(--muted); }
.stepper { display: flex; align-items: center; border: 1px solid #d9cdbd; border-radius: 10px; overflow: hidden; background: #fff; flex: none; }
.stepper button { width: 38px; height: 42px; border: 0; background: var(--soft); font-size: 20px; cursor: pointer; color: var(--ink); }
.stepper button:active { background: #e6dccd; }
.stepper input { width: 44px; min-height: 42px; border: 0; border-radius: 0; text-align: center; padding: 0; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.og-items { display: flex; flex-direction: column; }
.og-item { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "info price" "qty qty" "note note"; gap: 6px 10px; padding: 10px 4px; border-bottom: 1px solid var(--soft); align-items: center; }
.og-item.has-qty { background: #f6fbf5; border-radius: 8px; }
.og-info { grid-area: info; min-width: 0; }
.og-name { font-weight: 600; }
.og-detail { font-size: .8rem; color: var(--muted); }
.og-price { grid-area: price; font-weight: 700; white-space: nowrap; }
.og-price small { font-weight: 500; color: var(--muted); }
.og-qty { grid-area: qty; display: flex; gap: 6px; }
.og-qty input { width: 90px; text-align: center; font-weight: 700; }
.og-qty select { width: auto; }
.og-note-in { grid-area: note; display: none; min-height: 38px; font-size: 15px; }
.og-item.has-qty .og-note-in { display: block; }
@media (min-width: 720px) {
  .og-item { grid-template-columns: 1fr 110px 190px; grid-template-areas: "info price qty" "note note note"; }
  .og-price { text-align: right; }
  .og-qty { justify-content: flex-end; }
}
.extra-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; margin-bottom: 8px; }
.stickybar {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 -4px; padding: 10px 14px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -4px 20px rgba(60, 40, 20, .1);
}
.sb-total { margin-right: auto; display: flex; flex-direction: column; line-height: 1.2; }
.sb-total b { font-size: 1.2rem; }
.sb-total small { color: var(--muted); }
@media (max-width: 720px) {
  .admin .stickybar { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .stickybar .btn { flex: 1; }
  .stickybar .sb-total { flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* ===== Détail commande ===== */
.big-tel a { font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 .8em; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; }
.status-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.step { flex: 1 1 110px; min-height: 46px; border-radius: 10px; border: 2px solid color-mix(in srgb, var(--c) 30%, white); background: #fff; color: var(--c); font: 700 .92rem var(--font); cursor: pointer; }
.step.on { background: var(--c); color: #fff; border-color: var(--c); }
.paid-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tfoot td { border-bottom: 0; padding-top: 12px; }
.tr-group td { background: var(--soft); font-weight: 700; color: var(--green); }
.big-n { font-size: 1.25rem; font-weight: 800; }
.num-in { width: 96px; text-align: right; min-height: 40px; }
.total-big { font-size: 1.3rem; }
@media (max-width: 720px) {
  .weigh thead { display: none; }
  .weigh tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .weigh td { border: 0; padding: 2px 0; text-align: left !important; }
  .weigh td:first-child { grid-column: 1 / -1; }
  .weigh td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; }
  .weigh td:empty { display: none; }
  .weigh tfoot tr { display: flex; justify-content: space-between; }
  .num-in { width: 100%; text-align: left; }
}
.form-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; }
.form-foot .check { margin: 0 auto 0 0; }
.danger-zone { text-align: right; margin: -4px 0 16px; }

/* ===== Catalogue ===== */
.sec-card { scroll-margin-top: 80px; }
.sec-card.is-off { background: #faf8f5; }
.sec-card.is-off .ptable { opacity: .55; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.sec-name { flex: 1 1 220px; font-size: 1.15rem; font-weight: 800; color: var(--green); border-color: transparent; background: transparent; padding-left: 4px; }
.sec-name:hover { border-color: var(--line); }
.sec-tools { display: flex; gap: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .88rem; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 42px; height: 24px; border-radius: 99px; background: #cfc5b8; position: relative; transition: background .15s; flex: none; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + .sw { background: var(--green-2); }
.switch input:checked + .sw::after { left: 21px; }
.switch input:focus-visible + .sw { outline: 2px solid #9cc49f; outline-offset: 2px; }
.sec-settings { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.sec-settings summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); padding: 4px 0; }
.sec-settings[open] summary { margin-bottom: 10px; }
.sec-settings .tag { background: #fff; }
.percent-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.percent-row .field { flex: 1 1 260px; }
.percent-row .btn { margin-bottom: .9em; }
.ptable { display: flex; flex-direction: column; }
.prow { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); grid-template-columns: repeat(6, 1fr); align-items: end; }
.prow.is-off { opacity: .5; }
.prow .pc { display: flex; flex-direction: column; gap: 2px; min-width: 0; grid-column: span 2; }
.prow .pc-name { grid-column: 1 / -1; }
.prow .pc-av, .prow .pc-tools { grid-column: span 3; align-self: center; }
.prow .pc-name input { font-weight: 700; }
.prow .lbl { font-size: .72rem; color: var(--muted); font-weight: 600; }
.prow .pc-av { flex-direction: row; }
.prow .pc-tools { flex-direction: row; justify-content: flex-end; gap: 4px; }
.prow input, .prow select { min-height: 38px; padding: .35em .5em; font-size: 15px; }
.phead { display: none; }
.prow-new { background: #fbf8f2; border-radius: 10px; padding: 10px; margin-top: 6px; }
@media (min-width: 900px) {
  .prow { grid-template-columns: 2.2fr 1fr 1fr 1fr 1.1fr .8fr .8fr 70px 112px; padding: 4px 0; border: 0; }
  .is-carte .prow { grid-template-columns: 3fr 1.4fr .8fr .8fr 70px 112px; }
  .prow .pc, .prow .pc-name, .prow .pc-av, .prow .pc-tools { grid-column: auto; }
  .prow { align-items: center; }
  .prow .lbl { display: none; }
  .prow .pc-av .lbl { display: none; }
  .phead { display: grid; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--line); padding-bottom: 6px; }
  .prow-new { padding: 8px 6px; }
}
.sec-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ===== Campagnes ===== */
.pk-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pk-row { display: grid; grid-template-columns: 1fr 170px; gap: 8px; }
.pk-head { font-size: .8rem; font-weight: 600; color: var(--muted); }
@media (max-width: 520px) { .pk-row { grid-template-columns: 1fr; } .pk-row + .pk-row { padding-top: 8px; border-top: 1px dashed var(--line); } .pk-head { display: none; } }

/* ===== Préparation ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 1.5rem; color: var(--green); }
.stats span { font-size: .78rem; color: var(--muted); }
.box { display: inline-block; width: 16px; height: 16px; border: 2px solid #9c8f80; border-radius: 4px; vertical-align: -3px; }
.checklist td { vertical-align: top; }
.ticket { page-break-inside: avoid; }
.ticket-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 8px; }
.ticket-name { font-size: 1.3rem; }
.ticket-w { color: var(--muted); white-space: nowrap; }

/* ===== Clients ===== */
.cust-row { display: block; padding: 0; }
.cust-row summary { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.cust-row summary::-webkit-details-marker { display: none; }
.cust-form { padding: 4px 14px 14px; border-top: 1px dashed var(--line); }

/* ===== Connexion ===== */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--green) 0 40%, var(--bg) 40%); }
.login-card { width: 100%; max-width: 380px; text-align: left; }
.login-card h1 { text-align: center; }
.login-mark { font-size: 44px; width: 72px; height: 72px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 20px; background: var(--pink); }

/* ===== Page publique ===== */
.public .pub-wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.pub-hero { background: var(--green); color: #fff; padding: 36px 0 44px; text-align: center; margin-bottom: -20px; }
.pub-hero h1 { font-size: 2.2rem; margin-bottom: .3em; }
.pub-mark { font-size: 54px; width: 90px; height: 90px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--pink); border-radius: 26px; }
.pub-intro { max-width: 620px; margin: 0 auto 18px; opacity: .92; }
.pub-cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pub-campaign h2 { font-size: 1.4rem; color: var(--green); }
.pub-dates { list-style: none; padding: 0; margin: 0 0 .8em; display: grid; gap: 8px; }
.pub-dates li { display: flex; flex-direction: column; padding: 10px 14px; background: var(--soft); border-radius: 10px; border-left: 4px solid var(--orange); }
.pub-dates li.closed { opacity: .55; border-left-color: #bbb; }
.pub-dates span { font-size: .9rem; color: var(--muted); }
.pub-sec { margin-top: 18px; }
.pub-sec h3 { color: var(--green); font-size: 1.1rem; }
.pub-prices { list-style: none; padding: 0; margin: 0; }
.pub-prices li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pub-prices small { display: block; color: var(--muted); }
.pub-prices b { white-space: nowrap; }
.pub-info { display: grid; gap: 0 16px; }
@media (min-width: 760px) { .pub-info { grid-template-columns: repeat(3, 1fr); } }
.pub-pack { margin-top: 1.7em; }
.pub-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 20px 16px 40px; }
.pub-foot a { color: var(--muted); }
.hp { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.public .stickybar { margin-bottom: 16px; }

/* ===== Bon de commande imprimable ===== */
.bon-body { background: #ddd; }
.bon-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.bon-toolbar select { width: auto; }
.bon-toolbar .check { margin: 0; }
.bon-sheet {
  width: 297mm; min-height: 210mm; margin: 16px auto; background: #fff; padding: 8mm; display: grid;
  grid-template-columns: 62mm 1fr; gap: 6mm; font-size: 9.5pt; line-height: 1.25; color: #000; box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.bon-side { display: flex; flex-direction: column; gap: 3mm; text-align: center; }
.bon-logo { font-size: 46px; line-height: 1; }
.bon-shop { font-size: 16pt; font-weight: 800; }
.bon-phone { font-weight: 700; font-size: 11pt; }
.bon-intro { font-size: 9pt; margin: 0; }
.bon-warn { color: #c00; font-weight: 700; margin: 0; }
.bon-msg { font-weight: 700; margin: 0; }
.bon-dates { text-align: left; font-size: 10.5pt; font-weight: 700; }
.bon-dates p { margin: 0 0 2mm; }
.red { color: #c00; }
.orange { color: #d4580a; }
.bon-form { border: 1px solid #000; padding: 3mm; text-align: left; }
.bon-form p { margin: 0 0 2.5mm; }
.bon-pack { margin: 0 auto; width: 36mm; height: 36mm; border-radius: 50%; background: #fff200; display: grid; place-items: center; padding: 4mm; font-size: 9pt; }
.bon-title { text-align: center; font-size: 20pt; text-decoration: underline; margin: 0 0 3mm; }
.bon-cols { column-count: 2; column-gap: 5mm; }
.bon-tbl { width: 100%; border-collapse: collapse; margin-bottom: 3mm; break-inside: avoid; font-size: 8.5pt; }
.bon-tbl caption { font-weight: 800; font-size: 11pt; padding: 1mm 0; border: 1px solid #000; border-bottom: 0; background: #f4f4f4; }
.bon-tbl th, .bon-tbl td { border: 1px solid #000; padding: .6mm 1.2mm; text-align: center; white-space: nowrap; }
.bon-tbl td.n { text-align: left; white-space: normal; }
.bon-tbl th { font-weight: 600; }
.bon-tbl .w { min-width: 18mm; }
.wbox { display: inline-block; width: 6mm; height: 3.5mm; border: 1px solid #000; vertical-align: middle; }
.bon-note { color: #c00; font-weight: 700; font-size: 8.5pt; margin: -2mm 0 3mm; break-inside: avoid; }
.bon-foot { text-align: center; font-size: 8.5pt; margin-top: 3mm; }
@media screen and (max-width: 1150px) { .bon-sheet { transform-origin: top left; zoom: .6; } }

/* ===== Impression ===== */
@media print {
  @page { margin: 10mm; }
  body { background: #fff !important; font-size: 11pt; }
  .topbar, .tabbar, .noprint, .stickybar, .danger-zone, .bon-toolbar { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0 0 8mm; margin: 0; }
  .cols-2 { grid-template-columns: 1fr 1fr; }
  .ticket { page-break-before: always; }
  a { color: inherit; text-decoration: none; }
  input.num-in { border: 0; background: none; padding: 0; }
  .weigh thead { display: table-header-group; }
  .bon-body { background: #fff; }
  .bon-sheet { box-shadow: none; margin: 0; width: auto; min-height: 0; padding: 0; zoom: 1; }
}

/* ===== Ajouts : zone sensible, vie privée ===== */
.card-danger { border-color: #f5c2bd; background: #fffafa; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #912018; }
.pub-privacy { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }
.legal h2 { margin-top: 1.4em; color: var(--green); }
.legal { max-width: 760px; }

/* ===== Logo ===== */
img.brand-mark { object-fit: cover; padding: 0; background: #fff; }
.pub-logo { display: block; width: min(300px, 78vw); height: auto; margin: 0 auto 16px; background: #fff; border-radius: 22px; padding: 10px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.login-logo { display: block; width: 210px; max-width: 80%; height: auto; margin: 0 auto 14px; }
.bon-logo { width: 100%; max-width: 58mm; height: auto; margin: 0 auto; display: block; }
.logo-row { display: grid; gap: 16px; align-items: start; }
@media (min-width: 640px) { .logo-row { grid-template-columns: 200px 1fr; } }
.logo-preview { width: 200px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; }
.logo-row input[type=file] { min-height: 0; padding: .5em; }
