/* HELVEDEX — style.css v0.2
   Direction : épuré, arrondi, beaucoup d'air. Identité suisse conservée :
   croix, rouge fédéral en signal unique, chiffres tabulaires. */

:root {
  --paper:   #F7F7F5;
  --ink:     #17191B;
  --steel:   #6B7480;
  --line:    #E6E8E4;
  --red:     #DA291C;
  --red-dk:  #B71F14;
  --ok:      #2E7D32;
  --warn:    #B26A00;
  --card:    #FFFFFF;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;
  --r-lg:    20px;
  --r-md:    12px;
  --shadow:  0 1px 2px rgba(23,25,27,.04), 0 8px 24px rgba(23,25,27,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "tnum" 1;
  min-height: 100vh;
}

.wrap { max-width: 540px; margin: 0 auto; padding: 0 20px 64px; }

/* ── Header ── */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px 0 26px;
}
.wordmark {
  font-family: "Archivo", "Inter", sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none;
}
.cross {
  width: 20px; height: 20px; background: var(--red);
  border-radius: 6px;
  display: inline-block; position: relative; flex: none;
}
.cross::before, .cross::after {
  content: ""; position: absolute; background: #fff; border-radius: 1px;
}
.cross::before { left: 8.5px; top: 4px; width: 3px; height: 12px; }
.cross::after  { left: 4px; top: 8.5px; width: 12px; height: 3px; }
.tagline { font-size: 12px; color: var(--steel); letter-spacing: 0.03em; }

/* ── Carte swap ── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 16px; }
.field-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 7px; padding: 0 2px;
}
label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--steel);
}
.hint { font-size: 12px; color: var(--steel); }

.row { display: flex; gap: 10px; }
.row > * { min-width: 0; }

input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  appearance: none;
  transition: border-color .12s, box-shadow .12s;
}
input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23,25,27,.07);
}
input.addr { font-family: var(--mono); font-size: 13px; }
input::placeholder { color: #ADB3BA; }

.amount-row input#amount-in { flex: 1.2; font-size: 18px; font-weight: 600; }

/* ── Token picker (recherche) ── */
.picker { position: relative; flex: 1; }
.picker input { cursor: text; padding-right: 32px; }
.picker::after {
  content: ""; position: absolute; right: 13px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.5px solid var(--steel); border-bottom: 1.5px solid var(--steel);
  transform: rotate(45deg); pointer-events: none;
}
.picker input.selected { font-weight: 600; }
.tk-list {
  display: none;
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(23,25,27,.12);
}
.tk-list.open { display: block; }
.tk-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer; gap: 10px;
}
.tk-item:hover, .tk-item.hl { background: var(--paper); }
.tk-item .sym { font-weight: 600; font-size: 14px; }
.tk-item .chain {
  font-size: 11px; color: var(--steel);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 99px; padding: 2px 9px; white-space: nowrap;
}
.tk-item.hl .chain, .tk-item:hover .chain { background: #fff; }
.tk-empty { padding: 14px; font-size: 13px; color: var(--steel); text-align: center; }

.swap-divider { display: flex; justify-content: center; margin: 2px 0 14px; }
#btn-flip {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 16px; color: var(--ink);
  transition: border-color .12s, transform .12s;
}
#btn-flip:hover { border-color: var(--ink); transform: rotate(180deg); }

/* ── Le taux ── */
.rate-board {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 20px 0;
  min-height: 96px;
}
.rate-line {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 3px 0; font-size: 13px;
}
.rate-line .k { color: var(--steel); }
.rate-line .v { font-weight: 600; font-family: var(--mono); font-size: 12.5px; }
.rate-main {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 9px; margin-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.rate-main .out {
  font-family: "Archivo", sans-serif;
  font-size: 27px; font-weight: 700; letter-spacing: -0.02em;
}
.rate-main .chf { color: var(--steel); font-size: 14px; }
.rate-empty { color: var(--steel); font-size: 13.5px; padding-top: 22px; text-align: center; }

/* ── Bouton ── */
.btn {
  display: block; width: 100%;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 15px; border: none; cursor: pointer;
  background: var(--red); color: #fff;
  border-radius: var(--r-md);
  transition: background .12s, transform .05s;
}
.btn:hover { background: var(--red-dk); }
.btn:active { transform: scale(.99); }
.btn:disabled { background: #CDD1D4; cursor: not-allowed; transform: none; }

/* ── Zone dépôt ── */
.deposit { display: none; margin-top: 24px; background: var(--paper); border-radius: var(--r-md); padding: 20px; }
.deposit.show { display: block; }
.deposit h2 { font-family: "Archivo", sans-serif; font-size: 16px; margin-bottom: 14px; }
.dep-grid { display: flex; gap: 18px; align-items: flex-start; }
#qrcode {
  flex: none; width: 132px; height: 132px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 7px; background: #fff;
}
#qrcode img, #qrcode canvas { border-radius: 6px; }
.dep-info { flex: 1; min-width: 0; }
.dep-addr {
  font-family: var(--mono); font-size: 12.5px; word-break: break-all;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px; margin-bottom: 10px;
}
.copy-btn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  background: #fff; border: 1px solid var(--ink); color: var(--ink);
  border-radius: 99px; padding: 8px 16px; cursor: pointer;
  transition: background .12s, color .12s;
}
.copy-btn:hover { background: var(--ink); color: #fff; }
.deadline { font-size: 12.5px; color: var(--warn); margin-top: 10px; }

/* ── Statut ── */
.status-track { margin-top: 18px; list-style: none; }
.status-track li {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 0; font-size: 13.5px; color: var(--steel);
}
.status-track li .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line); flex: none;
}
.status-track li.active { color: var(--ink); font-weight: 600; }
.status-track li.active .dot { background: var(--red); animation: pulse 1.4s infinite; }
.status-track li.done { color: var(--ink); }
.status-track li.done .dot { background: var(--ok); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .status-track li.active .dot { animation: none; } }

.alert {
  display: none; margin-top: 14px; padding: 12px 14px;
  font-size: 13.5px; border-radius: var(--r-md);
  background: #FBEDEC; color: var(--red-dk);
}
.alert.show { display: block; }

/* ── Footer ── */
.trust {
  margin-top: 32px;
  font-size: 12.5px; color: var(--steel); line-height: 1.65;
  text-align: center;
}
.trust strong { color: var(--ink); }
footer {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--steel);
}
footer a { color: var(--steel); text-decoration: none; padding: 2px 6px; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* ── Pages légales ── */
.legal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); }
.legal h1 { font-family: "Archivo", sans-serif; font-size: 24px; margin-bottom: 6px; }
.legal .updated { font-size: 12px; color: var(--steel); margin-bottom: 24px; }
.legal h2 { font-family: "Archivo", sans-serif; font-size: 16px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 14px; line-height: 1.7; color: #3A3F45; margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.legal .placeholder { background: #FFF6E5; border-radius: 6px; padding: 1px 6px; font-size: 13px; }

@media (max-width: 480px) {
  .dep-grid { flex-direction: column; }
  .rate-main .out { font-size: 22px; }
  .card, .legal { padding: 20px; }
}

/* ── Switcher de langue ── */
.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch button {
  font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  background: none; border: none; cursor: pointer;
  color: var(--steel); padding: 3px 7px; border-radius: 99px;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--ink); color: #fff; }
