/* ─────────────────────────────────────────────────────────────────────────────────────────────
   The help centre of aupuce.fr — ONE stylesheet for every guide page, where the home page inlines
   its own. LIGHT ONLY, like the home page.
   ───────────────────────────────────────────────────────────────────────────────────────────── */

/* Roboto, from this site: one variable file, weights 100 to 900. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/roboto-latin-wght-normal.woff2") format("woff2");
}

/* ── Tokens ───────────────────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  --shell: #f6f8fc;
  --background: #ffffff;
  --foreground: #1f1f1f;
  --card: #ffffff;
  --primary: #0b57d0;
  --primary-foreground: #ffffff;
  --secondary: #e9eef6;
  --muted: #f2f6fc;
  --muted-foreground: #444746;
  --accent: rgba(68, 71, 70, 0.08);
  --border: #dadce0;
  --divider: #e3e7eb;
  --ring: #0b57d0;
  --nav-active: #d3e3fd;
  --nav-active-foreground: #001d35;
  --tonal: #c2e7ff;
  --tonal-foreground: #001d35;
  --search: #e9eef6;

  /* The pages' colours, as the app uses them */
  --c-orders: #0b57d0;    /* commandes, lots */
  --c-items: #0097a7;     /* articles */
  --c-sales: #f97316;     /* ventes */
  --c-sellers: #db2777;   /* vendeurs */
  --c-markets: #795548;   /* marchés */
  --c-neutral: #5f6368;   /* historique, réglages */
  --c-alert: #b3261e;

  --radius-card: 18px;
  --radius-field: 10px;
  --radius-chip: 8px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Roboto", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-weight: 400; line-height: 1.16; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.875rem, 4.2vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); margin-top: 2.25em; }
h3 { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; margin-top: 1.75em; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
ul, ol { padding-left: 1.375rem; margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { font-weight: 500; }
code { font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875em; }

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 0;
  border-radius: var(--radius-chip);
}

/* ── Buttons ──────────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 36px; padding: 0 1.5rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: .9375rem; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, box-shadow .15s, border-color .15s;
}
.btn-lg { height: 48px; padding: 0 2rem; font-size: 1rem; }
.btn-filled { background: var(--primary); color: var(--primary-foreground); }
.btn-filled:hover { box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); }
.btn-outline { background: var(--background); color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: var(--accent); }

/* ── Header: 64 px ────────────────────────────────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 10;
  height: 64px; display: flex; align-items: center;
  background: var(--background); border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 1.5rem; width: 100%; }
.brand { display: flex; align-items: center; gap: .625rem; text-decoration: none; color: var(--foreground); }
.brand img { width: 30px; height: 30px; display: block; }
.brand .name { font-size: 22px; font-weight: 400; }
header.site nav { display: flex; gap: .25rem; margin-left: auto; }
header.site nav a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 .875rem;
  border-radius: 999px; color: var(--muted-foreground);
  text-decoration: none; font-size: .875rem; font-weight: 500;
}
header.site nav a:hover, header.site nav a[aria-current] { background: var(--accent); color: var(--foreground); }
header.site .btn { margin-left: .75rem; }
@media (max-width: 1000px) { header.site nav { display: none; } header.site .btn { margin-left: auto; } }

/* ── Breadcrumb ─────────────────────────────────────────────────────────────────────────────── */
.crumbs { font-size: .8125rem; color: var(--muted-foreground); padding: 1rem 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: .5rem; opacity: .6; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--foreground); text-decoration: underline; }
.crumbs [aria-current] { color: var(--foreground); }

/* ── The guide: the tree at the left, the article at the right ─────────────────────────────── */
/* `minmax(0, 1fr)` on both widths, and `min-width: 0` on the column: a wide <pre> or table must scroll inside
   the article, never widen the page (on a phone, every line would be cut at the right). */
.guide { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 3rem; padding: 1.5rem 0 4rem; align-items: start; }
.guide > main { min-width: 0; }
@media (max-width: 900px) { .guide { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* The tree: a <details> whose summary only shows on narrow screens (aide.js closes it there). */
details.tree {
  position: sticky; top: 80px;
  background: var(--shell); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 1rem 1.125rem; margin: 0; font-size: .875rem;
  max-height: calc(100vh - 96px); overflow: auto;
}
details.tree > summary { display: none; }
details.tree ul { list-style: none; padding: 0; margin: 0; }
details.tree > ul > li { margin: 0 0 .75rem; }
details.tree > ul > li > span, details.tree > ul > li > a.section {
  display: block; font-weight: 500; color: var(--foreground); text-decoration: none; margin-bottom: .25rem;
}
details.tree ul ul li { margin: 0; }
details.tree ul ul a {
  display: block; padding: .3rem .625rem; border-radius: 999px;
  color: var(--muted-foreground); text-decoration: none; line-height: 1.35;
}
details.tree ul ul a:hover { background: var(--accent); color: var(--foreground); }
details.tree a[aria-current] { background: var(--nav-active); color: var(--nav-active-foreground); font-weight: 500; }
@media (max-width: 900px) {
  details.tree { position: static; max-height: none; }
  details.tree > summary {
    display: flex; align-items: center; gap: .625rem; cursor: pointer; font-weight: 500; color: var(--foreground); list-style: none;
  }
  details.tree > summary::-webkit-details-marker { display: none; }
  details.tree > summary::before {
    content: ""; flex: none; width: 18px; height: 18px; background: currentColor; opacity: .55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .15s;
  }
  details.tree[open] > summary::before { transform: rotate(-180deg); }
  details.tree[open] > summary { margin-bottom: .75rem; }
}

/* A page outside the guide (the privacy page): the article alone, no tree, the guide's vertical rhythm. */
main.single { padding: 1.5rem 0 4rem; min-width: 0; }

/* ── The article ────────────────────────────────────────────────────────────────────────────── */
article.doc { max-width: 46rem; min-width: 0; }
article.doc > p.lead { font-size: 1.125rem; color: var(--muted-foreground); margin-bottom: 1.5em; }
article.doc h2 { scroll-margin-top: 80px; }
article.doc h3 { scroll-margin-top: 80px; }
article.doc img { max-width: 100%; height: auto; }
article.doc table { border-collapse: collapse; width: 100%; font-size: .9375rem; margin: 0 0 1.5em; }
article.doc th, article.doc td { text-align: left; vertical-align: top; padding: .5rem .625rem; border-bottom: 1px solid var(--divider); }
article.doc th { font-weight: 500; }
article.doc .meta { font-size: .8125rem; color: var(--muted-foreground); margin: -.5em 0 1.5em; }

.chip {
  display: inline-block; height: 20px; line-height: 20px; padding: 0 .5rem;
  border-radius: var(--radius-chip); background: var(--nav-active); color: var(--nav-active-foreground);
  font-size: 12px; font-weight: 500; margin-bottom: .75rem;
}
.chip--items { background: color-mix(in srgb, var(--c-items) 16%, white); color: #005662; }
.chip--sales { background: color-mix(in srgb, var(--c-sales) 16%, white); color: #7a3400; }
.chip--sellers { background: color-mix(in srgb, var(--c-sellers) 16%, white); color: #7a1246; }
.chip--markets { background: color-mix(in srgb, var(--c-markets) 16%, white); color: #4e3226; }
.chip--neutral { background: color-mix(in srgb, var(--c-neutral) 16%, white); color: #3c4043; }

/* A word written in a page's colour (the guide's own convention, as the app's bubbles do). */
.w-items { color: var(--c-items); font-weight: 500; }
.w-orders { color: var(--c-orders); font-weight: 500; }
.w-sales { color: var(--c-sales); font-weight: 500; }
.w-sellers { color: var(--c-sellers); font-weight: 500; }
.w-markets { color: var(--c-markets); font-weight: 500; }

/* The screen labels: « Nouveau », « Marquer comme reçue » — a key cap, so the eye finds the click. */
kbd.ui {
  font: inherit; font-size: .9em; font-weight: 500;
  background: var(--muted); border: 1px solid var(--border); border-radius: 6px;
  padding: 0 .4em; white-space: nowrap;
}

/* ── Callouts: what the product does, its limit, a tip ─────────────────────────────────────── */
.callout {
  margin: 1.5em 0; padding: 1rem 1.25rem;
  border-radius: var(--radius-field); border-left: 4px solid var(--primary);
  background: var(--muted); font-size: .9375rem;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout strong.title { display: block; margin-bottom: .25rem; color: var(--foreground); }
.callout--app { border-left-color: var(--primary); background: color-mix(in srgb, var(--tonal) 45%, white); }
.callout--limit { border-left-color: var(--c-alert); background: color-mix(in srgb, var(--c-alert) 7%, white); }
.callout--tip { border-left-color: var(--c-items); background: color-mix(in srgb, var(--c-items) 8%, white); }

/* ── Screenshots: a screen of AuPuce Note, bordered, never cropped ────────────────────────────── */
figure.shot { margin: 2em 0; }
figure.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--shell); }
figure.shot figcaption { font-size: .8125rem; color: var(--muted-foreground); margin-top: .5rem; }
/* A phone screen: narrow, so two or three stand side by side on a desktop width and one under the other on a phone. */
figure.shot--phone { max-width: 320px; }
@media (min-width: 640px) {
  figure.shot--phone { display: inline-block; vertical-align: top; width: calc(33.333% - .75rem); margin-right: 1rem; }
  figure.shot--phone:nth-of-type(3n) { margin-right: 0; }
}

/* ── Illustrations: a figure, and the placeholder until the image is there ─────────────────── */
figure.illus { margin: 2em 0; }
figure.illus img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-card); border: 1px solid var(--border); }
figure.illus figcaption { font-size: .8125rem; color: var(--muted-foreground); margin-top: .5rem; }
/* PLACEHOLDER: the image is not there yet — a grey box naming the file, the prompt under it.
   Once the image is in `img/`, the `placeholder` class and the <code class="prompt"> go, the
   <img> stays. */
figure.illus.placeholder img { display: none; }
figure.illus.placeholder::before {
  content: ""; display: block; aspect-ratio: 16 / 9;
  background: var(--shell); border: 1px dashed var(--border); border-radius: var(--radius-card);
}
figure.illus.placeholder .file { font-size: .8125rem; color: var(--muted-foreground); margin-top: .5rem; }
figure.illus code.prompt {
  display: block; white-space: pre-wrap; font-size: .8125rem; line-height: 1.5;
  background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-field);
  padding: .75rem 1rem; margin-top: .5rem; color: var(--muted-foreground);
}

/* An SVG diagram drawn in the page */
figure.diagram { margin: 2em 0; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption { font-size: .8125rem; color: var(--muted-foreground); margin-top: .5rem; }

/* A tree printed as text (the app's menu) */
pre.tree-diagram {
  background: var(--shell); border: 1px solid var(--border); border-radius: var(--radius-field);
  padding: 1rem 1.25rem; font-size: .875rem; line-height: 1.5; overflow: auto; margin: 1.5em 0;
}

/* The lexicon */
dl.lexique dt { font-weight: 500; margin-top: 1.25em; scroll-margin-top: 80px; }
dl.lexique dd { margin: .25em 0 0; color: var(--muted-foreground); }
dl.lexique dd p { margin-bottom: .5em; }

/* ── Cards — the hub's map of the guide ───────────────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.5em 0; }
.card {
  --dot: var(--c-orders);
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.25rem 1.5rem;
}
a.card:hover { background: var(--shell); }
.card h3 { margin: 0 0 .25rem; font-size: 1rem; }
.card p { color: var(--muted-foreground); font-size: .9375rem; margin: 0; }
.card .dot {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center; margin-bottom: .75rem; font-size: 1.125rem;
  background: color-mix(in srgb, var(--dot) 15%, transparent);
}
.card--items   { --dot: var(--c-items); }
.card--sales   { --dot: var(--c-sales); }
.card--sellers { --dot: var(--c-sellers); }
.card--markets { --dot: var(--c-markets); }
.card--neutral { --dot: var(--c-neutral); }

/* ── Steps ────────────────────────────────────────────────────────────────────────────────── */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.5em 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
ol.steps li { counter-increment: s; }
ol.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--tonal); color: var(--tonal-foreground);
  font-size: 1rem; font-weight: 500; margin-bottom: .75rem;
}
ol.steps h3 { margin: 0 0 .25rem; }
ol.steps p { color: var(--muted-foreground); font-size: .9375rem; margin: .25rem 0 0; }

/* ── Questions ────────────────────────────────────────────────────────────────────────────── */
section.qa { margin-top: 3em; }
details.q {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-field); padding: .9375rem 1.25rem; margin-bottom: .625rem;
}
details.q summary { font-weight: 500; cursor: pointer; list-style: none; display: flex; gap: .75rem; align-items: center; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::before {
  content: ""; flex: none; width: 18px; height: 18px;
  background: currentColor; opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .15s;
}
details.q[open] summary::before { transform: rotate(-180deg); }
details.q p { margin: .75rem 0 0 1.6875rem; color: var(--muted-foreground); font-size: .9375rem; }

/* ── Previous / next, the closing line ─────────────────────────────────────────────────────── */
nav.prevnext { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--divider); font-size: .9375rem; }
nav.prevnext a { text-decoration: none; max-width: 48%; }
nav.prevnext a:hover { text-decoration: underline; }
nav.prevnext .next { margin-left: auto; text-align: right; }
nav.prevnext small { display: block; color: var(--muted-foreground); font-size: .8125rem; }
.closing-line { margin-top: 2.5em; padding: 1.25rem 1.5rem; background: var(--shell); border-radius: var(--radius-card); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.closing-line p { margin: 0; flex: 1 1 18rem; color: var(--muted-foreground); }

/* ── Footer ───────────────────────────────────────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--border); padding: 2rem 0; font-size: .875rem; color: var(--muted-foreground); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer.site nav { display: flex; gap: 1.5rem; margin-left: auto; flex-wrap: wrap; }
/* A second row for the pages outside the site's own sections; its nav keeps the right edge. */
footer.site .wrap + .wrap { margin-top: .75rem; }
footer.site a, footer.site button.link { color: var(--muted-foreground); text-decoration: none; }
footer.site a:hover, footer.site button.link:hover { color: var(--foreground); text-decoration: underline; }
button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ── Cookie banner ────────────────────────────────────────────────────────────────────────── */
.consent {
  position: fixed; z-index: 20; inset-inline: 0; bottom: 0;
  display: none; padding: 1rem;
}
.consent[data-open] { display: block; }
.consent-card {
  max-width: 44rem; margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 1rem 1.25rem; font-size: .9375rem;
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
}
.consent-card p { margin: 0; flex: 1 1 18rem; color: var(--muted-foreground); }
.consent-card strong { color: var(--foreground); font-weight: 500; }
.consent-card a { color: inherit; }
.consent-actions { display: flex; gap: .625rem; flex-wrap: wrap; }
body:has(.consent[data-open]) #beacon-container { bottom: 7rem !important; }
