/* Espace pro (clients) : charte du site Ardèche Impressions — rose, Montserrat, gris chauds. */
:root {
  --paper: #f5f3f4; --panel: #ffffff; --ink: #1c1a18; --body: #3d3a37; --muted: #77716e; --line: #e4dfe1; --soft: #faf8f9;
  --pink: #e72781; --pink-ink: #c01767; --pink-soft: #fceef6; --bar: #1c1a18; --bar-ink: #f4f0f1;
  --ok: #17784a; --ok-bg: #e5f4ec; --warn: #9a5a00; --warn-bg: #fff2dc; --info: #2a55b8; --info-bg: #e9effc; --bad: #a3122c; --bad-bg: #fde8ec;
  --f-ui: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --paper: #151314; --panel: #1f1c1e; --ink: #f3eff0; --body: #d6d0d2; --muted: #a29a9e; --line: #383235; --soft: #1a1719;
  --pink: #f0559b; --pink-ink: #ff7db5; --pink-soft: #3a1d2b; --bar: #0d0b0c; --bar-ink: #f3eff0;
  --ok: #5fd39a; --ok-bg: #143223; --warn: #f2b55a; --warn-bg: #3a2a10; --info: #8fb0ff; --info-bg: #1a2644; --bad: #ff8fa3; --bad-bg: #3d1720;
  color-scheme: dark; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--body); font-family: var(--f-ui); font-size: 15px; line-height: 1.5; padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
h1, h2 { color: var(--ink); text-wrap: balance; margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--pink-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.mono { font-family: var(--f-data); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lbl { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chargement { text-align: center; color: var(--muted); padding: 20vh 16px; }

.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bar); color: var(--bar-ink); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; font-weight: 800; color: var(--bar-ink); text-decoration: none; }
.brand b { color: var(--pink); }
.brand span { font-weight: 500; font-size: .8rem; opacity: .7; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a, .nav button { background: none; border: 0; color: var(--bar-ink); opacity: .75; font-weight: 600; font-size: .88rem; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.nav a[aria-current="page"] { opacity: 1; background: color-mix(in srgb, var(--bar-ink) 12%, transparent); }
.nav a:hover, .nav button:hover { opacity: 1; }
@media (max-width: 640px) { .nav { margin-left: 0; width: 100%; } .nav a, .nav button { padding: 6px 8px; font-size: .82rem; } }

.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.etroit { max-width: 460px; width: 100%; margin: 6vh auto 0; display: flex; flex-direction: column; gap: 16px; }
.moyen { max-width: 680px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.pri { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn.pri:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.lien { background: none; border-color: transparent; color: var(--pink-ink); padding-inline: 4px; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: none; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--ink); min-width: 0; }
label.f .aide { font-weight: 500; color: var(--muted); }
.in { width: 100%; border: 1px solid var(--line); background: var(--soft); border-radius: 9px; padding: 10px 12px; font-size: 1rem; font-weight: 500; }
.in:focus { border-color: var(--pink); outline: none; background: var(--panel); }
.in[readonly] { color: var(--muted); }

.tabs { display: flex; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.tabs a { flex: 1; text-align: center; padding: 8px; border-radius: 7px; font-weight: 600; font-size: .88rem; color: var(--muted); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }

.note { border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.note.info { background: var(--info-bg); color: var(--info); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.erreur { color: var(--bad); font-size: .88rem; font-weight: 600; }
.erreur:empty { display: none; }

.vide { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.vide p { max-width: 52ch; }
.texte { max-width: 70ch; display: flex; flex-direction: column; gap: 12px; }
.texte h2 { margin-top: 10px; }
.texte ul { margin: 0; padding-left: 20px; }
.pied { text-align: center; font-size: .8rem; color: var(--muted); padding: 0 16px 24px; }

#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; z-index: 60; max-width: calc(100% - 32px); }
#toast.bad { background: var(--bad); color: #fff; }

/* ---------------------------------------------------------------- Commandes */
:root { --sil-line: #8f898c; --todo: #6b4fa3; }
@media (prefers-color-scheme: dark) { :root { --sil-line: #8a8386; } }
.pile { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.serre { gap: 6px; }
.entre { justify-content: space-between; }
.plein { grid-column: 1 / -1; flex-basis: 100%; }
.centre { text-align: center; align-items: center; }
.num-cmd { font-family: var(--f-data); font-size: 1.4rem; font-weight: 600; color: var(--pink-ink); }
.ok-txt { color: var(--ok); }
.btn.sm { padding: 5px 10px; font-size: .82rem; }
.coche { gap: 8px; align-items: flex-start; flex-wrap: nowrap; }
.coche input { margin-top: 3px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-recue { color: var(--info); background: var(--info-bg); }
.p-verif { color: var(--warn); background: var(--warn-bg); }
.p-prod { color: var(--pink-ink); background: var(--pink-soft); }
.p-prete { color: var(--ok); background: var(--ok-bg); }
.p-annulee { color: var(--muted); background: var(--soft); border: 1px solid var(--line); }

.filtres { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 5px 12px; font-size: .82rem; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.tbl { overflow-x: auto; }
table.cmd { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.cmd th { text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
table.cmd td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.cmd tr:last-child td { border-bottom: 0; }
table.cmd .num { text-align: right; font-variant-numeric: tabular-nums; }
table.cmd .cf { color: var(--ink); }
.actions { justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }

.etapes { display: flex; gap: 6px; flex-wrap: wrap; counter-reset: e; }
.etapes button { border: 0; background: none; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .86rem; color: var(--muted); padding: 6px 10px 6px 6px; border-radius: 99px; }
.etapes button::before { counter-increment: e; content: counter(e); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; border: 1.5px solid var(--line); }
.etapes button[aria-current="step"] { color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
.etapes button[aria-current="step"]::before { background: var(--pink); border-color: var(--pink); color: #fff; }
.etapes button.fait::before { content: "✓"; background: var(--ink); color: var(--panel); border-color: var(--ink); }

.prod { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .prod { grid-template-columns: minmax(0, 1fr); } }
.vues { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 420px; }
.vues.une { max-width: 420px; }
.vue { margin: 0; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 4px; }
.vue svg { width: 100%; height: auto; display: block; }
.vue figcaption { text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tee { fill: var(--tex, #fff); stroke: var(--sil-line); stroke-width: 1.4; stroke-linejoin: round; }
.col { fill: none; stroke: var(--sil-line); stroke-width: 1.4; }
.hot { cursor: pointer; }
.hot rect { fill: color-mix(in srgb, var(--pink) 8%, transparent); stroke: var(--pink); stroke-width: 1; stroke-dasharray: 3 2; }
.hot text { font: 700 9px var(--f-ui); fill: var(--pink-ink); text-anchor: middle; pointer-events: none; }
.hot:hover rect, .hot:focus rect { fill: color-mix(in srgb, var(--pink) 20%, transparent); }
.hot:focus { outline: none; }
.mk { cursor: pointer; }
.mk .ph { fill: color-mix(in srgb, var(--pink) 18%, transparent); stroke: var(--pink); stroke-width: .8; }
.mk .ph-t { font: 700 6px var(--f-data); fill: var(--pink-ink); text-anchor: middle; }
.mk .sel { fill: none; stroke: var(--pink); stroke-width: 1; stroke-dasharray: 2 1.5; }
.aide-sil { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.aide-sil b { color: var(--pink-ink); }

.pastilles { display: flex; gap: 6px; flex-wrap: wrap; }
.pastille { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); padding: 0; }
.pastille[aria-pressed="true"] { outline: 2px solid var(--pink); outline-offset: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 7px 12px; font-weight: 600; font-size: .85rem; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.tailles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.tailles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tailles label { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.tailles input { text-align: center; padding: 7px 2px; }
details summary { cursor: pointer; margin-top: 6px; }
.total { font-size: .85rem; font-weight: 700; color: var(--ink); }

.mks { display: flex; flex-direction: column; gap: 8px; }
.mkrow { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: 92px minmax(104px, 1fr) minmax(0, 1.6fr) 74px 74px auto; gap: 10px; align-items: end; background: var(--soft); }
.mkrow.on { border-color: var(--pink); }
@media (max-width: 760px) { .mkrow { grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); } .mkrow > div:nth-child(2) { grid-column: 2 / -1; } .mkrow > .f:has(.logo-btn) { grid-column: 1 / -1; } }
.mkrow .zone { font-weight: 700; color: var(--ink); font-size: .9rem; }
.fmt { font-family: var(--f-data); font-size: .76rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.fmt.hors { color: var(--bad); border-color: var(--bad); }
.x { border: 0; background: none; color: var(--muted); font-size: 1.1rem; padding: 6px; line-height: 1; }
.x:hover { color: var(--bad); }
.logo-btn { width: 100%; justify-content: flex-start; min-width: 0; }
.logo-btn img, .logo-btn .tn { width: 28px; height: 28px; object-fit: contain; flex: none; border-radius: 4px; background: var(--panel); }
.logo-btn .tn { display: grid; place-items: center; font: 600 .6rem var(--f-data); color: var(--pink-ink); }
.logo-btn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.q { font-size: .8rem; font-weight: 600; }
.q.ok { color: var(--ok); } .q.warn { color: var(--warn); } .q.bad { color: var(--bad); }

.fichier { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); font-size: .88rem; flex-wrap: wrap; }
.depot { border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); font-size: .88rem; display: block; cursor: pointer; }
.depot b { color: var(--pink-ink); }
.depot:hover { border-color: var(--pink); }
.depot input { display: none; }

.lignes { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lignes td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.lignes td:last-child { text-align: right; white-space: nowrap; font-family: var(--f-data); font-variant-numeric: tabular-nums; padding-left: 12px; }
.lignes tr.tot td { border-bottom: 0; font-weight: 700; color: var(--ink); font-size: 1rem; padding-top: 10px; }
.lignes .sub { display: block; font-size: .78rem; color: var(--muted); }
.palier { display: block; color: var(--ok); font-size: .78rem; font-weight: 600; }

.wrap:has(.barre) { padding-bottom: 130px; }
.barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 24px rgb(0 0 0 / .06); }
.barre-in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.barre-in .grow { min-width: 190px; }
.gros { font-size: 1.35rem; font-weight: 800; color: var(--ink); font-family: var(--f-data); letter-spacing: -.02em; }

.voile { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .45); display: grid; place-items: center; padding: 16px; }
.modale { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: min(680px, 100%); max-height: 86vh; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.choix button { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 0; overflow: hidden; text-align: left; display: flex; flex-direction: column; }
.choix button:hover { border-color: var(--pink); }
.choix .im, .carte-logo .im { aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; padding: 10px; background: repeating-conic-gradient(var(--soft) 0 25%, var(--panel) 0 50%) 0 0 / 14px 14px; color: var(--pink-ink); font-weight: 600; }
.choix .im img, .carte-logo .im img { max-height: 100%; max-width: 100%; object-fit: contain; }
.choix .nm { padding: 7px 9px; font-size: .78rem; font-weight: 600; border-top: 1px solid var(--line); }
.biblio { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.carte-logo { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.carte-logo .meta { padding: 10px 12px; font-size: .84rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }

.frise { display: flex; flex-wrap: wrap; }
.frise div { flex: 1; min-width: 100px; padding: 10px 8px 0; border-top: 3px solid var(--line); font-size: .8rem; color: var(--muted); font-weight: 600; }
.frise div.fait { border-color: var(--pink); color: var(--ink); }
.frise div.ici { border-color: var(--pink); color: var(--pink-ink); }

/* Vue rapprochée d'un logo placé (même échelle, recadrée). */
.vue.zoom { width: 92px; padding: 2px; border-radius: 8px; align-self: start; background: var(--panel); }

/* Page de confidentialité */
.legal h2 { font-size: 1.05rem; margin-top: 14px; }
.legal p, .legal li { font-size: .92rem; }
.legal-t { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 520px; }
.legal-t th { text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.legal-t td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
