/* Proposer un produit in the new look (SKI-1282; portalAdd/emptyWide, portalAdd/cardsWide): the
   proposed card, the catalogue list, the paste box, the three steps, the cards, « Comment nous
   choisissons » and the send bar. Most of the cards' states are drawn by portal.js as answers
   arrive (the reading card, the search inside a card and its hits, the sent state, the send bar):
   they are styled on its own classes, which are its hooks. Every value reads a variable of
   css/tokens.css; nothing moves but the reading pill's turning icon (portal.css, .spin). */

/* ── a product: its picture on an oat tile of 16, its brand a Small in muted ─────────────── */
.proposedcard img,
.proposedcard .noimg,
.catalog-row img,
.catalog-row .noimg,
.pc-prod img,
.pc-prod .noimg,
.choice img,
.choice .noimg {
  flex: none;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: var(--radius-16);
  background: var(--color-oat);
  object-fit: cover;
}
.catalog-row img,
.catalog-row .noimg {
  width: var(--size-tile-large);
  height: var(--size-tile-large);
}
.choice img,
.choice .noimg {
  width: 40px;
  height: 40px;
}
.proposedcard .noimg .ph,
.catalog-row .noimg .ph,
.pc-prod .noimg .ph,
.choice .noimg .ph {
  width: 20px;
  height: 20px;
}
.proposedcard .brandline,
.catalog-row .brandline,
.pc-prod .brandline,
.choice .brandline {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-small);
  letter-spacing: normal;
  text-transform: none;
}

/* ── the product Performance's Proposer carried here (SKI-687), above the paste box ──────── */
.proposedcard {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px;
}
.proposedcard > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.proposedcard b {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.proposedcard p {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* ── choose from your catalogue (SKI-635; not drawn): a paper card, its title a Heading at its
   phone size, the search field, the count a Small; rows as Ma boutique's, divided by the thin
   edge, « Choisir » a quiet small button (portal.js disables it once chosen), the pager. ──── */
.catalog {
  margin-bottom: 24px;
  padding: 24px;
}
.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.catalog-head > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.catalog-head h2 {
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-heading-mobile);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}
.catalog-head p {
  max-width: 520px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
/* The search field, wide enough for its whole hint, « Chercher un produit ou une marque ». */
.catalog-head > .search .input {
  width: 400px;
}
.catalog-count {
  margin: 20px 0 6px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.catalog-empty {
  margin: 20px 0 0;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.catalog-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.catalog-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--color-edge);
}
.catalog-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.catalog-text b {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.catalog-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* ── the paste box: the field of several lines (ticket 03's textarea.input, corners of 16) with
   its link icon inside, the main button « Lire », the line under it a Small in muted ──────── */
.pastecard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 20px;
}
.pastecard-lead {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.pastebox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* The hint stays on one line: a field of one row clips a second. */
.pastebox textarea::placeholder {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pastebox > .ph {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  pointer-events: none;
}
.pastebox textarea {
  flex: 1;
  min-width: 0;
  padding-left: 46px;
  resize: none;
}
.pastefoot,
.pastefoot .tiny {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* ── the three steps (#empty), the page's one painted group: paper cards with the thin edge, a
   painted icon of 26 on a tile of rose's tint (corners of 16), the title a Name, the line a
   Small in muted (the kit's portalAdd.step) ─────────────────────────────────────────────── */
.pc-empty {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.pc-empty > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 4px 16px;
  padding: 20px;
  border: 1px solid var(--color-edge);
  border-radius: var(--radius-24);
  background: var(--color-paper);
}
.pc-empty .ph-duotone {
  --paint: var(--color-rose-mid);
  grid-row: span 2;
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: var(--radius-16);
  background: var(--color-rose-tint);
  color: var(--color-ink);
}
.pc-empty b {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.pc-empty span {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* ── a card: one page read (requestCard, and portal.js's own markup) ───────────────────────
   Paper, corners of 24, 24 inside. Its head: the link icon, host and path in a Small in muted,
   the match pill, the round « Retirer de la liste ». Then « Votre page » and « Sur SkinSouk »
   side by side with the arrows between, then the sizes under the thin edge. */
.pcard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  margin-bottom: 24px;
  padding: 24px;
}
.pcard[data-state="error"] {
  gap: 14px;
}
.pc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pc-url {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  text-decoration: none;
}
.pc-url .ph {
  width: 16px;
  height: 16px;
}
.pc-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-url:hover {
  color: var(--color-ink);
}
.pc-head .pill {
  flex: none;
}
.pcard .notice {
  margin: 0;
}
/* The sent card's message (portal.js) holds its references and its link as two pieces: they run
   as one line of words after the icon, as a message's words do, instead of two columns. The
   numbers mirror ticket 03's `.notice` (css/controls.css): its inner room of 13 by 16, its icon
   of 18 set 1 down, its gap of 10, so 44 = 16 + 18 + 10 and 14 = 13 + 1. Change them with it. */
.pcard[data-state="sent"] .notice.ok {
  position: relative;
  display: block;
  padding-left: 44px;
}
.pcard[data-state="sent"] .notice.ok > .ph-duotone {
  position: absolute;
  top: 14px;
  left: 16px;
  margin: 0;
}
.pc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.pc-mid {
  display: flex;
  padding-top: 44px;
  color: var(--color-muted);
}
.pc-mid .ph {
  width: 20px;
  height: 20px;
}
.pc-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pcard .eyebrow {
  margin: 0;
  color: var(--color-rose-deep);
  font-size: var(--text-overline);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-overline);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
}
.pc-prod {
  display: flex;
  gap: 14px;
}
.pc-prod > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pc-prod b {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.pc-prod .small {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
/* The sizes SkinSouk has: pills of 26 on paper with the pill's edge; the shop's own on oat. */
.sizes-on {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
}
.szchip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--color-edge-pill);
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  color: var(--color-ink-2);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.szchip.mine {
  border-color: var(--color-oat);
  background: var(--color-oat);
}
/* The links under a side: a Small in muted, each link underlined in ink 2. */
.pc-links,
.pc-hits > .small {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.pc-links a,
.pc-hits a {
  color: var(--color-ink-2);
  font-weight: var(--font-weight-regular);
  text-decoration: underline 1px;
  text-underline-offset: 3px;
}
.pc-links a:hover,
.pc-hits a:hover {
  color: var(--color-ink);
}
/* Not yet on SkinSouk: its line icon, a Name, a Small in ink 2. */
.pc-new {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pc-new > .ph-duotone {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--color-ink);
}
.pc-new > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pc-new b {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.pc-new .small {
  color: var(--color-ink-2);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
/* A choice between a few products: paper cards with the thin edge, corners of 16; the picture
   on oat, the name a Label, its sizes a Small in muted. Under the pointer the Lift shadow. */
.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-hits:empty {
  display: none;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--color-edge);
  border-radius: var(--radius-16);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) {
  .choice:hover {
    box-shadow: var(--shadow-lift);
  }
}
.choice:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}
.choice > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.choice b {
  color: var(--color-ink);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
.choice .small {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
/* The search inside a card (portal.js): the field, the tip a Small in muted after its line
   icon, the hits as choices. */
.pc-search {
  width: 100%;
}
.pc-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.pc-tip .ph {
  width: 14px;
  height: 14px;
}
.pc-hits .notice {
  margin: 0;
}
/* The sizes, under the thin edge: an Overline, then a row per size: the tick box, the size in
   Bold and its price and stock in a Label of ink 2, the arrow, the state chip as a badge. A size
   SkinSouk already has is off: its tick box disabled, its words in muted. */
.pc-sizes,
.pc-wait {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--color-edge);
}
.pc-wait {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.pc-wait > .ph,
.szrow .chip > .ph {
  display: none;
}
.szrow {
  display: grid;
  grid-template-columns: 20px minmax(0, 260px) 14px auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}
.szrow > span:not(.chip) {
  color: var(--color-ink-2);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
.szrow b {
  color: var(--color-ink);
  font-weight: var(--font-weight-bold);
}
.szrow.off {
  cursor: default;
}
.szrow.off > span:not(.chip),
.szrow.off b {
  color: var(--color-muted);
}
/* Out of stock reads apart from in stock: muted (no green, which would be a seventh state). */
.szrow .nostock {
  color: var(--color-muted);
}
.szrow .arrow {
  width: 14px;
  height: 14px;
  color: var(--color-muted);
}
/* A card being read (portal.js): two still oat blocks under the reading pill. */
.pc-skel {
  display: flex;
  gap: 24px;
}
.pc-skel span {
  flex: 1;
  height: 72px;
  border-radius: var(--radius-16);
  background: var(--color-oat);
}

/* ── « Comment nous choisissons »: on oat, corners of 24, no edge; its line icon, the title a
   Name, the text a Small in ink 2 with its bold word in ink (portalAdd.how) ───────────────── */
.howwe {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px;
  border: 0;
  background: var(--color-oat);
}
.howwe > .ph-duotone {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--color-ink);
}
.howwe > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.howwe > div > b {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.howwe p {
  max-width: 900px;
  color: var(--color-ink-2);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.howwe p b {
  color: var(--color-ink);
  font-weight: var(--font-weight-bold);
}

/* ── the send bar (portal.js): paper, a pill, the Float shadow since it follows the scroll; its
   count a Label, the products a Small in muted, the waiting chip, the reading line, and
   « Envoyer… », the main button where the shop must act ───────────────────────────────────── */
.sendbar {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  padding: 10px 10px 10px 24px;
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  box-shadow: var(--shadow-float);
}
.sb-txt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}
.sb-txt b {
  color: var(--color-ink);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
.sb-txt .muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.sb-txt .muted .ph {
  width: 14px;
  height: 14px;
}

/* Just above the stacking, a step's words would run a few letters wide beside its tile: the tile
   goes above them. */
@media (min-width: 900.02px) and (max-width: 1100px) {
  .pc-empty > div {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    align-content: start;
  }
  .pc-empty .ph-duotone {
    grid-row: auto;
    margin-bottom: 12px;
  }
}
@media (max-width: 900px) {
  .pc-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .pc-mid {
    display: none;
  }
  .pc-empty {
    grid-template-columns: minmax(0, 1fr);
  }
  .szrow {
    grid-template-columns: 20px minmax(0, 1fr);
    row-gap: 8px;
  }
  .szrow .arrow {
    display: none;
  }
  .szrow .chip {
    grid-column: 2;
  }
  .catalog-head > div,
  .catalog-head > .search {
    width: 100%;
  }
  .catalog-head > .search .input {
    width: 100%;
  }
}
@media (max-width: 600px) {
  .catalog-row {
    display: grid;
    grid-template-columns: var(--size-tile-large) minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
    row-gap: 10px;
  }
  .catalog-row > .btn {
    grid-column: 2;
    justify-self: start;
  }
  .pcard,
  .catalog {
    padding: 20px;
  }
  .sendbar {
    flex-wrap: wrap;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-24);
  }
  .sb-txt {
    padding: 0 6px;
  }
  .sendbar .btn {
    width: 100%;
  }
}
