/* BetterVTC Refonte — composants brutalistes reutilisables
   Tag, Stat, Button, Card, IconButton, Phone shell, BottomNav, TopBar, Numpad. */

/* ─────────── Tag ─────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
}
.tag--paper       { background: var(--paper); color: var(--ink); }
.tag--ink         { background: var(--ink); color: var(--paper); }
.tag--red         { background: var(--signal-red); color: #fff; border-color: var(--signal-red); }
.tag--red-soft    { background: var(--signal-red-tint); color: var(--signal-red); border-color: var(--signal-red); }
.tag--green       { background: var(--signal-green); color: #fff; border-color: var(--signal-green); }
.tag--green-soft  { background: var(--signal-green-tint); color: var(--signal-green); border-color: var(--signal-green); }
.tag--yellow      { background: var(--signal-yellow); color: #000; border-color: var(--ink); }
.tag--yellow-soft { background: var(--signal-yellow-tint); color: #7A4F00; border-color: #7A4F00; }
.tag--blue        { background: var(--signal-blue); color: #fff; border-color: var(--signal-blue); }
.tag--blue-soft   { background: var(--signal-blue-tint); color: var(--signal-blue); border-color: var(--signal-blue); }

/* ─────────── Stat block ─────────── */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.stat__value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat__value--display {
  font-family: var(--font-display);
}
.stat__value--big { font-size: 32px; }
.stat__unit { font-size: 13px; opacity: 0.6; margin-left: 2px; }
.stat__value--big .stat__unit { font-size: 18px; }

/* ─────────── Boutons brutalistes ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
  text-transform: none;
}
.btn:active { transform: translate(2px, 2px); box-shadow: none !important; }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 0 var(--accent);
}
.btn--primary:active { box-shadow: 2px 2px 0 0 var(--accent) !important; }

.btn--secondary {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.btn--accent {
  background: var(--signal-yellow);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.btn--success {
  background: var(--signal-green);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-soft);
}
.btn--ghost:hover { border-color: var(--line); }

.btn--block { width: 100%; }
.btn--lg { padding: 18px 24px; font-size: 16px; }
.btn--sm { padding: 10px 14px; font-size: 12px; }

/* Bouton "chip" mono compact */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.chip--active { background: var(--ink); color: var(--paper); }

/* ─────────── Card / Block ─────────── */
.card {
  background: var(--paper);
  border: 2px solid var(--line);
  padding: 14px;
}
.card--shadow   { box-shadow: var(--shadow); }
.card--lg       { padding: 20px; }
.card--xl       { padding: 28px; }
.card--ink      { background: var(--ink); color: var(--paper); }
.card--yellow   { background: var(--signal-yellow); color: var(--ink); }
.card--dashed   { border-style: dashed; }
.card--hatched {
  background: repeating-linear-gradient(45deg,
    var(--paper-2), var(--paper-2) 6px,
    var(--paper-3) 6px, var(--paper-3) 12px);
}

/* ─────────── Bandeau d'avertissement (exports) ─────────── */
.banner-warn {
  background: var(--signal-yellow-tint);
  border: 2px solid var(--ink);
  padding: 14px;
}
.banner-warn__head {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--signal-red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.banner-warn__body {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.4;
}

/* ─────────── Phone shell (mockup mobile 390x844) ─────────── */
.phone {
  width: 390px;
  height: 844px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  font-family: var(--font-body);
}
.phone__statusbar {
  height: 44px;
  padding: 0 24px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  background: var(--paper);
}
.phone__statusbar-icons {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
}
.phone__battery {
  display: inline-block;
  width: 22px;
  height: 11px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  position: relative;
}
.phone__battery::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--ink);
  width: 85%;
}
.phone__screen {
  height: calc(100% - 44px);
  overflow-y: auto;
  position: relative;
}
.phone__home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: var(--ink);
  border-radius: 3px;
}

/* ─────────── Top bar ─────────── */
.topbar {
  padding: 14px 20px 12px;
  border-bottom: 2px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.topbar__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.topbar__back {
  width: 36px;
  height: 36px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  cursor: pointer;
}
.topbar__text { flex: 1; min-width: 0; }
.topbar__subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.topbar__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.topbar__action {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─────────── Bottom nav (mobile) ─────────── */
.bottomnav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--paper);
  border-top: 2px solid var(--line);
  padding: 10px 8px 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.bottomnav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  background: transparent;
  color: var(--ink);
  border: 2px solid transparent;
  cursor: pointer;
}
.bottomnav__item--active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.bottomnav__label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─────────── Numpad (saisie CA) ─────────── */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.numpad__key {
  padding: 20px 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 0 var(--ink);
  transition: transform 60ms ease, box-shadow 60ms ease;
}
.numpad__key:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ─────────── Toggle 2 valeurs (privée / plateforme) ─────────── */
.toggle2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
}
.toggle2__opt {
  padding: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.toggle2__opt--active {
  background: var(--ink);
  color: var(--paper);
}
.toggle2__opt + .toggle2__opt { border-left: 2px solid var(--ink); }

/* ─────────── Jauge segmentée (dashboard) ─────────── */
.gauge {
  display: flex;
  gap: 3px;
  height: 28px;
}
.gauge__seg {
  flex: 1;
  background: transparent;
  border: 1.5px solid var(--ink);
}
.gauge__seg--filled { background: var(--ink); }
.gauge__seg--rest {
  border-style: dashed;
  border-color: var(--ink-soft);
  opacity: 0.5;
}

.gauge__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}
.gauge__legend-cur { color: var(--ink); }

/* ─────────── Avatar bloc (initiales rotated) ─────────── */
.avatar-block {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--ink);
}
.avatar-block--rotated { transform: rotate(-3deg); }
.avatar-block--lg { width: 72px; height: 72px; font-size: 28px; }
.avatar-block--xl { width: 112px; height: 112px; font-size: 44px; }
.avatar-block--shadow-red { box-shadow: 3px 3px 0 0 var(--signal-red); }

/* ─────────── List item (prochainement / entrées CA) ─────────── */
.list-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  align-items: center;
}
.list-row--first { border-top: 2px solid var(--line); }

.list-row__time {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}
.list-row__title {
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}
.list-row__sub {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ─────────── Manifest card ─────────── */
.manifest-card {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--line);
  padding: 28px;
  box-shadow: 6px 6px 0 0 var(--signal-red);
}
.manifest-card__badge {
  position: absolute;
  top: -14px;
  right: 20px;
  background: var(--signal-red);
  color: #fff;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 2px solid var(--paper);
}
.manifest-card__article {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  margin-bottom: 12px;
}
.manifest-card__quote {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.manifest-card__metrics {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(244,241,234,0.2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.manifest-card__metric-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  opacity: 0.6;
}
.manifest-card__metric-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

/* ─────────── Pricing card ─────────── */
.price-card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--line);
  padding: 24px;
}
.price-card--highlight {
  background: var(--signal-yellow);
  box-shadow: var(--shadow-lg);
}
.price-card__tag-pin {
  position: absolute;
  top: -12px;
  left: 16px;
}
.price-card__tier {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.price-card__name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.02em;
}
.price-card__price {
  display: flex;
  align-items: baseline;
  margin-top: 12px;
  gap: 4px;
}
.price-card__price-num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.price-card__price-period {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  opacity: 0.6;
}
.price-card__sep {
  height: 1px;
  background: var(--ink);
  margin: 20px 0;
  opacity: 0.2;
}
.price-card__feats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.price-card__feat {
  display: flex;
  gap: 8px;
  line-height: 1.4;
}
.price-card__feat-mark {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ─────────── Form input style ─────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field__input {
  padding: 16px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
}

/* ─────────── Trust signals row ─────────── */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.trust__item::before { content: "✓ "; color: var(--ink); }

/* ─────────── Toggle switch (tweaks panel) ─────────── */
.switch {
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 22px;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  padding: 1px;
  position: relative;
}
.switch__dot {
  width: 16px;
  height: 16px;
  background: var(--ink);
  transition: transform 120ms ease;
}
.switch--on { background: var(--ink); }
.switch--on .switch__dot { background: var(--paper); transform: translateX(20px); }
