/* Ça vaut combien ? — styles communs (typographie adaptée à la dyslexie) */
:root {
  --ground: #faf5ee;
  --card: #fffaf3;
  --card-2: #f3ebdf;
  --ink: #2a2522;
  --ink-soft: #5d554d;
  --line: #e0d5c5;
  --accent: #8a2f3c;
  --accent-ink: #fff4f0;
  --ok: #3f6b2f;
  --ok-bg: #e6efdd;
  --warn: #8a5a12;
  --warn-bg: #f6e9cf;
  --bad: #8a2f3c;
  --bad-bg: #f5dfe0;
  --focus: #d98a2b;
  --head: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, sans-serif;
  --body: "Lexend", Verdana, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #201c19; --card: #2a2521; --card-2: #332d28;
    --ink: #f2eae0; --ink-soft: #c2b6a8; --line: #463d36;
    --accent: #e08795; --accent-ink: #2a1418;
    --ok: #b6d89a; --ok-bg: #2c3a22; --warn: #f0c778; --warn-bg: #3f3117;
    --bad: #f0a2ac; --bad-bg: #44252a; --focus: #f0b25c;
  }
}
:root[data-theme="dark"] {
  --ground: #201c19; --card: #2a2521; --card-2: #332d28;
  --ink: #f2eae0; --ink-soft: #c2b6a8; --line: #463d36;
  --accent: #e08795; --accent-ink: #2a1418;
  --ok: #b6d89a; --ok-bg: #2c3a22; --warn: #f0c778; --warn-bg: #3f3117;
  --bad: #f0a2ac; --bad-bg: #44252a; --focus: #f0b25c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 20px 64px;
  display: grid;
  gap: 18px;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.3; margin: 0; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 21px; }
p { margin: 0; max-width: 62ch; }
a { color: var(--accent); font-weight: 600; }
.num, .num * {
  font-family: var(--head);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: .045em;
}
.lead { color: var(--ink-soft); }

.entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.lien-carnet { font-family: var(--head); font-size: 16px; }

button {
  font-family: var(--head);
  font-weight: 700;
  font-size: 17px;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  min-height: 50px;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
}
button.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
button.petit { min-height: 38px; padding: 4px 12px; font-size: 15px; }
button:disabled { opacity: .6; cursor: default; }
input:focus, select:focus, button:focus-visible, a:focus-visible, textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

button.gros {
  width: 100%;
  min-height: 120px;
  font-size: 24px;
  font-weight: 800;
  display: grid;
  gap: 4px;
  align-content: center;
  border-radius: 16px;
}
button.gros small { font-family: var(--body); font-weight: 500; font-size: 15px; opacity: .92; }

.statut { font-family: var(--head); font-weight: 700; padding: 12px 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); }
.statut.erreur { background: var(--bad-bg); color: var(--bad); }
.statut.fini { background: var(--ok-bg); color: var(--ok); }

.resultats { display: grid; gap: 18px; }
.carte {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
}
.vignettes { display: flex; gap: 8px; flex-wrap: wrap; }
.vignettes:empty { display: none; }
.vignettes img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); display: block; }
.titre-bloc { display: grid; gap: 2px; }
.details { color: var(--ink-soft); font-size: 16px; }

.prix-bloc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.prix-grand { font-size: 38px; line-height: 1.15; white-space: nowrap; }
.prix-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink-soft); font-size: 16px; }
.verdict { display: inline-block; padding: 2px 12px; border-radius: 999px; font-family: var(--head); font-weight: 700; font-size: 15px; white-space: nowrap; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict.bad { background: var(--bad-bg); color: var(--bad); }

.plateformes { list-style: none; margin: 0; padding: 0; display: grid; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.plateformes li { border-bottom: 2px solid var(--line); }
.plateformes li:last-child { border-bottom: 0; }
.plateformes a.pf-tete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  min-height: 50px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  background: var(--card-2);
}
.plateformes a.pf-tete:hover .pf-nom { text-decoration: underline; }
.plateformes .meilleure a.pf-tete { background: var(--ok-bg); }
.pf-source { font-family: var(--body); font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--ink-soft); margin-left: 6px; }
.pf-annonces { list-style: none; margin: 0; padding: 4px 0 8px; background: var(--card); }
.pf-annonces li { border: 0; }
.pf-annonces a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 6px 14px 6px 26px; font-size: 15px; line-height: 1.45; color: var(--accent); font-weight: 500;
}
.pf-annonces a span:first-child { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.pf-annonces a .num { color: var(--ink); white-space: nowrap; font-size: 16px; }
.pf-nom { font-family: var(--head); font-weight: 700; }
.pf-mieux { font-family: var(--body); font-weight: 600; font-size: 14px; color: var(--ok); margin-left: 8px; }
.pf-prix { font-size: 19px; white-space: nowrap; }
.pf-vide { color: var(--ink-soft); font-size: 15px; font-family: var(--body); font-weight: 400; letter-spacing: 0; }
.note { font-size: 15px; color: var(--ink-soft); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.enregistre { font-family: var(--head); font-weight: 700; color: var(--ok); }

.correction { display: grid; gap: 14px; padding-top: 6px; border-top: 2px solid var(--line); }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.champs label { display: grid; gap: 4px; font-family: var(--head); font-weight: 700; font-size: 15px; }
input, select, textarea {
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--ground); border: 2px solid var(--line); border-radius: 10px;
  padding: 8px 12px; width: 100%; min-height: 48px;
}
input.num { font-size: 19px; }

/* page des vêtements enregistrés */
.resume { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; color: var(--ink-soft); }
.resume .num { color: var(--ink); font-size: 20px; }
.photos-grandes { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.photos-grandes a { flex: none; }
.photos-grandes img { height: 170px; width: auto; max-width: 100%; border-radius: 10px; border: 2px solid var(--line); display: block; }
.copiable { display: grid; gap: 6px; }
.copiable-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.copiable-tete span { font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.copiable-texte { background: var(--card-2); border-radius: 10px; padding: 10px 14px; white-space: pre-wrap; }
.fiche-infos { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 16px; }
.fiche-infos dt { font-family: var(--head); font-weight: 700; color: var(--ink-soft); }
.fiche-infos dd { margin: 0; }
.vendre-sur { display: flex; flex-wrap: wrap; gap: 8px; }
.vendre-sur a {
  font-family: var(--head); font-weight: 700; font-size: 15px; text-decoration: none;
  border: 2px solid var(--accent); border-radius: 999px; padding: 6px 14px; min-height: 40px;
  display: inline-flex; align-items: center;
}
.vide { color: var(--ink-soft); }

@media (max-width: 520px) {
  .champs { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
  .prix-grand { font-size: 34px; }
}
