:root {
  /* Look « Nuit » : fond presque noir aux tons chauds, lueur bordeaux derrière les titres,
     serif crème, repères dorés, actions en bordeaux. Un seul thème, sombre, par choix.
     La caisse dessinée avec ses bouteilles reste l'élément signature.
     Mise en page : une colonne sur iPhone, deux ou trois colonnes d'étiquettes sur iPad. */
  --buee: #0e0a0a;
  --papier: #1a1314;
  --nuit: #f3e8dc;
  --gris: #b7a79b;
  --trait: #33262a;
  --verre: #2a0b14;
  --lueur: radial-gradient(120% 140% at 50% 0%, #5a1226 0%, #2a0b14 45%, #0e0a0a 100%);
  --sur-verre: #f3e8dc;
  --sur-verre-doux: #cdb9a6;
  --or: #dcb27a;
  --capsule: #8c1f3a;
  --sur-capsule: #f8ece0;
  --capsule-pale: #3a1420;
  --carton: #8a6b45;
  --carton-pale: #120d0d;
  --ok: #86d6a8;
  --ok-pale: #12261b;
  --alerte: #f0a877;
  --alerte-pale: #33211a;
  --vin-blanc: #e0c65c;
  --vin-rose: #f0a2b3;
  --vin-rouge: #c2455f;
  --etoile: #e6bb4f;
  --rayon: 12px;
  --ombre: 0 0 0 1px var(--trait);
  --display: "DM Serif Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --texte: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabs-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--buee);
  color: var(--nuit);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.4;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- Boutons et champs ---------- */
.btn {
  min-height: 46px;
  padding: 0 18px;
  border: 1.5px solid var(--trait);
  border-radius: 999px;
  background: var(--papier);
  font-weight: 600;
}
.btn.primary { background: var(--capsule); border-color: var(--capsule); color: var(--sur-capsule); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link { border: 0; background: none; padding: 10px 4px; color: var(--or); font-weight: 600; text-decoration: underline; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { flex: 1; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--gris); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--trait);
  border-radius: 10px;
  background: var(--papier);
}
textarea { resize: vertical; line-height: 1.4; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--capsule); }
.msg { min-height: 20px; font-size: 14px; color: var(--alerte); }
.msg.good { color: var(--ok); }
.hint { font-size: 14px; color: var(--gris); }

/* ---------- Écrans d'entrée ---------- */
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen.center { align-items: center; justify-content: center; }
.wait { font-family: var(--display); font-size: 22px; color: var(--gris); }
.hero {
  background: var(--lueur);
  border-bottom: 1px solid var(--trait);
  color: var(--sur-verre);
  padding: 56px 24px 40px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero.small { padding: 40px 24px 28px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(40px, 11vw, 64px); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
.hero.small h1 { font-size: clamp(30px, 8vw, 44px); }
.hero p { max-width: 34ch; font-size: 18px; color: var(--sur-verre-doux); }
.hero-crate { --slot-w: 30px; --slot-h: 76px; gap: 8px; padding: 12px 12px 8px; margin-top: 10px; background: rgba(255, 255, 255, 0.06); border-color: var(--sur-verre-doux); }
.hero-crate .slot path { stroke: var(--sur-verre-doux); }
.panel {
  width: 100%; max-width: 460px; margin: 0 auto;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.panel form { display: flex; flex-direction: column; gap: 14px; }
.or { text-align: center; color: var(--gris); font-size: 14px; }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.google { border-color: var(--or); }

/* ---------- Application ---------- */
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--tabs-h) + 24px); }
.mast { background: var(--lueur); border-bottom: 1px solid var(--trait); color: var(--sur-verre); padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.order-switch {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 0; background: none; padding: 0; color: inherit; text-align: left;
}
.agency { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--or); }
.agency::after { content: " ▾"; }
.order-title { font-family: var(--display); font-style: italic; font-size: clamp(28px, 7vw, 40px); line-height: 1.05; text-wrap: balance; }
.mast-line { font-size: 15px; color: var(--sur-verre-doux); }
.banner { padding: 10px 16px; background: var(--alerte-pale); color: var(--alerte); font-size: 14px; font-weight: 600; }
.view { max-width: 1180px; margin: 0 auto; }

.filters { display: flex; gap: 8px; padding: 14px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.filters button {
  flex: none; min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--trait); border-radius: 999px;
  background: var(--papier); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.filters button[aria-pressed="true"] { background: var(--nuit); border-color: var(--nuit); color: var(--buee); }

.group > h2 { padding: 18px 16px 8px; font-family: var(--display); font-weight: 400; font-style: italic; font-size: 22px; color: var(--or); }
.labels { list-style: none; margin: 0; padding: 0 12px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .labels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 16px; } }
@media (min-width: 1100px) { .labels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.empty { padding: 40px 24px; text-align: center; color: var(--gris); }

/* L'étiquette d'un vin */
.label {
  --type: var(--vin-rouge);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  background: var(--papier);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.label[data-type="blanc"] { --type: var(--vin-blanc); }
.label[data-type="rose"] { --type: var(--vin-rose); }
.label[data-type="mousseux"] { --type: var(--vin-blanc); }
.label[data-type="mousseux"] .thumb { border: 1.5px dotted var(--vin-blanc); }
.label.mine { background: color-mix(in srgb, var(--capsule-pale) 60%, var(--papier)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--capsule) 70%, var(--trait)); }
.label-main {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 16px 6px 12px 12px;
  border: 0; background: none; text-align: left;
}
.thumb {
  position: relative;
  width: 58px; height: 76px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: color-mix(in srgb, var(--type) 30%, var(--buee));
}
.thumb .num { font-family: var(--display); font-size: 28px; line-height: 1; color: var(--nuit); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.thumb.has-photo .num {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  padding: 2px 6px; font-size: 15px;
  background: var(--papier); color: var(--nuit); border-top-right-radius: 4px;
}
.mybadge {
  position: absolute; top: -8px; right: -8px; z-index: 2;
  min-width: 24px; height: 24px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--capsule); color: var(--sur-capsule);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mybadge.hold { background: var(--papier); color: var(--or); border: 1.5px dashed var(--or); }
.info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.name { font-weight: 600; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.origin { font-size: 13px; color: var(--gris); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; background: var(--buee); color: var(--gris); }
.tag.bio { background: var(--ok-pale); color: var(--ok); }
.tag.rabais { background: var(--alerte-pale); color: var(--alerte); }
.tag.nouveau { background: var(--capsule-pale); color: #f3b3c0; }
.aside { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 14px 12px 8px 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb { font-family: var(--display); font-size: 21px; line-height: 1; }
.pc { font-size: 13px; color: var(--gris); font-variant-numeric: tabular-nums; }
.per { font-size: 12px; color: var(--gris); }
.pc.odd { color: var(--alerte); font-weight: 700; }
.talk {
  margin-top: 6px; min-height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--trait); border-radius: 999px; background: var(--papier);
  font-size: 13px; font-weight: 600;
}
.talk svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.talk .star { color: var(--etoile); }

/* La caisse et ses bouteilles */
.crate-row { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 4px 12px 10px; }
.crate {
  --slot-w: 15px;
  --slot-h: 38px;
  display: grid; gap: 3px;
  grid-template-columns: repeat(var(--cols, 6), var(--slot-w));
  width: max-content; max-width: 100%;
  justify-self: start;
  padding: 6px 6px 4px;
  background: var(--carton-pale);
  border: 2px solid var(--carton);
  border-top-width: 5px;
  border-radius: 2px;
}
.crate.complete { border-color: var(--ok); background: var(--ok-pale); }
.slot { width: var(--slot-w); height: var(--slot-h); display: block; --who: var(--gris); }
.slot svg { width: 100%; height: 100%; display: block; }
.slot path { fill: color-mix(in srgb, var(--carton) 10%, transparent); stroke: var(--carton); stroke-width: 0.9; stroke-dasharray: 1.2 1.6; }
.slot.firm path, .slot.hold path { stroke-dasharray: none; }
.slot.firm path { fill: var(--who); stroke: var(--who); }
.slot.hold path { fill: color-mix(in srgb, var(--who) 18%, transparent); stroke: var(--who); stroke-width: 1.3; stroke-dasharray: 2.2 1.6; }
.crate.big { --slot-w: 26px; --slot-h: 66px; gap: 5px; padding: 10px 10px 6px; }
.crate-note { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sentence { font-size: 13.5px; font-weight: 600; }
.sentence.ok { color: var(--ok); }
.who { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--gris); }
.who span { display: inline-flex; align-items: center; gap: 5px; }
.who i { width: 9px; height: 9px; border-radius: 50%; background: var(--who); flex: none; }
.who .hold { font-style: italic; }
.who .hold i { background: transparent; border: 1.5px dashed var(--who); }

/* Mes bouteilles */
.ctl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 0 12px 12px; }
.ctl-note { flex-basis: 100%; margin: 0; padding: 8px 12px; border: 1px solid var(--or); border-radius: 8px; color: var(--or); font-size: 14px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 8px; }
.step {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--or); background: transparent; color: var(--nuit);
  font-size: 24px; font-weight: 600; line-height: 1;
}
.step:active:not(:disabled) { background: var(--or); color: var(--buee); transform: scale(0.92); }
.step:disabled { opacity: 0.35; }
.qty { min-width: 96px; text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.qty small { display: block; font-weight: 500; font-size: 12px; color: var(--gris); }
.seg { display: inline-flex; border: 1.5px solid var(--trait); border-radius: 999px; overflow: hidden; background: var(--papier); }
.seg button { min-height: 40px; padding: 0 14px; border: 0; background: none; font-size: 14px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--nuit); color: var(--buee); }
.join, .add {
  min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: var(--capsule); color: var(--sur-capsule);
  font-size: 14px; font-weight: 700;
}
.join:disabled, .add:disabled, .seg button:disabled { opacity: 0.45; }

/* ---------- Groupe, ma part ---------- */
.block { margin: 14px 12px 0; padding: 18px 16px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 720px) { .block { margin: 16px 16px 0; padding: 22px; } }
.block h2 { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--nuit); }
.block h3 { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--trait); font-size: 16px; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lines li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--trait); }
.lines li:first-child { border-top: 0; }
.lines .q { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .n { min-width: 0; overflow-wrap: anywhere; }
.lines .n small { display: block; color: var(--gris); font-size: 13px; }
.lines .a { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.lines .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--who); margin-right: 6px; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 2px solid var(--nuit); font-weight: 700; }
.total b { font-family: var(--display); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; }
.open-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--trait); }
.open-item:first-of-type { border-top: 0; }
.open-item .t { font-weight: 600; }
.open-item .btn { grid-column: 1 / -1; justify-self: start; min-height: 40px; }
.row-form { display: flex; gap: 8px; align-items: flex-end; }

/* ---------- Installer sur l'écran d'accueil ---------- */
.install-bar { display: flex; align-items: stretch; margin: 12px 12px 0; border: 1px solid var(--or); border-radius: var(--rayon); overflow: hidden; }
.install-go { flex: 1; min-height: 48px; padding: 0 14px; border: 0; background: transparent; color: var(--or); font-weight: 700; font-size: 15px; text-align: left; }
.install-x { width: 48px; border: 0; border-left: 1px solid var(--trait); background: transparent; color: var(--gris); font-size: 22px; }
.install-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 24px; }
.install-body > div { display: flex; flex-direction: column; gap: 14px; }
.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: pas; display: flex; flex-direction: column; gap: 12px; }
.install-steps li { counter-increment: pas; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.install-steps li::before { content: counter(pas); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--or); color: var(--or); font-family: var(--display); font-size: 18px; }
.install-steps span { padding-top: 5px; }
.install-steps svg { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: var(--or); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Guide d'utilisation ---------- */
.guide { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 28px; max-width: 62ch; }
.guide h3 { margin-top: 12px; font-family: var(--display); font-weight: 400; font-style: italic; font-size: 21px; color: var(--or); }
.guide p { line-height: 1.5; }
.guide ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.guide li::marker { color: var(--or); }
#guide-admin { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Suivi de la commande ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--trait); }
.steps li:last-child::before { display: none; }
.steps .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--trait); background: var(--papier); position: relative; }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); }
.steps li.done .tick::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--papier); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.steps li.done::before { background: var(--ok); }
.steps b { font-size: 16px; }
.owed { font-family: var(--display); font-size: 22px; line-height: 1.25; }

/* ---------- Ludo ---------- */
.ludo-head { display: flex; gap: 12px; align-items: center; }
.ludo-face { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50% 50% 50% 8px; background: var(--capsule); border: 1px solid var(--or); color: var(--sur-verre); font-style: italic; font-family: var(--display); font-size: 30px; }
.ludo-says { padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: var(--buee); font-size: 16.5px; line-height: 1.5; white-space: pre-wrap; max-width: 62ch; }
.ludo-says.busy { color: var(--gris); font-style: italic; }
.ludo-form { display: flex; gap: 8px; }
.ludo-form input { flex: 1; min-width: 0; border-radius: 999px; padding-left: 16px; }

/* ---------- Messages ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; }
.bubble { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--who); color: var(--buee); font-weight: 700; font-size: 15px; }
.bubble .b { padding: 10px 12px; background: var(--papier); border-radius: 4px 14px 14px 14px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 4px; }
.bubble.me .b { background: color-mix(in srgb, var(--capsule-pale) 60%, var(--papier)); }
.bubble .h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13px; color: var(--gris); }
.bubble .h b { color: var(--nuit); font-size: 14px; }
.bubble .x { white-space: pre-wrap; overflow-wrap: anywhere; }
.wine-ref { justify-self: start; align-self: flex-start; border: 0; padding: 3px 8px; border-radius: 3px; background: var(--buee); color: var(--or); font-size: 13px; font-weight: 600; text-align: left; }
.del { border: 0; background: none; padding: 0 4px; color: var(--gris); font-size: 13px; text-decoration: underline; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: var(--buee); border-top: 1px solid var(--trait); }
.composer textarea { flex: 1; min-height: 46px; max-height: 120px; resize: none; border-radius: 22px; padding: 11px 14px; }
#v-chat .composer { position: sticky; bottom: var(--tabs-h); }

/* ---------- Barre d'onglets ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  height: var(--tabs-h);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--papier); border-top: 1px solid var(--trait);
}
.tabs button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--gris); font-size: 11.5px; font-weight: 600; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tabs button[aria-current="page"] { color: var(--or); }
.tabs button[aria-current="page"] svg { fill: color-mix(in srgb, var(--or) 18%, transparent); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--capsule); color: var(--sur-capsule); font-size: 12px; display: grid; place-items: center; }

.delta {
  position: fixed; left: 16px; bottom: calc(var(--tabs-h) + 12px); z-index: 6;
  padding: 6px 14px; border-radius: 999px;
  background: var(--ok-pale); color: var(--ok); border: 1.5px solid currentColor;
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  opacity: 0; pointer-events: none;
}
.delta.down { background: var(--alerte-pale); color: var(--alerte); }
.delta.show { animation: delta-fade 1.2s ease forwards; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 16px); z-index: 30; transform: translateX(-50%);
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 12px;
  background: var(--nuit); color: var(--buee); font-weight: 600; font-size: 15px; text-align: center;
}

/* ---------- Fiches ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 20, 14, 0.55); }
.card { width: 100%; max-width: 620px; max-height: 92%; display: flex; flex-direction: column; background: var(--buee); box-shadow: 0 0 0 1px var(--trait); border-radius: 18px 18px 0 0; overflow: hidden; }
@media (min-width: 720px) { .sheet { align-items: center; } .card { border-radius: 18px; max-height: 86%; } }
.card-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 16px 12px; background: var(--lueur); border-bottom: 1px solid var(--trait); color: var(--sur-verre); }
.card-head h2 { flex: 1; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.15; text-wrap: balance; }
.close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: inherit; font-size: 26px; line-height: 1; }
.card-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
#ws-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.ws-top { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.ws-photo { position: relative; width: 112px; height: 150px; border-radius: var(--rayon); overflow: hidden; display: grid; place-items: center; background: var(--papier); box-shadow: var(--ombre); }
.ws-photo img { width: 100%; height: 100%; object-fit: cover; }
.ws-photo .num { font-family: var(--display); font-size: 48px; color: var(--gris); }
.ws-facts { display: flex; flex-direction: column; gap: 6px; }
.ws-facts .pb { font-size: 26px; }
.ws-crate { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
.ws-crate .ctl { padding: 0; }
.rate { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
.rate-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-weight: 600; }
.rate-title { display: block; font-family: var(--display); font-style: italic; font-weight: 400; font-size: 20px; }
.stars-input { display: flex; gap: 2px; }
.stars-input button { width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--trait); }
.stars-input button.on { color: var(--etoile); }
.rate-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rate-list li { display: flex; justify-content: space-between; gap: 12px; }
.rate-list .s { color: var(--etoile); letter-spacing: 1px; white-space: nowrap; }
.ws-admin { display: flex; flex-direction: column; gap: 8px; margin: 0 16px; padding: 14px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
.ws-admin .btn { align-self: flex-start; }
#ws-thread { padding: 4px 16px 16px; }
.order-list { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.order-list button { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--trait); border-radius: var(--rayon); background: var(--papier); text-align: left; }
.order-list button[aria-current="true"] { border-color: var(--or); }
.order-list .oa { font-size: 14px; color: var(--gris); font-weight: 600; }
.order-list .ot { font-family: var(--display); font-size: 21px; }
.order-list .os { font-size: 13px; color: var(--gris); }

/* ---------- Mouvement : seulement en réponse à un geste ---------- */
.fx-up { animation: flash-up 0.4s ease; }
.fx-down { animation: flash-down 0.4s ease; }
@keyframes flash-up { 40% { color: var(--ok); } }
@keyframes flash-down { 40% { color: var(--alerte); } }
@keyframes delta-fade { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .step { transition: transform 0.08s ease, background-color 0.08s ease; }
  .fx-up { animation: pop-up 0.34s ease; }
  .fx-down { animation: pop-down 0.34s ease; }
  .crate.bump { animation: crate-bump 0.36s ease; }
  .delta.show { animation: delta-rise 1.2s ease forwards; }
  @keyframes pop-up { 40% { transform: scale(1.14); color: var(--ok); } }
  @keyframes pop-down { 40% { transform: scale(0.9); color: var(--alerte); } }
  @keyframes crate-bump { 35% { transform: translateY(3px) rotate(-1.5deg); } 70% { transform: translateY(-1px) rotate(1deg); } }
  .crate.lit .slot { animation: slot-lit 0.5s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
  .fx-fade { animation: fx-fade 0.45s ease; }
  .fx-bounce { animation: fx-bounce 0.32s ease; }
  .react.pop { animation: react-pop 0.32s ease; }
  .toast.shake { animation: toast-shake 0.36s ease; }
  @keyframes slot-lit { 0% { filter: none; } 45% { filter: drop-shadow(0 0 6px var(--ok)) brightness(1.35); transform: translateY(-3px); } 100% { filter: none; } }
  @keyframes fx-fade { 40% { opacity: 0.35; } }
  @keyframes fx-bounce { 40% { transform: scale(1.08); } 70% { transform: scale(0.97); } }
  @keyframes react-pop { 40% { transform: scale(1.3); } }
  @keyframes toast-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
  @keyframes delta-rise { 0% { opacity: 0; transform: translateY(10px); } 15%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-8px); } }
}

/* Réactions emoji sous un message */
.reacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.react { border: 1px solid var(--trait); background: var(--buee); color: var(--nuit); border-radius: 999px; padding: 2px 9px; font-size: 13px; line-height: 1.4; }
.react.on { border-color: var(--or); background: var(--capsule-pale); }
.react.add { color: var(--gris); }
.react-pick { display: flex; gap: 2px; background: var(--buee); border: 1px solid var(--trait); border-radius: 999px; padding: 3px 6px; align-self: flex-start; }
.react-pick[hidden], .emoji-bar[hidden] { display: none; }
.react-pick button { border: 0; background: none; font-size: 20px; padding: 2px 5px; border-radius: 8px; }
.react-pick button:active, .emoji-bar button:active { background: var(--capsule-pale); }
.bubble .b { -webkit-touch-callout: none; }

/* Barre d'emojis des zones d'écriture */
form.has-emoji { flex-wrap: wrap; }
.emoji-bar { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); }
.emoji-bar button { border: 0; background: none; font-size: 22px; padding: 4px 6px; border-radius: 8px; }
.emoji-toggle { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--trait); background: var(--papier); font-size: 20px; padding: 0; }
.ludo-form .emoji-toggle { height: auto; align-self: stretch; }

/* Carte de vin allégée : badges et dernier commentaire */
.info .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.info .chips[hidden] { display: none; }
.chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--trait); white-space: nowrap; }
.chip.coeur { background: var(--alerte-pale); border-color: var(--alerte); color: var(--alerte); }
.chip.hot { background: var(--capsule-pale); border-color: var(--vin-rouge); color: var(--vin-rose); }
.last-msg { grid-column: 1 / -1; margin: 0 12px 10px; padding: 0; border: 0; background: none; text-align: left; font-size: 13px; font-style: italic; color: var(--sur-verre-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-msg[hidden] { display: none; }

/* Profil de goût */
.taste { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 28px; }
.taste-progress { height: 5px; border-radius: 3px; background: var(--trait); overflow: hidden; }
.taste-progress span { display: block; height: 100%; background: var(--or); transition: width .25s; }
.taste-q { font-family: var(--display); font-size: 24px; line-height: 1.2; color: var(--nuit); }
.taste-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.taste-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--rayon); border: 1px solid var(--trait); background: var(--papier); color: var(--nuit); font-size: 15px; text-align: center; min-height: 96px; justify-content: center; }
.taste-choice .e { font-size: 30px; line-height: 1; }
.taste-choice[aria-pressed="true"] { border-color: var(--or); background: var(--capsule-pale); }
.taste-none { align-self: center; border: 1px dashed var(--trait); background: none; color: var(--gris); border-radius: 999px; padding: 8px 16px; font-size: 14px; }
.taste textarea { width: 100%; }
.taste-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.taste-nav .link { background: none; border: 0; color: var(--gris); text-decoration: underline; padding: 6px 0; font-size: 14px; }
.taste-name { font-family: var(--display); font-size: 22px; color: var(--or); }
.taste-name.big { font-size: 30px; text-align: center; }
.taste-svg { width: 100%; max-width: 300px; align-self: center; display: block; margin: 0 auto; }
.taste-svg .axis { stroke: var(--trait); stroke-width: 1; }
.taste-svg .qlab { fill: var(--gris); font-size: 11px; }
.taste-svg .shape { fill: var(--or); fill-opacity: .25; stroke: var(--or); stroke-width: 1.5; }
.taste-svg .ghost { fill: none; stroke: var(--gris); stroke-dasharray: 4 3; }
.taste-gauge .track { position: relative; height: 6px; border-radius: 3px; background: var(--trait); margin: 8px 0 4px; }
.taste-gauge .dot { position: absolute; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--or); }
.taste-gauge .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--gris); }
.taste-ludo { margin: 6px 0 0; }
.taste-block .taste-svg { max-width: 220px; }

/* Bouton d'aide « ? » dans l'en-tête */
.mast { position: relative; }
.help { position: absolute; top: 16px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--or); background: rgba(0, 0, 0, 0.2); color: var(--or); font-family: var(--display); font-size: 18px; line-height: 1; padding: 0; }
.mast .order-switch { padding-right: 44px; }
.tabs button[hidden] { display: none; }

/* Icônes de l'en-tête : aide et compte */
.mast-icons { position: absolute; top: 16px; right: 14px; display: flex; gap: 8px; }
.mast-icons .help { position: static; }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; background: var(--who, var(--or)); color: #1a1314; font-weight: 700; font-size: 16px; }
.mast .order-switch { padding-right: 88px; }
.account .block { margin: 14px 12px; }

/* Carte des goûts du groupe et profil d'un membre */
.group-map { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
.group-map .q-frais { fill: rgba(134, 214, 168, 0.07); }
.group-map .q-gourmand { fill: rgba(240, 168, 119, 0.08); }
.group-map .q-raffine { fill: rgba(183, 155, 224, 0.08); }
.group-map .q-costaud { fill: rgba(194, 69, 95, 0.12); }
.group-map .ax { fill: var(--gris); font-size: 10px; }
.group-map .dot { cursor: pointer; }
.group-map .dot circle { stroke: var(--buee); stroke-width: 2; }
.group-map .dot.me circle { stroke: var(--nuit); stroke-width: 2.5; }
.group-map .dot text { fill: #1a1314; font-size: 10px; font-weight: 700; pointer-events: none; }
.group-map .dot:focus { outline: none; }
.group-map .dot:focus circle { stroke: var(--or); stroke-width: 3; }
.aff-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--trait); background: none; color: var(--nuit); font-size: 15px; text-align: left; }
.aff-row b { color: var(--or); font-weight: 600; }
.aff-row.static { font-size: 14px; }
.aff-list { display: flex; flex-direction: column; }
.aff-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 0; border: 0; border-top: 1px solid var(--trait); background: none; color: var(--nuit); text-align: left; font-size: 15px; }
.aff-item i { width: 12px; height: 12px; border-radius: 50%; }
.aff-item .pn { color: var(--gris); font-size: 13px; }
.aff-item b { color: var(--or); }
.aff-big { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.aff-big b { font-family: var(--display); font-size: 40px; font-weight: 400; color: var(--or); }
.aff-big span { color: var(--gris); }
.taste .legend { font-size: 12px; color: var(--gris); text-align: center; }
.taste .hint.center { text-align: center; }
.taste-quote { border-left: 2px solid var(--or); padding: 4px 0 4px 12px; font-style: italic; color: var(--sur-verre-doux); line-height: 1.5; }
.taste-quote b { font-style: normal; color: var(--or); }
.taste-h3 { font-size: 16px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--trait); }
.taste .feed { padding: 0; }
.taste .composer { position: static; border-radius: var(--rayon); }

/* Profil : dessin à taille raisonnable sur iPhone */
.taste-svg { width: min(100%, 260px); height: auto; }
.taste-block .taste-svg { width: min(100%, 220px); }

/* Ludo partout : bouton flottant et conversation */
.ludo-fab { position: fixed; right: 14px; bottom: calc(var(--tabs-h) + 14px); z-index: 6; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--or); background: var(--capsule); color: var(--sur-capsule); font-family: var(--display); font-size: 26px; line-height: 1; padding: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.lc-card { height: 88%; }
.lc-head { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lc-head h2 { flex: none; }
.lc-mem { align-self: flex-start; padding: 0; font-size: 13px; font-weight: 600; }
.lc-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; }
.lc-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.lc-msg.u { align-self: flex-end; background: var(--capsule-pale); border-radius: 14px 14px 4px 14px; }
.lc-msg.l { align-self: flex-start; background: var(--papier); box-shadow: var(--ombre); border-radius: 14px 14px 14px 4px; }
.lc-msg.wait { color: var(--gris); font-style: italic; }
.lc-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--or); background: none; color: var(--or); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; }
.lc-note { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
.lc-note.fixed { border-left: 3px solid var(--or); border-radius: 0 var(--rayon) var(--rayon) 0; }
.lc-note .x { border: 0; background: none; color: var(--gris); font-size: 16px; padding: 2px 6px; }
#lc-form[hidden] { display: none; }

/* Zone de commentaire d'un profil : assez haute, texte jamais caché (iPhone) */
.taste { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.taste .composer { flex-wrap: wrap; padding: 10px; gap: 8px; align-items: flex-end; }
.taste .composer textarea { flex: 1 1 100%; min-height: 64px; font-size: 16px; line-height: 1.4; padding: 10px 14px; border-radius: 14px; }
.taste .composer .emoji-toggle { margin-left: auto; }

/* iPhone : pas de zoom automatique quand on touche une zone d'écriture */
.composer textarea { font-size: 16px; }

.rel-date { font-weight: normal; font-size: .8em; color: var(--or); }
.rel-all { align-self: center; margin-top: 4px; }
#release-content .btn.wide { margin-top: 8px; }

/* Évolution du profil */
.evo-range { width: 100%; accent-color: var(--or); }
.evo-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--gris); margin-top: -6px; }
.evo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.evo-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.evo-list b { font-weight: 700; }
.evo-list b.up { color: var(--ok); }
.evo-list b.down { color: var(--alerte); }

/* En-tête : pastilles (Ludo, aide, compte) sur la ligne de l'agence ; le titre garde toute la largeur */
.mast { padding-top: 16px; }
.mast-icons { top: 14px; right: 14px; gap: 8px; align-items: center; }
.mast .order-switch { padding-right: 0; }
.mast .agency { display: flex; align-items: center; min-height: 34px; padding-right: 136px; }
.ludo-mini { width: 34px; height: 34px; padding: 0; border-radius: 50% 50% 50% 8px; border: 1.5px solid var(--or); background: var(--capsule); color: var(--sur-capsule); font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1; }

/* iPhone (app installée) : l'en-tête descend sous l'heure et la batterie */
.mast { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.mast-icons { top: calc(14px + env(safe-area-inset-top, 0px)); }

/* Zones d'écriture au bas d'une fenêtre : marge pour les coins arrondis de l'iPhone */
.card > .composer { padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }

/* Zones d'écriture des fenêtres (Ludo, fiche d'un vin) : le texte sur toute la largeur, boutons dessous à droite */
.card > .composer { flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.card > .composer textarea { flex: 1 1 100%; min-height: 52px; line-height: 1.4; padding: 12px 16px; border-radius: 16px; }
.card > .composer .emoji-toggle { margin-left: auto; }

/* Organisateur : membres et invitations */
.mem-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--trait); font-size: 15px; }
.mem-row small { color: var(--gris); }
.mem-row .link { padding: 4px 0; font-size: 14px; }
.mem-row.used span { color: var(--ok); }

.inv-btns { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }

/* Carte de vin : affinité et style */
.chip.match { border-color: var(--or); color: var(--or); }
.chip.match.top { background: color-mix(in srgb, var(--or) 18%, transparent); }
.chip.style { color: var(--sur-verre-doux); }
.chip.s-frais { border-color: #86d6a8; }
.chip.s-gourmand { border-color: #f0a877; }
.chip.s-raffine { border-color: #b79be0; }
.chip.s-costaud { border-color: #c2455f; }
.tabs .badge { position: absolute; }

/* Qui a payé ✓ */
.pay-bar { height: 8px; border-radius: 4px; background: var(--trait); overflow: hidden; }
.pay-bar span { display: block; height: 100%; background: var(--ok); }
.pay-interac { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; color: var(--sur-verre-doux); }
.pay-interac .link { padding: 4px 0; font-size: 14px; }
.pay-st { display: inline-block; font-weight: 700; margin-left: 6px; }
.pay-st.ok { color: var(--ok); }
.pay-st.wait { color: var(--alerte); }
.pay-st.due { color: var(--gris); }
.pay-st.big { font-size: 16px; margin: 0; }
.pay-act .link { padding: 2px 0 2px 8px; font-size: 13px; }
.pay-me .pay-amt { font-family: var(--display); font-size: 36px; color: var(--or); line-height: 1; }

/* Photos des produits : la bouteille entière, sur fond clair comme chez ActiVin */
.thumb.has-photo { background: #f7f5f0; }
.thumb img { object-fit: contain; padding: 3px; }
.ws-photo:has(img) { background: #f7f5f0; }
.ws-photo img { object-fit: contain; padding: 6px; }
/* Fiche : l'image remplit le cadre sans déborder (sinon la grille la laisse à sa taille naturelle) */
.ws-photo { height: 180px; }
.ws-photo img { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; }

/* Remplir le panier ActiVin */
.av-list { list-style: none; margin: 0; padding: 0; }
.av-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.av-list small { color: var(--gris); }
.av-list b { text-align: right; font-size: 13px; color: var(--gris); }
.av-list b.ok { color: var(--ok); }
.av-check { padding: 10px 12px; border: 1px solid var(--or); border-radius: 8px; color: var(--or); font-size: 14px; font-weight: 600; }

.map-note { font-size: 13px; margin-top: 6px; }
.gap-note { margin: 4px 0 10px; padding: 8px 12px; border-left: 3px solid var(--or); color: var(--creme, inherit); font-size: 14px; line-height: 1.4; }

/* Boutons-labels (vibration iPhone) */
.as-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
.seg .as-btn { min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 600; }
.seg .as-btn[aria-pressed="true"] { background: var(--nuit); color: var(--buee); }
.as-btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.step.as-btn:active { background: var(--or); color: var(--buee); transform: scale(0.92); }
.react-pick .as-btn { font-size: 20px; padding: 2px 5px; border-radius: 8px; }
.react-pick .as-btn:active { background: var(--capsule-pale); }
.as-btn:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
/* Interrupteur Vibrations : taille iOS normale */
.check input[switch] { width: 51px; height: 31px; flex: none; }

/* ---------- 1.13 : fête, sceau, étoiles, messages, Ludo, tirer pour rafraîchir ---------- */
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.celebrate i { position: absolute; top: -40px; font-size: 26px; font-style: normal; animation: fall 2.4s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(var(--rot, 180deg)); opacity: .9; } }
.stars-input .as-btn { width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--trait); }
.stars-input .as-btn.on { color: var(--etoile); }
.clink { display: inline-flex; gap: 1px; vertical-align: middle; }
.clink i { font-style: normal; display: inline-block; font-size: 15px; }
.ptr { height: 0; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.ptr-glass { width: 22px; height: 26px; margin-bottom: 8px; border: 2px solid var(--or); border-top: 0; border-radius: 0 0 12px 12px; position: relative; overflow: hidden; opacity: .5; }
.ptr.ready .ptr-glass { opacity: 1; }
.ptr-glass i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p, 0) * 100%); background: var(--capsule); }
.ptr.filling .ptr-glass i { height: 100%; transition: height .5s ease; }
@media (prefers-reduced-motion: no-preference) {
  .pay-st.stamp { animation: stamp .55s cubic-bezier(.2,1.6,.4,1) both; display: inline-block; }
  @keyframes stamp { 0% { transform: scale(2.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(.95) rotate(-3deg); opacity: 1; } 100% { transform: none; } }
  .taste-svg.draw .shape { stroke-dasharray: 1000; animation: draw-line 1.3s ease both, fill-in .5s ease 1.1s both; }
  @keyframes draw-line { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
  @keyframes fill-in { from { fill-opacity: 0; } to { fill-opacity: .25; } }
  .taste-name.reveal { animation: reveal .6s ease 1.2s both; }
  @keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .star-lit { animation: star-lit .35s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
  @keyframes star-lit { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: none; } }
  .bubble.sent-in { animation: sent-in .35s ease both; }
  @keyframes sent-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
  .badge.bounce { animation: badge-bounce .5s ease; }
  @keyframes badge-bounce { 30% { transform: translateY(-6px) scale(1.15); } 60% { transform: translateY(1px); } }
  .clink i { animation: clink 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * .18s); }
  @keyframes clink { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-18deg) translateY(-2px); } 50% { transform: rotate(10deg); } }
}
.btn.as-btn[aria-disabled="true"] { opacity: 0.5; }
@media (prefers-reduced-motion: no-preference) { .btn.fx-bounce { animation: fx-bounce 0.32s ease; } }

/* Questionnaire v2 */
.taste-alt { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.btn-row .taste-none { align-self: center; }
.taste-choices { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.taste-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.taste-scale:not(.like) { grid-template-columns: 1fr; }
.taste-step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; min-height: 64px; justify-content: center; border-radius: var(--rayon); border: 1px solid var(--trait); background: var(--papier); color: var(--nuit); font-size: 13px; line-height: 1.2; text-align: center; }
.taste-step .dots { color: var(--or); font-size: 10px; letter-spacing: 1px; }
.taste-step[aria-pressed="true"] { border-color: var(--or); background: var(--capsule-pale); }
.taste-intro { font-style: italic; }
.taste-new { display: flex; flex-direction: column; gap: 6px; padding: 12px; margin-bottom: 12px; border: 1px solid var(--or); border-radius: var(--rayon); background: var(--capsule-pale); }
.taste-new .btn { align-self: flex-start; }
.palate { margin: 8px 0 4px; }
.pal-row { display: grid; grid-template-columns: 96px auto 1fr; align-items: center; gap: 10px; min-height: 28px; font-size: 14px; }
.pal-dots { display: inline-flex; gap: 5px; }
.pal-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--or); }
.pal-dots i.on { background: var(--or); }
.pal-end { color: var(--gris); font-size: 13px; }

/* Questionnaire animé */
.sec-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 12px; margin-bottom: 10px; border-radius: var(--rayon); background: var(--capsule-pale); text-align: center; }
.sec-card .sec-emoji { font-size: 44px; line-height: 1.1; }
.sec-card b { font-size: 18px; }
.sec-card .cheer { margin: 0 0 4px; font-weight: 700; color: var(--or); }
.taste-live { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 6px; }
.taste-svg.mini { width: 84px; height: 84px; }
.taste-svg.mini .qlab { display: none; }
.taste-svg.mini .shape { transition: all .4s ease; }
.bottle-prog { display: flex; align-items: center; margin: 4px 0 2px; }
.bp-body { flex: 1; height: 14px; border: 1.5px solid var(--or); border-radius: 8px 3px 3px 8px; overflow: hidden; }
.bp-fill { display: block; height: 100%; background: var(--capsule); transition: width .4s ease; }
.bp-neck { width: 18px; height: 6px; border: 1.5px solid var(--or); border-left: 0; border-radius: 0 3px 3px 0; }
.taste-step .face { font-size: calc(18px + var(--lv, 0) * 4px); line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
  #taste-body.q-in > * { animation: q-in .3s ease both; }
  @keyframes q-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
  .sec-card .sec-emoji { animation: sec-pop .5s cubic-bezier(.2,1.6,.4,1) both; }
  @keyframes sec-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
  .taste-choice.picked, .taste-step.picked, .taste-none.picked { animation: picked .22s ease; }
  @keyframes picked { 50% { transform: scale(1.06); } }
  .palate.lit-seq .pal-dots i.on { animation: dot-lit .35s ease both; animation-delay: calc(1.6s + var(--i, 0) * 70ms); }
  @keyframes dot-lit { from { background: transparent; transform: scale(.4); } to { transform: none; } }
}

/* Réponses citées */
.composer.replying { flex-wrap: wrap; }
.composer.replying textarea { flex: 1 1 0; min-width: 0; }
.reply-bar { flex: 0 0 100%; order: -1; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-left: 3px solid var(--or); background: var(--capsule-pale); border-radius: 6px; font-size: 13px; }
.reply-bar .rb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-bar .rb-txt span { color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar .rb-x { border: 0; background: none; font-size: 16px; width: 32px; height: 32px; color: var(--gris); }
.bubble .quote { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px; padding: 5px 9px; border: 0; border-left: 3px solid var(--or); border-radius: 6px; background: color-mix(in srgb, var(--trait) 35%, transparent); font-size: 13px; max-width: 100%; }
.bubble .quote b { font-size: 12px; color: var(--or); }
.bubble .quote span { color: var(--gris); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bubble .to-me { font-size: 12px; font-weight: 700; color: var(--or); }
.react-pick .reply-btn { font-size: 14px; font-weight: 600; white-space: nowrap; }
.bubble .b.swipe-ready { box-shadow: -4px 0 0 var(--or); }
@media (prefers-reduced-motion: no-preference) {
  .bubble.flash .b { animation: flash-gold 1.4s ease; }
  @keyframes flash-gold { 0%, 60% { box-shadow: 0 0 0 3px var(--or); } 100% { box-shadow: var(--ombre); } }
}
