/* ──────────────────────────────────────────────────────────────
   Comptes — feuille de style
   Réutilise le langage visuel des sections /recettes/ et /courses/
   (palette cream/terra/gold, fonts Playfair Display + DM Sans, barre
   .app-switcher identique). Le mockup comptes/docs/comptes-mockup.html
   n'est qu'une proposition, pas la référence de style.
   Section desktop (contenu centré, largeur max 1180 px).
   Phase 0 : barre + en-tête + état vide.
   ────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #faf6f0;
  --cream-dark: #f0e8dc;
  --ink:        #1a1208;
  --ink-muted:  #6b5a47;
  --terra:      #1a3a6b;
  --terra-pale: #e8eef8;
  --gold:       #d4a843;
  --gold-pale:  #fdf3dc;
  --green:      #4a7c5a;
  --border:     #e0d4c4;
  --maxw:       1180px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}
/* App installée (PWA standalone) : on annule la safe-area du bas (cf. i18n.js). */
html.standalone { --safe-bottom: 0px; }

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── APP SWITCHER (identique à /recettes/ et /courses/) ── */
.app-switcher {
  position: sticky;
  top: 0;
  z-index: 101;
  background: #0d1b35;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: calc(36px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  flex-shrink: 0;
}
.app-switcher-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.app-switcher-link:hover  { color: rgba(255,255,255,.85); background: rgba(255,255,255,.07); }
.app-switcher-link.active { color: white; background: rgba(255,255,255,.1); }

/* ── EN-TÊTE ── */
.app-header {
  position: sticky;
  top: calc(36px + env(safe-area-inset-top, 0px));
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 28px 28px 22px;
}
.header-inner { max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
  min-height: 1em;
}
.header-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 6px;
}
.lede {
  color: var(--ink-muted);
  margin-top: 8px;
  font-size: .95rem;
  max-width: 640px;
}

/* ── CONTENU ── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 28px calc(80px + var(--safe-bottom));
}

/* ── ÉTAT VIDE (phase 0) ── */
.empty {
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 48px 32px;
  text-align: center;
}
.empty-icon { font-size: 2rem; line-height: 1; }
.empty h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 12px 0 6px;
}
.empty p {
  color: var(--ink-muted);
  font-size: .9rem;
  max-width: 460px;
  margin: 0 auto;
}

/* ── ENCART CONFIGURATION OWNER_UID ──
   Visible uniquement tant que la constante OWNER_UID de app.js est vide :
   aide à récupérer son UID Firebase (cf. plan section 6.1). */
.owner-setup {
  margin-bottom: 24px;
  border: 1px solid var(--gold);
  background: var(--gold-pale);
  color: var(--ink);
  border-radius: 16px;
  padding: 18px 20px;
}
.owner-setup h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.owner-setup p { font-size: .9rem; color: var(--ink-muted); margin-bottom: 12px; }
.owner-setup .uid-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.owner-setup .uid {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
  user-select: all;
}
.owner-setup code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .85em;
  background: rgba(0,0,0,.05);
  padding: 1px 5px;
  border-radius: 4px;
}
