/* Écran Réglages et synchronisation (préfixe .st-). */

.st > .section:first-child { margin-top: 8px; }

/* ───────── Lignes de réglage ───────── */

.st-row { gap: 14px; }
label.st-row { cursor: pointer; }
.st-col { flex-direction: column; align-items: stretch; gap: 10px; }
.st-col > .grow { flex: none; }

.st-test {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 15px;
}

.st-toggle { display: inline-block; }
/* Zone tactile agrandie (60 × 48 px) sans changer le dessin de l'interrupteur. */
.st-toggle input { top: -8px; right: -4px; bottom: -8px; left: -4px; }

.st-seg button { min-height: 44px; font-variant-numeric: tabular-nums; }

.st-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}
.st-ico-accent { background: var(--accent-soft); color: var(--accent); }
.st-ico-ok { background: var(--ok-soft); color: var(--ok); }

.st-action { color: var(--text); }
.st-action .sub { margin-top: 1px; }

/* ───────── Synchronisation ───────── */

.st-sync > * + * { margin-top: 14px; }
.st-head { gap: 12px; }
.st-head-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }

.st-health:empty { display: none; }
.st-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
}
.st-warn .icon { margin-top: 2px; }

.st-join > * + * { margin-top: 10px; }
.st-join-label { display: block; }
.st-code-input {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.st-code-input::placeholder { color: var(--faint); letter-spacing: 0.06em; }
.st-code-input[aria-invalid="true"] { border-color: var(--danger); }
.st-error { color: var(--danger); font-weight: 600; }
.st-error:empty { display: none; }

.st-code-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: center;
}
.st-code-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.st-code {
  margin: 8px 0 14px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
  -webkit-user-select: all;
  user-select: all;
}
.st-code.is-masked {
  color: var(--faint);
  letter-spacing: 0.1em;
  -webkit-user-select: none;
  user-select: none;
}
@media (min-width: 400px) { .st-code { font-size: 24px; } }
.st-code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.st-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.st-status-text { font-size: 15px; font-weight: 650; }
.st-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.st-status.is-ok .st-dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.st-status.is-busy .st-dot { background: var(--warn); animation: st-pulse 1s ease-in-out infinite; }
.st-status.is-error .st-dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.st-status.is-error .st-status-text { color: var(--danger); }
.st-status.is-offline .st-status-text { color: var(--muted); }

.st-spin svg { animation: st-rotate 1s linear infinite; }

.st-help { display: flex; align-items: flex-start; gap: 8px; }
.st-help .icon { margin-top: 2px; color: var(--faint); }

@keyframes st-pulse { 50% { opacity: 0.3; } }
@keyframes st-rotate { to { transform: rotate(360deg); } }

/* ───────── Données ───────── */

.st-erase > * + * { margin-top: 12px; }
.st-warn-text { color: var(--warn); }

/* ───────── Installation ───────── */

.st-install > * + * { margin-top: 12px; }
.st-steps { margin: 0; padding-left: 22px; color: var(--text); }
.st-steps li { padding-left: 4px; }
.st-steps li + li { margin-top: 8px; }
.st-inline-ico { display: inline-flex; vertical-align: -4px; margin: 0 2px; color: var(--accent); }

/* ───────── À propos ───────── */

.st-about > * + * { margin-top: 12px; }
.st-about-name { font-family: var(--font-display); font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }

/* ───────── Éléments techniques invisibles (champ fichier, copie, téléchargement) ───────── */

.st-offscreen {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  font-size: 16px; /* pas de zoom iOS si le champ prend le focus */
  pointer-events: none;
}
