/* Appli client : compléments propres à ses écrans (le reste vient du design system). */
.hero {
  text-align: center;
  padding: var(--s-4) 0 var(--s-2);
}
.hero .state {
  font-weight: 800;
  font-size: var(--fs-lg);
}
.hero .sub {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-top: 2px;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
.status-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 84px;
}
.status-tile .t {
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: 700;
}
.status-tile .v {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-tile .v.ok {
  color: var(--green);
}
.status-tile .v.err {
  color: var(--red);
}
.result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.trade {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.trade .sym {
  font-weight: 800;
}
.trade .pl {
  margin-left: auto;
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.trade .meta {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.steps {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: var(--s-2) 0 var(--s-5);
}
.steps span {
  width: 28px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-2);
}
.steps span.on {
  background: var(--gold);
}
.legal-text {
  max-height: 42dvh;
  overflow: auto;
  padding: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.legal-text h3 {
  margin: var(--s-4) 0 var(--s-2);
  font-size: var(--fs-md);
}
.legal-text p,
.legal-text ul {
  margin: 0 0 var(--s-2);
}
.qr {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: var(--r-md);
  background: #fff;
  padding: 6px;
}
.secret {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  word-break: break-all;
  text-align: center;
  font-size: var(--fs-sm);
}
.setting {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 60px;
  padding: var(--s-2) 0;
  border-top: 1px solid var(--line);
}
.setting:first-of-type {
  border-top: 0;
}
.setting .txt {
  flex: 1;
  min-width: 0;
}
.setting .txt b {
  display: block;
  font-weight: 700;
}
.setting .txt span {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.setting .input {
  width: 104px;
  min-height: var(--tap);
  text-align: right;
}
.welcome {
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.raw {
  white-space: pre-wrap;
  font-size: var(--fs-xs);
  color: var(--muted);
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: var(--s-3);
  border: 1px solid var(--line);
  max-height: 180px;
  overflow: auto;
}
button.trade {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.trade .meta {
  display: block;
  margin-top: 2px;
}

/* ---------------------------------------------------------------- accès : clé, code à 6 chiffres, Face ID */
.lock {
  min-height: calc(100dvh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-6);
  text-align: center;
}
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: var(--s-2) 0;
}
.pin-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.pin-dots span.on {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.08);
}
.pin-dots.shake {
  animation: shake 0.4s;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-8px);
  }
  40%,
  80% {
    transform: translateX(8px);
  }
}
.pinpad {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 14px 22px;
  justify-content: center;
}
.pinpad button {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.pinpad button:active {
  background: var(--surface-3);
  transform: scale(0.94);
}
.pinpad button.ghost {
  border-color: transparent;
  background: transparent;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.pinpad svg {
  width: 30px;
  height: 30px;
}
.key-input {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* ---------------------------------------------------------------- mise en page à 2 colonnes (ordinateur) */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* jamais plus large que l'écran (listes défilantes comprises) */
  gap: var(--s-5);
}
.cols > .stack {
  gap: var(--s-4);
}
@media (min-width: 900px) {
  #view.shell {
    max-width: 1120px;
  }
  .cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------------------------------------------------------------- éléments de l'ancienne interface */
.hero-row {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.hero-row .power {
  width: 112px;
  height: 112px;
  margin: 0;
  flex: none;
}
.hero-row .power svg {
  width: 40px;
  height: 40px;
}
.hero-row .power .label {
  bottom: 18px;
  font-size: var(--fs-xs);
}
.state-tag {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}
.state-tag.on {
  color: var(--green);
}
.feed .ev {
  display: flex;
  gap: var(--s-3);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  align-items: flex-start;
}
.feed .ev:first-child {
  border-top: 0;
}
.feed .grow {
  overflow-wrap: anywhere;
}
.feed .t {
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  flex: none;
  width: 42px;
}
.feed .k {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
  background: var(--muted-2);
}
.feed .k.trade {
  background: var(--green);
}
.feed .k.error,
.feed .k.alert {
  background: var(--red-strong);
}
.feed .k.skip {
  background: var(--gold);
}
.feed .k.message {
  background: var(--blue);
}
.chart {
  width: 100%;
  height: 150px;
  margin-top: var(--s-3);
}
.setrow {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
}
.setrow:first-of-type {
  border-top: 0;
}
.setrow .nm {
  font-weight: 700;
}
.setrow .ds {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: 2px 0 var(--s-2);
}
.setrow .segmented button {
  font-size: var(--fs-sm);
  padding: 0 4px;
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-3);
  text-align: center;
}
.statgrid b {
  display: block;
  font-size: var(--fs-lg);
  font-variant-numeric: tabular-nums;
}
.statgrid small {
  color: var(--muted);
  font-size: var(--fs-xs);
}
.pos-edit {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3);
}
.pos-edit .input {
  width: 92px;
  min-height: var(--tap);
  text-align: center;
}
textarea.input {
  min-height: 110px;
  padding: var(--s-3) var(--s-4);
  resize: vertical;
}
.result-box {
  white-space: pre-wrap;
  color: var(--gold-2);
  font-size: var(--fs-sm);
}
.tabbar a {
  font-size: 0.68rem;
}

.grid-2 .big {
  font-size: 1.45rem;
}
