/* =============================================================================
   TerraTrack — Base
   =============================================================================
   Reset, typographie, layout général de l'app.
   Importe Outfit (UI) et Space Mono (logo, chiffres) depuis Google Fonts.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* ---------- Reset léger ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--txt);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

/* ---------- Layout principal ---------- */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(80px + var(--sb));
  -webkit-overflow-scrolling: touch;
}

.screen::-webkit-scrollbar {
  display: none;
}

/* ---------- Loading overlay ---------- */
.load-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .9);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.load-overlay p {
  color: var(--txt2);
  font-size: 14px;
  font-weight: 600;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(227, 163, 42, .15);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Status banner ---------- */
.ds-status {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  margin: 0 var(--sp-4) 10px;
  border-radius: 10px;
  display: none;
  border: 1px solid;
}

/* ---------- Empty state ---------- */
.es {
  text-align: center;
  padding: 70px 32px;
}
.ei {
  font-size: 52px;
  margin-bottom: var(--sp-4);
  opacity: .25;
}
.es h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--txt3);
}
.es p {
  font-size: 13px;
  color: var(--txt3);
  opacity: .6;
  line-height: 1.7;
}

/* ---------- Divider ---------- */
.div2 {
  height: 1px;
  background: var(--bor);
  margin: var(--sp-4);
}
