/* ==================================================================
   NEYBI — Le Fil
   Feuille autonome de la page communautaire. Reprend les jetons de
   l'app : blanc dominant, encre #0A0A0A, IBM Plex, chiffres tabulaires.
   ================================================================== */

:root {
  --page: #f7f7f5;
  --raised: #ffffff;
  --inset: #f1f1ef;
  --ink: #0a0a0a;
  --ink-2: #3a3a3e;
  /* 4,48:1 sur `--inset` (#f1f1ef) à 11 px — sous le seuil d'un
     cheveu. Deux crans plus foncé et on passe à 4,9:1. */
  --ink-3: #68686d;
  --hairline: #d8d8d4;
  /* La couleur qui se lit sur --ink. Sans elle, tout ce qui posait du
     blanc en dur sur un fond `var(--ink)` devenait blanc sur blanc dès
     qu'on passait en nuit. */
  --sur-ink: #ffffff;
  /* Vert institutionnel. C'était #C6FF3D — l'ancien « Rave », un
     archétype supprimé en sept. 2026. Le kit v11 l'a remplacé partout
     par le #C6FF3D de Block Star : plus aucune teinte orpheline. */
  --acide: #c6ff3d;
  --print-angel: #ff4438;
  --nav-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* La règle du navigateur `[hidden]{display:none}` a une spécificité
   nulle : dès qu'une de nos règles pose un `display`, elle la bat et
   l'élément reste affiché. C'est arrivé deux fois — la pastille du
   panier, puis l'écran de recherche qui recouvrait l'app en
   permanence. On la réaffirme une bonne fois pour toutes. */
[hidden] { display: none !important; }

/* `html` ne porte AUCUN fond, et c'est volontaire. Les jetons de thème
   (`--page`, `--ink`…) sont posés sur `body[data-theme=…]` : si `html`
   peignait `var(--page)`, il lirait la valeur claire de `:root` et
   restait blanc en nuit. Comme il a un fond, le navigateur n'y propage
   plus celui de `body` — d'où la bande blanche sous les messages dès que
   la liste est plus courte que l'écran. Fond transparent sur `html` =
   le fond de `body` reprend tout le canevas, quel que soit le thème. */
html {
  margin: 0;
  padding: 0;
  background: transparent;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.tabulaire { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------------------------- En-tête ---------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.entete-haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* L'encoche. `viewport-fit=cover` est demandé dans le <head>, donc
     en app installée (écran d'accueil iOS) la page passe SOUS la
     barre d'état : le logo et les quatre icônes s'y perdaient. Dans un
     onglet Safari l'inset vaut 0 — le rendu ne bouge pas. */
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  max-width: 680px;
  margin: 0 auto;
}
.logo { width: 92px; height: 28px; display: block; }
.entete-actions { display: flex; align-items: center; gap: 14px; }
.icone-btn {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Onglets — Fil / News / Messages */
.onglets {
  display: flex;
  max-width: 680px;
  margin: 0 auto;
}
.onglet {
  flex: 1;
  min-height: 46px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  position: relative;
}
.onglet[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.onglet[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
  transform: translateX(-50%);
}

/* ---------------------------- Contenu ---------------------------- */

main { max-width: 680px; margin: 0 auto; padding-bottom: calc(var(--nav-h) + 24px); }
.vue[hidden] { display: none; }

/* Composeur */
.composeur {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 8px solid var(--inset);
  background: var(--raised);
}
.composeur textarea {
  flex: 1;
  min-height: 52px;
  border: 0;
  resize: none;
  font: inherit;
  font-size: 16px;
  line-height: 22px;
  background: none;
  color: var(--ink);
  outline: none;
}
.composeur textarea::placeholder { color: var(--ink-3); }
.composeur-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.compteur { font-size: 12px; color: var(--ink-3); }
.compteur[data-limite="true"] { color: var(--print-angel); }

.btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: var(--sur-ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.14s ease;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Avatars */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--inset);
}
.avatar.petit { width: 34px; height: 34px; }

/* ---------------------------- Postes ---------------------------- */

.poste {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--raised);
  animation: entree 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes entree {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.poste-corps { flex: 1; min-width: 0; }

.repris svg { width: 14px; height: 14px; flex-shrink: 0; }
.repris {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 0 56px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--raised);
}

.poste-tete {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.nom { font-weight: 600; font-size: 15px; }
.handle, .temps { font-size: 13px; color: var(--ink-3); }
.badge-marque {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--acide);
  /* Noir, pas `--ink` : c'est un APLAT de couleur de marque, et le
     contraste du noir sur les cinq encres est vérifié. En nuit,
     `--ink` devenait blanc — blanc sur vert acide, 1,07:1. */
  color: #0a0a0a;
}
.texte { margin: 4px 0 0; font-size: 15px; line-height: 21px; white-space: pre-wrap; }
.texte a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.media {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--hairline);
}
.media video, .media img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; }

/* L'étiquette prix — la signature de la marque, portée dans le fil */
.etiquette {
  margin-top: 10px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 15px;
  font-variant-numeric: tabular-nums;
}
.etiquette b { font-weight: 600; letter-spacing: 0.04em; }
.etiquette .part { background: var(--ink); color: var(--sur-ink); padding: 1px 5px; border-radius: 3px; align-self: flex-start; }

/* L'étiquette qui se déplie : le prix décomposé sous la pièce, sans
   quitter le fil. Discrète par construction — c'est un fait qu'on peut
   consulter, pas un argument qu'on pousse. */
.etiquette-ouvrable { padding: 0; overflow: hidden; }
.etq-tete {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 26px 9px 11px;
  width: 100%;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.etq-fleche {
  position: absolute;
  top: 13px;
  right: 11px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.4;
  transition: transform 160ms ease, opacity 160ms ease;
}
.etq-tete[aria-expanded="true"] .etq-fleche { transform: rotate(-135deg); opacity: 0.75; }
.etq-tete:hover .etq-fleche { opacity: 0.7; }
.etq-detail {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
  padding: 7px 11px 9px;
}
.etq-l { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.etq-l > span:first-child { opacity: 0.68; }
.etq-cle > span { font-weight: 600; opacity: 1; }
.etq-tot { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--inset); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .etq-fleche { transition: none; } }

/* Barre d'actions */
.actions {
  display: flex;
  justify-content: space-between;
  max-width: 320px;
  margin-top: 10px;
}
.action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 6px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  /* Le compteur ne se coupe jamais. Sans ça, « 1,9 k » passait sur
     deux lignes dès 375 px — le « k » se retrouvait sous le chiffre
     et la rangée d'actions gagnait 15 px de haut. */
  white-space: nowrap;
  transition: color 0.16s ease, transform 0.12s ease;
}
.action:hover { color: var(--ink); }
.action:active { transform: scale(0.92); }
.action:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.action[aria-pressed="true"].aime { color: var(--print-angel); }
.action[aria-pressed="true"].repost { color: #0f9d58; }
.action svg { width: 19px; height: 19px; }

/* ---------------------------- News ---------------------------- */

.news-carte {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--raised);
  text-decoration: none;
  color: inherit;
}
.news-carte:hover { background: var(--inset); }
.news-vignette { width: 92px; height: 92px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--inset); }
.news-cat {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.news-titre { margin: 3px 0 0; font-size: 16px; line-height: 20px; font-weight: 600; font-style: italic; }
.news-chapo { margin: 5px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* ---------------------------- Messages ---------------------------- */

.conv {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--raised);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.conv:hover { background: var(--inset); }
.conv-corps { flex: 1; min-width: 0; }
.conv-nom { font-weight: 600; font-size: 15px; }
.conv-extrait {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pastille { width: 8px; height: 8px; border-radius: 999px; background: var(--print-angel); flex-shrink: 0; }

.fil-messages { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.bulle {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 20px;
  animation: entree 0.28s ease both;
}
.bulle.eux { align-self: flex-start; background: var(--inset); border-bottom-left-radius: 5px; }
.bulle.moi { align-self: flex-end; background: var(--ink); color: var(--sur-ink); border-bottom-right-radius: 5px; }

/* ---------------- L'arrivée d'un message ----------------
   Un message qu'on n'a pas encore vu entre du côté d'où parle la
   personne : le tien par la droite, le sien par la gauche. Les
   messages déjà lus ne rejouent rien — rouvrir une conversation ne
   doit pas rejouer son histoire.

   Le mouvement suit le réglage de l'app, pas le sien : [data-motion]
   porte déjà E.motion et prefers-reduced-motion. */
.bulle.neuve { animation: none; }
[data-motion="on"] .bulle.neuve {
  animation: bulle-entre-eux 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 0.34s);
}
[data-motion="on"] .bulle.neuve.moi { animation-name: bulle-entre-moi; }

@keyframes bulle-entre-eux {
  from { opacity: 0; transform: translate3d(-12px, 8px, 0) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes bulle-entre-moi {
  from { opacity: 0; transform: translate3d(12px, 8px, 0) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* La frappe : la même bulle, en creux. Pas de couleur en plus —
   l'encre de l'app suffit, et trois points valent mieux qu'un mot. */
.tape {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 14px;
  border-radius: 16px;
  border-bottom-left-radius: 5px;
  background: var(--inset);
}
.tape i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.34;
}
[data-motion="on"] .tape { animation: bulle-entre-eux 0.24s ease both; }
[data-motion="on"] .tape i { animation: tape-point 0.9s ease-in-out infinite; }
[data-motion="on"] .tape i:nth-child(2) { animation-delay: 0.15s; }
[data-motion="on"] .tape i:nth-child(3) { animation-delay: 0.3s; }

@keyframes tape-point {
  0%, 100% { opacity: 0.28; transform: none; }
  50% { opacity: 0.85; transform: translateY(-3px); }
}

.saisie {
  position: sticky;
  bottom: var(--nav-h);
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--raised);
  border-top: 1px solid var(--hairline);
}
.saisie input {
  flex: 1;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  background: var(--page);
  color: var(--ink);
  outline: none;
}
.saisie input:focus-visible { border-color: var(--ink); }

.retour {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------------------------- Nav basse ---------------------------- */

.nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  background: color-mix(in srgb, var(--raised) 96%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 10px;
  text-decoration: none;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] .puce { opacity: 1; }
.puce { width: 22px; height: 3px; border-radius: 3px; background: var(--ink); opacity: 0; margin-bottom: 1px; }
.nav svg { width: 21px; height: 21px; }

/* Vide */
.vide { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.vide p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==================================================================
   Mode Looks — le plein écran vertical, dans la même page
   ================================================================== */

body[data-mode="looks"] { background: #0a0a0a; }
body[data-mode="looks"] .entete { background: rgba(10,10,10,.82); border-bottom-color: rgba(255,255,255,.14); }
body[data-mode="looks"] .onglet { color: rgba(255,255,255,.55); }
body[data-mode="looks"] .onglet[aria-selected="true"] { color: #fff; }
body[data-mode="looks"] .onglet[aria-selected="true"]::after { background: #fff; }
body[data-mode="looks"] .icone-btn { color: #fff; }
body[data-mode="looks"] main { max-width: none; padding-bottom: 0; }
body[data-mode="looks"] .nav { background: rgba(10,10,10,.9); border-top-color: rgba(255,255,255,.14); }
body[data-mode="looks"] .nav a { color: rgba(255,255,255,.55); }
body[data-mode="looks"] .nav a[aria-current="page"] { color: #fff; }
body[data-mode="looks"] .nav a[aria-current="page"] .puce { background: #fff; }

#pile-looks {
  height: calc(100dvh - 108px - var(--nav-h));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  background: #0a0a0a;
}
.volet {
  position: relative;
  height: calc(100dvh - 108px - var(--nav-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #0a0a0a;
}
.volet video {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  width: min(100%, calc((100dvh - 108px - var(--nav-h)) * 9 / 16));
  height: 100%;
  object-fit: cover;
}
.voile-bas {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 55%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,.45) 42%, rgba(10,10,10,.94) 100%);
}
.rail {
  position: absolute;
  right: 12px;
  bottom: 108px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  border: 0;
  background: none;
  cursor: pointer;
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: transform 0.14s ease;
}
.rail-btn:active { transform: scale(0.9); }
.rail-btn svg { width: 26px; height: 26px; }
.rail-btn .avatar.petit { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.75); }
.rail-btn[aria-pressed="true"].aime { color: var(--print-angel); }
.rail-btn[aria-pressed="true"].repost { color: #4ade80; }

.legende {
  position: absolute;
  left: 0; right: 84px; bottom: 22px;
  z-index: 2;
  padding: 0 20px;
  color: #fff;
}
.legende-qui { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 600; }
.legende-txt { margin: 6px 0 0; font-size: 13px; line-height: 18px; }
.legende-tags { margin: 6px 0 0; font-family: "IBM Plex Mono", monospace; font-size: 12px; opacity: .82; }
.legende .etiquette { border-color: rgba(255,255,255,.6); color: #fff; transform: rotate(-3deg); transform-origin: bottom left; }
.legende .etiquette .part { background: #fff; color: #0a0a0a; }

/* ------------------- Création : média et bibliothèque ------------------- */

.outils {
  display: flex;
  align-items: center;
  gap: 10px;
}
.outil {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.outil:hover { border-color: var(--ink); color: var(--ink); }

#apercu-media {
  position: relative;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: #0a0a0a;
}
#apercu-media video, #apercu-media img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.retirer {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  border: 0; border-radius: 999px;
  background: rgba(10,10,10,.72);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

#tiroir-biblio { margin-top: 10px; }
#tiroir-biblio summary {
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
#biblio {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.biblio-item {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #0a0a0a;
  cursor: pointer;
  aspect-ratio: 9 / 16;
}
.biblio-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.biblio-item:hover { border-color: var(--ink); }

/* Vignette vidéo cliquable dans le fil */
.media-btn { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--hairline); cursor: pointer; }
.media-jouer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  pointer-events: none;
}
.tags { margin: 5px 0 0; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-3); }

/* -------- Le Journal dans le fil : une carte, pas un onglet -------- */
.news-bloc {
  display: block;
  margin-top: 10px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--page);
}
.news-bloc:hover { border-color: var(--ink); }
.news-img { display: block; width: 100%; height: 168px; object-fit: cover; }
.news-bloc .news-cat {
  display: block;
  padding: 12px 14px 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.news-h { margin: 4px 0 0; padding: 0 14px; font-size: 18px; line-height: 22px; font-style: italic; font-weight: 700; }
.news-p { margin: 6px 0 0; padding: 0 14px 14px; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* ==================================================================
   Ajouts : tri du fil, bandeau de goûts, commentaires, profil.
   ================================================================== */

/* ------------------- Le tri : Pour toi / Récent / Abos ------------------- */
.sous-onglets {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
}
.sous-onglets button {
  flex: 0 0 auto;
  border: 1px solid var(--hairline);
  background: var(--raised);
  color: var(--ink-3);
  font: inherit;
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.sous-onglets button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--sur-ink);
}

/* ---- Ce qui règle ton fil : l'archétype réel + les mots-clés suivis ---- */
.bandeau-gouts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px 2px;
  scrollbar-width: none;
}
.bandeau-gouts::-webkit-scrollbar { display: none; }
.bandeau-gouts > * { flex: 0 0 auto; }

.pastille-arch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--teinte, var(--acide));
  color: #0a0a0a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(10,10,10,.12);
}
.pastille-arch::before { content: "○"; font-size: 12px; }
/* La pastille pleine porte l'encre d'archétype, donc du noir dessus.
   La pastille VIDE — « Fais le quiz » — n'a pas de fond : elle héritait
   quand même de ce noir, et se retrouvait à 1,03:1 sur le papier de
   nuit. Invisible pour qui arrive sans avoir fait le quiz, c'est-à-dire
   exactement la personne à qui elle s'adresse. */
.pastille-vide {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.tag {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }
.tag.suivi { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }

/* --------------------------- Les commentaires ---------------------------
   Deux sous chaque poste, tous dans une feuille qui monte. */
.comms-apercu, .comms { list-style: none; margin: 0; padding: 0; }
.comms-apercu {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.comm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
}
.avatar.mini { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.comm-corps { flex: 1; min-width: 0; }
.comm-tete { margin: 0; display: flex; gap: 6px; align-items: baseline; }
.comm-nom { font-size: 12px; font-weight: 600; }
.comm-temps { font-size: 11px; color: var(--ink-3); }
.comm-txt { margin: 1px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.comm-aime {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--ink-3);
  font-size: 10px;
  flex: 0 0 auto;
  padding-top: 3px;
}
.comm-aime svg { width: 13px; height: 13px; }
.comm-aime i { font-style: normal; font-family: "IBM Plex Mono", monospace; }

.voir-comms {
  margin-top: 2px;
  border: 0;
  background: none;
  padding: 2px 0;
  font: inherit;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
}
.voir-comms:hover { color: var(--ink); text-decoration: underline; }

#feuille-comm { position: fixed; inset: 0; z-index: 60; }
#feuille-fond { position: absolute; inset: 0; background: rgba(10,10,10,.45); }
.feuille {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 78dvh;
  display: flex;
  flex-direction: column;
  background: var(--raised);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.22);
  animation: monte .22s cubic-bezier(.4,0,.2,1);
}
@keyframes monte { from { transform: translateY(14%); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .feuille { animation: none; } }

.feuille-tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--hairline);
}
.feuille-titre { margin: 0; font-size: 15px; font-weight: 600; }
.feuille-sous { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }
/* Tous les ✕ de fermeture, pas seulement deux.
   La page en contient quatorze ; trois étaient stylés, les autres
   s'affichaient en bouton natif minuscule — d'où l'impossibilité de
   sortir des réglages. Le sélecteur par suffixe couvre aussi ceux
   qu'on ajoutera. */
[id$="-fermer"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--inset);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
[id$="-fermer"]:hover { background: var(--hairline); }
#feuille-liste { overflow-y: auto; padding: 8px 16px 4px; flex: 1; }
.feuille .saisie { border-top: 1px solid var(--hairline); }

body.feuille-ouverte { overflow: hidden; }

/* Dans les looks, la feuille reste claire : on lit mieux du texte sur blanc. */
body[data-mode="looks"] .feuille { background: #141414; color: #fff; }
body[data-mode="looks"] .feuille .comm-txt { color: rgba(255,255,255,.78); }
body[data-mode="looks"] .feuille .feuille-tete,
body[data-mode="looks"] .feuille .saisie { border-color: rgba(255,255,255,.14); }
body[data-mode="looks"] #feuille-fermer { background: rgba(255,255,255,.12); color: #fff; }
body[data-mode="looks"] .feuille input {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}

/* ---------------------------- Le compteur looks ---------------------------- */
.looks-compte {
  position: absolute;
  z-index: 5;
  margin: 0;
  padding: 4px 10px;
  top: 10px; left: 12px;
  border-radius: 999px;
  background: rgba(10,10,10,.5);
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  pointer-events: none;
}
#vue-looks { position: relative; }

/* ------------------------------- Le profil ------------------------------- */
#vue-profil { padding: 4px 0 24px; }


.profil-chiffres {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-block: 1px solid var(--hairline);
}
.profil-chiffres > * {
  background: var(--page);
  padding: 12px 8px;
  text-align: center;
}
.profil-chiffres b { display: block; font-size: 20px; font-weight: 700; }
.profil-chiffres span { font-size: 11px; color: var(--ink-3); }

/* La seule métrique qui compte vraiment ici : ce qui irait aux ateliers.
   Formulée au conditionnel — on n'invente pas des achats. */
.carte-soutien {
  margin: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--sur-ink);
}
.carte-soutien-h { margin: 0; font-size: 12px; color: rgba(255,255,255,.62); }
.carte-soutien-n { margin: 4px 0 6px; font-size: 34px; font-weight: 700; color: var(--acide); letter-spacing: -0.02em; }
.carte-soutien-p { margin: 0; font-size: 12px; line-height: 17px; color: rgba(255,255,255,.72); }

.profil-bloc { padding: 4px 16px 18px; }
.profil-bloc h3 { margin: 14px 0 6px; font-size: 15px; }
.profil-note { margin: 0 0 12px; font-size: 12px; line-height: 17px; color: var(--ink-3); }

.barres { list-style: none; margin: 0; padding: 0; }
.barre-l { display: grid; grid-template-columns: 92px 1fr 30px; align-items: center; gap: 9px; padding: 4px 0; }
.barre-nom { font-size: 12px; color: var(--ink-2); }
.barre { display: block; height: 7px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.barre i { display: block; height: 100%; border-radius: 999px; transition: width .3s cubic-bezier(.4,0,.2,1); }
.barre-n { font-size: 11px; color: var(--ink-3); text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.btn-ghost {
  display: inline-block;
  /* Sans ça, un <button class="btn-ghost"> hérite du fond gris du
     navigateur alors qu'un <a> reste transparent. */
  background: transparent;
  font: inherit;
  cursor: pointer;
  margin-top: 12px;
  padding: 8px 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--sur-ink); }

.vide { margin: 6px 0; font-size: 13px; color: var(--ink-3); }

/* Le profil garde le fond clair même si on vient des looks. */
body[data-mode="profil"] { background: var(--page); }

/* -------------------------------- Desktop -------------------------------- */
@media (min-width: 900px) {
  .profil-chiffres { border-inline: 1px solid var(--hairline); }
}

/* La barre de saisie de la feuille suit le mode sombre des looks, et
   respecte l'encoche du bas. */
body[data-mode="looks"] .feuille .saisie { background: #141414; }
.feuille .saisie { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

/* Sur grand écran la feuille ne prend pas toute la largeur : elle se
   cale sur la colonne de lecture, sinon les commentaires s'étirent sur
   1 400 px et deviennent illisibles. */
@media (min-width: 720px) {
  .feuille {
    max-width: 560px;
    margin-inline: auto;
    bottom: 18px;
    border-radius: 18px;
    max-height: 70dvh;
  }
  .feuille .saisie { padding-bottom: 10px; }
}

/* ==================================================================
   Vidéos jouées dans le fil, et le profil complet.
   ================================================================== */

/* ------------------ La vidéo joue seule, le son se prend ------------------ */
.media-video { position: relative; }
.media-video .media-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.media-video video { display: block; width: 100%; }

.son {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
.son svg { width: 16px; height: 16px; }
.son[aria-pressed="true"] { background: rgba(10,10,10,.78); }

/* Le marque-page se remplit quand il est actif, comme le cœur. */
.action.garde[aria-pressed="true"] { color: var(--ink); }
.action.garde[aria-pressed="true"] svg { fill: currentColor; }
.rail-btn.garde[aria-pressed="true"] svg { fill: currentColor; }

/* ------------------------------ Les bulles ------------------------------ */
.stories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 16px 14px;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }

.bulle-story {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 66px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.bulle-story .anneau {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  padding: 2px;
  background: var(--teinte, var(--ink));
}
.bulle-story.vue .anneau { background: var(--hairline); }
.bulle-story .anneau img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--page);
}
.bulle-moi .anneau { background: var(--hairline); }
.bulle-moi .anneau i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--acide);
  color: #0a0a0a;
  border: 2px solid var(--page);
  font-style: normal;
  font-size: 13px;
  line-height: 1;
}
.bulle-nom {
  font-size: 11px;
  color: var(--ink-3);
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------- Les chiffres du profil -------------------------- */
.profil-chiffres { grid-template-columns: repeat(4, 1fr); }
.profil-chiffres a { text-decoration: none; color: inherit; }
.profil-chiffres a:hover b { text-decoration: underline; }

/* ------------------- Les collections : postes, j'aime, … ------------------- */
.onglets-profil {
  display: flex;
  gap: 2px;
  margin-top: 14px;
  border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
  scrollbar-width: none;
}
.onglets-profil::-webkit-scrollbar { display: none; }
.onglets-profil button {
  flex: 1 0 auto;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-3);
  padding: 11px 12px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.onglets-profil button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.onglets-profil i {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-3);
}

/* ------------------------- La grille façon Instagram ------------------------- */
.grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px 0;
}
.case {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: var(--inset);
  cursor: pointer;
}
.case img, .case video { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-jouer {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
  pointer-events: none;
}
.case-jouer svg { width: 15px; height: 15px; }
.case-texte {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  background: var(--raised);
  border-left: 3px solid var(--teinte, var(--hairline));
  text-align: left;
}
.case-texte span {
  font-size: 11px;
  line-height: 15px;
  color: var(--ink-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
}
.vide-grille { padding: 26px 16px; text-align: center; }

/* ------------------------------- Le réseau ------------------------------- */
.profil-bloc h3 small { font-weight: 400; font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.gens { list-style: none; margin: 0 0 4px; padding: 0; }
.gens-l {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.gens-l:last-child { border-bottom: 0; }
.gens-corps { flex: 1; min-width: 0; }
.gens-nom { display: block; font-size: 14px; font-weight: 600; }
.gens-nom em {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--acide);
  color: #0a0a0a;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}
.gens-sous { display: block; font-size: 12px; color: var(--ink-3); }
.gens-l .tag { flex: 0 0 auto; }

@media (min-width: 720px) {
  .grille { gap: 4px; padding: 4px 0; }
}

/* Le fond des cases de chiffres vaut aussi pour les liens. */
.profil-chiffres > a { display: block; text-align: center; padding: 12px 8px; }

/* --------------------------- La fiche d'achat ---------------------------
   La décomposition est au-dessus du bouton, jamais en dessous. */
#feuille-achat { position: fixed; inset: 0; z-index: 70; }
#achat-fond { position: absolute; inset: 0; background: rgba(10,10,10,.5); }
.feuille-achat { max-height: 88dvh; }
.achat-corps { overflow-y: auto; padding: 14px 16px 18px; flex: 1; }
.achat-pied {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  background: var(--raised);
}
.achat-prix { flex: 1; font-size: 20px; font-weight: 700; }
.achat-pied .btn { flex: 0 0 auto; }

.fiche-tete { display: flex; gap: 12px; align-items: flex-start; }
.fiche-vue {
  flex: 0 0 92px;
  width: 92px;
  height: 116px;
  border-radius: 10px;
  object-fit: cover;
  border-left: 3px solid var(--teinte, var(--hairline));
}
.fiche-marque {
  margin: 2px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.fiche-nom { margin: 3px 0 4px; font-size: 18px; line-height: 22px; }
.fiche-qui { margin: 0; font-size: 12px; color: var(--ink-3); }
.fiche-mot { margin: 12px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }

.dec-oeil {
  margin: 20px 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.dec-l {
  display: grid;
  grid-template-columns: 1fr auto 52px;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}
.dec-nom { font-size: 13px; font-weight: 600; }
.dec-nom em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 1px;
}
.dec-val { font-size: 14px; font-weight: 600; }
.dec-pct { font-size: 11px; color: var(--ink-3); text-align: right; }
.dec-total { border-bottom: 0; padding-top: 12px; }
.dec-total .dec-nom, .dec-total .dec-val { font-size: 16px; }
.dec-lien {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
}
.dec-lien:hover { color: var(--ink); }

.fiche-lab {
  margin: 20px 0 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tailles { display: flex; gap: 7px; flex-wrap: wrap; }
.taille {
  min-width: 46px;
  padding: 8px 13px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.taille[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }

/* Le bouton Acheter du fil porte son mot : c'est la marketplace. */
.action.acheter { gap: 6px; font-weight: 600; color: var(--ink); }
.action.acheter span { font-size: 12px; }

body[data-mode="boutique"] { background: var(--page); }

@media (min-width: 720px) {
  .pieces { grid-template-columns: repeat(3, 1fr); }
  .feuille-achat { max-width: 560px; margin-inline: auto; }
  .achat-pied { padding-bottom: 12px; }
}

/* La pastille du panier n'avait plus de règle de base — seulement sa
   couleur en thème teinté (plus bas) et son [hidden] ci-dessous. Sans
   `position`, elle devenait une SECONDE case du bouton, qui est un
   `display:grid; place-items:center` : le chiffre s'empilait SOUS le
   sac au lieu de se poser sur son coin, et poussait l'icône vers le
   haut. Elle sort du flux et se cale en haut à droite. Le fond reste
   `--ink` par défaut ; `body[data-teinte]` le remplace par l'encre
   d'archétype, comme avant. */
.icone-btn { position: relative; }
.pastille-nb {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sur-ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* `display:grid` battait le [hidden] du navigateur : la pastille
   restait visible à 0. */
.pastille-nb[hidden] { display: none !important; }

.fiche-drop {
  margin: 12px 0 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--inset);
  font-size: 12px;
  line-height: 17px;
  color: var(--ink-2);
}
.fiche-drop b { display: block; margin-bottom: 4px; font-size: 11px; color: var(--ink); }

/* ==================================================================
   LA BOUTIQUE — reprise à l'identique de /feed/.
   Mêmes sections, même ordre, même thème sombre : bandeau archétype,
   bloc Code Neybi, « Ton feed » et sa jauge de composition, puis les
   cartes pièces. Ce n'est plus une page à part, c'est un onglet.
   ================================================================== */

/* La Boutique avait son noir à elle, quel que soit le thème : elle
   reproduisait /feed/, qui était sombre. Résultat, on passait l'app en
   clair et cet onglet-là restait noir. Elle suit maintenant le thème.
   Son caractère vient de la mise en page et des pleines images, pas
   d'une couleur écrite en dur.

   Deux familles à ne pas confondre, et c'est tout l'enjeu du passage :
   — les SURFACES (barres, cartes, blocs) suivent le thème ;
   — le texte posé SUR UNE PHOTO reste blanc, en clair comme en nuit,
     parce que son fond n'est pas le papier mais l'image. */
body[data-mode="boutique"] {
  background: var(--page);
  --bq-carte: var(--raised);
  --bq-trait: var(--hairline);
  --bq-creux: var(--inset);
}
body[data-mode="boutique"] .entete { background: color-mix(in srgb, var(--page) 92%, transparent); border-bottom-color: var(--hairline); }
body[data-mode="boutique"] .onglet { color: var(--ink-3); }
body[data-mode="boutique"] .onglet[aria-selected="true"] { color: var(--ink); }
body[data-mode="boutique"] .onglet[aria-selected="true"]::after { background: var(--ink); }
body[data-mode="boutique"] .icone-btn { color: var(--ink); }
body[data-mode="boutique"] .nav { background: color-mix(in srgb, var(--page) 94%, transparent); border-top-color: var(--hairline); }
body[data-mode="boutique"] .nav a { color: var(--ink-3); }
body[data-mode="boutique"] .nav a[aria-current="page"] { color: var(--ink); }
body[data-mode="boutique"] .nav a[aria-current="page"] .puce { background: var(--ink); }

#vue-boutique { color: var(--ink); padding-bottom: 8px; }

/* ------------------------- Bandeau archétype ------------------------- */
.bq-hero { position: relative; min-height: 292px; display: flex; align-items: flex-end; overflow: hidden; }
.bq-hero-fond {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
}
.bq-hero::after {
  content: ""; position: absolute; inset: 0;
  /* Le voile reste sombre là où le texte est posé — c'est lui qui le
     rend lisible sur la photo — et ne se fond dans le papier que sur
     les tout derniers pourcents. Le faire finir sur `--page` dès 55 %
     mettait du texte blanc sur une photo éclaircie en thème clair. */
  background: linear-gradient(180deg,
    rgba(10,10,10,.15) 0%,
    rgba(10,10,10,.55) 55%,
    rgba(10,10,10,.88) 88%,
    var(--page) 100%);
}
/* Le texte du hero porte SON voile, il ne dépend pas de celui de la
   photo. Une photo claire — et il y en a — laissait « CANDY MBALA »
   en blanc sur du gris clair. La sonde de contraste ne le voit pas :
   elle ne juge pas ce qui est posé sur une image, faute de savoir ce
   qu'il y a dessous. D'où ce voile local, qui rend la question sans
   objet quelle que soit la photo. */
.bq-hero-txt {
  position: relative; z-index: 1;
  width: 100%;
  padding: 60px 16px 18px;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,.72) 46%, rgba(10,10,10,.88) 100%);
}
.bq-hero-qui {
  margin: 0 0 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .1em;
  color: rgba(255,255,255,.72);
}
.bq-hero-nom {
  margin: 0;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700; font-size: 44px; line-height: .96;
  letter-spacing: -.01em; text-transform: uppercase;
  color: var(--teinte, #fff);
}
.bq-hero-nuance {
  margin: 6px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.bq-hero-nuance b { color: var(--teinte, #fff); font-weight: 400; }
.bq-hero-vide { min-height: 0; background: var(--raised); padding-top: 30px; }
.bq-hero-vide::after { display: none; }
.bq-hero-vide .bq-hero-nom { color: var(--ink); font-size: 34px; }
.bq-hero-vide .btn { margin-top: 14px; }

/* --------------------------- Bloc Code Neybi --------------------------- */
.bq-code {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 16px 20px;
  background: var(--bq-carte, var(--raised));
  border-block: 1px solid var(--bq-trait, var(--hairline));
  text-decoration: none; color: var(--ink);
}
.bq-code-l { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bq-code-l span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
.bq-code-gros {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700; font-size: 34px; line-height: 1;
  color: var(--ink);
}
.bq-code-jauge { display: block; height: 5px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.bq-code-jauge i { display: block; height: 100%; background: var(--accent); }
/* L'encre d'archétype ÉCRITE sur du papier ne tient pas : #FF4438 sur
   blanc, c'est 3,42:1, et #DCDCDC pire encore. On l'assombrit pour le
   texte — l'aplat, lui, garde la teinte de marque. 45 % suffit pour
   les cinq archétypes ; c'est le gris argent qui fixe la limite. */
:root { --encre-accent: color-mix(in srgb, var(--accent, #c6ff3d) 45%, #0a0a0a); }
body[data-theme="sombre"] { --encre-accent: var(--accent); }
.bq-code .bq-code-actif { color: var(--encre-accent); }

/* Le mélange d'archétypes porte sa teinte en variable, et c'est la
   feuille de style qui décide de l'assombrir : sur le papier clair il
   faut la foncer, sur le noir il faut la laisser vive. Le gabarit ne
   peut pas le savoir — il ne connaît pas le thème. */
.bq-feed-mix b { color: color-mix(in srgb, var(--t, var(--accent)) 45%, #0a0a0a); }
body[data-theme="sombre"] .bq-feed-mix b { color: var(--t, var(--accent)); }

/* ------------------------------ Ton feed ------------------------------ */
.bq-feed-tete { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 9px; }
.bq-feed-l { display: flex; justify-content: space-between; align-items: center; }
.bq-feed-l > span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
.bq-feed-n { color: var(--ink-3) !important; }
.bq-feed-jauge { display: flex; height: 5px; gap: 2px; }
.bq-feed-jauge i { display: block; flex-basis: 0; border-radius: 999px; }
.bq-feed-mix {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3);
}
.bq-feed-mix b { font-weight: 400; }

/* ---------------------------- Cartes pièces ---------------------------- */
/* Ce qui est posé SUR une photo garde son blanc dans les trois thèmes :
   son fond n'est pas le papier, c'est l'image et son voile. C'est la
   seule exception à « la Boutique suit le thème », et elle est nette —
   une carte, un hero, rien d'autre. */
.bq-carte, .bq-carte .bq-nom, .bq-hero-txt { color: #fff; }
/* Sauf le hero vide : pas de photo, donc pas de blanc. Sans ça, « Pas
   encore d'archétype » s'écrivait en blanc sur blanc — l'écran que
   voit exactement quelqu'un qui n'a pas fait le quiz. */
.bq-hero-vide .bq-hero-txt { color: var(--ink); background: none; padding-top: 0; }
.bq-hero-vide .bq-hero-qui, .bq-hero-vide .bq-hero-nuance { color: var(--ink-3); }
.bq-cartes { display: flex; flex-direction: column; gap: 14px; padding: 6px 16px 22px; }
.bq-carte {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #141414;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
}
.bq-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bq-carte::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.28) 0%, rgba(10,10,10,0) 34%, rgba(10,10,10,.72) 100%);
}
.bq-pastille {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--teinte, #fff);
  color: #0a0a0a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
.bq-bas { position: relative; z-index: 2; width: 100%; padding: 14px; }
.bq-nom { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.bq-marque {
  margin: 2px 0 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.78);
}
.bq-actions { display: flex; gap: 12px; align-items: center; }
.bq-coeur {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}
.bq-coeur svg { width: 18px; height: 18px; }
.bq-coeur[aria-pressed="true"] { background: #fff; border-color: #fff; color: #0a0a0a; }
.bq-acheter {
  flex: 1;
  min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.bq-acheter span {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 800; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
}
.bq-acheter b { font-size: 12px; font-weight: 700; color: var(--teinte, #fff); }

/* Le Journal s'intercale tous les trois postes, comme sur /feed/. */
.bq-news {
  display: block;
  border: 1px solid var(--bq-trait, var(--hairline));
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--bq-carte, var(--raised));
}
.bq-news img { display: block; width: 100%; height: 150px; object-fit: cover; }
.bq-news-cat {
  display: block; padding: 12px 14px 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.bq-news-h { display: block; padding: 4px 14px 0; font-size: 18px; line-height: 22px; font-weight: 700; }
.bq-news-p { display: block; padding: 6px 14px 14px; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* La fiche d'achat suit le sombre quand on vient de la boutique. */
body[data-mode="boutique"] .feuille { background: var(--raised); color: var(--ink); }
body[data-mode="boutique"] .feuille .feuille-tete,
body[data-mode="boutique"] .dec, body[data-mode="boutique"] .dec-l,
body[data-mode="boutique"] .achat-pied { border-color: var(--hairline); }
body[data-mode="boutique"] .fiche-mot, body[data-mode="boutique"] .dec-nom em,
body[data-mode="boutique"] .dec-pct, body[data-mode="boutique"] .fiche-qui { color: var(--ink-2); }
body[data-mode="boutique"] .fiche-drop { background: var(--inset); color: var(--ink-2); }
body[data-mode="boutique"] .fiche-drop b { color: var(--ink); }
body[data-mode="boutique"] #achat-fermer { background: var(--inset); color: var(--ink); }
body[data-mode="boutique"] .achat-pied { background: var(--raised); }
body[data-mode="boutique"] .taille { color: var(--ink-2); border-color: var(--hairline); }
body[data-mode="boutique"] .taille[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }
body[data-mode="boutique"] .dec-lien { color: var(--ink-2); }

@media (min-width: 720px) {
  .bq-cartes { display: grid; grid-template-columns: repeat(2, 1fr); }
  .bq-news { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .bq-cartes { grid-template-columns: repeat(3, 1fr); }
}

/* ==================================================================
   LE PROFIL — en-tête façon X, grille façon Instagram.
   X pour l'identité : bannière, avatar qui chevauche, bio, ligne de
   métadonnées, compteurs en toutes lettres. Instagram pour ce qu'on
   a produit : bulles en haut, grille trois colonnes en dessous.
   ================================================================== */

.pf-banniere {
  position: relative;
  height: 132px;
  background: var(--teinte, var(--inset));
  overflow: hidden;
}
.pf-banniere img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  opacity: .85;
}
.pf-banniere::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.08), rgba(10,10,10,.30));
}

.pf-tete {
  /* La bannière est `position:relative`, donc elle peindrait au-dessus
     d'un frère non positionné : l'avatar passait dessous. */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  margin-top: -38px;
}
.pf-avatar {
  width: 84px; height: 84px;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid var(--page);
  background: var(--page);
  flex: 0 0 auto;
}
/* Les deux pastilles du profil tenaient sur 247 px à 375 px de large,
   alors qu'il leur en faut 283 : « Partager mon archétype » se coupait
   en plein milieu d'un mot. Elles passent à la ligne entières plutôt
   que de se casser, et se recollent sur une seule rangée dès 430 px. */
.pf-boutons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 46px; }
.pf-btn { margin: 0; padding: 7px 12px; font-size: 13px; white-space: nowrap; }

.pf-ident { padding: 10px 16px 4px; }
.pf-nom {
  margin: 0;
  font-size: 22px; font-weight: 700; letter-spacing: -.015em;
  display: flex; align-items: center; gap: 6px;
}
.pf-coche {
  width: 19px; height: 19px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--teinte, var(--ink));
  color: #0a0a0a;
  font-size: 11px; line-height: 1;
}
.pf-handle { margin: 1px 0 0; font-size: 14px; color: var(--ink-3); }
.pf-bio { margin: 10px 0 0; font-size: 14px; line-height: 20px; }

.pf-meta {
  margin: 10px 0 0;
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  font-size: 13px; color: var(--ink-3);
}
.pf-meta a { color: var(--ink-3); }
.pf-meta a:hover { color: var(--ink); }

.pf-compte { margin: 10px 0 0; display: flex; gap: 16px; font-size: 13px; }
.pf-compte a { color: var(--ink-3); text-decoration: none; }
.pf-compte a:hover { text-decoration: underline; }
.pf-compte b {
  color: var(--ink); font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.pf-cta { margin-top: 14px; display: inline-block; }

/* La ligne de bulles se recolle sous l'identité. */
#vue-profil .stories { padding-top: 14px; }

@media (min-width: 720px) {
  .pf-banniere { height: 190px; }
  .pf-avatar { width: 104px; height: 104px; }
  .pf-tete { margin-top: -48px; }
  .pf-boutons { padding-top: 56px; }
}

/* ==================================================================
   L'APPARENCE
   Trois axes indépendants, tous portés par des variables sur <body> :
   le thème (clair / nuit), la teinte d'archétype, le mouvement.
   Aucune règle n'est dupliquée : on redéfinit les tokens, pas les
   composants.
   ================================================================== */

:root {
  --accent: var(--acide);        /* vert NEYBI par défaut */
  --logo-fond: var(--accent);
  --logo-encre: #0a0a0a;
  --t-court: 160ms;
  --t-moyen: 260ms;
  --courbe: cubic-bezier(.4, 0, .2, 1);
  --ressort: cubic-bezier(.34, 1.4, .64, 1);
}

/* --------------------------- Le mode nuit --------------------------- */
body[data-theme="sombre"] {
  --page: #0e0e0f;
  --raised: #17171a;
  --inset: #1f1f23;
  --ink: #f4f4f2;
  --ink-2: #b4b4b0;
  --ink-3: #85858b;
  --hairline: #2b2b31;
  --sur-ink: #0a0a0a;
  color-scheme: dark;
}
body[data-theme="sombre"] .etiquette { border-color: var(--hairline); }
body[data-theme="sombre"] .carte-soutien { background: var(--raised); border: 1px solid var(--hairline); }
body[data-theme="sombre"] .son { background: rgba(255,255,255,.16); }
body[data-theme="sombre"] .pf-avatar,
body[data-theme="sombre"] .bulle-story .anneau img { border-color: var(--page); }
body[data-theme="sombre"] .case-texte { background: var(--raised); }
body[data-theme="sombre"] .bq-hero-vide { background: var(--raised); }

/* En nuit, le fil et les looks partagent le même noir : plus de rupture
   quand on passe d'un onglet à l'autre. */
body[data-theme="sombre"][data-mode="fil"],
body[data-theme="sombre"][data-mode="messages"],
body[data-theme="sombre"][data-mode="profil"] { background: var(--page); }

/* ----------------------- Le mode archétype -----------------------
   `--accent` est posé en ligne par le JS avec l'encre de l'archétype.
   Tout ce qui portait le vert NEYBI le suit — logo compris. */
body[data-teinte] { --acide: var(--accent); }
body[data-teinte] .badge-marque { background: var(--accent); color: #0a0a0a; }
body[data-teinte] .carte-soutien-n { color: var(--accent); }
body[data-teinte] .gens-nom em { background: var(--accent); }
body[data-teinte] .bulle-moi .anneau i { background: var(--accent); }
body[data-teinte] .onglet[aria-selected="true"]::after { background: var(--accent); }
body[data-teinte] .nav a[aria-current="page"] .puce { background: var(--accent); }
body[data-teinte] .pastille-nb { background: var(--accent); color: #0a0a0a; }

/* Le logo suit : fond à la teinte, tracé toujours noir — le contraste
   noir sur les cinq encres est vérifié (cf. tokens on-archetype). */
.logo rect { transition: fill var(--t-moyen) var(--courbe); }
body[data-teinte] { --logo-fond: var(--accent); }

/* En nuit sans teinte, le logo garde le vert : c'est la marque. */
body[data-theme="sombre"]:not([data-teinte]) { --logo-fond: var(--acide); }

/* ==================================================================
   LE MOUVEMENT
   Discret et court. Coupé net si la personne l'a demandé, dans les
   réglages ou dans son système.
   ================================================================== */

body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
  scroll-behavior: auto !important;
}

body[data-motion="on"] { --mv: 1; }

/* Changement d'onglet : la vue se pose. */
body[data-motion="on"] .vue:not([hidden]) { animation: pose var(--t-moyen) var(--courbe); }
@keyframes pose { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Les postes arrivent en cascade — courte, sinon ça devient une attente. */
body[data-motion="on"] #liste-postes > .poste,
body[data-motion="on"] .bq-carte,
body[data-motion="on"] .piece {
  animation: monteDoux 320ms var(--courbe) both;
}
@keyframes monteDoux { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body[data-motion="on"] #liste-postes > .poste:nth-child(1) { animation-delay: 0ms; }
body[data-motion="on"] #liste-postes > .poste:nth-child(2) { animation-delay: 40ms; }
body[data-motion="on"] #liste-postes > .poste:nth-child(3) { animation-delay: 80ms; }
body[data-motion="on"] #liste-postes > .poste:nth-child(4) { animation-delay: 120ms; }
body[data-motion="on"] #liste-postes > .poste:nth-child(n+5) { animation-delay: 150ms; }

/* Le cœur : une impulsion, pas un rebond de dessin animé. */
body[data-motion="on"] .action.aime[aria-pressed="true"] svg,
body[data-motion="on"] .rail-btn.aime[aria-pressed="true"] svg,
body[data-motion="on"] .bq-coeur[aria-pressed="true"] svg { animation: bat 340ms var(--ressort); }
@keyframes bat { 0% { transform: scale(1); } 42% { transform: scale(1.32); } 100% { transform: scale(1); } }

/* Les états qui changent glissent au lieu de sauter. */
.onglet, .sous-onglets button, .tag, .taille, .btn, .btn-ghost,
.action, .rail-btn, .nav a, .icone-btn, .onglets-profil button {
  transition: color var(--t-court) var(--courbe),
              background-color var(--t-court) var(--courbe),
              border-color var(--t-court) var(--courbe),
              transform var(--t-court) var(--courbe);
}
body[data-motion="on"] .btn:active,
body[data-motion="on"] .bq-acheter:active,
body[data-motion="on"] .piece:active { transform: scale(.975); }

/* Le trait sous l'onglet actif glisse. */
.onglet::after { transition: background-color var(--t-court) var(--courbe), transform var(--t-moyen) var(--ressort); }

/* Les jauges se remplissent au lieu d'apparaître pleines. */
.barre i, .drop-jauge i, .bq-code-jauge i { transition: width 620ms var(--courbe); }

/* Le fond de page suit le thème sans clignoter. */
body { transition: background-color var(--t-moyen) var(--courbe), color var(--t-moyen) var(--courbe); }

/* ==================================================================
   LES RÉGLAGES — structure façon X : sections, lignes, interrupteurs.
   ================================================================== */
#feuille-reglages { position: fixed; inset: 0; z-index: 80; }
#reglages-fond { position: absolute; inset: 0; background: rgba(10,10,10,.5); }
.feuille-reglages { max-height: 86dvh; }
.reglages-corps { overflow-y: auto; padding: 4px 0 calc(18px + env(safe-area-inset-bottom)); }

.rg-sec { padding: 10px 0 4px; }
.rg-sec h3 {
  margin: 10px 0 2px;
  padding: 0 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.rg-l {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 0; border-bottom: 1px solid var(--hairline);
  background: none; color: inherit; font: inherit; text-align: left;
}
.rg-sec .rg-l:last-child { border-bottom: 0; }
.rg-lien { cursor: pointer; text-decoration: none; }
.rg-lien:hover { background: var(--inset); }
.rg-txt { flex: 1; min-width: 0; }
.rg-txt b { display: block; font-size: 14px; font-weight: 500; }
.rg-txt em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.rg-fleche { color: var(--ink-3); flex: 0 0 auto; }
.rg-danger .rg-txt b { color: var(--print-angel); }

.rg-choix { display: flex; gap: 3px; flex: 0 0 auto; background: var(--inset); border-radius: 999px; padding: 3px; }
.rg-choix button {
  border: 0; background: none; font: inherit; font-size: 12px;
  color: var(--ink-3); padding: 5px 11px; border-radius: 999px; cursor: pointer;
}
.rg-choix button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); }

.rg-bascule {
  flex: 0 0 auto;
  width: 46px; height: 27px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--inset);
  cursor: pointer; padding: 0;
  transition: background-color var(--t-court) var(--courbe), border-color var(--t-court) var(--courbe);
}
.rg-bascule i {
  display: block; width: 21px; height: 21px;
  margin: 2px; border-radius: 999px;
  background: var(--raised);
  box-shadow: 0 1px 3px rgba(0,0,0,.24);
  transition: transform var(--t-moyen) var(--ressort);
}
.rg-bascule[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.rg-bascule[aria-checked="true"] i { transform: translateX(19px); background: #fff; }

.rg-pied { margin: 6px 0 0; padding: 12px 16px 0; font-size: 12px; line-height: 17px; color: var(--ink-3); border-top: 1px solid var(--hairline); }

@media (min-width: 720px) {
  .feuille-reglages { max-width: 520px; margin-inline: auto; bottom: 18px; border-radius: 18px; }
}

/* ---------- Le profil, suite : la boucle de rétention rendue lisible ---------- */
.pf-progres {
  display: block;
  margin: 16px;
  padding: 14px 15px 13px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--raised);
  text-decoration: none;
  color: inherit;
}
.pf-progres:hover { border-color: var(--accent); }
.pf-progres-l { display: flex; justify-content: space-between; align-items: baseline; }
.pf-progres-l span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.pf-progres-l b { font-size: 20px; font-weight: 700; color: var(--ink); }
.pf-progres-jauge {
  display: block; height: 5px; margin: 9px 0 11px;
  border-radius: 999px; background: var(--inset); overflow: hidden;
}
.pf-progres-jauge i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pf-progres-actions { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.pf-act { font-size: 12px; color: var(--ink-3); }
.pf-act.ok { color: var(--ink); }
.pf-progres-note { display: block; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--ink-3); }

/* Un halo à la couleur de l'archétype derrière l'avatar. */
.pf-tete::before {
  content: "";
  position: absolute;
  left: 6px; top: -18px;
  width: 108px; height: 108px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .22;
  filter: blur(22px);
  pointer-events: none;
}
body:not([data-teinte]) .pf-tete::before { opacity: .14; }

/* La barre d'onglets du profil colle en haut quand on descend. */
.onglets-profil {
  position: sticky;
  top: var(--entete-h, 112px);
  z-index: 4;
  background: var(--page);
}


/* ==================================================================
   LISIBILITÉ — corrections mesurées, pas devinées.
   Chaque règle ci-dessous répond à un contraste relevé sous le seuil
   WCAG AA (4.5:1 pour le texte courant, 3:1 pour le grand texte),
   sur les dix combinaisons thème × archétype.
   ================================================================== */

/* Deux des cinq encres d'archétype ne passent pas sur fond clair :
   Block Star (1,18:1) et Supastar (1,63:1) sont trop lumineuses.
   On ne les met donc JAMAIS en texte sur la page — seulement en aplat,
   avec de l'encre noire dessus, ce qui est le contraste vérifié. */
/* `.bq-feed-mix` n'a jamais eu besoin de la pastille : ses couleurs
   sont toujours posées sur un fond sombre (Boutique et Achats), où
   elles passent largement. La mettre ici créait un conflit avec les
   couleurs d'état posées en ligne. */
.pf-progres-l b,
.rg-pied b {
  color: var(--ink) !important;
  background: var(--accent);
  padding: 1px 7px;
  border-radius: 999px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.rg-pied b, .pf-progres-l b { color: #0a0a0a !important; }

/* Rouge NEYBI sur fond clair : 3,42:1. On l'assombrit pour le texte,
   l'aplat garde la teinte de marque. */
.rg-danger .rg-txt b { color: #d92d22; }
body[data-theme="sombre"] .rg-danger .rg-txt b { color: #ff6b60; }

/* Compteurs et libellés discrets de la boutique. Ils passent par les
   jetons depuis que la Boutique suit le thème ; seul le sous-titre du
   hero garde son blanc, parce qu'il est posé sur la photo. */
.bq-feed-n { color: var(--ink-3) !important; }
.bq-feed-mix { color: var(--ink-3); }
.bq-marque { color: rgba(255,255,255,.78); }
.bq-hero-nuance { color: rgba(255,255,255,.78); }
.bq-news-p { color: var(--ink-2); }

/* En nuit, les gris secondaires remontent : --ink-3 sur --page passait
   à 4,1:1, sous le seuil pour du 12-13 px. */
body[data-theme="sombre"] { --ink-3: #9a9aa1; --ink-2: #c9c9c5; }

/* L'étiquette : le bloc « part artiste » est un aplat d'encre, il doit
   donc porter la couleur qui se lit dessus, dans les deux thèmes. */
.etiquette .part { background: var(--ink); color: var(--sur-ink); }

/* Le halo d'archétype ne doit jamais passer sous du texte. */
.pf-tete::before { z-index: -1; }

/* Dernier écart mesuré : « Clair » inactif dans le sélecteur de thème
   était à 4,48:1, pour 4,5 requis. */
.rg-choix button { color: var(--ink-2); }

/* ==================================================================
   LE THÈME ARCHÉTYPE
   Le fond de l'app devient l'encre de la personne. C'est la seule des
   trois options qui n'existe nulle part ailleurs, et c'est la plus
   exigeante : il a fallu vérifier que le texte tient sur les cinq.

   Mesures : noir #0a0a0a sur les cinq encres donne 5,78 (Print Angel),
   12,14 (Supastar), 16,76 (Block Star), 14,44 (After Hours) et 5,56
   (Boss Lady). Le blanc échoue partout (1,18 à 3,56) — donc l'encre
   est noire, jamais blanche, et les surfaces de lecture sont blanches.
   ================================================================== */

body[data-theme="archetype"] {
  --page: var(--accent);
  --raised: #ffffff;          /* les blocs de lecture restent sur blanc */
  --inset: rgba(10, 10, 10, .09);
  --ink: #0a0a0a;
  --ink-2: #33333a;
  --ink-3: #5a5a63;           /* assombri : doit tenir sur blanc ET sur l'encre */
  --hairline: rgba(10, 10, 10, .18);
  --sur-ink: #ffffff;
  color-scheme: light;
}

/* Sur la teinte, le texte secondaire de l'en-tête doit rester noir :
   les gris pâles y disparaissent. */
body[data-theme="archetype"] .entete { background: color-mix(in srgb, var(--accent) 92%, #fff); }
body[data-theme="archetype"] .onglet { color: rgba(10, 10, 10, .58); }
body[data-theme="archetype"] .onglet[aria-selected="true"] { color: #0a0a0a; }
body[data-theme="archetype"] .onglet[aria-selected="true"]::after { background: #0a0a0a; }
body[data-theme="archetype"] .icone-btn { color: #0a0a0a; }
body[data-theme="archetype"] .nav { background: color-mix(in srgb, var(--accent) 94%, #fff); border-top-color: rgba(10,10,10,.18); }
body[data-theme="archetype"] .nav a { color: rgba(10, 10, 10, .58); }
body[data-theme="archetype"] .nav a[aria-current="page"] { color: #0a0a0a; }
body[data-theme="archetype"] .nav a[aria-current="page"] .puce { background: #0a0a0a; }

/* Le logo s'inverse : sur un fond déjà à la teinte, un logo à la même
   teinte disparaîtrait. Encre noire, tracé de la teinte. */
body[data-theme="archetype"] { --logo-fond: #0a0a0a; --logo-encre: var(--accent); }

/* Les blocs de lecture reposent sur du blanc pour garder 21:1. */
body[data-theme="archetype"] .poste,
body[data-theme="archetype"] .composeur,
body[data-theme="archetype"] .conv,
body[data-theme="archetype"] .salon,
body[data-theme="archetype"] .gens-l,
body[data-theme="archetype"] .rangee-presence,
body[data-theme="archetype"] .bq-hero-vide {
  background: var(--raised);
}
body[data-theme="archetype"] #liste-postes > .poste { border-radius: 14px; margin: 0 10px 10px; }
body[data-theme="archetype"] .composeur { border-radius: 14px; margin: 10px; }
body[data-theme="archetype"] .liste { padding: 0 10px; }
body[data-theme="archetype"] .conv,
body[data-theme="archetype"] .salon { border-radius: 12px; margin-bottom: 8px; }
body[data-theme="archetype"] .profil-chiffres > * { background: var(--raised); }
body[data-theme="archetype"] .sous-onglets button:not([aria-selected="true"]),
body[data-theme="archetype"] .tag:not(.suivi) { background: var(--raised); }
body[data-theme="archetype"] .onglets-profil { background: var(--page); }
body[data-theme="archetype"] .pastille-arch { border-color: rgba(10,10,10,.3); }

/* La bannière du profil : sur un fond déjà coloré, on la calme. */
body[data-theme="archetype"] .pf-banniere img { opacity: .6; }
body[data-theme="archetype"] .pf-avatar { border-color: var(--accent); }
body[data-theme="archetype"] .pf-tete::before { display: none; }

/* ==================================================================
   MESSAGES — trois entrées, présence, salons de communauté.
   ================================================================== */
.msg-onglets { display: flex; gap: 6px; padding: 10px 16px 4px; }
.msg-onglets button {
  flex: 1;
  border: 1px solid var(--hairline);
  background: var(--raised);
  color: var(--ink-3);
  font: inherit; font-size: 13px;
  padding: 7px 10px; border-radius: 999px; cursor: pointer;
}
.msg-onglets button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }
.msg-chapo { margin: 8px 16px 4px; font-size: 12px; line-height: 17px; color: var(--ink-3); }

.presence {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 999px;
  border: 2px solid var(--page);
  flex: 0 0 auto;
}
.presence.on { background: #35c46a; }
.presence.away { background: #f5b518; }
.presence.off { background: var(--hairline); }

.rangee-presence { padding: 10px 0 6px; border-bottom: 1px solid var(--hairline); }
.rangee-titre {
  margin: 0 16px 8px;
  display: flex; align-items: center; gap: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3);
}
.presents { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.presents::-webkit-scrollbar { display: none; }
.present {
  flex: 0 0 auto; width: 58px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 0; background: none; padding: 0; cursor: pointer; color: inherit;
}
.present-vue { position: relative; display: block; }
.present-vue img { width: 46px; height: 46px; border-radius: 999px; object-fit: cover; }
.present-vue .presence { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; }
.present-nom { font-size: 11px; color: var(--ink-3); max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.liste { padding-bottom: 8px; }
.conv-vue { position: relative; flex: 0 0 auto; }
.conv-vue .presence { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; }
.conv-nom em {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent); color: #0a0a0a;
  padding: 1px 5px; border-radius: 4px; margin-left: 5px;
}
.conv-nom em.doux { background: var(--inset); color: var(--ink-3); }
.conv-ecrire {
  flex: 0 0 auto;
  font-size: 12px; color: var(--ink-3);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 5px 11px;
}
.conv-atelier { border-left: 3px solid var(--teinte, transparent); }

.salon {
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; padding: 12px 16px;
  border: 0; border-bottom: 1px solid var(--hairline);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.salon:hover { background: var(--inset); }
.salon-emoji {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--teinte, var(--inset));
  color: var(--teinte, var(--ink)) ;
  font-size: 18px;
  filter: none;
}
.salon[style*="--teinte"] .salon-emoji { color: #0a0a0a; }
.salon-chiffres {
  margin: 5px 0 0;
  display: flex; align-items: center; gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .04em;
  color: var(--ink-3);
}

#titre-conv { display: flex; flex-direction: column; gap: 2px; }
#titre-conv small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
#vue-conv { --teinte: var(--accent); }

.salon-msg { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 4px; }
.salon-msg.moi { justify-content: flex-end; }
.salon-msg > div { max-width: 82%; }
.salon-qui { margin: 0 0 3px; font-size: 12px; font-weight: 600; }
.salon-qui em {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); margin-left: 4px;
}

/* Les lignes de réglage qui montrent une valeur au lieu d'un contrôle. */
.rg-info .rg-val {
  flex: 0 0 auto; max-width: 52%; text-align: right;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-2);
}
.rg-info .rg-val em {
  display: block; margin-top: 3px;
  font-family: "IBM Plex Sans", sans-serif; font-style: normal;
  font-size: 11px; line-height: 15px; color: var(--ink-3);
}

/* ------------------------------------------------------------------
   Thème archétype : la couleur est le SOL de l'app, pas le papier.

   Mesure : sur Print Angel (#FF4438, la plus sombre des cinq), un gris
   secondaire doit descendre à #242424 pour tenir 4,5:1 — à ce niveau
   la hiérarchie typographique s'écrase, tout devient noir.

   La bonne réponse n'est donc pas d'assombrir le texte, c'est de le
   sortir de la couleur : la teinte reste visible en en-tête, en nav et
   dans les gouttières, le contenu se lit sur blanc. On garde la
   couleur ET la lisibilité.
   ------------------------------------------------------------------ */
body[data-theme="archetype"] main > .vue {
  background: var(--raised);
  border-radius: 18px 18px 0 0;
  margin: 8px 8px 0;
  padding-bottom: 10px;
  min-height: calc(100dvh - var(--nav-h) - 130px);
  overflow: hidden;
}
/* Les looks et la boutique ont leur propre fond, on n'y touche pas. */
body[data-theme="archetype"] #vue-looks,
body[data-theme="archetype"] #vue-boutique { background: none; margin: 0; border-radius: 0; overflow: visible; }

/* Du coup les blocs internes reprennent le fond du papier. */
body[data-theme="archetype"] #liste-postes > .poste { margin: 0; border-radius: 0; }
body[data-theme="archetype"] .composeur { margin: 0; border-radius: 0; }
body[data-theme="archetype"] .liste { padding: 0; }
body[data-theme="archetype"] .conv,
body[data-theme="archetype"] .salon { border-radius: 0; margin-bottom: 0; }
body[data-theme="archetype"] .onglets-profil,
body[data-theme="archetype"] .profil-chiffres > *,
body[data-theme="archetype"] .rangee-presence { background: var(--raised); }
body[data-theme="archetype"] .pf-banniere { border-radius: 18px 18px 0 0; }
body[data-theme="archetype"] .pf-avatar { border-color: var(--raised); }

/* La barre de tri flotte au-dessus du papier : elle garde la teinte. */
body[data-theme="archetype"] .sous-onglets,
body[data-theme="archetype"] .bandeau-gouts { background: var(--raised); }

/* Les en-têtes de la Boutique aussi : « TON FEED [ 36 ] » et le mélange
   d'archétypes sont écrits en gris atténué, qui ne tient pas sur une
   encre saturée. Ils reviennent sur le papier blanc. */
body[data-theme="archetype"] .bq-feed-tete { background: var(--raised); }

/* Deux restes mesurés en thème archétype :
   — la carte du Journal prenait `--page`, donc la teinte : elle passe
     sur le papier comme le reste du contenu ;
   — les onglets et la nav inactifs à .58 d'opacité donnaient 3,2:1
     sur l'en-tête teinté. */
body[data-theme="archetype"] .news-bloc { background: var(--raised); }
body[data-theme="archetype"] .onglet { color: rgba(10, 10, 10, .8); }
body[data-theme="archetype"] .nav a { color: rgba(10, 10, 10, .8); }

/* L'entrée créatrice, dans l'onglet Ateliers : c'est là qu'on cherche
   à parler aux gens qui fabriquent, donc c'est là qu'on se déclare. */
.carte-artist {
  display: block;
  margin: 8px 16px 14px;
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--sur-ink);
  text-decoration: none;
}
.carte-artist-t { display: block; font-size: 16px; font-weight: 700; }
.carte-artist-p { display: block; margin-top: 5px; font-size: 12px; line-height: 17px; opacity: .74; }
.carte-artist-f {
  display: block; margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent);
}
body[data-theme="archetype"] .carte-artist-f { color: var(--accent); }

/* ==================================================================
   LA RECHERCHE — plein écran, comme sur X et Instagram.
   ================================================================== */
#voile-recherche {
  position: fixed; inset: 0; z-index: 90;
  background: var(--page);
  display: flex; flex-direction: column;
}
.rech-tete {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid var(--hairline);
}
.rech-champ {
  flex: 1; display: flex; align-items: center; gap: 9px;
  padding: 0 12px; height: 42px;
  border-radius: 999px;
  background: var(--inset);
  color: var(--ink-3);
}
.rech-champ input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  font: inherit; font-size: 15px; color: var(--ink);
}
.rech-champ input::placeholder { color: var(--ink-3); }
#rech-vider {
  border: 0; background: var(--hairline); color: var(--ink);
  width: 21px; height: 21px; border-radius: 999px; font-size: 11px; cursor: pointer;
}
#rech-fermer { border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 4px; }

.rech-filtres { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; }
.rech-filtres::-webkit-scrollbar { display: none; }
.rech-filtres button {
  flex: 0 0 auto;
  border: 1px solid var(--hairline); background: transparent;
  color: var(--ink-3); font: inherit; font-size: 13px;
  padding: 6px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.rech-filtres button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }

.rech-corps { flex: 1; overflow-y: auto; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.rech-sec { padding: 6px 0 10px; }
.rech-sec h4 {
  margin: 8px 0 6px; padding: 0 16px;
  display: flex; align-items: center; gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; font-weight: 400; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
}
.rech-sec h4 i { font-style: normal; opacity: .6; }
.rech-eff { margin-left: auto; border: 0; background: none; font: inherit; font-size: 11px; color: var(--ink-3); text-transform: none; letter-spacing: 0; cursor: pointer; text-decoration: underline; }

.rech-l {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 9px 16px;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-left: 3px solid transparent;
}
.rech-l:hover { background: var(--inset); border-left-color: var(--teinte, transparent); }
.rech-vue { position: relative; flex: 0 0 auto; width: 44px; height: 44px; }
.rech-vue img, .rech-vue video { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.rech-vue.carre img, .rech-vue.carre video { border-radius: 9px; }
.rech-vue .presence { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; }
.rech-ic {
  flex: 0 0 auto; width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 11px; background: var(--inset);
  font-size: 17px; color: var(--ink-2);
}
.rech-txt { flex: 1; min-width: 0; }
.rech-txt b { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; }
.rech-txt em {
  display: block; margin-top: 1px;
  font-style: normal; font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rech-jetons { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 16px 4px; }
.jeton {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hairline); background: transparent;
  color: var(--ink-2); font: inherit; font-size: 13px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.jeton:hover { border-color: var(--ink); color: var(--ink); }
.jeton span { color: var(--ink-3); font-size: 11px; }

/* La pastille de marque, à l'encre de l'archétype du créateur. */
.badge-marque.badge-arch { background: var(--teinte); color: #0a0a0a; }
.badge-marque i { font-style: normal; margin-right: 3px; }
body[data-teinte] .badge-marque.badge-arch { background: var(--teinte); }

@media (min-width: 720px) {
  .rech-tete, .rech-filtres, .rech-corps { max-width: 620px; margin-inline: auto; width: 100%; }
}

/* ------------------------------------------------------------------
   Les looks dans la recherche : grille de vignettes verticales, façon
   résultats vidéo de TikTok. Une vidéo se juge à l'image ; la mettre
   en ligne de liste avec 44 px de haut n'a aucun sens.
   ------------------------------------------------------------------ */
.rech-looks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 2px 0 6px;
}
.vignette {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 0; padding: 0;
  overflow: hidden;
  background: var(--inset);
  cursor: pointer;
}
.vignette video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette-voile {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.32) 0%, rgba(10,10,10,0) 34%, rgba(10,10,10,.62) 100%);
}
.vignette-arch {
  position: absolute; top: 6px; left: 6px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--teinte, #fff);
  color: #0a0a0a;
  font-size: 10px;
}
.vignette-bas {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 7px;
  display: flex; flex-direction: column; gap: 2px;
  color: #fff;
}
.vignette-qui {
  font-size: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.vignette-vues {
  display: flex; align-items: center; gap: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.vignette-vues svg { width: 12px; height: 12px; }

@media (min-width: 720px) { .rech-looks { grid-template-columns: repeat(4, 1fr); gap: 4px; } }
@media (min-width: 1100px) { .rech-looks { grid-template-columns: repeat(6, 1fr); } }

/* `input[type=search]` affiche sa propre croix : elle doublonnait
   avec la nôtre, qui elle est stylée avec le reste. */
.rech-champ input::-webkit-search-cancel-button,
.rech-champ input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

/* ==================================================================
   LA FICHE D'UN COMPTE — ouverte en touchant une tête dans le fil.
   ================================================================== */
/* `align-self` : sans lui le bouton s'étirait sur TOUTE la hauteur du
   poste (`.poste` est un flex, donc `align-items: stretch` par défaut),
   et comme un <button> centre son contenu, la tête se retrouvait au
   milieu de la photo au lieu d'être à côté du nom. Visible sur
   téléphone comme sur bureau, d'autant plus que le poste est long. */
.avatar-btn { border: 0; padding: 0; background: none; cursor: pointer; flex: 0 0 auto; align-self: flex-start; line-height: 0; }
.poste-tete .nom {
  border: 0; padding: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: inherit;
}
.poste-tete .nom:hover { text-decoration: underline; }

#voile-compte {
  position: fixed; inset: 0; z-index: 95;
  background: var(--page);
  display: flex; flex-direction: column;
}
.cp-tete {
  display: flex; align-items: center; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  border-bottom: 1px solid var(--hairline);
  background: var(--page);
}
#cp-retour {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--inset); color: var(--ink);
  font-size: 17px; cursor: pointer;
}
#cp-titre { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; line-height: 1.2; }
#cp-titre small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.cp-corps { flex: 1; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.cp-banniere { position: relative; height: 118px; background: var(--teinte); overflow: hidden; }
.cp-banniere img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; opacity: .9; }
.cp-banniere::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.06), rgba(10,10,10,.34));
}
.cp-ident {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 0 16px; margin-top: -34px;
}
.cp-avatar {
  width: 78px; height: 78px;
  border-radius: 999px; object-fit: cover;
  border: 4px solid var(--page); background: var(--page);
  flex: 0 0 auto;
}
.cp-bouts { display: flex; gap: 8px; padding-top: 42px; }
.cp-txt { padding: 10px 16px 4px; }
.cp-etat { font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.cp-philo {
  margin: 10px 0 0;
  font-size: 15px; line-height: 21px; font-style: italic;
  color: var(--ink);
}
.cp-txt .pf-compte span { color: var(--ink-3); font-size: 13px; }
.cp-txt .pf-compte b { color: var(--ink); }

.cp-sec { padding: 16px 16px 4px; border-top: 1px solid var(--hairline); margin-top: 14px; }
.cp-sec > h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.cp-sec > h3 i { font-style: normal; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-3); }
.cp-sec-fil { padding-left: 0; padding-right: 0; }
.cp-sec-fil > h3 { padding: 0 16px; }

.cp-coll {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--teinte);
  background: var(--raised);
}
.cp-coll-nom { font-size: 18px; font-weight: 700; }
.cp-coll-chiffres { font-size: 12px; color: var(--ink-3); }
.cp-coll-btn { margin-top: 10px; align-self: flex-start; }

.cp-pieces { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cp-sec .rech-looks { grid-template-columns: repeat(3, 1fr); }

@media (min-width: 720px) {
  .cp-tete, .cp-corps { max-width: 620px; margin-inline: auto; width: 100%; }
  .cp-pieces { grid-template-columns: repeat(3, 1fr); }
}

/* ==================================================================
   ACHETER — panier, animation, reçu, suivi, boucle B.
   La direction artistique tient en une idée : l'étiquette. Le reçu
   est une étiquette dépliée, le tampon en reprend le geste.
   ================================================================== */
#feuille-panier { position: fixed; inset: 0; z-index: 75; }
#panier-fond { position: absolute; inset: 0; background: rgba(10,10,10,.5); }
.feuille-panier { max-height: 90dvh; }
.panier-corps { overflow-y: auto; flex: 1; padding-bottom: 10px; }

.pn-bloc { padding: 16px; border-top: 1px solid var(--hairline); }
.pn-bloc h4 { margin: 0 0 8px; font-size: 15px; }
.pn-bloc p { margin: 0 0 8px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.pn-credit { margin: 12px 16px 0; font-size: 13px; color: var(--ink-2); }
.pn-credit b { color: var(--ink); }
.pn-verse {
  margin: 10px 0 0; padding: 10px 12px;
  border-radius: 10px; background: var(--inset);
  font-size: 13px; color: var(--ink);
}

.pn-comment ol { margin: 0; padding-left: 20px; }
.pn-comment li { font-size: 13px; line-height: 19px; color: var(--ink-2); margin-bottom: 7px; }
.pn-comment li b { color: var(--ink); }
.pn-bloc .pn-legal { margin: 10px 0 0; font-size: 11px; line-height: 16px; color: var(--ink-3); }

/* Le suivi : une colonne d'étapes, celles franchies en plein. */
.suivi { list-style: none; margin: 4px 0 0; padding: 0; }
.suivi li { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.suivi li::before {
  content: ""; position: absolute;
  left: 5px; top: 14px; bottom: 0; width: 2px;
  background: var(--hairline);
}
.suivi li:last-child::before { display: none; }
.suivi-pt {
  flex: 0 0 auto; width: 12px; height: 12px; margin-top: 3px;
  border-radius: 999px; border: 2px solid var(--hairline);
  background: var(--page); position: relative; z-index: 1;
}
.suivi li.fait .suivi-pt { background: var(--accent); border-color: var(--accent); }
.suivi li.fait::before { background: var(--accent); }
.suivi-txt b { display: block; font-size: 13px; }
.suivi-txt em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.suivi li:not(.fait) .suivi-txt b { color: var(--ink-3); }

/* La boucle B : le post est déjà écrit, mention publicitaire incluse. */
.pn-bouclee { background: var(--inset); }
.pn-poste {
  margin: 10px 0 12px; padding: 12px;
  border-radius: 12px; background: var(--raised);
  border: 1px dashed var(--hairline);
}
.pn-poste-l {
  margin: 0 0 6px !important;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px !important; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3) !important;
}
.pn-poste-t { margin: 0 !important; font-size: 13px !important; line-height: 19px !important; color: var(--ink) !important; }
.pn-note { font-size: 13px; color: var(--ink-2); }
.achat-prix small { font-size: 11px; font-weight: 400; color: var(--ink-3); }

/* ------------------ L'animation d'achat ------------------
   Un tampon, comme celui qu'on met sur un bon de commande. */
#voile-achat {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  background: rgba(10,10,10,.86);
  backdrop-filter: blur(6px);
}
.tampon { text-align: center; color: #fff; position: relative; }
.tampon svg { width: 84px; height: 84px; color: var(--accent); }
.tampon-cercle { position: absolute; left: 50%; top: 0; transform: translateX(-50%); }
.tampon-coche { position: relative; }
.tampon-t {
  margin: 14px 0 2px;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700; font-size: 30px; letter-spacing: -.01em;
  color: var(--accent);
}
.tampon-p {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
body[data-motion="on"] #voile-achat.actif .tampon-cercle {
  animation: traceCercle 620ms var(--courbe) both;
  stroke-dasharray: 183; stroke-dashoffset: 183;
}
body[data-motion="on"] #voile-achat.actif .tampon-coche {
  animation: traceCoche 420ms var(--courbe) 480ms both;
  stroke-dasharray: 44; stroke-dashoffset: 44;
}
body[data-motion="on"] #voile-achat.actif .tampon-t { animation: monteDoux 420ms var(--ressort) 700ms both; }
body[data-motion="on"] #voile-achat.actif .tampon-p { animation: monteDoux 420ms var(--courbe) 820ms both; }
@keyframes traceCercle { to { stroke-dashoffset: 0; } }
@keyframes traceCoche { to { stroke-dashoffset: 0; } }

@media (min-width: 720px) {
  .feuille-panier { max-width: 560px; margin-inline: auto; bottom: 18px; border-radius: 18px; }
}

/* Le reçu affiche « art. 14,00 € » : 52 px ne suffisent pas. */
.pn-recu .dec-l { grid-template-columns: 1fr auto 74px; }
.pn-recu .dec-pct { white-space: nowrap; }

/* ==================================================================
   LES VIGNETTES DE PIÈCE (.piece)
   Ces règles avaient disparu quand la Boutique est passée en cartes
   pleine largeur (.bq-carte) : les vignettes des fiches de compte et
   de la recherche se retrouvaient sans style, donc en images brutes
   de 752 px de large. Reposées ici, en grille façon Instagram —
   la photo dans un cadre fixe, l'information dessous.
   ================================================================== */
.piece {
  /* En colonne, pour que les étiquettes s'alignent en bas quel que
     soit le nombre de lignes du nom. */
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: var(--raised);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.piece:hover { border-color: var(--teinte, var(--ink)); }

.piece-vue {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;          /* le cadre, pas la photo, décide */
  overflow: hidden;
  background: var(--inset);
}
.piece-vue img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;            /* la photo remplit le cadre sans le déformer */
  object-position: center;
}
.piece-nom {
  display: block;
  padding: 9px 10px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 17px;
  /* Deux lignes maximum : sinon une carte pousse toute sa rangée. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
/* L'étiquette rétrécit par sa typo, pas par un `scale` : la mise à
   l'échelle ne réduit pas la boîte, donc elle débordait de la carte. */
.piece .etiquette {
  margin: 7px 10px 10px;
  margin-top: auto;
  padding: 6px 8px;
  gap: 2px;
}
.piece .etiquette b { font-size: 9px; letter-spacing: .05em; }
.piece .etiquette span { font-size: 12px; }
.piece .etiquette .part { font-size: 9px; padding: 2px 5px; }

/* Les grilles qui les portent. */
.cp-pieces, .pieces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 560px) { .cp-pieces, .pieces { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pieces { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* En résultat de recherche la pièce reste une ligne, pas une tuile. */
.rech-l .rech-vue.carre img { object-fit: cover; }

/* ==================================================================
   LE PANIER — refait.
   Trois défauts corrigés : la vignette était un timbre-poste, la
   décomposition mangeait la moitié de l'écran pour un seul article,
   et rien n'était ajustable. La transparence reste avant le paiement
   — c'est le premier pilier — mais elle passe par une barre qu'on lit
   d'un coup d'œil, le tableau chiffré restant à un geste.
   ================================================================== */
.pn-lignes { list-style: none; margin: 0; padding: 0; }
.pn-l {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  border-left: 3px solid var(--teinte, transparent);
}
.pn-vue {
  flex: 0 0 auto; width: 76px; height: 95px;
  border: 0; padding: 0; overflow: hidden;
  border-radius: 10px; background: var(--inset); cursor: pointer;
}
.pn-vue img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pn-txt { flex: 1; min-width: 0; }
.pn-nom { margin: 0; font-size: 15px; font-weight: 600; line-height: 19px; }
.pn-marque {
  margin: 2px 0 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.pn-reglages { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pn-select select {
  font: inherit; font-size: 12px;
  padding: 5px 8px;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--raised); color: var(--ink);
  cursor: pointer;
}
.pn-qte {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--raised);
}
.pn-qte button {
  width: 28px; height: 28px;
  border: 0; background: none; color: var(--ink);
  font-size: 15px; line-height: 1; cursor: pointer;
  border-radius: 999px;
}
.pn-qte button:hover { background: var(--inset); }
.pn-qte b { min-width: 16px; text-align: center; font-size: 13px; }

.pn-droite { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pn-prix { font-size: 16px; font-weight: 700; }
.pn-part { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.pn-oter {
  margin-top: 5px;
  border: 0; background: none; padding: 2px 0;
  font: inherit; font-size: 12px; color: var(--ink-3);
  text-decoration: underline; cursor: pointer;
}
.pn-oter:hover { color: var(--print-angel); }

/* La barre : la répartition se voit avant de se lire. */
.pn-ou { padding: 16px; border-bottom: 1px solid var(--hairline); }
.pn-ou-l { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 9px; }
.pn-ou-l span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
}
.pn-ou-l b { font-size: 19px; font-weight: 700; }
.pn-barre { display: flex; gap: 2px; height: 9px; margin: 0 0 10px; }
.pn-barre i { display: block; flex-basis: 0; border-radius: 999px; }
.b-art { background: var(--accent); }
.b-res { background: var(--ink-3); }
.b-com { background: var(--hairline); }
.pn-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.pn-legende span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.pn-legende i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.pn-legende b { color: var(--ink); font-weight: 600; }

.pn-detail { margin-top: 12px; }
.pn-detail summary {
  cursor: pointer; font-size: 13px; color: var(--ink-2);
  padding: 6px 0; list-style: none;
}
.pn-detail summary::-webkit-details-marker { display: none; }
.pn-detail summary::before { content: "▸ "; color: var(--ink-3); }
.pn-detail[open] summary::before { content: "▾ "; }
.pn-detail .dec { margin-top: 4px; }

.pn-credit {
  margin: 0; padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px; color: var(--ink-2);
}
.pn-credit b { color: var(--ink); }

/* Trois pastilles, pas un pavé numéroté. */
.pn-etapes { display: flex; gap: 8px; padding: 14px 16px 4px; }
.pn-etape {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px;
  border-radius: 11px; background: var(--inset);
  font-size: 12px; font-weight: 600; line-height: 15px;
}
.pn-etape b {
  width: 18px; height: 18px; margin-bottom: 3px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--ink); color: var(--sur-ink);
  font-size: 10px;
}
.pn-etape em { font-style: normal; font-weight: 400; font-size: 11px; line-height: 14px; color: var(--ink-3); }
.pn-legal { margin: 12px 16px 4px; font-size: 11px; line-height: 16px; color: var(--ink-3); }

.pn-vide { padding: 40px 24px; text-align: center; }
.pn-vide-t { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.pn-vide-p { margin: 0 0 18px; font-size: 13px; line-height: 19px; color: var(--ink-3); }

.achat-prix small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); margin-top: 1px; }

/* Les écrans qui se posent par-dessus l'app (recherche, fiche de
   compte) sont hors de `main` : la règle qui met le contenu sur du
   papier blanc en thème archétype ne les atteignait pas, et leur texte
   secondaire tombait à 1,9:1 sur la couleur pleine. */
body[data-theme="archetype"] #voile-recherche,
body[data-theme="archetype"] #voile-compte { background: var(--raised); }
body[data-theme="archetype"] .cp-tete,
body[data-theme="archetype"] .rech-tete { background: var(--raised); }
body[data-theme="archetype"] .cp-avatar { border-color: var(--raised); }
body[data-theme="archetype"] .suivi-pt { background: var(--raised); }

/* ==================================================================
   TES ACHATS — la page « où en est ma commande ».
   Structure reprise de ce qui marche sur Vinted et Shein : l'état en
   premier, les photos, le prix, et le vendeur joignable en un geste.
   NEYBI y ajoute la seule ligne qui lui appartient : ce qui est parti
   à l'atelier.
   ================================================================== */
.achats-total {
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--sur-ink);
  font-size: 13px;
}
.achats-total b { font-family: "IBM Plex Mono", monospace; font-size: 16px; color: var(--accent); }

.cmds { display: flex; flex-direction: column; gap: 12px; }
.cmd {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 13px;
  background: var(--raised);
}
.cmd-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.cmd-etat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--etat) 18%, transparent);
  color: var(--etat);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
}
.cmd-etat::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--etat); }
.cmd-date { font-size: 11px; color: var(--ink-3); }

.cmd-vues { display: flex; align-items: flex-start; gap: 9px; }
.cmd-vues > img {
  width: 54px; height: 68px;
  border-radius: 8px; object-fit: cover;
  flex: 0 0 auto; background: var(--inset);
}
.cmd-plus {
  flex: 0 0 auto;
  width: 30px; height: 68px;
  display: grid; place-items: center;
  border-radius: 8px; background: var(--inset);
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-3);
}
.cmd-resume { flex: 1; min-width: 0; }
.cmd-nom { margin: 0; font-size: 14px; font-weight: 600; line-height: 18px; }
.cmd-nom span { font-weight: 400; color: var(--ink-3); }
.cmd-marque {
  margin: 2px 0 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .07em;
  color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmd-prix { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cmd-prix b { font-size: 16px; }
.cmd-prix em { font-style: normal; font-size: 11px; color: var(--ink-3); }

.cmd-jauge { margin: 12px 0 6px; height: 4px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.cmd-jauge i { display: block; height: 100%; border-radius: 999px; transition: width 620ms var(--courbe); }
.cmd-etape { margin: 0 0 11px; font-size: 12px; color: var(--ink-3); }

.cmd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cmd-actions .btn-ghost { margin: 0; padding: 7px 13px; font-size: 12px; }

/* Les ancres et les éléments collants se calent sur la hauteur réelle
   de l'en-tête, mesurée au démarrage — la valeur devinée de 112 px
   faisait passer la carte de commande SOUS la barre d'onglets. */
.onglets-profil { top: var(--entete-h, 112px); }
#achats, #reseau, .profil-bloc, .cp-sec {
  scroll-margin-top: calc(var(--entete-h, 112px) + 52px);
}

/* ==================================================================
   LA PAGE ACHATS — mêmes sections que la Boutique.
   Elle reprend `.bq-hero`, `.bq-code`, `.bq-feed-tete` et `.bq-cartes`
   à l'identique : qui a compris la Boutique comprend cette page.
   ================================================================== */
#voile-achats {
  position: fixed; inset: 0; z-index: 96;
  background: #0a0a0a; color: #fff;
  display: flex; flex-direction: column;
}
#voile-achats .cp-tete { background: #0a0a0a; border-bottom-color: rgba(255,255,255,.14); }
#voile-achats #ac-retour { background: rgba(255,255,255,.12); color: #fff; }
#ac-titre { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; line-height: 1.2; }
#ac-titre small { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.6); }

.ac-hero { min-height: 232px; }
.ac-hero .bq-hero-nom { font-size: 52px; }

.ac-groupe { padding-top: 6px; }
.ac-groupe-t {
  margin: 10px 16px 8px;
  display: flex; align-items: center; gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.ac-groupe-t i { font-style: normal; opacity: .55; }

/* Les cartes de commande sur fond sombre. */
#voile-achats .bq-cartes { gap: 12px; }
#voile-achats .cmd { background: #141414; border-color: rgba(255,255,255,.16); }
#voile-achats .cmd-date { color: rgba(255,255,255,.55); }
#voile-achats .cmd-marque { color: rgba(255,255,255,.6); }
#voile-achats .cmd-prix em { color: rgba(255,255,255,.62); }
#voile-achats .cmd-jauge { background: rgba(255,255,255,.14); }
#voile-achats .cmd-etape { color: rgba(255,255,255,.66); }
#voile-achats .cmd-plus { background: rgba(255,255,255,.1); color: rgba(255,255,255,.66); }
#voile-achats .btn-ghost { border-color: rgba(255,255,255,.42); color: #fff; }
#voile-achats .btn-ghost:hover { background: #fff; color: #0a0a0a; }
#voile-achats .bq-code { background: #141414; }

.ac-aide { padding: 20px 16px 8px; border-top: 1px solid rgba(255,255,255,.14); margin-top: 14px; }
.ac-aide h3 { margin: 0 0 8px; font-size: 15px; }
.ac-aide p { margin: 0 0 8px; font-size: 13px; line-height: 19px; color: rgba(255,255,255,.7); }
.ac-aide .pn-legal { margin: 10px 0 0; color: rgba(255,255,255,.5); }

/* La porte, sur le profil. */
.porte-achats {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 13px;
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--raised); color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.porte-achats:hover { border-color: var(--accent); }
.porte-vues { display: flex; flex: 0 0 auto; }
.porte-vues img {
  width: 42px; height: 52px; border-radius: 8px; object-fit: cover;
  border: 2px solid var(--raised); margin-left: -14px; background: var(--inset);
}
.porte-vues img:first-child { margin-left: 0; }
.porte-txt { flex: 1; min-width: 0; }
.porte-txt b { display: block; font-size: 14px; }
.porte-txt em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 2px; }

@media (min-width: 720px) {
  #voile-achats .cp-tete, #voile-achats .cp-corps { max-width: 620px; margin-inline: auto; width: 100%; }
}

/* La règle qui met les encres d'archétype en pastille (posée pour le
   contraste sur fond clair) attrapait aussi le résumé des commandes,
   qui est déjà sur fond sombre avec ses propres couleurs d'état. */
#voile-achats .bq-feed-mix b {
  background: none;
  padding: 0;
  /* On ne touche pas à la couleur : elle est posée en ligne (jaune
     « en cours », vert « livrée ») et doit passer telle quelle. */
}
#voile-achats #ac-retour {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  font-size: 17px; cursor: pointer;
}

/* Trois écarts relevés sur la page Achats, tous sur fond sombre :
   la pastille d'état, la flèche de la porte, et les libellés de tête. */
.cmd-etat { background: color-mix(in srgb, var(--etat) 22%, transparent); }
#voile-achats .cmd-etat { color: color-mix(in srgb, var(--etat) 82%, #fff); }
#voile-achats .bq-feed-l > span { color: rgba(255,255,255,.7); }
#voile-achats .bq-feed-n { color: rgba(255,255,255,.62) !important; }
.porte-achats .rg-fleche { color: var(--ink-2); }

/* ==================================================================
   LE TUNNEL D'ACHAT — 4 étapes navigables.
   Structure et libellés repris de /paiement/ et /code-neybi/.
   ================================================================== */
.tn-etapes {
  display: flex; gap: 2px;
  padding: 12px 16px 4px;
  border-bottom: 1px solid var(--hairline);
}
.tn-etape {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 0; background: none; padding: 4px 2px 10px;
  font: inherit; font-size: 11px; color: var(--ink-3);
  cursor: pointer; position: relative;
}
.tn-etape:disabled { cursor: default; opacity: .5; }
.tn-etape span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tn-pt {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--raised);
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
}
.tn-etape.fait .tn-pt { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.tn-etape.fait { color: var(--ink-2); }
.tn-etape.ici .tn-pt { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }
.tn-etape.ici { color: var(--ink); font-weight: 600; }
.tn-etape::after {
  content: ""; position: absolute; top: 15px; left: 50%; right: -50%;
  height: 1px; background: var(--hairline); z-index: -1;
}
.tn-etape:last-child::after { display: none; }

.tn-bloc { padding: 16px; border-bottom: 1px solid var(--hairline); }
.tn-bloc h4 { margin: 0 0 11px; font-size: 15px; }

.tn-choix { display: flex; flex-direction: column; gap: 8px; }
.tn-opt {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 12px 13px;
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--raised); color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.tn-opt.ok { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tn-opt-ic {
  flex: 0 0 auto; width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px; background: var(--inset);
  font-size: 15px; color: var(--ink-2);
}
.tn-opt-t { flex: 1; min-width: 0; }
.tn-opt-t b { display: block; font-size: 14px; }
.tn-opt-t em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.tn-opt-p { flex: 0 0 auto; font-size: 13px; font-weight: 600; }

.tn-champ { display: block; margin-bottom: 10px; }
.tn-champ span {
  display: block; margin-bottom: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.tn-champ input {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--hairline); border-radius: 10px;
  background: var(--raised); color: var(--ink);
  font: inherit; font-size: 14px;
}
.tn-champ input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tn-carte { margin-top: 12px; }
.tn-carte-l { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Le Code Neybi */
.tn-code { background: var(--inset); }
.tn-code-nom {
  margin: 4px 0 10px;
  font-size: 22px; font-weight: 700; letter-spacing: .04em;
}
.tn-code-l { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.tn-code-l b { font-size: 20px; color: var(--ink); }
.tn-code-l span { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.tn-code-p { margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }

.tn-paliers { display: flex; flex-direction: column; gap: 8px; }
.tn-palier {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--raised); color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.tn-palier.ok { border-color: var(--accent); }
.tn-palier:disabled { cursor: default; }
.tn-palier-t { flex: 1; min-width: 0; }
.tn-palier-t b { display: block; font-size: 14px; }
.tn-palier-t em { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.tn-palier-d { flex: 0 0 auto; text-align: right; }
.tn-palier-d b { display: block; font-size: 15px; }
.tn-palier-d em {
  display: block; font-style: normal; font-size: 10px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px;
}
.tn-palier.ok .tn-palier-d em { color: var(--ink-2); }

.tn-qui { background: var(--inset); }
.tn-qui-p { margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.recu-meta { margin: 8px 0 0; font-size: 11px; letter-spacing: .04em; color: var(--ink-3); }

/* ==================================================================
   LE RAIL « ILS VENDENT LE PLUS »
   Classement au mérite — ventes, montant reversé, taux de retour, avis
   — comme le prescrit le brief. Aucun emplacement n'est vendu ici.
   ================================================================== */
.top {
  margin: 4px 0;
  padding: 16px 0 14px;
  border-block: 1px solid var(--hairline);
  background: var(--inset);
}
.top-l { margin: 0 16px 12px; display: flex; flex-direction: column; gap: 3px; }
.top-l > span:first-child {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink);
}
.top-aide { font-size: 11px; line-height: 15px; color: var(--ink-3); }

.top-liste {
  display: flex; gap: 11px;
  overflow-x: auto; padding: 0 16px 4px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.top-liste::-webkit-scrollbar { display: none; }
.top-c {
  flex: 0 0 244px; scroll-snap-align: start;
  position: relative;
  padding: 13px;
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--teinte, var(--ink));
  border-radius: 13px;
  background: var(--raised);
}
.top-rang {
  position: absolute; top: 11px; right: 13px;
  font-size: 20px; font-weight: 700; color: var(--hairline);
}
.top-tete {
  display: flex; align-items: center; gap: 9px;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: inherit; font: inherit; text-align: left; width: 100%;
}
.top-tete img { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.top-tete b { display: block; font-size: 14px; }
.top-tete em {
  display: block; font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 1px;
}

.top-ch { display: flex; gap: 12px; margin: 11px 0 0; }
.top-ch div { min-width: 0; }
.top-ch dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3);
}
.top-ch dd { margin: 1px 0 0; font-size: 14px; font-weight: 700; }

.top-projet {
  margin: 11px 0 0; padding: 9px 10px;
  border-radius: 9px; background: var(--inset);
}
.top-projet-n { margin: 0; font-size: 13px; font-weight: 700; }
.top-projet-q { margin: 2px 0 0; font-size: 11px; line-height: 15px; color: var(--ink-3); }
.top-projet-e { margin: 5px 0 0; font-size: 10px; letter-spacing: .05em; color: var(--teinte, var(--ink-2)); }

.top-acts { display: flex; gap: 7px; margin-top: 11px; }
.top-btn { margin: 0; flex: 1; padding: 7px 10px; font-size: 12px; text-align: center; }

.cp-ventes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; }
.cp-ventes span { display: flex; flex-direction: column; font-size: 11px; color: var(--ink-3); }
.cp-ventes b { font-size: 15px; color: var(--ink); }

/* ==================================================================
   NEYBI FOR ARTIST — la question que la page d'origine ne posait pas :
   pourquoi un atelier en aurait besoin.
   ================================================================== */
#voile-artist {
  position: fixed; inset: 0; z-index: 97;
  background: #0a0a0a; color: #fff;
  display: flex; flex-direction: column;
}
#voile-artist .cp-tete { background: #0a0a0a; border-bottom-color: rgba(255,255,255,.14); }
#voile-artist #ar-retour {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 999px; font-size: 17px; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff;
}
#ar-titre { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; line-height: 1.2; }
#ar-titre small { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.6); }
.ar-hero { min-height: 268px; }
.ar-hero .bq-hero-nom { font-size: 42px; line-height: .98; color: #fff; }
.ar-hero .bq-hero-nuance { color: rgba(255,255,255,.72); text-transform: none; letter-spacing: 0; }

.ar-sec { padding: 20px 16px 6px; border-top: 1px solid rgba(255,255,255,.14); }
.ar-sec:first-of-type { border-top: 0; }
.ar-sec h3 { margin: 0 0 10px; font-size: 17px; }
.ar-note { margin: 0 0 14px; font-size: 13px; line-height: 19px; color: rgba(255,255,255,.7); }

.ar-raisons { display: flex; flex-direction: column; gap: 10px; }
.ar-r { display: flex; gap: 11px; padding: 12px; border-radius: 12px; background: #141414; }
.ar-r-ic {
  flex: 0 0 auto; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--accent); color: #0a0a0a; font-size: 15px;
}
.ar-r-t { margin: 0; font-size: 14px; font-weight: 700; }
.ar-r-d { margin: 3px 0 0; font-size: 12px; line-height: 17px; color: rgba(255,255,255,.68); }

.ar-tableau { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ar-tableau div { padding: 12px; border-radius: 12px; background: #141414; }
.ar-tableau dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.ar-tableau dd { margin: 4px 0 3px; font-size: 24px; font-weight: 700; color: var(--accent); }
.ar-tableau small { font-size: 11px; line-height: 15px; color: rgba(255,255,255,.55); }
.ar-demo { margin: 12px 0 0; font-size: 11px; letter-spacing: .04em; color: rgba(255,255,255,.5); }

.ar-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-boutons .btn-ghost { margin: 0; border-color: rgba(255,255,255,.42); color: #fff; }
.ar-boutons .btn-ghost:hover { background: #fff; color: #0a0a0a; }
.ar-etat {
  margin: 12px 0 0; padding: 10px 12px;
  border-radius: 10px; background: rgba(255,255,255,.08);
  font-size: 12px; color: rgba(255,255,255,.78);
}

.ar-lab {
  margin: 16px 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.ar-gabarits { display: flex; gap: 8px; }
.ar-gab {
  flex: 1; min-width: 0; padding: 11px 10px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 11px;
  background: #141414; color: #fff; font: inherit;
  text-align: left; cursor: pointer;
}
.ar-gab.ok { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ar-gab b { display: block; font-size: 13px; }
.ar-gab em { display: block; font-style: normal; font-size: 11px; line-height: 15px; color: rgba(255,255,255,.6); margin-top: 3px; }

.ar-encres { display: flex; gap: 9px; }
.ar-encre {
  width: 34px; height: 34px; border-radius: 999px;
  border: 2px solid transparent; background: var(--teinte);
  cursor: pointer; padding: 0;
}
.ar-encre.ok { border-color: #fff; box-shadow: 0 0 0 2px #0a0a0a inset; }
.ar-ordre { margin: 0; font-size: 13px; letter-spacing: .03em; color: rgba(255,255,255,.78); }

.ar-fin { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.ar-fin .pn-legal { color: rgba(255,255,255,.5); }

@media (min-width: 720px) {
  #voile-artist .cp-tete, #voile-artist .cp-corps { max-width: 620px; margin-inline: auto; width: 100%; }
  .ar-tableau { grid-template-columns: repeat(4, 1fr); }
}

/* Douze écarts relevés dans le rail « Ils vendent le plus » : l'encre
   d'archétype servait de couleur de texte sur fond clair — Block Star
   tombait à 1,18:1. Même correctif que partout ailleurs : l'encre en
   aplat, jamais en texte. */
.top-projet-e {
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.top-projet-e::before {
  content: ""; width: 7px; height: 7px; flex: 0 0 auto;
  border-radius: 999px; background: var(--teinte, var(--ink));
}
.top-rang { color: var(--ink-3); opacity: .45; }

/* ==================================================================
   LE PARTAGE — feuille façon Spotify : l'aperçu, puis les réseaux.
   La carte est composée dans un canvas aux formats du kit de marque,
   pas capturée à l'écran.
   ================================================================== */
#feuille-partage { position: fixed; inset: 0; z-index: 110; }
#partage-fond { position: absolute; inset: 0; background: rgba(10,10,10,.62); backdrop-filter: blur(4px); }
.feuille-partage { max-height: 92dvh; }

.pg-formats { display: flex; gap: 6px; padding: 12px 16px 0; }
.pg-formats button {
  flex: 1; border: 1px solid var(--hairline); border-radius: 999px;
  background: transparent; color: var(--ink-3);
  font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer;
}
.pg-formats button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sur-ink); }

.pg-apercu {
  display: grid; place-items: center;
  padding: 14px 16px 6px;
  overflow: hidden;
}
#pg-toile {
  max-height: 42dvh; max-width: 100%;
  height: auto; width: auto;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.34);
  background: #0a0a0a;
}

/* (ancienne rangée horizontale unique — remplacée par les trois blocs
   empilés de la feuille façon TikTok, plus bas dans ce fichier) */
.pg-r {
  flex: 0 0 auto; width: 72px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--ink-2); font: inherit; font-size: 11px;
}
.pg-r-ic {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--teinte);
  color: #fff; font-size: 21px;
}
.pg-r.fait .pg-r-ic { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-r span:last-child { text-align: center; line-height: 14px; }
.pg-legal {
  margin: 4px 0 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  font-size: 11px; line-height: 16px; color: var(--ink-3);
  border-top: 1px solid var(--hairline);
}
.pn-bouts { display: flex; gap: 8px; flex-wrap: wrap; }
.pn-bouts .btn-ghost { margin: 0; }

/* ------------------------------ L'AVIS ------------------------------ */
#feuille-avis { position: fixed; inset: 0; z-index: 112; }
#avis-fond { position: absolute; inset: 0; background: rgba(10,10,10,.55); }
.feuille-avis { max-height: 88dvh; }
.av-corps { overflow-y: auto; flex: 1; padding: 16px; }
.av-qui { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.av-qui img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }
.av-nom { margin: 0; font-size: 15px; font-weight: 600; }
.av-marque {
  margin: 2px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.av-lab {
  margin: 16px 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
}
.av-etoiles { display: flex; align-items: center; gap: 4px; }
.av-e {
  border: 0; background: none; padding: 2px;
  font-size: 30px; line-height: 1; cursor: pointer;
  color: var(--hairline);
}
.av-e.ok { color: var(--accent); }
.av-n { margin-left: 8px; font-size: 13px; color: var(--ink-3); }
#av-texte {
  width: 100%; padding: 12px;
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--raised); color: var(--ink);
  font: inherit; font-size: 14px; line-height: 20px; resize: vertical;
}
#av-texte:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.cp-avis { padding: 13px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--raised); }
.cp-avis-n { margin: 0 0 6px; font-size: 17px; color: var(--accent); }
.cp-avis-n span { color: var(--hairline); }
.cp-avis-t { margin: 0 0 10px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.cp-avis .btn-ghost { margin: 0; padding: 6px 12px; font-size: 12px; }

@media (min-width: 720px) {
  .feuille-partage, .feuille-avis { max-width: 560px; margin-inline: auto; bottom: 18px; border-radius: 18px; }
}

/* L'encre des pastilles de réseau est portée par la donnée : le blanc
   tombait à 1,38:1 sur le cyan TikTok et 1,98:1 sur le vert WhatsApp. */
.pg-r-ic { color: var(--encre, #fff); }
/* Les étoiles vides à `--hairline` faisaient 1,5:1 : on ne voyait pas
   qu'il y en avait cinq. */
.av-e { color: var(--ink-3); }
.av-e.ok { color: var(--accent); }

/* Le son dans les looks : un bouton du rail, à la même place que sur
   les vidéos du fil, pour qu'on le cherche au même endroit. */
.rail-son[aria-pressed="true"] { background: rgba(255,255,255,.22); }
.rail-btn[data-son] svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------
   Les pièces de côté, dans le panier.
   Sans elles on était enfermé : soit on payait, soit on fermait tout
   et on repartait chercher. Elles rendent l'ajout et le retrait
   réversibles sans quitter l'écran.
   ------------------------------------------------------------------ */
.pn-favoris { padding: 16px; border-top: 1px solid var(--hairline); }
.pn-fav-l { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 11px; }
.pn-fav-l span:first-child {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
}
.pn-fav-n { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-3); }
.pn-fav-liste { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pn-fav-liste::-webkit-scrollbar { display: none; }
.pn-fav {
  flex: 0 0 132px;
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--teinte, var(--hairline));
  border-radius: 11px; overflow: hidden;
  background: var(--raised);
}
.pn-fav-vue { display: block; width: 100%; aspect-ratio: 4/5; border: 0; padding: 0; background: var(--inset); cursor: pointer; overflow: hidden; }
.pn-fav-vue img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pn-fav-nom {
  margin: 8px 9px 0; font-size: 12px; font-weight: 600; line-height: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px;
}
.pn-fav-prix { margin: 3px 9px 8px; font-size: 13px; font-weight: 700; }
.pn-fav-btn {
  display: block; width: calc(100% - 18px); margin: 0 9px 9px;
  padding: 7px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--sur-ink);
  font: inherit; font-size: 11px; cursor: pointer;
}
.pn-fav-btn.dedans { background: transparent; color: var(--ink-3); border-color: var(--hairline); }

/* Une sortie visible : on n'est jamais coincé dans le tunnel. */
.pn-sortie { margin: 4px 0 0; padding: 14px 16px 18px; text-align: center; }
.pn-sortie button {
  border: 0; background: none; padding: 6px 10px;
  font: inherit; font-size: 13px; color: var(--ink-3);
  text-decoration: underline; cursor: pointer;
}
.pn-sortie button:hover { color: var(--ink); }
.pn-vide + .pn-favoris { border-top: 0; }

/* ==================================================================
   LE JOURNAL et OÙ VA TON ARGENT, rapatriés dans le hub.
   ================================================================== */
#voile-page {
  position: fixed; inset: 0; z-index: 98;
  background: var(--page); color: var(--ink);
  display: flex; flex-direction: column;
}
#voile-page .cp-tete { background: var(--page); }
#pa-titre { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; line-height: 1.2; }
#pa-titre small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
#voile-page #pa-retour {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 999px; font-size: 17px; cursor: pointer;
  background: var(--inset); color: var(--ink);
}

.jo-tete { padding: 20px 16px 6px; }
.jo-h { margin: 6px 0 6px; font-size: 30px; line-height: 34px; letter-spacing: -.015em; }
.jo-chapo { margin: 0 0 14px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.jo-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.jo-cat {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  background: var(--teinte, var(--inset)); color: #0a0a0a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.jo-liste { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 16px; }
.jo-a { display: flex; gap: 12px; align-items: flex-start; }
.jo-a1 { flex-direction: column; }
.jo-vue { flex: 0 0 106px; width: 106px; height: 78px; border-radius: 10px; overflow: hidden; background: var(--inset); }
.jo-a1 .jo-vue { flex: none; width: 100%; height: 200px; }
.jo-vue img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jo-txt { flex: 1; min-width: 0; }
.jo-meta { margin: 0 0 5px; display: flex; align-items: center; gap: 8px; }
.jo-meta > span:last-child { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-3); }
.jo-t { margin: 0; font-size: 16px; line-height: 21px; font-weight: 700; }
.jo-a1 .jo-t { font-size: 22px; line-height: 27px; }
.jo-c { margin: 5px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-3); }
#voile-page .ac-aide { border-top-color: var(--hairline); }
#voile-page .ac-aide h3 { color: var(--ink); }
#voile-page .ac-aide p { color: var(--ink-2); }

/* -------------------------- Où va ton argent -------------------------- */
.oa-hero { min-height: 0; padding: 24px 16px 20px; background: var(--ink); color: var(--sur-ink); }
.oa-hero .bq-oeil { color: rgba(255,255,255,.6); }
.oa-h {
  margin: 8px 0 12px;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700; font-size: 46px; line-height: .98; letter-spacing: -.015em;
  color: var(--accent);
}
.oa-chapo { margin: 0; font-size: 14px; line-height: 21px; color: rgba(255,255,255,.76); }
body[data-theme="sombre"] .oa-hero { background: var(--raised); }

.oa-bande {
  display: flex; overflow: hidden; white-space: nowrap;
  padding: 10px 0; border-bottom: 1px solid var(--hairline);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.oa-bande span { padding-right: 14px; }

.oa-sec { padding: 18px 16px 8px; }
.oa-postes { list-style: none; margin: 0; padding: 0; }
.oa-p {
  display: grid;
  grid-template-columns: 1fr auto 56px;
  grid-template-rows: auto auto;
  align-items: baseline; gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.oa-p-l b { display: block; font-size: 15px; }
.oa-p-l em { display: block; font-style: normal; font-size: 12px; line-height: 16px; color: var(--ink-3); margin-top: 2px; }
.oa-p-m { font-size: 18px; font-weight: 700; }
.oa-p-pct { font-size: 12px; color: var(--ink-3); text-align: right; }
.oa-p-barre { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--inset); overflow: hidden; margin-top: 6px; }
.oa-p-barre i { display: block; height: 100%; border-radius: 999px; background: var(--ink-3); }
.oa-p.cle .oa-p-m { color: var(--ink); }
.oa-p.cle .oa-p-barre i { background: var(--accent); }
.oa-p.cle .oa-p-l b::after {
  content: "la clé"; margin-left: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 9px;
  letter-spacing: .07em; text-transform: uppercase;
  background: var(--accent); color: #0a0a0a; padding: 2px 6px; border-radius: 4px;
}
.oa-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 0; }
.oa-total span { font-size: 16px; font-weight: 700; }
.oa-total b { font-size: 24px; }

.oa-sortant { border-top: 1px solid var(--hairline); }
.oa-lab {
  margin: 0 0 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
}
.oa-gros { margin: 0 0 8px; font-size: 44px; font-weight: 700; color: var(--ink); }
.oa-note { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.oa-fin .btn { margin-top: 12px; }

@media (min-width: 720px) {
  #voile-page .cp-tete, #voile-page .cp-corps { max-width: 640px; margin-inline: auto; width: 100%; }
}

/* Le Journal et « Où va ton argent » sont des écrans posés par-dessus,
   donc hors de `main` : la règle qui met le contenu sur du papier
   blanc en thème archétype ne les atteignait pas. Troisième fois que
   ce cas se présente — la règle vaut pour tous les `#voile-*`. */
body[data-theme="archetype"] #voile-page,
body[data-theme="archetype"] #voile-page .cp-tete { background: var(--raised); }
body[data-theme="archetype"] #voile-page #pa-retour { background: var(--inset); }

/* `.dec-lien` est passé de <a> à <button> et a perdu sa couleur : un
   bouton n'hérite pas de `color`. */
.dec-lien {
  border: 0; background: none; padding: 6px 0;
  font: inherit; font-size: 12px;
  color: var(--ink-2); text-decoration: underline; cursor: pointer;
}
.dec-lien:hover { color: var(--ink); }

/* ------------------------------------------------------------------
   Le rail des looks, corrigé.
   Les icônes montaient trop haut : sur un écran de 844 px la première
   arrivait au tiers de la hauteur. On descend le rail et on resserre.
   ------------------------------------------------------------------ */
.rail { bottom: 96px; gap: 14px; }

/* La bulle du créateur porte un « + » pour s'abonner, comme sur TikTok. */
.rail-qui { position: relative; display: block; margin-bottom: 6px; }
.rail-plus {
  position: absolute; left: 50%; bottom: -9px;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 2px solid #fff; border-radius: 999px;
  background: var(--accent); color: #0a0a0a;
  font-size: 14px; font-weight: 700; line-height: 1;
  cursor: pointer; padding: 0;
}
.rail-plus.suivi { background: rgba(255,255,255,.24); color: #fff; border-color: rgba(255,255,255,.5); font-size: 11px; cursor: default; }

/* Le cœur du double-tap : il part de là où on a touché. */
.coeur-vol {
  position: absolute; z-index: 6;
  width: 88px; height: 88px;
  margin: -44px 0 0 -44px;
  color: var(--print-angel);
  pointer-events: none;
  animation: coeurVole 900ms cubic-bezier(.2,.7,.3,1) forwards;
}
.coeur-vol svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 14px rgba(0,0,0,.5)); }
@keyframes coeurVole {
  0%   { opacity: 0; transform: scale(.3) rotate(-14deg); }
  22%  { opacity: 1; transform: scale(1.18) rotate(6deg); }
  40%  { transform: scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: scale(1.1) translateY(-64px) rotate(2deg); }
}
body[data-motion="off"] .coeur-vol { animation-duration: 300ms; }

/* ==================================================================
   LA FEUILLE DE PARTAGE, structurée comme celle de TikTok :
   les gens d'abord, les applications ensuite, les actions en dernier.
   ================================================================== */
.pg-bloc { padding: 14px 0 4px; border-top: 1px solid var(--hairline); }
.pg-bloc:first-child { border-top: 0; }
.pg-l {
  margin: 0 16px 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
}
.pg-rangee {
  display: flex; gap: 12px;
  overflow-x: auto; padding: 0 16px 6px;
  scrollbar-width: none;
}
.pg-rangee::-webkit-scrollbar { display: none; }

.pg-ami, .pg-r, .pg-a {
  flex: 0 0 auto; width: 68px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--ink-2); font: inherit; font-size: 11px; line-height: 14px;
  text-align: center;
}
.pg-ami-vue { position: relative; display: block; }
.pg-ami-vue img { width: 52px; height: 52px; border-radius: 999px; object-fit: cover; }
.pg-ami-vue .presence { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; }
.pg-ami.fait .pg-ami-vue img { outline: 2px solid var(--accent); outline-offset: 2px; }

.pg-r-ic, .pg-a-ic {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 999px;
}
.pg-r-ic { background: var(--teinte); color: var(--encre, #fff); }
.pg-r-ic svg { width: 25px; height: 25px; }
.pg-a-ic { background: var(--inset); color: var(--ink); }
.pg-a-ic svg { width: 23px; height: 23px; }
.pg-a.danger .pg-a-ic { color: var(--print-angel); }
.pg-r.fait .pg-r-ic { outline: 2px solid var(--accent); outline-offset: 2px; }

.pg-lien {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 16px 0; padding: 10px 12px;
  border: 1px dashed var(--hairline); border-radius: 11px;
  background: var(--inset);
}
.pg-lien-t {
  flex: 1; min-width: 0;
  font-size: 12px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pg-lien-b {
  flex: 0 0 auto;
  border: 0; border-radius: 999px; padding: 6px 13px;
  background: var(--ink); color: var(--sur-ink);
  font: inherit; font-size: 12px; cursor: pointer;
}
#pg-legal.dit { color: var(--ink); font-weight: 600; }
#pg-toile { max-height: 30dvh; }
.feuille-partage { max-height: 94dvh; }
.feuille-partage .pg-apercu { padding-bottom: 2px; }

/* La feuille de partage a trois rangées sous l'aperçu : elle doit
   défiler, sinon les applications et les actions restent hors champ. */
.feuille-partage { display: flex; flex-direction: column; }
.feuille-partage #pg-formats,
.feuille-partage .pg-apercu,
.feuille-partage #pg-legal { flex: 0 0 auto; }
.feuille-partage #pg-reseaux {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
}
#pg-toile { max-height: 26dvh; }

/* Le conteneur des blocs de partage s'empile en colonne et défile
   verticalement — l'ancienne règle le mettait en rangée horizontale,
   ce qui poussait les applications et les actions hors de l'écran. */
.feuille-partage #pg-reseaux {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
}

/* ==================================================================
   LES STORIES
   Le rang de bulles en tête du fil, et la visionneuse plein écran.
   Une story vit 24 h : passé ce délai elle sort du rang.
   ================================================================== */
/* ------------------------------------------------------------------
   Le rang de bulles, dans le fil.
   Il était collé au rang de mots-clés au-dessus et au composeur en
   dessous — zéro pixel de part et d'autre. Il flottait entre deux
   choses sans appartenir à aucune. Il prend maintenant sa propre
   bande, avec un filet de chaque côté et de l'air autour.
   ------------------------------------------------------------------ */
.bulles {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 16px 16px 14px;
  /* Un filet de chaque côté : le rang est une bande à lui, pas la
     suite du rang de tri au-dessus. */
  border-block: 1px solid var(--hairline);
  scroll-padding-inline: 16px;
  scrollbar-width: none;
}
.bulles::-webkit-scrollbar { display: none; }
.bulles .bulle-story {
  flex: 0 0 auto;
  width: 68px;
  gap: 8px;                 /* l'anneau respirait mal sous son nom */
  scroll-snap-align: start;
}
.bulles .anneau {
  position: relative;
  display: block;
  width: 68px; height: 68px;
  border-radius: 999px;
  padding: 2.5px;
  /* L'anneau porte l'encre de l'archétype : la couleur suffit à dire
     de quel atelier il s'agit, sans badge posé par-dessus. */
  background: conic-gradient(from 210deg, var(--teinte, var(--accent)), var(--accent) 55%, var(--teinte, var(--accent)));
}
.bulles .bulle-story.vue .anneau { background: var(--hairline); }
.bulles .anneau img {
  width: 100%; height: 100%;
  display: block;
  border-radius: 999px;
  object-fit: cover;
  border: 2.5px solid var(--page);
  box-sizing: border-box;
}
.bulles .bulle-nom {
  font-size: 11px;
  line-height: 13px;
  color: var(--ink-2);
  max-width: 68px;
}
.bulles .bulle-story.vue .bulle-nom { color: var(--ink-3); }

/* La bulle « Ajouter » : le + déborde de l'anneau, cerclé de la
   couleur de page — comme sur Instagram. */
/* L'anneau vide se lit comme un anneau, pas comme une ombre : un
   trait net plutôt qu'un aplat proche du fond. */
.bulles .bulle-moi .anneau {
  background: none;
  box-shadow: inset 0 0 0 2px var(--hairline);
}
.bulles .bulle-moi .anneau.active {
  background: conic-gradient(from 210deg, var(--accent), var(--print-angel) 55%, var(--accent));
}
/* Le + se pose sous l'anneau, centré — comme « Ta story » sur
   Instagram. À l'angle il recouvrait le visage. */
.bulles .bulle-moi .anneau i {
  position: absolute;
  left: 50%; bottom: -7px;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  border: 3px solid var(--page);
  font-style: normal;
  font-size: 15px; font-weight: 700; line-height: 1;
}

/* ------------------------- La visionneuse ------------------------- */
#voile-story {
  position: fixed; inset: 0; z-index: 130;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#st-video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.st-barres {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px;
  z-index: 4; display: flex; gap: 4px;
}
.st-b { flex: 1; height: 3px; border-radius: 999px; background: rgba(255,255,255,.3); overflow: hidden; }
.st-b i { display: block; height: 100%; width: 0; background: #fff; border-radius: 999px; }
.st-b i.pleine { width: 100%; }
.st-b i[data-en-cours] { animation: stAvance 8s linear forwards; }
@keyframes stAvance { from { width: 0; } to { width: 100%; } }

.st-tete {
  position: absolute; top: calc(26px + env(safe-area-inset-top)); left: 10px; right: 10px;
  z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.st-qui {
  display: flex; align-items: center; gap: 9px;
  border: 0; background: none; padding: 4px; cursor: pointer;
  color: #fff; font: inherit; text-align: left;
}
.st-qui img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; }
.st-qui b { display: block; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.st-qui em {
  display: block; font-style: normal; font-size: 11px;
  color: rgba(255,255,255,.76); text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.st-fermer {
  width: 36px; height: 36px; flex: 0 0 auto;
  border: 0; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff;
  font-size: 16px; cursor: pointer;
}

.st-texte {
  position: absolute; left: 16px; right: 16px; bottom: 96px;
  z-index: 4; margin: 0;
  font-size: 17px; line-height: 23px; font-weight: 600; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}

/* Les deux zones de tap : à gauche on revient, à droite on avance. */
.st-zone {
  position: absolute; top: 60px; bottom: 78px;
  z-index: 3; border: 0; background: none; cursor: pointer;
}
.st-gauche { left: 0; width: 32%; }
.st-droite { right: 0; width: 68%; }

.st-pied {
  position: absolute; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 5; display: flex; align-items: center; gap: 9px;
}
#st-reponse {
  flex: 1; min-width: 0; height: 44px;
  padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.44);
  background: rgba(0,0,0,.34); color: #fff;
  font: inherit; font-size: 14px;
  backdrop-filter: blur(10px);
}
#st-reponse::placeholder { color: rgba(255,255,255,.6); }
.st-act {
  flex: 0 0 auto; width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(0,0,0,.34); color: #fff;
  cursor: pointer; backdrop-filter: blur(10px);
}
.st-act svg { width: 22px; height: 22px; }

/* ---------------------- Créer sa story ---------------------- */
#feuille-story { position: fixed; inset: 0; z-index: 118; }
#story-fond { position: absolute; inset: 0; background: rgba(10,10,10,.55); }
.feuille-story { max-height: 88dvh; }
.cs-corps { overflow-y: auto; flex: 1; padding: 16px; }
.cs-depot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 34px 20px; margin-bottom: 16px;
  border: 2px dashed var(--hairline); border-radius: 14px;
  background: var(--inset); cursor: pointer; text-align: center;
}
.cs-depot-ic { font-size: 26px; color: var(--ink-3); }
.cs-depot b { font-size: 15px; }
.cs-depot em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.cs-apercu { position: relative; margin-bottom: 16px; border-radius: 14px; overflow: hidden; background: #000; }
.cs-apercu video { width: 100%; max-height: 46dvh; object-fit: contain; display: block; }
.cs-miennes { margin-top: 18px; }
.cs-liste { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.cs-liste::-webkit-scrollbar { display: none; }
.cs-item { position: relative; flex: 0 0 82px; border-radius: 10px; overflow: hidden; background: var(--inset); }
.cs-item video { width: 82px; height: 110px; object-fit: cover; display: block; }
.cs-reste {
  position: absolute; left: 5px; bottom: 5px;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(10,10,10,.6); color: #fff; font-size: 10px;
}
.cs-suppr {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border: 0; border-radius: 999px;
  background: rgba(10,10,10,.6); color: #fff; font-size: 10px; cursor: pointer;
}

/* ------------------------------------------------------------------
   Le rail des looks passe de huit boutons à cinq, comme sur TikTok :
   atelier, j'aime, commentaires, enregistrer, partager. Tout ce qui
   touche à la pièce, à la boutique et au repost a rejoint la feuille
   de partage — c'est elle qui regroupe, la barre latérale ne fait que
   les gestes qu'on répète.
   ------------------------------------------------------------------ */
.rail { bottom: 104px; gap: 20px; }

/* Le son quitte le rail pour le coin haut, là où Instagram le met. */
.volet-son {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 4;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(10,10,10,.44);
  backdrop-filter: blur(10px);
  color: #fff; cursor: pointer;
}
.volet-son svg { width: 18px; height: 18px; }
.volet-son[aria-pressed="true"] { background: rgba(10,10,10,.7); }

/* Le bloc « Cette pièce », en tête de la feuille de partage. */
.pg-a-fort .pg-a-ic { background: var(--accent); color: #0a0a0a; }
.pg-a-fort span:last-child b { display: block; font-size: 12px; margin-top: 1px; }
.pg-a .pg-a-ic img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.pg-a.fait .pg-a-ic { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==================================================================
   LOOKS EN PLEIN CADRE
   La vidéo perdait 176 px : 111 d'en-tête et 64 de nav. Sur TikTok
   comme sur Reels, la vidéo occupe l'écran entier et les barres
   flottent dessus. On fait pareil — la pile monte sous l'en-tête et
   descend sous la nav, et les commandes se décalent pour ne pas
   passer derrière.
   ================================================================== */
body[data-mode="looks"] main { padding: 0; }
body[data-mode="looks"] #pile-looks,
body[data-mode="looks"] .volet { height: 100dvh; }

/* La pile démarre en haut de l'écran : on la remonte de la hauteur de
   l'en-tête, qui flotte par-dessus. */
body[data-mode="looks"] #vue-looks {
  margin-top: calc(-1 * var(--entete-h, 111px));
  margin-bottom: calc(-1 * var(--nav-h));
}
body[data-mode="looks"] .entete {
  background: linear-gradient(180deg, rgba(10,10,10,.72) 0%, rgba(10,10,10,.34) 62%, rgba(10,10,10,0) 100%);
  border-bottom: 0;
  backdrop-filter: none;
}
body[data-mode="looks"] .nav {
  background: linear-gradient(0deg, rgba(10,10,10,.9) 0%, rgba(10,10,10,.62) 60%, rgba(10,10,10,0) 100%);
  border-top: 0;
  backdrop-filter: none;
}

/* Les commandes se décalent pour rester au-dessus de la nav et sous
   l'en-tête, maintenant qu'elles flottent. */
body[data-mode="looks"] .rail { bottom: calc(var(--nav-h) + 26px); }
body[data-mode="looks"] .legende { bottom: calc(var(--nav-h) + 14px); }
body[data-mode="looks"] .volet-son { top: calc(var(--entete-h, 111px) + 10px); }
body[data-mode="looks"] .looks-compte { top: calc(var(--entete-h, 111px) + 12px); }

/* Les zones de tap du double-clic évitent l'en-tête et la nav. */
body[data-mode="looks"] .volet { touch-action: pan-y; }

/* ------------------------------------------------------------------
   Lisibilité en plein cadre.
   Sur une vidéo claire, le dégradé de l'en-tête ne suffit pas : les
   onglets et le logo se perdent. On leur ajoute une ombre portée —
   c'est ce que font TikTok et Reels sur leurs surtitres.
   ------------------------------------------------------------------ */
body[data-mode="looks"] .onglet,
body[data-mode="looks"] .icone-btn,
body[data-mode="looks"] .nav a {
  text-shadow: 0 1px 8px rgba(0,0,0,.85);
}
body[data-mode="looks"] .icone-btn svg,
body[data-mode="looks"] .nav a svg {
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.85));
}
body[data-mode="looks"] .onglet { color: rgba(255,255,255,.72); }
body[data-mode="looks"] .onglet[aria-selected="true"] { color: #fff; }
body[data-mode="looks"] .entete {
  background: linear-gradient(180deg, rgba(10,10,10,.82) 0%, rgba(10,10,10,.46) 58%, rgba(10,10,10,0) 100%);
}
body[data-mode="looks"] .logo { filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); }

/* Le compteur « 16 looks » n'apporte rien en plein cadre et se perdait
   sur les vidéos claires : on le retire. Le nombre reste lisible dans
   la recherche, là où il sert. */
.looks-compte { display: none; }

/* Le + d'abonnement est un tracé, pas un caractère : le glyphe « + »
   de la police se lisait comme une flèche. */
.rail-plus svg { width: 12px; height: 12px; }
.rail-plus { font-size: 0; }

/* En plein cadre, la nav flotte sur du noir : son entrée active
   reprenait `var(--ink)`, donc du noir sur noir en thème clair. Ces
   règles arrivent après, à spécificité égale, et tranchent. */
body[data-mode="looks"] .nav a { color: rgba(255,255,255,.62); }
body[data-mode="looks"] .nav a[aria-current="page"] { color: #fff; }
body[data-mode="looks"] .nav a[aria-current="page"] .puce { background: var(--accent); }
body[data-mode="looks"] .onglet[aria-selected="true"]::after { background: #fff; }

/* ==================================================================
   L'APPAREIL PHOTO
   La caméra du téléphone en plein cadre, façon Instagram : l'image
   occupe tout, les commandes flottent par-dessus en verre sombre.
   Rien ici ne dépend du thème — une caméra est noire partout, et le
   texte blanc sur l'image reste lisible quel que soit le réglage.
   ================================================================== */

#voile-camera {
  position: fixed; inset: 0; z-index: 140;
  background: #000;
  color: #fff;
  display: flex; flex-direction: column;
  overflow: hidden;
  touch-action: manipulation;
}

.cam-scene { position: absolute; inset: 0; background: #000; }
#cam-flux, #cam-revue-video, #cam-revue-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}
/* L'aperçu frontal est retourné : on se voit comme dans un miroir,
   sinon lever la main droite fait bouger celle de gauche à l'écran. */
#cam-flux { transform: scaleX(-1); }
#voile-camera[data-face="environment"] #cam-flux { transform: none; }

#cam-fond-texte { position: absolute; inset: 0; }

/* Le quadrillage des tiers — quatre traits, pas une grille pleine. */
.cam-quadrillage { position: absolute; inset: 0; pointer-events: none; }
.cam-quadrillage i { position: absolute; background: rgba(255,255,255,.28); }
.cam-quadrillage i:nth-child(1) { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.cam-quadrillage i:nth-child(2) { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.cam-quadrillage i:nth-child(3) { top: 33.33%; left: 0; right: 0; height: 1px; }
.cam-quadrillage i:nth-child(4) { top: 66.66%; left: 0; right: 0; height: 1px; }

/* Le flash d'écran : quand la caméra n'a pas de torche (frontale,
   ordinateur), c'est l'écran qui éclaire, comme sur Instagram. */
.cam-eclair { position: absolute; inset: 0; background: #fff; z-index: 9; }

.cam-decompte {
  position: absolute; inset: 0; z-index: 8;
  display: grid; place-items: center;
  font: 700 96px/1 "IBM Plex Sans Condensed", sans-serif;
  color: #fff; text-shadow: 0 4px 30px rgba(0,0,0,.6);
  pointer-events: none;
}
.cam-decompte.bat { animation: cam-bat .9s ease both; }
@keyframes cam-bat { from { transform: scale(1.5); opacity: .2; } to { transform: scale(1); opacity: 1; } }

/* Mise en page : les quatre cases se remplissent au fur et à mesure. */
.cam-collage {
  position: absolute; inset: 0; z-index: 6;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px;
  padding: 3px;
  pointer-events: none;
}
.cam-case {
  position: relative; overflow: hidden;
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center;
}
.cam-case.pleine { background: #000; border-color: transparent; }
.cam-case img { width: 100%; height: 100%; object-fit: cover; }
.cam-case i {
  font: 600 15px/1 "IBM Plex Mono", monospace;
  color: rgba(255,255,255,.5); font-style: normal;
}

/* Le mot posé sur l'image, dans la revue. */
.cam-mot {
  position: absolute; left: 22px; right: 22px; bottom: 34%;
  z-index: 7; margin: 0; text-align: center;
  font: 700 22px/28px "IBM Plex Sans Condensed", sans-serif;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
  pointer-events: none; word-break: break-word;
}
.cam-mot.gros { font-size: 32px; line-height: 38px; bottom: 44%; }

/* Caméra refusée ou absente : on ne bloque pas, on redirige. */
.cam-refus {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 34px; text-align: center;
  background: #0a0a0a;
}
.cam-refus-ic { width: 40px; height: 40px; color: rgba(255,255,255,.7); }
.cam-refus-ic svg { width: 100%; height: 100%; }
.cam-refus b { font-size: 17px; }
.cam-refus em { font-style: normal; font-size: 13px; line-height: 19px; color: rgba(255,255,255,.66); max-width: 26ch; }
.cam-refus-b {
  margin-top: 8px; padding: 11px 20px;
  border: 0; border-radius: 999px;
  background: #fff; color: #0a0a0a;
  font: 600 14px/1 inherit; cursor: pointer;
}

/* ---------------------------- Les barres ---------------------------- */

.cam-haut {
  position: absolute; z-index: 12;
  top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cam-outils { display: flex; align-items: center; gap: 8px; }
.cam-ic {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
  font: 600 15px/1 inherit;
  transition: background var(--t-court, .16s) ease, transform var(--t-court, .16s) ease;
}
.cam-ic svg { width: 20px; height: 20px; }
.cam-ic:hover { background: rgba(0,0,0,.5); }
.cam-ic:active { transform: scale(.92); }
.cam-ic[aria-pressed="true"] { background: #fff; color: #0a0a0a; }
.cam-ic:disabled { opacity: .35; cursor: not-allowed; }
.cam-ic-txt { font: 700 13px/1 "IBM Plex Mono", monospace; letter-spacing: .02em; }
#cam-aa { font: 700 15px/1 "IBM Plex Sans Condensed", sans-serif; }

.cam-bas, .cam-revue-bas {
  position: absolute; z-index: 12;
  left: 0; right: 0; bottom: 0;
  padding: 14px 12px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.42) 50%, transparent);
}
/* La revue peut se poser sur une image très claire — un fond de mode
   Texte à l'or, par exemple. Le voile y est plus franc, sinon
   « Visible 24 h » descend sous le seuil de lisibilité. */
.cam-revue-bas { background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.6) 46%, transparent); }

.cam-aide {
  margin: 0; text-align: center;
  font: 500 12px/16px inherit; color: rgba(255,255,255,.78);
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

.cam-rangee { display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }

/* Le déclencheur : l'anneau se remplit pendant qu'on filme. */
.cam-declencheur {
  position: relative;
  width: 84px; height: 84px; flex: 0 0 auto;
  border: 0; background: none; padding: 0; cursor: pointer;
  display: grid; place-items: center;
}
.cam-anneau { position: absolute; inset: 0; width: 84px; height: 84px; transform: rotate(-90deg); }
.cam-anneau-piste { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 4; }
.cam-anneau-jauge {
  fill: none; stroke: var(--acide, #C6FF3D); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 239; stroke-dashoffset: 239;
}
.cam-declencheur i {
  width: 62px; height: 62px; border-radius: 999px; background: #fff;
  transition: width var(--t-court, .16s) ease, height var(--t-court, .16s) ease,
              border-radius var(--t-court, .16s) ease, background var(--t-court, .16s) ease;
}
.cam-declencheur:active i { transform: none; width: 56px; height: 56px; }
.cam-declencheur[data-en-cours="1"] i { width: 30px; height: 30px; border-radius: 8px; background: #ff3b30; }
.cam-declencheur[data-mode="texte"] i { width: 52px; height: 52px; background: var(--acide, #C6FF3D); }
.cam-declencheur:disabled { opacity: .4; cursor: not-allowed; }

.cam-galerie, .cam-bascule {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  background: rgba(0,0,0,.34); backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
  transition: transform var(--t-court, .16s) ease;
}
.cam-bascule { border-radius: 999px; }
.cam-galerie svg, .cam-bascule svg { width: 21px; height: 21px; }
.cam-galerie:active, .cam-bascule:active { transform: scale(.9); }
.cam-bascule:active { transform: scale(.9) rotate(180deg); }
.cam-galerie:disabled, .cam-bascule:disabled { opacity: .35; cursor: not-allowed; }

/* Les modes, en carrousel : le sélectionné est au milieu, en blanc. */
/* Les modes défilent et se calent au centre — avec cinq entrées, un
   `justify-content: center` rognait « Story » à gauche et « Texte » à
   droite sans laisser aucun moyen d'y accéder. */
.cam-modes {
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding: 2px 40% 0;
  scroll-padding-inline: 40%;
}
.cam-modes::-webkit-scrollbar { display: none; }
.cam-modes button {
  flex: 0 0 auto;
  border: 0; background: none;
  padding: 7px 11px; border-radius: 999px;
  color: rgba(255,255,255,.6);
  font: 600 11px/1 "IBM Plex Mono", monospace;
  letter-spacing: .09em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  scroll-snap-align: center;
  transition: color var(--t-court, .16s) ease, background var(--t-court, .16s) ease;
}
.cam-modes button[aria-selected="true"] { color: #0a0a0a; background: #fff; }

/* Les filtres — la pastille montre l'effet sur un dégradé, pas un mot. */
.cam-rang-filtres {
  display: flex; gap: 10px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 2px;
}
.cam-rang-filtres::-webkit-scrollbar { display: none; }
.cam-rang-filtres button {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: rgba(255,255,255,.7);
  font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .05em;
}
.cam-rang-filtres button span {
  width: 46px; height: 46px; border-radius: 12px;
  border: 2px solid transparent;
  background: linear-gradient(140deg, #f0c14b, #e2574c 45%, #4a5bd6);
  background-size: cover; background-position: center;
}
/* Dans la revue, la pastille montre la prise elle-même : on choisit un
   filtre en le voyant sur sa propre image, pas sur un dégradé témoin. */
#cam-revue-rang button span { background-image: var(--apercu, none); }
.cam-rang-filtres button[aria-pressed="true"] { color: #fff; }
.cam-rang-filtres button[aria-pressed="true"] span { border-color: #fff; }

/* Les couleurs du mot : blanc, noir, et les cinq encres d'archétype. */
.cam-teintes { display: flex; gap: 9px; justify-content: center; padding: 2px 0; }
.cam-teintes button {
  width: 26px; height: 26px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.45);
  background: var(--t); cursor: pointer; padding: 0;
  transition: transform var(--t-court, .16s) ease, border-color var(--t-court, .16s) ease;
}
.cam-teintes button[aria-pressed="true"] { border-color: #fff; transform: scale(1.16); }

.cam-champ input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.24); border-radius: 12px;
  background: rgba(0,0,0,.42); color: #fff;
  font: 500 15px/1.2 inherit;
}
.cam-champ input::placeholder { color: rgba(255,255,255,.5); }
.cam-champ input:focus { outline: 2px solid var(--acide, #C6FF3D); outline-offset: 1px; }

.cam-envoi { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cam-duree { font-size: 12px; color: rgba(255,255,255,.86); text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.cam-publier {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border: 0; border-radius: 999px;
  background: #fff; color: #0a0a0a;
  font: 600 15px/1 inherit; cursor: pointer;
  transition: transform var(--t-court, .16s) ease;
}
.cam-publier b { font-weight: 700; }
.cam-publier:active { transform: scale(.96); }

/* Gérer ses stories depuis la visionneuse. */
.st-gere {
  width: 36px; height: 36px; flex: 0 0 auto; margin-left: auto;
  border: 0; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.st-texte.gros { font-size: 26px; line-height: 33px; text-align: center; bottom: 44%; }
#st-photo { width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Ce qu'on a composé dans la caméra a été cadré en `cover` : la
   visionneuse doit recadrer pareil, sinon un autocollant posé en bas
   de l'image se retrouve dans la bande noire. Les dix-neuf vidéos
   fournies avec le projet, elles, restent entières — elles sont déjà
   au format et personne n'a rien posé dessus. */
#st-video.mien, #st-photo.mien { object-fit: cover; }

/* La feuille « Ta story » ouvre désormais la caméra. */
.cs-depot { width: 100%; text-align: center; }
.cs-depot-ic svg { width: 26px; height: 26px; }

/* Mouvement coupé si la personne l'a demandé. */
@media (prefers-reduced-motion: reduce) {
  .cam-decompte.bat { animation: none; }
  .cam-ic, .cam-galerie, .cam-bascule, .cam-publier, .cam-declencheur i { transition: none; }
}

/* Au-delà du téléphone, la caméra reste un cadre 9:16 centré : une
   webcam d'ordinateur étirée sur 1440 px n'a aucun sens. */
@media (min-width: 620px) {
  #voile-camera { background: #000; }
  .cam-scene { left: 50%; transform: translateX(-50%); width: min(100vw, calc(100dvh * 9 / 16)); right: auto; }
  .cam-haut, .cam-bas, .cam-revue-bas, .cam-revue-haut {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(100vw, calc(100dvh * 9 / 16));
    box-sizing: border-box;
  }
  .cam-haut, .cam-revue-haut { padding-inline: 12px; }
}

/* ==================================================================
   LES AUTOCOLLANTS DU KIT
   De vrais objets NEYBI posés sur la story : l'étiquette au prix
   décomposé, la part artiste, l'atelier. Rendus en SVG dans la page —
   c'est pour ça qu'ils héritent d'IBM Plex sans qu'on l'embarque.
   ================================================================== */

.cam-colle, .st-colle { position: absolute; inset: 0; z-index: 7; }
.st-colle { pointer-events: none; }

.colle {
  position: absolute;
  transform-origin: center;
  touch-action: none;
  cursor: grab;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.32));
  transition: filter var(--t-court) var(--courbe);
}
.colle svg { width: 100%; height: 100%; display: block; }
.colle.prise { cursor: grabbing; filter: drop-shadow(0 10px 26px rgba(0,0,0,.5)); }
.st-colle .colle { cursor: default; }

/* La corbeille : elle n'apparaît que pendant qu'on déplace, comme sur
   Instagram, et s'ouvre quand l'autocollant la survole. */
.cam-corbeille {
  position: absolute; z-index: 9;
  left: 50%; bottom: calc(46px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
  transition: transform var(--t-court) var(--courbe), background var(--t-court) var(--courbe);
  pointer-events: none;
}
.cam-corbeille span {
  width: 20px; height: 22px;
  border: 2px solid #fff; border-top-width: 0; border-radius: 0 0 5px 5px;
  position: relative;
}
.cam-corbeille span::before {
  content: ""; position: absolute; left: -5px; right: -5px; top: -6px;
  height: 2px; background: #fff; border-radius: 2px;
}
.cam-corbeille.ouverte { background: #ff3b30; transform: translateX(-50%) scale(1.22); }

/* --------------------------- Le tiroir --------------------------- */

/* Le tiroir est du mobilier de caméra : il reste sombre dans les trois
   thèmes, comme la barre d'outils au-dessus de lui. On redéfinit donc
   les jetons LOCALEMENT plutôt que de recolorier chaque texte — sans
   ça, `.ar-lab`, qui est en blanc à 60 % pour les fonds sombres du
   reste de l'app, tombait à 1,07:1 sur le papier clair. */
#feuille-colle {
  position: fixed; inset: 0; z-index: 150;
  --page: #141416;
  --raised: #17171a;
  --inset: #212126;
  --ink: #f4f4f2;
  --ink-2: #b8b8b4;
  --ink-3: #9a9aa1;
  --hairline: #2e2e34;
  --sur-ink: #0a0a0a;
  color: var(--ink);
  color-scheme: dark;
}
#colle-fond { position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.feuille-colle {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 82dvh;
  display: flex; flex-direction: column;
  border-radius: 18px 18px 0 0;
  background: var(--raised);
  animation: monte var(--t-moyen) var(--ressort) both;
}
.colle-corps { overflow-y: auto; padding: 0 14px calc(20px + env(safe-area-inset-bottom)); }
.colle-groupe { padding-top: 12px; }
.colle-aide {
  margin: 2px 0 10px; font-size: 12px; line-height: 17px; color: var(--ink-3);
}
.colle-grille {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.colle-vign {
  display: grid; place-items: center;
  min-height: 104px; padding: 12px;
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--inset);
  cursor: pointer;
  transition: transform var(--t-court) var(--courbe), border-color var(--t-court) var(--courbe);
}
.colle-vign:hover { border-color: var(--ink-3); }
.colle-vign:active { transform: scale(.96); }
.colle-vign > span { display: block; width: 100%; }
.colle-vign svg { width: 100%; height: auto; display: block; max-height: 128px; }
/* Les objets à trois lignes (l'étiquette) tiennent toute la largeur. */
.colle-grille > .colle-vign:has(svg[viewBox^="0 0 520"]) { grid-column: span 2; }

@media (prefers-reduced-motion: reduce) {
  .feuille-colle { animation: none; }
  .colle, .colle-vign, .cam-corbeille { transition: none; }
}

/* ==================================================================
   Créateurs autour de toi — la carte des ateliers
   Réutilise les jetons de thème (--ink, --hairline, --raised, --page)
   donc s'adapte au clair comme au sombre sans règle en double.
   ================================================================== */
.carte-hero { padding: 2px 0 4px; }
.carte-h {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 7.5vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
  color: var(--ink);
}
.carte-chapo { margin: 0; max-width: 42ch; color: var(--ink-2); font-size: 14px; line-height: 20px; }

.carte-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  margin: 14px 0 20px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--page);
  border: 1px solid var(--hairline);
}
.carte-fond { position: absolute; inset: 0; width: 100%; height: 100%; --carte-terre: var(--hairline); --carte-route: var(--ink-3); }
.carte-zone {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
  white-space: nowrap;
}
.carte-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.carte-pin-pt {
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  border-radius: 50% 50% 50% 0;
  background: var(--t, var(--acide));
  transform: rotate(-45deg);
  border: 2px solid var(--page);
  box-shadow: 0 2px 5px rgba(10, 10, 10, 0.28);
  transition: transform 0.16s ease;
}
.carte-pin:hover .carte-pin-pt,
.carte-pin.actif .carte-pin-pt { transform: rotate(-45deg) scale(1.28); }
.carte-pin:focus-visible { outline: 2px solid var(--t, var(--ink)); outline-offset: 3px; border-radius: 50%; }

.carte-groupe { margin-bottom: 18px; }
.carte-ville {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.carte-ville em { font-style: normal; color: var(--ink); }
.carte-fiche {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--t, var(--hairline));
  border-radius: 14px;
  background: var(--raised);
  scroll-margin-top: 132px;
  transition: box-shadow 0.16s ease;
}
.carte-fiche.actif { box-shadow: 0 0 0 2px var(--t, var(--ink)); }
.carte-fiche .avatar { width: 44px; height: 44px; flex: 0 0 auto; }
.carte-fiche-txt { flex: 1; min-width: 0; }
.carte-fiche-nom { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; color: var(--ink); }
.carte-puce {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--t, var(--acide));
  color: #0a0a0a;
}
.carte-fiche-sous { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-fiche-part {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: right;
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.carte-fiche-part em { font-style: normal; font-size: 9px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) {
  .carte-pin-pt { transition: none; }
  .carte-fiche { scroll-behavior: auto; }
}

/* ------------------- L'édition d'un autocollant -------------------
   Sélection au doigt : un appui sans déplacement ouvre les poignées.
   À la souris, les poignées sont la seule façon de redimensionner et
   de faire pivoter — il n'y a rien à pincer. */

.colle-svg { display: block; width: 100%; height: 100%; }
.colle-svg svg { width: 100%; height: 100%; display: block; }
.colle.sel { outline: 2px dashed rgba(255,255,255,.9); outline-offset: 5px; }

.colle-x, .colle-ed, .colle-h {
  position: absolute; z-index: 2;
  width: 27px; height: 27px;
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.92); border-radius: 999px;
  background: #0a0a0a; color: #fff;
  font: 600 13px/1 inherit; cursor: pointer; padding: 0;
}
.colle-x { top: -13px; left: -13px; }
.colle-ed { top: -13px; right: -13px; }
.colle-h {
  bottom: -13px; right: -13px; cursor: nwse-resize; touch-action: none;
  background: #fff;
}
.colle-h::before {
  content: ""; width: 11px; height: 11px;
  border-right: 2px solid #0a0a0a; border-bottom: 2px solid #0a0a0a;
  border-radius: 0 0 3px 0;
}

/* Le compteur de calques, dans la barre de revue. */
#cam-calques::after { content: " ▤"; font-size: 11px; opacity: .8; }

/* ---------------------------- La pile ---------------------------- */

.cq-liste { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.cq {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--inset);
}
.cq.actif { border-color: var(--acide); }
.cq-vue {
  width: 54px; height: 54px; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden;
  border: 0; border-radius: 9px; padding: 5px;
  background: var(--page); cursor: pointer;
}
.cq-vue svg { width: 100%; height: auto; max-height: 44px; display: block; }
.cq-nom {
  flex: 1; min-width: 0; text-align: left;
  border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink);
  font: inherit;
}
.cq-nom b { display: block; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-nom em {
  display: block; margin-top: 2px; font-style: normal;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .05em;
  color: var(--ink-3);
}
.cq-actes { display: flex; gap: 3px; flex: 0 0 auto; }
.cq-actes button {
  width: 28px; height: 28px;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--page); color: var(--ink-2);
  font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.cq-actes button:disabled { opacity: .3; cursor: not-allowed; }
.cq-actes .cq-supr { color: #ff6b60; }
.cq-ajout {
  width: 100%; margin-top: 12px; padding: 13px;
  border: 1px dashed var(--hairline); border-radius: 12px;
  background: none; color: var(--ink-2);
  font: 500 13px/1 inherit; cursor: pointer;
}

/* ------------------------- L'inspecteur ------------------------- */

#feuille-edite, #feuille-calques {
  position: fixed; inset: 0; z-index: 152;
  --page: #141416; --raised: #17171a; --inset: #212126;
  --ink: #f4f4f2; --ink-2: #b8b8b4; --ink-3: #9a9aa1;
  --hairline: #2e2e34; --sur-ink: #0a0a0a;
  color: var(--ink); color-scheme: dark;
}
#calques-fond, #edite-fond { position: absolute; inset: 0; background: rgba(0,0,0,.62); }

.ed-apercu {
  display: grid; place-items: center;
  margin: 12px 0 4px; padding: 16px;
  border-radius: 14px; background: var(--inset);
  min-height: 96px;
}
.ed-apercu svg { width: 100%; height: auto; max-height: 168px; display: block; }
.ed-bloc { padding-top: 6px; }
.ed-typos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ed-typos button {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: 11px;
  background: var(--inset); color: var(--ink-2);
  font: 500 12px/1 inherit; cursor: pointer; text-align: left;
}
.ed-typos button[aria-pressed="true"] { border-color: var(--acide); color: var(--ink); }
.ed-typo-ex {
  width: 26px; height: 26px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 7px; background: var(--page);
  font-size: 14px; font-weight: 700;
}
.ed-teintes { display: flex; gap: 9px; flex-wrap: wrap; }
.ed-teintes button {
  width: 30px; height: 30px; padding: 0;
  border: 2px solid var(--hairline); border-radius: 999px;
  background: var(--t); cursor: pointer;
}
.ed-teintes button[aria-pressed="true"] { border-color: var(--acide); transform: scale(1.1); }
.ed-curseur { display: block; margin: 10px 0; }
.ed-curseur span {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--ink-2); margin-bottom: 5px;
}
.ed-curseur span i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.ed-curseur input[type="range"] { width: 100%; accent-color: var(--acide); }

#edite-pied { display: flex; gap: 10px; }
.btn-doux, .btn-danger {
  flex: 1; padding: 13px;
  border-radius: 11px; border: 1px solid var(--hairline);
  background: var(--inset); color: var(--ink);
  font: 600 14px/1 inherit; cursor: pointer;
}
.btn-danger { color: #ff6b60; border-color: rgba(255,107,96,.4); }

@media (prefers-reduced-motion: reduce) {
  .ed-teintes button { transition: none; }
}

/* ==================================================================
   Carte réelle MapLibre — écrase le repli SVG (aspect-ratio) par une
   hauteur fixe, et habille marqueurs + popups aux jetons NEYBI.
   ================================================================== */
.carte-scene { height: 340px; aspect-ratio: auto; }
.carte-scene.carte-scene-svg { height: 300px; aspect-ratio: auto; }
#carte-map { position: absolute; inset: 0; }
.carte-attente {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  color: var(--ink-3);
  font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.04em;
}
.carte-mk { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.carte-mk-pt {
  display: block; width: 18px; height: 18px; margin: auto;
  border-radius: 50% 50% 50% 0;
  background: var(--t, var(--acide));
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(10, 10, 10, 0.4), 0 0 0 1px rgba(10, 10, 10, 0.5);
  transition: transform 0.16s ease;
}
.carte-mk:hover .carte-mk-pt { transform: rotate(-45deg) scale(1.2); }
.carte-mk:focus-visible { outline: none; }
.carte-mk:focus-visible .carte-mk-pt { box-shadow: 0 0 0 3px var(--t, var(--ink)); }

.maplibregl-popup { max-width: 240px !important; }
.maplibregl-popup-content {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 9px 12px;
  box-shadow: 0 8px 30px rgba(10, 10, 10, 0.18);
  font-family: "IBM Plex Sans", sans-serif;
}
.maplibregl-popup-content b { font-size: 13px; font-weight: 600; }
.maplibregl-popup-content span { font-size: 12px; color: var(--ink-2); }
.maplibregl-popup-content em { font-style: normal; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--raised); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--raised); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--raised); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--raised); }
.maplibregl-ctrl-group { border-radius: 10px !important; overflow: hidden; }

/* ==================================================================
   LE DIRECT
   Periscope : plein cadre, aucun habillage qui mange l'image, le badge
   rouge, les arrivées annoncées, les commentaires qui montent et
   s'effacent, et les cœurs qui dérivent — un par tap. Ce qui rendait
   un direct vivant plutôt que regardé.
   Ce que NEYBI ajoute : la pièce dont l'atelier parle, en bas, avec
   son prix décomposé. Le direct explique le prix, il ne le crie pas.
   ================================================================== */

#voile-direct {
  position: fixed; inset: 0; z-index: 142;
  background: #000; color: #fff;
  overflow: hidden;
  touch-action: manipulation;
}
#dir-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
/* Deux voiles seulement : en haut pour le titre, en bas pour le fil.
   Le milieu reste net — c'est l'atelier qu'on est venu voir. */
.dir-voile-h { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.62), transparent 22%),
    linear-gradient(to top, rgba(0,0,0,.72), transparent 42%);
}

.dir-haut {
  position: absolute; z-index: 4;
  top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px;
}
.dir-chrome .dir-haut { position: absolute; }
.dir-qui {
  display: flex; align-items: center; gap: 8px;
  border: 0; background: rgba(0,0,0,.34); backdrop-filter: blur(8px);
  padding: 4px 12px 4px 4px; border-radius: 999px;
  color: #fff; font: inherit; text-align: left; cursor: pointer;
  min-width: 0;
}
.dir-qui { max-width: 46%; }
.dir-qui > span { min-width: 0; }
.dir-qui img { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
/* Sur une seule ligne : un nom qui passe à la ligne pousse le titre
   du direct par-dessus lui-même. */
.dir-qui b, .dir-qui em {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dir-qui b { font-size: 13px; font-weight: 600; }
.dir-qui em {
  font-style: normal; font-size: 10px;
  font-family: "IBM Plex Mono", monospace; color: rgba(255,255,255,.66);
}
/* Le rouge du direct, une seule fois. Le vif #ff2d2d ne portait que
   3,71:1 avec du blanc dessus — sous le seuil, et le badge est en
   7 px. Celui-ci tient 4,85:1 et reste un rouge de direct. */
:root { --direct: #de2020; }
.dir-badge {
  flex: 0 0 auto;
  padding: 5px 9px; border-radius: 5px;
  background: var(--direct); color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
}
.dir-vus, .dir-chrono {
  flex: 0 0 auto;
  padding: 5px 8px; border-radius: 5px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(8px);
  font-size: 10px; letter-spacing: .02em; color: rgba(255,255,255,.94);
  white-space: nowrap;
}
.dir-haut .cam-ic { margin-left: auto; }
#cam-dir-fin { width: auto; padding: 0 14px; font-size: 13px; font-weight: 600; background: var(--direct); }

.dir-titre {
  position: absolute; z-index: 4;
  top: calc(62px + env(safe-area-inset-top)); left: 14px; right: 14px;
  margin: 0; font-size: 15px; line-height: 20px; font-weight: 600;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}

/* Le fil : il monte, il ne se relit pas. */
.dir-fil {
  position: absolute; z-index: 4;
  left: 12px; right: 76px; bottom: calc(146px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: flex-end; gap: 7px;
  max-height: 42dvh; overflow: hidden;
  pointer-events: none;
}
.dir-chrome .dir-fil { bottom: calc(58px + env(safe-area-inset-bottom)); right: 12px; }
.dir-l {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 0; font-size: 13px; line-height: 18px;
  text-shadow: 0 1px 8px rgba(0,0,0,.75);
  animation: dir-monte .34s var(--courbe) both;
}
.dir-l img { width: 22px; height: 22px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.dir-l b { color: var(--teinte, #fff); font-weight: 600; }
.dir-l.auteur b::after { content: " ✦"; opacity: .8; }
.dir-l-arr {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: rgba(255,255,255,.6); letter-spacing: .03em;
}
@keyframes dir-monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Les cœurs. Un par tap, chacun de la couleur de qui l'envoie. */
.dir-coeurs { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.dir-c {
  position: absolute; bottom: 96px;
  width: 26px; height: 26px;
  background: var(--t, #ff3b6b);
  -webkit-mask: var(--coeur) center/contain no-repeat;
  mask: var(--coeur) center/contain no-repeat;
  animation: dir-coeur 3s var(--courbe) forwards;
}
:root {
  --coeur: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 21s-7.5-4.7-7.5-10A4.3 4.3 0 0 1 12 8.2 4.3 4.3 0 0 1 19.5 11c0 5.3-7.5 10-7.5 10Z'/%3E%3C/svg%3E");
}
@keyframes dir-coeur {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  12% { opacity: 1; transform: translate(0, -14px) scale(1.05); }
  100% { opacity: 0; transform: translate(var(--derive, 0), -62dvh) scale(.72); }
}

/* La pièce dont on parle. */
.dir-piece {
  position: absolute; z-index: 4;
  left: 12px; right: 12px; bottom: calc(90px + env(safe-area-inset-bottom));
}
.dir-p {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px; border: 0; border-radius: 14px;
  background: rgba(10,10,10,.72); backdrop-filter: blur(12px);
  color: #fff; font: inherit; text-align: left; cursor: pointer;
}
.dir-p img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; }
.dir-p-txt { flex: 1; min-width: 0; }
.dir-p-txt b { display: block; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-p-txt em {
  display: block; margin-top: 1px; font-style: normal; font-size: 11px;
  color: rgba(255,255,255,.72);
}
.dir-p-prix { flex: 0 0 auto; font-size: 14px; font-weight: 600; }

.dir-bas {
  position: absolute; z-index: 4;
  left: 12px; right: 12px; bottom: calc(32px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
}
.dir-bas input {
  flex: 1; min-width: 0;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.26); border-radius: 999px;
  background: rgba(0,0,0,.42); color: #fff;
  font: 500 14px/1 inherit;
}
.dir-bas input::placeholder { color: rgba(255,255,255,.56); }
.dir-act {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
}
.dir-act svg { width: 21px; height: 21px; }
#dir-coeur { color: #ff3b6b; }
#dir-coeur:active { transform: scale(.88); }

/* La note d'honnêteté doit se lire : c'est elle qui empêche de croire
   à une vraie diffusion. Pas de gris à 42 % sur une image claire. */
.dir-note {
  position: absolute; z-index: 4;
  left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom));
  margin: 0; font-size: 9px; line-height: 12px;
  color: rgba(255,255,255,.78);
  text-shadow: 0 1px 6px rgba(0,0,0,.85);
  font-family: "IBM Plex Mono", monospace;
  pointer-events: none;
}
.dir-chrome .dir-note { bottom: calc(4px + env(safe-area-inset-bottom)); }

/* L'émission : le même habillage, posé sur l'aperçu de la caméra. */
.dir-chrome { position: absolute; inset: 0; z-index: 13; pointer-events: none; }
.dir-chrome > * { pointer-events: auto; }
.dir-chrome .dir-note { pointer-events: none; }

/* La bulle d'un direct, en tête du rang. */
.bulle-direct .anneau { position: relative; }
.bulle-direct .anneau::before {
  content: ""; position: absolute; inset: -3px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, var(--direct), var(--teinte, var(--direct)), var(--direct));
  z-index: -1;
}
.bulle-live {
  position: absolute; left: 50%; bottom: -5px;
  transform: translateX(-50%);
  padding: 2px 5px; border-radius: 4px;
  background: var(--direct); color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px; font-weight: 600; letter-spacing: .06em;
  font-style: normal; white-space: nowrap;
}

.dir-bilan { display: flex; gap: 8px; margin-top: 10px; }
.cam-refus-b.doux { background: rgba(255,255,255,.14); color: #fff; }
.cam-champ-dir input { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .dir-l { animation: none; }
  .dir-c { display: none; }
}

/* Au-delà du téléphone, le direct garde son cadre 9:16 centré — comme
   la caméra. Une vidéo verticale étirée sur 1440 px n'existe pas. */
@media (min-width: 620px) {
  #dir-video, .dir-voile-h, .dir-haut, .dir-titre, .dir-fil,
  .dir-piece, .dir-bas, .dir-note, .dir-coeurs {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(100vw, calc(100dvh * 9 / 16));
    box-sizing: border-box;
  }
  .dir-haut, .dir-titre, .dir-piece, .dir-bas, .dir-note { padding-inline: 12px; }
  .dir-fil { padding-inline: 12px 76px; }
  .dir-l { transform: none; }
}

/* ==================================================================
   #7 Rituel « tenue du jour » (OOTD) — nudge calme au-dessus du composeur
   ================================================================== */
.ootd {
  display: flex; align-items: center; gap: 12px;
  width: calc(100% - 32px); margin: 12px 16px 0; padding: 12px 14px;
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--raised); cursor: pointer; text-align: left; font: inherit;
  transition: border-color 0.16s ease;
}
.ootd:hover { border-color: var(--ink); }
.ootd:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ootd-pt { position: relative; flex: 0 0 auto; width: 9px; height: 9px; }
.ootd-pt::before, .ootd-pt::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--acide); }
.ootd-pt::before { animation: ootdPulse 1.8s ease-out infinite; }
@keyframes ootdPulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.6); opacity: 0; } }
.ootd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ootd-txt b { font-size: 14px; font-weight: 600; color: var(--ink); }
.ootd-txt em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.ootd-go { flex: 0 0 auto; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ootd-pt::before { animation: none; } }

/* Le mot sous le composeur : quota atteint, vidéo non gardée. */
.comp-note {
  margin: 6px 0 0; padding: 7px 10px; border-radius: 10px;
  background: var(--inset); border: 1px solid var(--hairline);
  font-size: 12px; line-height: 1.35; color: var(--ink-3);
}

/* L'état « publiée » : la carte se calme, la flamme et le compteur
   prennent la place du point qui pulse. Sans ces règles, le rituel
   accompli s'affichait sans aucun style. */
.ootd.fait { cursor: default; border-color: var(--hairline); background: var(--inset); }
.ootd.fait:hover { border-color: var(--hairline); }
.ootd-feu { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.ootd-serie {
  flex: 0 0 auto; min-width: 26px; padding: 3px 8px; border-radius: 999px;
  background: var(--acide); color: #0a0a0a;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600;
  text-align: center; font-variant-numeric: tabular-nums;
}

/* #2 — badge « reçu vérifié » sur le post généré après achat */
.badge-recu {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 3px 0 1px; padding: 3px 9px; border-radius: 999px;
  background: var(--acide); color: #0a0a0a;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* #6 — Partage aux proches (close friends) */
.pg-proche .pg-ami-vue { position: relative; }
.pg-etoile {
  position: absolute; right: -3px; bottom: -3px;
  width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 999px; background: var(--raised); border: 1px solid var(--hairline);
  font-size: 11px; line-height: 1; color: var(--ink-3);
}
.pg-proche.on .pg-ami-vue img { box-shadow: 0 0 0 2px var(--acide); }
.pg-proche.on .pg-etoile { background: var(--acide); color: #0a0a0a; border-color: transparent; }
.pg-groupe { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pg-groupe.fait { color: var(--ink-3); text-decoration: none; }
.pg-doux { font-style: normal; color: var(--ink-3); font-weight: 400; }

/* ==================================================================
   LE PARCOURS CODE NEYBI
   Une étape par écran, un bouton par étape. La page respire : c'est ce
   qui fait qu'on sait quoi faire sans lire. La teinte est celle de
   l'atelier du panier — c'est son code qu'on débloque.
   ================================================================== */

#voile-code {
  position: fixed; inset: 0; z-index: 148;
  display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  overflow: hidden;
}

.cn-tete {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  border-bottom: 1px solid var(--hairline);
}
.cn-ic {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--inset); color: var(--ink);
  font-size: 15px; cursor: pointer;
}
.cn-jauge {
  flex: 1; height: 4px; border-radius: 999px;
  background: var(--inset); overflow: hidden;
}
.cn-jauge i {
  display: block; height: 100%; width: 0;
  background: var(--teinte, var(--acide));
  transition: width var(--t-moyen) var(--courbe);
}
.cn-pas { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--ink); }

.cn-corps { flex: 1; overflow-y: auto; }
.cn-page {
  padding: 26px 20px 20px;
  max-width: 560px; margin: 0 auto;
  animation: cn-entre var(--t-moyen) var(--courbe) both;
}
@keyframes cn-entre { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cn-oeil {
  display: block; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.cn-h {
  margin: 10px 0 0;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 30px; line-height: 34px; font-weight: 700;
  letter-spacing: -.01em;
}
.cn-p { margin: 12px 0 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.cn-legal {
  margin: 18px 0 0; font-size: 11px; line-height: 16px; color: var(--ink-3);
  padding-top: 12px; border-top: 1px solid var(--hairline);
}

/* La carte de l'atelier concerné : on sait pour qui on fait le geste. */
.cn-carte {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px; padding: 12px;
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--raised);
  border-left: 3px solid var(--teinte, var(--acide));
}
.cn-carte.ok { border-color: var(--teinte, var(--acide)); }
.cn-carte img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.cn-carte-t { flex: 1; min-width: 0; }
.cn-carte-t b { display: block; font-size: 15px; font-weight: 600; }
.cn-carte-t em {
  display: block; margin-top: 2px; font-style: normal;
  font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cn-carte-d { flex: 0 0 auto; font-size: 15px; font-weight: 600; color: var(--ink); }

.cn-look {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-top: 10px; padding: 10px;
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--inset); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.cn-look img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.cn-look span { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* La liste des paliers, la même partout : parcours, tunnel, bilan. */
.cn-liste { list-style: none; margin: 20px 0 0; padding: 0; }
.cn-li {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.cn-li:last-child { border-bottom: 0; }
.cn-li-pt {
  width: 22px; height: 22px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1.5px solid var(--hairline); border-radius: 999px;
  font-size: 11px; color: var(--ink-3);
}
.cn-li.ok .cn-li-pt {
  background: var(--teinte, var(--acide)); border-color: var(--teinte, var(--acide));
  color: #0a0a0a;
}
.cn-li-t { flex: 1; min-width: 0; }
.cn-li-t b { display: block; font-size: 14px; font-weight: 500; }
.cn-li-t em {
  display: block; margin-top: 1px; font-style: normal;
  font-size: 11px; color: var(--ink-3);
}
.cn-li-d { flex: 0 0 auto; font-size: 13px; font-weight: 600; }
.cn-li.rate { opacity: .5; }

/* La dernière page : le code lui-même. */
.cn-code {
  display: inline-block; margin: 14px 0 0; padding: 8px 12px;
  border-radius: 8px;
  background: var(--teinte, var(--acide)); color: #0a0a0a;
  font-size: 20px; font-weight: 600; letter-spacing: .04em;
}
.cn-gros { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 8px; }
.cn-gros b {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 46px; line-height: 1; font-weight: 700;
}
.cn-gros em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.cn-qui { margin-top: 24px; }
.cn-qui h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }

/* Le pied : un seul bouton fort. « Passer » reste discret mais lisible
   — quelqu'un sans Instagram ne doit pas se sentir piégé. */
.cn-pied {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  background: var(--page);
}
.cn-cta {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 20px;
  border: 0; border-radius: 13px;
  background: var(--ink); color: var(--sur-ink);
  font: 600 16px/1 inherit; cursor: pointer;
  transition: transform var(--t-court) var(--courbe);
}
.cn-cta:active { transform: scale(.98); }
.cn-cta.fait { background: var(--teinte, var(--acide)); color: #0a0a0a; }
.cn-passe {
  flex: 0 0 auto; padding: 16px 4px;
  border: 0; background: none; color: var(--ink-3);
  font: 500 14px/1 inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.cn-total { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; }
.cn-total small { font-size: 10px; color: var(--ink-3); }
.cn-total b { font-size: 17px; font-weight: 600; }

@media (min-width: 620px) {
  .cn-pied { justify-content: center; }
  .cn-cta { flex: 0 0 auto; min-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .cn-page { animation: none; }
  .cn-jauge i, .cn-cta { transition: none; }
}

/* Le reçu du kit, en tête de la commande confirmée. */
.pn-recu-kit { border-left: 3px solid var(--teinte); }
.rk-objet {
  border-radius: 14px; overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
}
.rk-objet svg { width: 100%; height: auto; display: block; }
.rk-actes { display: flex; align-items: stretch; gap: 10px; margin-top: 14px; }
/* Les deux boutons viennent de familles différentes (plein / fantôme)
   et n'avaient ni la même hauteur ni le même aplomb. On les aligne
   ici plutôt que de retoucher les deux familles. */
.rk-actes .btn, .rk-actes .btn-ghost {
  flex: 1; margin: 0; min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
}
.rk-note { margin: 10px 0 0; font-size: 11px; line-height: 16px; color: var(--ink-3); }

/* Le post pré-rédigé, sur l'étape « partager ». La mention
   publicitaire y est déjà : c'est la conformité par construction. */
.cn-poste {
  margin-top: 18px; padding: 14px;
  border: 1px dashed var(--hairline); border-radius: 14px;
  background: var(--inset);
}
.cn-poste-l {
  margin: 0 0 8px; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.cn-poste-t { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.cn-poste-c {
  margin-top: 12px; padding: 9px 14px;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--page); color: var(--ink);
  font: 500 12px/1 inherit; cursor: pointer;
}

/* ------------- Les portes vers le Code Neybi -------------
   Le fil est l'onglet où l'on passe son temps : c'était le seul qui
   n'offrait aucun chemin vers le code. La carte dit ce qui RESTE à
   faire, pas ce qui est déjà gagné. */

.carte-code {
  display: block; width: 100%; text-align: left;
  /* L'en-tête est collant : sans cette marge, un `scrollIntoView`
     amène la carte SOUS lui et on n'en voit que le pied. */
  scroll-margin-top: calc(var(--entete-h, 111px) + 10px);
  padding: 18px 16px;
  border: 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  border-left: 3px solid var(--teinte, var(--acide));
  background: var(--raised); color: var(--ink);
  font: inherit; cursor: pointer;
}
.cc-oeil {
  display: block; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.cc-h {
  display: block; margin-top: 8px;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 22px; line-height: 26px; font-weight: 700;
}
.cc-p { display: block; margin-top: 6px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.cc-jauge {
  display: block; height: 4px; margin-top: 14px;
  border-radius: 999px; background: var(--inset); overflow: hidden;
}
.cc-jauge i { display: block; height: 100%; background: var(--teinte, var(--acide)); }
.cc-pied {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 10px;
}
.cc-pied em {
  font-style: normal; font-family: "IBM Plex Mono", monospace;
  font-size: 11px; color: var(--ink-3);
}
/* L'encre d'archétype est une couleur de FOND, pas d'écriture : le
   rouge Print Angel sur du papier blanc ne tient que 3,42:1. Elle
   reste sur les barres, les bordures et les pastilles — là où c'est
   du noir qu'on pose dessus, et c'est vérifié. */
.cc-pied b { font-size: 13px; font-weight: 600; color: var(--ink); }

/* Sur la fiche d'une pièce : une ligne, pas un bloc. La fiche parle
   de la pièce, le code n'y est qu'un rappel. */
.cc-rappel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; margin-top: 18px; padding: 13px 14px;
  border: 1px dashed var(--hairline); border-radius: 13px;
  background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.cc-rappel-t { font-size: 13px; color: var(--ink-2); }
.cc-rappel-t b { font-size: 15px; font-weight: 600; color: var(--ink); }
.cc-rappel-a { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--ink); }

/* ==========================================================
   MODIFIER LE PROFIL
   Le geste de X — feuille pleine, Annuler à gauche, Enregistrer à
   droite — dans l'habillage Neybi : papier, encre, encre d'archétype.
   Aucune couleur inventée, tout vient des variables du thème.
   ========================================================== */
/* L'enveloppe et le fond, comme toutes les autres feuilles de l'app :
   ils sont stylés par identifiant, un par un. Sans ces deux règles la
   feuille se déroulait dans le flux, en bas de la page. */
#feuille-profil { position: fixed; inset: 0; z-index: 114; }
#profil-fond { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.55); }

/* Plus haute que les autres — c'est un formulaire — mais en dvh comme
   le reste : en vh la barre du navigateur mobile est comptée en trop et
   le bas de la feuille passe sous l'écran. */
.feuille-profil { max-height: 88dvh; }
.feuille-profil .feuille-tete { align-items: center; }
.pe-annuler {
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 6px 2px;
  cursor: pointer;
}
.pe-enregistrer { padding: 8px 18px; font-size: 14px; }
.pe-corps { overflow-y: auto; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

.pe-banniere {
  position: relative;
  height: 118px;
  background: var(--teinte, var(--ink));
  overflow: hidden;
}
.pe-banniere img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.pe-banniere-note {
  position: absolute;
  left: 16px;
  bottom: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pe-photo { display: flex; align-items: flex-end; gap: 14px; padding: 0 16px; margin-top: -34px; }
.pe-photo-btn {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid var(--page);
  cursor: pointer;
  flex: none;
}
.pe-photo-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-photo-sur {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.44);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pe-photo-reset {
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: underline;
  padding: 0 0 8px;
  cursor: pointer;
}

.pe-champs { display: flex; flex-direction: column; gap: 16px; padding: 22px 16px 4px; }
.pe-champ { display: block; }
.pe-lab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.pe-compte { font-size: 11px; font-style: normal; color: var(--ink-3); }
.pe-compte.plein { color: var(--ink); font-weight: 600; }
.pe-champ input,
.pe-champ textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--raised);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  resize: none;
}
.pe-champ input:focus,
.pe-champ textarea:focus { outline: none; border-color: var(--ink); }
.pe-aide { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.pe-note { padding: 16px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

/* ---------------- Le réseau, en onglets ----------------
   Trois listes complètes empilées faisaient trois fois la même rangée
   à faire défiler. On n'en montre qu'une, et seulement son début. */
.reseau-onglets {
  display: flex;
  gap: 2px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--hairline);
}
.reseau-onglets button {
  flex: 1 0 auto;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-3);
  padding: 9px 10px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.reseau-onglets button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}
.reseau-onglets i {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-3);
}
.reseau-plus { display: block; width: 100%; margin-top: 10px; text-align: center; }

/* Les onglets du profil en fil, comme sur X : mêmes cartes que le fil
   principal, séparées par le même filet. Seul « Médias » reste en
   grille. */
.pf-fil { display: flex; flex-direction: column; }
.pf-fil > .poste { border-bottom: 1px solid var(--hairline); }
.pf-fil > .poste:last-child { border-bottom: 0; }

/* ==========================================================
   LA PORTE — inscription et connexion
   Blanc dominant, encre, IBM Plex : la DA de l'app, pas celle du
   composant d'origine. Pas de particules, pas de dégradé, et aucun
   bouton social : chacun aurait été une promesse qu'on ne tient pas.
   ========================================================== */
#porte {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
body.porte-ouverte { overflow: hidden; }

.porte-carte { width: 100%; max-width: 360px; }
.porte-marque { display: flex; justify-content: center; margin-bottom: 26px; }
.porte-marque .logo { height: 22px; width: auto; }

.po-titre {
  margin: 0 0 8px;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.po-sous { margin: 0 0 26px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* Le champ à étiquette flottante : elle monte quand on écrit. */
.po-champ {
  position: relative;
  display: block;
  margin-bottom: 12px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--raised);
  transition: border-color 160ms ease;
}
.po-champ:focus-within { border-color: var(--ink); }
.po-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--ink-3);
  pointer-events: none;
}
.po-champ input {
  width: 100%;
  padding: 22px 44px 9px 34px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  border-radius: 14px;
}
.po-champ input:focus { outline: none; }
.po-lab {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--ink-3);
  pointer-events: none;
  transition: transform 160ms ease, font-size 160ms ease, top 160ms ease;
}
.po-champ:focus-within .po-lab,
.po-champ.rempli .po-lab {
  top: 9px;
  transform: none;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.po-oeil {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 15px;
  cursor: pointer;
  border-radius: 999px;
}
.po-oeil:hover { color: var(--ink); }

.po-case { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 6px; cursor: pointer; }
.po-case input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.po-case span { font-size: 14px; line-height: 1.35; }
.po-case small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-3); line-height: 1.45; }

.po-erreur {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
}

.po-valide {
  position: relative;
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sur-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.po-valide[disabled] { cursor: default; }
.po-valide.envoi span { opacity: 0; }
.po-rond {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: var(--sur-ink);
  border-radius: 999px;
}
[data-motion="on"] .po-rond { animation: po-tourne 0.7s linear infinite; }
@keyframes po-tourne { to { transform: rotate(360deg); } }

.po-bascule { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--ink-3); }
.po-bascule button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  padding: 0 0 0 3px;
}
.po-plus-tard {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.po-note {
  margin: 22px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-3);
  text-align: center;
}
.po-note strong { color: var(--ink); font-weight: 600; }

/* Le mot qui rassure quand la porte s'ouvre au moment de commander. */
.po-plus-tard-note { margin: 18px 0 8px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* Une information déjà donnée : on la montre, on ne la redemande pas.
   Même gabarit qu'un champ du tunnel, mais en lecture. */
.tn-connu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--inset);
}
.tn-connu-l {
  display: block;
  min-width: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tn-connu-l em {
  display: block;
  margin-top: 3px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 14.5px;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tn-connu-b {
  flex: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}
.tn-connu-b:hover { color: var(--ink); }

/* ---------------- Le premier écran : on propose, on ne demande pas ---------------- */
.po-etapes { margin: 26px 0 28px; display: flex; flex-direction: column; gap: 16px; }
.po-etape { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.po-etape i {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  margin-top: 1px;
}
.po-etape span { font-size: 15px; line-height: 1.35; font-weight: 600; }
.po-etape small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-3); line-height: 1.45; }
.po-lien { display: block; text-align: center; text-decoration: none; }

/* ---------------- L'appel au quiz, en tête du fil ---------------- */
.appel-quiz {
  margin: 12px 16px 16px;
  padding: 18px 18px 20px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--raised);
}
.aq-encres { display: flex; gap: 4px; margin: 0 0 13px; }
.aq-encres i { width: 26px; height: 6px; border-radius: 999px; display: block; }
.aq-titre {
  margin: 0 0 6px;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.aq-txt { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.aq-btn { display: block; text-align: center; text-decoration: none; }

/* La porte, en mode archétype. Même faute que partout ailleurs : le
   gris atténué (`--ink-3`) posé sur l'encre de l'archétype tombe à
   1,99:1 sur le rouge Print Angel. La carte revient donc sur du blanc,
   comme tous les blocs de lecture de l'app. */
body[data-theme="archetype"] .porte-carte {
  background: var(--raised);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 8px 34px rgba(10, 10, 10, .12);
}

/* ------------- Taille des cibles au doigt -------------
   WCAG 2.2 §2.5.8 : 24 × 24 px minimum, sauf pour ce qui est écrit
   DANS une phrase — un nom d'auteur au milieu d'une ligne de texte
   reste une exception légitime, on n'y touche pas.
   Les pastilles et les actions autonomes, elles, n'en sont pas : à
   23 px on les rate une fois sur trois sur un écran de téléphone. */
.tag, .pastille-arch {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.voir-comms { padding-block: 5px; }

/* L'avis sur une commande livrée : il crédite la suivante. */
.pn-avis h4 { margin: 0 0 6px; }
.pn-avis p { margin: 0 0 12px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.pn-avis .btn { width: 100%; }
.pn-avis-ok { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }

/* ==================================================================
   LE PARC IPHONE
   La maquette est en 390 × 844 (iPhone 13/14). Le cas dur n'est pas la
   largeur — 375 contre 390, quinze pixels — c'est la HAUTEUR : un
   iPhone 7 fait 667 px, soit 177 de moins. En-tête et barre basse
   mangent 175 px : il reste 492 px de contenu contre 669. Un tiers de
   moins.

   D'où deux réglages distincts, et pas un « responsive » global :
   — sur écran COURT, on réduit l'échelle d'affichage. Un titre de
     30 px qui tenait en deux lignes en fait quatre, et la note du bas
     passe sous le pli.
   — sur écran ÉTROIT, on resserre les marges et le pas de la grille.

   Rien ne change au-delà : les grands iPhone gardent la maquette
   exacte. On ne dénature pas, on ajuste ce que la place impose.
   ================================================================== */

/* ---------------- Écran court : iPhone 7/8/SE, X, 12 mini ---------------- */
@media (max-height: 770px) {
  /* L'en-tête reprend 12 px au contenu. */
  .entete { --entete-h: 99px; }
  .onglets { padding-top: 4px; padding-bottom: 4px; }

  /* L'échelle d'affichage descend d'un cran. Les rapports entre les
     tailles sont conservés — c'est la composition qui compte, pas la
     valeur absolue. */
  .cn-h { font-size: 25px; line-height: 29px; }
  .cn-gros b { font-size: 38px; }
  .cn-page { padding-top: 18px; }
  .cn-liste { margin-top: 14px; }
  .cn-li { padding: 9px 0; }
  .cn-carte { margin-top: 15px; }

  .bq-hero { min-height: 232px; }
  .bq-hero-nom { font-size: 36px; }
  .bq-hero-txt { padding-top: 44px; }
  .bq-hero-vide .bq-hero-nom { font-size: 28px; }
  .bq-code-gros { font-size: 28px; }
  .ar-hero { min-height: 224px; }
  .ar-hero .bq-hero-nom { font-size: 34px; }
  .ac-hero { min-height: 196px; }
  .ac-hero .bq-hero-nom { font-size: 40px; }

  .cc-h { font-size: 19px; line-height: 23px; }
  .carte-code { padding: 15px 16px; }
  .jo-h { font-size: 25px; line-height: 29px; }
  .oa-gros { font-size: 36px; }
  .carte-soutien-n { font-size: 28px; }

  /* Le pied du parcours et des feuilles : moins d'air, mais la cible
     reste à 48 px — on ne rogne jamais sur ce qu'on doit toucher. */
  .cn-pied { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .cn-cta { padding: 13px 20px; }
  .feuille { max-height: 84dvh; }
}

/* ---------------- Écran étroit : tout ce qui est sous 390 ---------------- */
@media (max-width: 384px) {
  .poste, .composeur, .bq-feed-tete, .bq-cartes { padding-left: 13px; padding-right: 13px; }
  .onglet { font-size: 12px; letter-spacing: .06em; }
  .entete-haut { padding-left: 13px; padding-right: 13px; }
  .cn-page { padding-left: 16px; padding-right: 16px; }
  /* La rangée d'actions du poste : cinq boutons pour 238 px utiles.
     On reprend 3 px de chaque côté plutôt que de laisser « Acheter »
     déborder. La cible reste à 36 px de haut. */
  .action { padding-inline: 3px; gap: 5px; }
  .pn-l { gap: 9px; }
  /* Les pastilles de taille restent à 24 px : c'est un minimum
     d'accessibilité, pas une marge de manœuvre. */
  .tag { padding-inline: 8px; }
}

/* ---------------- Très court ET très étroit : l'iPhone SE ---------------- */
@media (max-height: 700px) and (max-width: 384px) {
  .cn-h { font-size: 23px; line-height: 27px; }
  .bq-hero { min-height: 210px; }
  .st-texte { bottom: 88px; }
}

/* ---------------- Sous 360 px : SE 1re génération, vieux Android ----------
   À 320 px la page débordait de 25 px sur la droite — donc défilement
   latéral sur TOUTE l'app. Deux coupables, mesurés :
     · les quatre icônes d'en-tête (218 px demandés, 190 disponibles) ;
     · la rangée d'actions du poste (276 px demandés, 238 disponibles).
   On ne touche ni au mot « Acheter » (il porte la marketplace, cf. la
   note plus haut) ni aux 44 px de hauteur de cible : on resserre les
   écarts, et la rangée d'actions accepte de passer à la ligne.
   Rien de tout ça n'atteint 375 px : la requête s'arrête à 359. */
@media (max-width: 359px) {
  .entete-actions { gap: 6px; }
  .icone-btn { min-width: 38px; }
  .actions { flex-wrap: wrap; row-gap: 2px; }
}

/* ==================================================================
   LE BUREAU
   Ajouté le 8 septembre 2026. Bloc autonome, posé en fin de fichier :
   tout y est sous `@media (min-width: …)`, donc AUCUNE de ces règles
   ne s'applique au téléphone — le rendu mobile est inchangé par
   construction. La fin du fichier sert aussi à gagner la cascade à
   spécificité égale, sans avoir à réécrire les règles du dessus.
   Pour revenir en arrière : supprimer ce bloc, rien d'autre.

   Quatre constats mesurés au navigateur, à 1280 et 1920 px :

   1. La coquille restait à 680 px. Or la Boutique passe à trois
      colonnes dès 1100 px (règle plus haut dans ce fichier) : elle
      les serrait donc dans 680 px, soit des cartes de 207 px où le
      prix se coupait EN DEUX LIGNES à l'intérieur du bouton Acheter.
      Plus l'écran était large, plus les cartes rétrécissaient.
   2. Dans les Looks, la vidéo est déjà centrée sur une colonne de
      ~410 px, mais la légende, le rail et le voile restaient collés
      aux bords de l'écran : à 1440 px, le nom de l'atelier et son
      étiquette de prix se retrouvaient à 500 px de l'image dont ils
      parlent.
   3. Les quatre entrées de la nav du bas s'étalaient sur toute la
      largeur de l'écran.
   4. Les rangs qui défilent à l'horizontale (stories, goûts) cachent
      leur barre de défilement : au doigt c'est juste, à la souris on
      ne pouvait plus atteindre la fin du rang.
   ================================================================== */

/* ----------------------------------------------------------------
   1. La coquille. Elle s'élargit d'un coup, pour tous les onglets —
   pas onglet par onglet, sinon l'en-tête change de largeur à chaque
   clic. Ce qui se LIT (le fil, les messages, le profil) garde sa
   colonne de lecture ; ce qui se PARCOURT (la Boutique) prend la
   place. 1100 px est repris tel quel de la règle des trois colonnes
   de la Boutique : les deux doivent basculer ensemble.
   ---------------------------------------------------------------- */
@media (min-width: 1100px) {
  /* L'en-tête tient la largeur du contenu le plus large (la Boutique),
     comme la barre haute d'Instagram sur le web : le logo et les
     quatre icônes marquent les bords de la page. */
  .entete-haut,
  main { max-width: 1040px; }

  /* Les cinq onglets, eux, restent groupés au centre : étalés sur
     1 040 px ils se lisaient comme cinq boutons sans rapport. */
  .onglets { max-width: 760px; }

  #vue-fil,
  #vue-messages,
  #vue-profil { max-width: 680px; margin-inline: auto; }

  /* La nav du bas se cale sur la colonne de lecture au lieu de
     répartir ses quatre entrées sur 1 440 px. */
  .nav { padding-inline: calc((100% - 680px) / 2); }

  /* Le prix ne se coupe plus jamais dans le bouton, même si une
     pièce passe à quatre chiffres. */
  .bq-acheter b { white-space: nowrap; }

  /* Le Journal s'intercale sur toute la largeur de la grille : à
     1 040 px, une image de 150 px de haut devient une bande. */
  .bq-news img { height: 210px; }

  /* Une conversation courte laissait le champ « Écrire un message »
     flotter au tiers de l'écran, avec 500 px de vide en dessous : sur
     téléphone le fil remplit toujours la hauteur, pas ici. La vue
     prend la hauteur disponible et le fil pousse la saisie en bas. */
  #vue-conv {
    display: flex;
    flex-direction: column;
    /* La hauteur s'arrête là où s'arrête le contenu de `main`, dont
       le bas réserve déjà `--nav-h` + 24 px. */
    min-height: calc(100dvh - var(--entete-h, 111px) - var(--nav-h) - 24px);
  }
  #vue-conv .fil-messages { flex: 1; }
}

/* ----------------------------------------------------------------
   2. Les Looks. `--look-col` reprend MOT POUR MOT l'expression de
   largeur de `.volet video` (plus haut) : les calques se calent donc
   exactement sur l'image, quelle que soit la hauteur de la fenêtre.
   `--look-marge` est la gouttière noire d'un côté.
   ---------------------------------------------------------------- */
@media (min-width: 900px) {
  .volet {
    --look-col: min(100%, calc((100dvh - 108px - var(--nav-h)) * 9 / 16));
    --look-marge: max(0px, calc((100% - var(--look-col)) / 2));
  }
  .voile-bas { inset-inline: var(--look-marge); }
  .legende { left: var(--look-marge); right: calc(var(--look-marge) + 84px); }
  .rail { right: calc(var(--look-marge) + 12px); }
  .volet-son { right: calc(var(--look-marge) + 14px); }
}

/* ----------------------------------------------------------------
   2 bis. Les stories, même problème que les Looks et plus visible
   encore : `#st-video` est en `object-fit: contain`, donc l'image se
   centrait dans une colonne d'environ 500 px pendant que les barres
   de progression, le nom de l'atelier, la légende et le champ de
   réponse s'étalaient sur les 1 440 px. Le champ « Répondre… » faisait
   1 416 px de large pour une story qui en occupe 506.
   `.st-colle` suit exactement l'image : les autocollants sont posés
   en pourcentage de ce cadre, ils se décaleraient sinon.
   ---------------------------------------------------------------- */
@media (min-width: 900px) {
  #voile-story {
    --st-col: min(100%, calc(100dvh * 9 / 16));
    --st-marge: max(0px, calc((100% - var(--st-col)) / 2));
  }
  #st-video, #st-photo { width: var(--st-col); flex: 0 0 auto; }
  .st-colle { inset-inline: var(--st-marge); }
  .st-barres,
  .st-tete { left: calc(var(--st-marge) + 10px); right: calc(var(--st-marge) + 10px); }
  .st-texte { left: calc(var(--st-marge) + 16px); right: calc(var(--st-marge) + 16px); }
  .st-pied { left: calc(var(--st-marge) + 12px); right: calc(var(--st-marge) + 12px); }
  /* Les deux zones de passage restent SUR l'image : cliquer dans la
     gouttière noire ne doit pas faire avancer la story. */
  .st-gauche { left: var(--st-marge); width: calc(var(--st-col) * 0.32); }
  .st-droite { right: var(--st-marge); width: calc(var(--st-col) * 0.68); }
}

/* ----------------------------------------------------------------
   3. Les écrans posés par-dessus (recherche, fiche de compte, achats,
   NEYBI for Artist). Ils étaient calés sur 620 px depuis 720 px de
   large ; au-delà de 1280 px on leur donne de l'air, sans jamais
   aller jusqu'au bord. Le Journal, lui, garde ses 640 px : c'est une
   largeur de LECTURE, elle ne doit pas grandir.
   ---------------------------------------------------------------- */
@media (min-width: 1280px) {
  .rech-tete, .rech-filtres, .rech-corps,
  .cp-tete, .cp-corps,
  #voile-achats .cp-tete, #voile-achats .cp-corps,
  #voile-artist .cp-tete, #voile-artist .cp-corps { max-width: 860px; }
}

/* ----------------------------------------------------------------
   4. Ce qui se manipule à la souris.
   ---------------------------------------------------------------- */
@media (min-width: 1100px) {
  /* Le rang des stories garde son défilement, mais montre sa barre :
     sans elle, à la souris, on ne pouvait pas atteindre la fin. */
  .bulles {
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
    padding-bottom: 8px;
  }
  /* Le bandeau des goûts n'a pas besoin de défiler quand il y a la
     place : il passe simplement à la ligne. */
  .bandeau-gouts { flex-wrap: wrap; row-gap: 6px; overflow-x: visible; }
}

@media (min-width: 1100px) and (hover: hover) {
  .onglet:hover { color: var(--ink); }
  .icone-btn:hover { color: var(--ink-2); }
  .nav a:hover { color: var(--ink); }
  .bq-carte { transition: transform 240ms var(--courbe); }
  .bq-carte:hover { transform: translateY(-3px); }
  .bulle-story:hover .anneau { filter: brightness(1.12); }
  .rail-btn:hover { transform: scale(1.06); }
}

/* Le clavier doit se voir. `:focus-visible` ne se déclenche jamais au
   doigt : cette règle est sans effet sur téléphone, elle est ici pour
   rester avec le reste du bureau. */
@media (min-width: 1100px) {
  .onglet:focus-visible,
  .icone-btn:focus-visible,
  .nav a:focus-visible,
  .avatar-btn:focus-visible,
  .bq-carte:focus-visible,
  .bq-acheter:focus-visible,
  .bq-coeur:focus-visible,
  .rail-btn:focus-visible,
  .btn:focus-visible,
  .btn-ghost:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}
