/* ==========================================================================
   VEXCAPITAL — BASE / RESET
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: var(--bg-page-image);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5 { font-weight: 600; line-height: 1.25; }

::-webkit-scrollbar { width: 0; height: 0; }

::selection { background: rgba(var(--brand-primary-rgb), 0.35); }

/* ---- App shell : conteneur mobile-first, centré sur desktop ---- */
.app-shell {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-content {
  flex: 1;
  padding: var(--space-4) var(--space-4) calc(var(--bottom-nav-height) + var(--space-6));
}

.app-content.no-nav {
  padding-bottom: var(--space-6);
}

.app-content.tight {
  padding-left: 0;
  padding-right: 0;
}

/* ---- Utilitaires ---- */
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-brand { color: var(--brand-primary); }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.w-full { width: 100%; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* ---- Desktop : layout élargi, pas juste un mobile étiré ---- */
@media (min-width: 900px) {
  body.desktop-frame {
    background-color: var(--bg-secondary);
    background-image: var(--bg-page-image);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }
  body.desktop-frame .app-shell {
    max-width: 1180px;
    min-height: 100vh;
    background: var(--bg-primary);
    box-shadow: none;
  }
  body.desktop-frame .app-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-8) var(--space-8);
    align-items: start;
  }
  body.desktop-frame .app-content.no-sidebar {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-8);
  }
  body.desktop-frame .bottom-nav { display: none; }
  body.desktop-frame .side-nav { display: flex; }
  body.desktop-frame .main-col { min-width: 0; }
  body.desktop-frame .trade-bar {
    position: static; max-width: none; margin: var(--space-6) 0 0;
    border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  }
  body.desktop-frame.centered-page .app-shell { max-width: 720px; }
  body.desktop-frame.centered-page .app-header { max-width: 640px; margin: 0 auto; width: 100%; }
}
