/* Spotted365 — Warm Terra (tokens repris de DESIGN.md). Dark par défaut. Jamais de violet en primary. */
:root {
  --primary: #C8693E;      /* terracotta */
  --bg: #130F0C;           /* brun-noir chaud */
  --surface: #1D1810;
  --surface-2: #261F17;
  --text: #F0E8DC;         /* crème chaude */
  --text-muted: #B8A990;
  --accent: #9685B8;       /* mauve muted, discret */
  --success: #5EDDA0;
  --error: #F27272;
  --warning: #F0B45A;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }
.screen { min-height: 100vh; }
.center { display: flex; align-items: center; justify-content: center; }

/* Brand mark */
.brand-mark {
  font-family: 'Instrument Serif', serif;
  color: var(--primary);
  font-size: 28px; letter-spacing: 1px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark.big { width: 76px; height: 76px; font-size: 36px; margin: 0 auto 8px; }

/* Onboarding */
.onboard { text-align: center; padding: 32px 28px; max-width: 420px; }
.hero { font-family: 'Instrument Serif', serif; font-size: 52px; font-weight: 400; margin: 12px 0 4px; }
.tagline { color: var(--text-muted); font-size: 17px; margin: 0 0 32px; }
.btn-google {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 17px;
  padding: 16px 26px; border-radius: var(--radius-md);
  min-height: 44px; transition: transform .15s var(--ease), filter .15s var(--ease);
}
.btn-google:active { transform: scale(.98); filter: brightness(1.05); }
.btn-google .g {
  background: #fff; color: var(--primary); font-weight: 800;
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.fineprint { color: var(--text-muted); font-size: 13px; margin-top: 18px; }
.error-msg { color: var(--error); font-size: 14px; margin-top: 14px; }

/* App shell */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px calc(14px); padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(var(--bg), color-mix(in srgb, var(--bg) 80%, transparent));
  backdrop-filter: none;
}
.wordmark { font-family: 'Instrument Serif', serif; font-size: 24px; color: var(--primary); }
.ghost {
  background: transparent; color: var(--text-muted); border: 1px solid transparent;
  font: inherit; padding: 8px 12px; border-radius: var(--radius-sm); min-height: 40px;
}
.ghost:active { background: var(--surface); }

.content { padding: 8px 16px 120px; max-width: 560px; margin: 0 auto; }
.greeting { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 30px; margin: 6px 4px 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 4px 12px; }
.section-head h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 600; margin: 0; }
.hint { color: var(--text-muted); font-size: 13px; }

/* Cards (grain léger via gradient subtil, jamais de blur) */
.cards { display: flex; flex-direction: column; gap: 10px; }
.card {
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--surface-2) 60%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
}
.card .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; background: var(--primary); }
.card .e-main { flex: 1; min-width: 0; }
.card .e-title { font-weight: 600; }
.card .e-when { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.day-label { color: var(--text-muted); font-size: 13px; font-weight: 600; margin: 16px 4px 4px; text-transform: capitalize; }
.empty, .soon { text-align: center; color: var(--text-muted); padding: 40px 20px; }
.soon h3 { color: var(--text); font-family: 'Instrument Serif', serif; font-weight: 400; }

/* FAB */
.fab {
  position: fixed; right: 18px; bottom: calc(82px + var(--safe-b)); z-index: 6;
  width: 58px; height: 58px; border-radius: var(--radius-md);
  background: var(--primary); color: #fff; border: none;
  font-size: 30px; line-height: 1; box-shadow: 0 8px 24px rgba(200,105,62,.35);
  transition: transform .15s var(--ease);
}
.fab:active { transform: scale(.94); }

/* Bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  padding: 8px 4px calc(8px + var(--safe-b));
}
.nav-btn {
  background: none; border: none; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: inherit; font-size: 11px; padding: 4px 8px; min-width: 56px; min-height: 44px;
}
.nav-btn i { font-style: normal; font-size: 20px; filter: grayscale(.3) opacity(.85); }
.nav-btn.active { color: var(--primary); }
.nav-btn.active i { filter: none; }

/* iOS hint */
.ios-hint {
  position: fixed; left: 12px; right: 12px; bottom: calc(92px + var(--safe-b)); z-index: 7;
  background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-radius: var(--radius-md); padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px;
}
