@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #1B1B2F;
  --paper: #FBF6EE;
  --coral: #FF5A36;
  --coral-deep: #E2421F;
  --sea: #0F8B8D;
  --sea-pale: #DDF0EE;
  --mute: #6C6A75;
  --line: rgba(27, 27, 47, .12);
  --font: "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--ink);
  color: var(--ink);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
button, select, input { font: inherit; color: inherit; }

.talk {
  height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* ---------- Une moitié d'écran par personne ---------- */
.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 16px;
  background: var(--paper);
}
.side.them { background: var(--sea-pale); }
.talk.face .side.them { transform: rotate(180deg); }

.side-head { display: flex; align-items: center; gap: 8px; }
.lang-pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.lang-pick { padding: 5px 14px 5px 5px; cursor: pointer; text-align: left; }
.flag {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(27, 27, 47, .14);
  background: var(--sea-pale);
}
.lang-name { flex: 1; min-width: 0; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { color: var(--mute); font-size: .9rem; }

/* ---------- Liste des langues (drapeaux + recherche) ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(27, 27, 47, .55);
}
.sheet.flip { transform: rotate(180deg); }
.sheet-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 86dvh;
  padding: 14px 16px calc(10px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-title { margin: 0; font-weight: 800; font-size: 1.2rem; }
.sheet-q {
  margin: 10px 0 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1rem;
}
.sheet-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 14px;
  cursor: pointer;
}
.opt .flag { width: 32px; height: 32px; }
.opt:hover, .opt:focus-visible { background: #fff; outline: none; }
.opt.on { background: var(--sea-pale); }
.opt.on::after { content: "✓"; margin-left: auto; color: var(--sea); font-weight: 800; }
.opt-txt { display: flex; flex-direction: column; min-width: 0; }
.opt-name { font-weight: 700; }
.opt-en { color: var(--mute); font-size: .85rem; }
.opt-none { padding: 18px 10px; color: var(--mute); text-align: center; }
.icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.05rem;
  cursor: pointer;
}
.icon-btn[aria-pressed="false"] { opacity: .45; }

/* ---------- Fil de la conversation ---------- */
.feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.feed:empty::before {
  content: attr(data-hint);
  margin: auto;
  max-width: 26ch;
  text-align: center;
  color: var(--mute);
  font-size: .95rem;
  line-height: 1.4;
}
.msg { max-width: 92%; line-height: 1.35; overflow-wrap: anywhere; }
.msg.said { align-self: flex-end; text-align: right; }
.msg.said .main { color: var(--mute); font-size: 1rem; }
.msg.said .check {
  margin-top: 4px;
  font-size: .85rem;
  color: var(--sea);
}
.msg.said .check::before { content: "↺ "; }
.msg.heard { align-self: flex-start; }
.msg.heard .main {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  background: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  box-shadow: 0 1px 0 var(--line);
  cursor: pointer;
}
.side.them .msg.heard .main { background: #fff; }
.msg.pending .main { color: var(--mute); font-style: italic; font-weight: 400; }

.kb { display: flex; gap: 8px; padding-bottom: 8px; }
.kb[hidden] { display: none; }
.kb input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1rem;
}
.kb button {
  width: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

/* ---------- Bouton micro ---------- */
.side-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.status { margin: 0; min-height: 1.2em; font-size: .85rem; color: var(--mute); text-align: center; }
.mic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, transform .1s;
}
.side.them .mic { background: var(--sea); }
.mic:active { transform: scale(.98); }
.mic-ico { font-size: 1.4rem; }
.mic-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 90, 54, .55);
  pointer-events: none;
}
.mic.rec { background: var(--ink); }
.mic.rec .mic-ring { animation: pulse 1.1s ease-out infinite; box-shadow: 0 0 0 calc(var(--lvl, 0) * 14px) rgba(255, 90, 54, .35); }
.mic.busy { opacity: .6; pointer-events: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 54, .5); }
  100% { box-shadow: 0 0 0 16px rgba(255, 90, 54, 0); }
}

/* ---------- Barre centrale ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  background: var(--ink);
  color: #fff;
}
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand b { color: var(--coral); font-weight: 800; }
.bar-actions { display: flex; gap: 6px; }
.bar .icon-btn { width: 36px; height: 36px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: .92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[dir="rtl"] { unicode-bidi: plaintext; }

@media (min-width: 720px) {
  .side { padding: 16px max(16px, calc(50% - 320px)); }
}

/* ---------- Encart « avant de partir » ---------- */
.prep {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px dashed var(--coral);
  background: #fff;
  font-size: .9rem;
  line-height: 1.4;
  overflow-y: auto;
  max-height: 46%;
}
.prep-title { margin: 0 0 6px; font-weight: 800; }
.prep-list { margin: 0 0 10px; padding-left: 1.1em; }
.prep-list li + li { margin-top: 4px; }
.prep-ok { border: 0; border-radius: 999px; padding: 8px 16px; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }

/* ---------- Pass : bouton compteur + fiche ---------- */
.pass-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
}
.pass-btn.low { background: var(--coral); border-color: var(--coral); }
.acct-body { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 2px 4px; }
.acct-big { margin: 0; font-weight: 800; font-size: 1.25rem; }
.acct-sub { margin: 0; color: var(--mute); }
.acct-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}
.acct-btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.acct-link { border: 0; background: none; color: var(--mute); text-decoration: underline; cursor: pointer; padding: 4px; }
.acct-key { margin: 0; font-family: ui-monospace, Consolas, monospace; color: var(--mute); text-align: center; letter-spacing: .05em; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-label { font-weight: 700; font-size: .92rem; }
.meter-track { height: 10px; border-radius: 999px; background: var(--sea-pale); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--sea); transition: width .3s; }
.buy, .key-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: #fff; border: 1px dashed var(--line); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--mute); line-height: 1.35; }
.consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--coral); }
.consent a { color: var(--sea); }

/* ---------- Hors ligne ---------- */
.msg.heard.off .main { background: #fff; box-shadow: 0 0 0 2px var(--sea-pale); }
.off-tag { margin-top: 4px; font-size: .75rem; font-weight: 700; color: var(--sea); letter-spacing: .04em; }
.off-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--sea-pale); }
.off-title { margin: 0; font-weight: 800; }
.off-list { display: flex; flex-direction: column; gap: 8px; }
.off-row { display: flex; align-items: center; gap: 10px; }
.off-row .flag { width: 26px; height: 26px; }
.off-name { flex: 1; font-weight: 700; min-width: 0; }
.off-state { color: var(--mute); font-size: .88rem; }
.off-state.ok { color: var(--sea); font-weight: 700; }

/* ---------- Habillage assorti au site : papier, icônes au trait, relief léger ---------- */
@font-face { font-family: "Caveat"; src: url("/assets/fonts/caveat-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
:root { --papier: #fbf2e1; --mer-papier: #e2f1ec; --grain: url("/assets/img/deco/grain.webp"); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
/* Les deux moitiés : du papier, avec le grain du site */
.side { background: var(--papier) var(--grain) 0 0 / 192px; }
.side.them { background: var(--mer-papier) var(--grain) 0 0 / 192px; }
.side.me { box-shadow: inset 0 10px 14px -12px rgba(27, 27, 47, .35); }
.side.them { box-shadow: inset 0 -10px 14px -12px rgba(27, 27, 47, .35); }
/* Sélecteur de langue et boutons ronds : étiquettes de papier */
.lang-pick, .icon-btn { background: #fffaf0; border: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(60, 30, 8, .18), 0 4px 10px -6px rgba(60, 30, 8, .35); }
.icon-btn { display: grid; place-items: center; color: var(--ink); }
.caret { font-size: .75rem; }
/* Consigne de départ, écrite à la main */
.feed:empty::before { font-family: "Caveat", var(--font); font-size: 1.45rem; line-height: 1.2; color: #5a6a85; max-width: 22ch; }
/* Bouton Parler : relief doux, icône au trait */
.mic { gap: 10px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .12), 0 6px 16px -8px rgba(226, 66, 31, .7); }
.side.them .mic { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .12), 0 6px 16px -8px rgba(15, 139, 141, .7); }
.mic .mic-ico { width: 22px; height: 22px; stroke-width: 2; }
.mic.rec { background: var(--ink); box-shadow: none; }
/* Barre centrale : bleu nuit, icônes fines, compteur en mini ticket */
.bar { background: #1b1b2f; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.bar .icon-btn { background: transparent; box-shadow: none; border: 1px solid rgba(255, 255, 255, .16); color: #fff; }
.bar .icon-btn .ico { width: 18px; height: 18px; }
.bar .icon-btn[aria-pressed="false"] { opacity: .4; }
.pass-btn { gap: 6px; padding: 0 12px 0 10px; border-radius: 8px; border: 1.5px dashed rgba(255, 255, 255, .35); background: transparent; letter-spacing: .02em; }
.pass-btn .ico { width: 18px; height: 18px; }
.pass-btn.low { border-style: solid; }
/* Messages : la traduction posée comme une note, la retraduction en bleu-vert */
.msg.heard .main { background: #fffaf0; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(60, 30, 8, .15), 0 8px 18px -12px rgba(60, 30, 8, .45); }
.side.them .msg.heard .main { background: #fffaf0; }
.msg.said .check { font-weight: 600; }
/* Saisie au clavier */
.kb input { background: #fffaf0; border: 0; box-shadow: inset 0 1px 3px rgba(60, 30, 8, .18); }
.kb button { display: grid; place-items: center; }
.kb button .ico { width: 18px; height: 18px; color: #fff; }
/* Fiches (langues, Mon pass) : papier */
.sheet-panel { background: var(--papier) var(--grain) 0 0 / 192px; }
.sheet-panel .icon-btn .ico { width: 16px; height: 16px; }

/* Barre du haut : retour des emojis (demande Jonathan 18/11) */
.bar .emo { font-size: 17px; line-height: 1; display: block; }
.bar .icon-btn { background: rgba(255, 255, 255, .12); border: 0; }
.pass-btn { border: 0; background: rgba(255, 255, 255, .12); border-radius: 10px; }
.pass-btn .emo { font-size: 18px; }
.pass-btn.low { background: var(--coral); }

/* Panneau Voix (🔊) */
.voice-panel { max-width: 420px; }
.voice-body { padding: 4px 18px 20px; display: grid; gap: 8px; }
.v-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 700; padding: 6px 0 10px; border-bottom: 1px dashed rgba(27, 27, 47, .15); }
.v-switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 99px; background: rgba(27, 27, 47, .2); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.v-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.v-switch input:checked { background: var(--sea, #0F8B8D); }
.v-switch input:checked::after { transform: translateX(20px); }
.v-label { margin: 8px 0 0; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mute, #5E5C68); }
.v-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(27, 27, 47, .07); }
.v-seg button { font: inherit; font-weight: 700; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink, #1B1B2F); cursor: pointer; }
.v-seg button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgba(60, 30, 8, .25); color: var(--coral, #FF5A36); }
.v-seg button:disabled { opacity: .45; cursor: default; }
.v-note { margin: 10px 0 0; font-size: .85rem; color: var(--mute, #5E5C68); }

/* ---------- Deux écrans côte à côte : traducteur | convertisseur (on glisse de l'un à l'autre) ---------- */
.pager {
  display: flex;
  height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.pager::-webkit-scrollbar { display: none; }
.pager > .talk, .pager > .conv { flex: 0 0 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.bar { position: relative; }
.conv-btn { box-shadow: 0 0 0 2px var(--coral) inset !important; }
.swipe-hint {
  position: absolute; left: 50%; top: calc(100% + 6px); z-index: 5; transform: translateX(-50%);
  margin: 0; padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--coral); color: #fff; font-size: .85rem; font-weight: 700;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5); animation: hint 1.4s ease-in-out infinite alternate;
}
@keyframes hint { to { transform: translateX(calc(-50% - 10px)); } }

/* Convertisseur : un ticket de bureau de change posé sur la table */
.conv {
  display: flex; flex-direction: column; height: 100dvh; min-width: 0;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: var(--paper); overflow-y: auto;
}
.cv-bar { justify-content: flex-start; gap: 14px; }
.cv-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; cursor: pointer;
}
.cv-back > span:first-child { font-size: 1.3rem; line-height: 1; }
.cv-title { margin: 0; font-size: 1.15rem; font-weight: 800; color: #fff; }
.cv-body { width: 100%; max-width: 520px; margin: 0 auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.cv-card {
  position: relative; padding: 12px 14px 10px; border-radius: 16px; background: #fffaf0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(60, 30, 8, .15), 0 10px 22px -16px rgba(60, 30, 8, .5);
}
.cv-to { background: var(--ink); color: #fff; }
.cv-lbl { margin: 0 0 6px; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.cv-cur {
  display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.cv-to .cv-cur { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.cv-code { font-weight: 800; }
.cv-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; opacity: .7; }
.cv-num {
  margin: 8px 0 0; text-align: right; font-weight: 800; font-size: clamp(2rem, 11vw, 3rem); line-height: 1.1;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.cv-res { color: #ffd2c4; }
.cv-swap {
  align-self: center; width: 44px; height: 44px; margin: -22px 0; z-index: 2; border-radius: 50%; border: 3px solid var(--paper);
  background: var(--coral); color: #fff; font-size: 1.3rem; font-weight: 800; cursor: pointer;
}
.cv-rate { margin: 2px 0 0; text-align: center; font-size: .8rem; color: var(--mute); }
.cv-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.cv-pad button {
  height: clamp(46px, 7.5dvh, 60px); border: 0; border-radius: 14px; background: #fff; font-size: 1.45rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 0 rgba(27, 27, 47, .12), 0 2px 0 rgba(27, 27, 47, .06); touch-action: manipulation;
}
.cv-pad button:active { transform: translateY(1px); background: var(--sea-pale); }
.cv-pad .cv-clr { color: var(--coral-deep); }
.cv-hist-t { margin: 8px 0 0; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.cv-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cv-hist button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .85rem; cursor: pointer; }
.cv-note { margin: 6px 0 0; font-size: .75rem; color: var(--mute); text-align: center; }

/* Montant converti sous une traduction : « ≈ 18,40 € » */
.conv-tag { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.conv-tag button {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff; font-size: .95rem;
}
.conv-tag b { color: #ffd2c4; font-weight: 800; }
.conv-tag span { font-size: .78rem; opacity: .7; }
@media (min-height: 760px) { .cv-body { padding-top: 22px; gap: 12px; } }

/* ---------- Convertisseur face à face : chacun tape son prix sur sa moitié ---------- */
.cv-bar { flex-wrap: nowrap; }
.cv-mode {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px;
  background: var(--coral); color: #fff; font-weight: 800; white-space: nowrap; cursor: pointer;
}
.conv.face { overflow: clip; }
.cv-face { flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr auto 1fr; }
.cvf-half { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 10px 14px; background: var(--paper); }
.cvf-them { background: var(--sea-pale); transform: rotate(180deg); }
.cvf-top { display: flex; align-items: center; gap: 10px; }
.cvf-top .cv-cur { flex: none; }
.cvf-val { flex: 1; min-width: 0; text-align: right; }
.cvf-num { margin: 0; font-weight: 800; font-size: clamp(1.7rem, 9vw, 2.5rem); line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cvf-num.is-conv { color: var(--coral-deep); }
.cvf-num.is-conv::before { content: "≈ "; font-size: .7em; }
.cvf-sub { margin: 2px 0 0; font-size: .8rem; color: var(--mute); min-height: 1em; }
.cvf-pad { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 6px; }
.cvf-pad button {
  min-height: 34px; border: 0; border-radius: 12px; background: #fff; font-size: 1.3rem; font-weight: 700; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 1px 0 rgba(27, 27, 47, .12);
}
.cvf-pad button:active { background: var(--coral); color: #fff; }
.cvf-bar { gap: 10px; padding: 6px 12px; }
.cvf-mid { flex: 1; min-width: 0; }
.cvf-log-t { margin: 0; font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .55; }
.cvf-log { list-style: none; margin: 2px 0 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-height: 26px; }
.cvf-log::-webkit-scrollbar { display: none; }
.cvf-log li { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .78rem; white-space: nowrap; }
.cvf-log li.by-them { background: rgba(15, 139, 141, .45); }
.cvf-log li img { border-radius: 50%; }
.cvf-log li span { opacity: .7; }
.conv-tag button:disabled { cursor: default; opacity: 1; }
.cv-face { grid-template-columns: minmax(0, 1fr); width: 100%; }
.cv-face > * { min-width: 0; }
.msg.said .conv-tag { justify-content: flex-end; }

/* ---------- Onglets en arc au bord de l'écran : l'écran voisin (glisser ou toucher) ---------- */
.conv { overflow-x: hidden; }
.cv-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edge-tab {
  position: absolute; top: 50%; z-index: 8; width: 28px; height: 132px; margin-top: -66px; padding: 0; border: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--coral); color: #fff; box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .45);
}
.edge-t { writing-mode: vertical-rl; white-space: nowrap; font-size: .72rem; font-weight: 800; letter-spacing: .03em; }
.edge-right { right: 0; border-radius: 66px 0 0 66px / 66px 0 0 66px; }
.edge-left { left: 0; border-radius: 0 66px 66px 0 / 0 66px 66px 0; }
.edge-left .edge-t { transform: rotate(180deg); }
.edge-tab.nudge { animation: nudge-r 1s ease-in-out 4; }
.edge-left.nudge { animation-name: nudge-l; }
@keyframes nudge-r { 50% { transform: translateX(-7px); } }
@keyframes nudge-l { 50% { transform: translateX(7px); } }
.talk .bar { padding-right: 38px; }
.cv-bar, .cvf-bar { padding-left: 38px; }
.cv-bar { min-height: 52px; }
/* Sur téléphone, on glisse : plus besoin des boutons « Traducteur » / 💱 */
@media (pointer: coarse) {
  .cv-back, #cvf-back, #btn-conv { display: none; }
}
.edge-right { box-shadow: -5px 0 12px -6px rgba(0, 0, 0, .5); }
.edge-left { box-shadow: 5px 0 12px -6px rgba(0, 0, 0, .5); }
.cv-bar { padding-left: 16px; }
.cv-bar .edge-tab { top: 100%; margin-top: 10px; }
.cvf-bar .edge-tab { height: 50px; margin-top: -25px; border-radius: 0 25px 25px 0; }
.cvf-bar .edge-t { writing-mode: horizontal-tb; transform: none; font-size: 1rem; }

/* ---------- Déménagement vers olatok.com (ancienne adresse seulement) ---------- */
.move { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; background: rgba(27, 27, 47, .82); backdrop-filter: blur(3px); }
.move-card { position: relative; width: 100%; max-width: 400px; margin: auto; border-radius: 18px; background: var(--papier, #fbf2e1) var(--grain) 0 0 / 192px; color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 18px 40px rgba(0, 0, 0, .45); overflow: hidden; }
.move-kicker { margin: 0; padding: 10px 16px; background: var(--sea); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.move-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.move-stop small { display: block; color: var(--mute); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.move-stop b { display: block; font-size: .95rem; line-height: 1.2; }
.move-old b { color: var(--mute); text-decoration: line-through; text-decoration-thickness: 1px; font-weight: 600; }
.move-new { text-align: right; }
.move-new b { font-size: 1.25rem; color: var(--coral-deep); }
.move-plane { font-size: 1.3rem; color: var(--sea); }
.move-tear { height: 0; margin: 0 14px; border-top: 2px dashed var(--line); }
.move-shot { display: block; width: auto; height: min(25vh, 220px); margin: 12px auto 0; border-radius: 16px; border: 5px solid var(--ink); transform: rotate(-2.5deg); box-shadow: 0 12px 22px rgba(27, 27, 47, .35); }
.move-body { padding: 12px 18px 14px; font-size: .95rem; }
.move-title { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.move-lead { margin: 0 0 10px; }
.move-steps { margin: 0 0 8px; padding-left: 1.2em; }
.move-steps li + li { margin-top: 3px; }
.move-note { margin: 0 0 14px; color: var(--mute); font-size: .88rem; }
.move-go { display: block; padding: 14px 16px; border-radius: 999px; background: var(--coral); color: #fff; text-align: center; font-weight: 800; text-decoration: none; box-shadow: 0 6px 14px rgba(226, 66, 31, .35); }
.move-go:active { background: var(--coral-deep); }
.move-later { display: block; margin: 8px auto 0; padding: 8px 14px; border: 0; background: none; color: var(--mute); font: inherit; text-decoration: underline; cursor: pointer; }
