/* =============================================================================
   SIGNALNEST — BASE
   Reset minimal + coquille de mise en page mobile-first. Le composant
   .sn-app simule le viewport webview/PWA (largeur plafonnée, safe-area).
   ============================================================================= */

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

body {
  background: var(--sn-color-bg-surface);
  color: var(--sn-color-text-primary);
  font-family: var(--sn-font-base);
  font-size: var(--sn-text-base);
  line-height: var(--sn-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
.sn-icon { flex-shrink: 0; }
[x-cloak] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }

/* Focus visible clavier, jamais supprimé — seulement redessiné */
:focus-visible {
  outline: 2px solid var(--sn-color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--sn-radius-xs);
}

/* Toute donnée mesurée (prix, %, quantités, horodatages) passe en mono
   avec chiffres tabulaires pour que les colonnes s'alignent. */
.sn-numeric, .sn-mono {
  font-family: var(--sn-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--sn-tracking-tight);
}

/* ---- Coquille d'application -------------------------------------------- */
.sn-app {
  max-width: var(--sn-viewport-max);
  margin-inline: auto;
  min-height: 100dvh;
  background: var(--sn-color-bg-canvas);
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.sn-screen {
  flex: 1;
  padding: 0 var(--sn-space-4) var(--sn-space-9);
}

.sn-screen--flush { padding-inline: 0; }
.sn-screen--surface { background: var(--sn-color-bg-surface); }

.sn-stack > * + * { margin-top: var(--sn-space-4); }
.sn-stack--sm > * + * { margin-top: var(--sn-space-2); }
.sn-stack--lg > * + * { margin-top: var(--sn-space-6); }

.sn-cluster {
  display: flex;
  align-items: center;
  gap: var(--sn-space-2);
}
.sn-cluster--between { justify-content: space-between; }

.sn-visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0;
}

/* ---- Utilitaires de texte réutilisés par les composants ---------------- */
.sn-eyebrow {
  font-size: var(--sn-text-xs);
  font-weight: var(--sn-weight-semibold);
  color: var(--sn-color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--sn-tracking-wide);
}
.sn-section-title {
  font-size: var(--sn-text-lg);
  font-weight: var(--sn-weight-bold);
  letter-spacing: var(--sn-tracking-tight);
}
.sn-text-secondary { color: var(--sn-color-text-secondary); }
.sn-text-tertiary  { color: var(--sn-color-text-tertiary); }
.sn-text-positive  { color: var(--sn-color-positive-600); }
.sn-text-negative  { color: var(--sn-color-negative-600); }
.sn-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
