/* AXZ Manager — design mobile-first responsive
   Palette + composants. Identité visuelle conservée (#2E87B5). */

:root {
  --c-primary: #2E87B5;
  --c-primary-dark: #1f6e94;
  --c-primary-light: #e7f4fb;
  --c-text: #222;
  --c-text-soft: #555;
  --c-text-mute: #888;
  --c-border: #e3e8ec;
  --c-border-strong: #c8d2da;
  --c-bg: #f5f7fa;
  --c-card: #ffffff;
  --c-success: #2e9d4f;
  --c-warning: #d6911a;
  --c-danger: #c43d3d;
  --c-overlay: rgba(0,0,0,0.45);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 18px rgba(0,0,0,0.12);

  --header-h: 56px;

  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);

  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; min-height: 100dvh; }

button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; /* prevent iOS zoom */ }

a { color: var(--c-primary); text-decoration: none; }

/* ── Boot loading screen ───────────────────────────── */
.loading-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
  background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  z-index: 9999;
}
.loading-logo { font-size: 48px; font-weight: 700; letter-spacing: 4px; }
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── App shell ─────────────────────────────────────── */
.app-shell {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
}

.app-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-primary);
  color: #fff;
  padding: calc(var(--safe-top) + 8px) 12px 8px 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
  min-height: calc(var(--header-h) + var(--safe-top));
}
.app-header .h-back, .app-header .h-menu {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #fff;
  border-radius: var(--r-sm);
}
.app-header .h-back:active, .app-header .h-menu:active { background: rgba(255,255,255,0.15); }
.app-header .h-title {
  flex: 1; font-size: 17px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .h-sub { font-size: 11px; opacity: 0.85; font-weight: 400; }

.app-main {
  flex: 1;
  padding: 12px;
  padding-left: max(12px, var(--safe-left));
  padding-right: max(12px, var(--safe-right));
  padding-bottom: calc(20px + var(--safe-bottom));
}

/* ── Drawer (menu hamburger) ───────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: var(--c-overlay);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 82%; max-width: 320px;
  background: #fff;
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  background: var(--c-primary);
  color: #fff;
  padding: 18px 16px;
}
.drawer-head .d-company { font-size: 16px; font-weight: 600; }
.drawer-head .d-user { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.drawer-list {
  flex: 1; overflow-y: auto;
  padding: 8px 0;
}
.drawer-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  font-size: 15px; color: var(--c-text);
  border: 0; background: transparent; width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.drawer-item:active { background: var(--c-primary-light); }
.drawer-item.active { background: var(--c-primary-light); color: var(--c-primary-dark); font-weight: 600; }
.drawer-item .d-icon { font-size: 20px; width: 28px; text-align: center; }
.drawer-foot {
  padding: 12px 16px calc(16px + var(--safe-bottom)) 16px;
  border-top: 1px solid var(--c-border);
}
.drawer-foot .btn-logout {
  width: 100%;
  background: #fff;
  color: var(--c-danger);
  border: 1px solid var(--c-border-strong);
  padding: 12px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
}
.drawer-foot .btn-logout:active { background: #fff5f5; }

/* ── Login screen ──────────────────────────────────── */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
}
.login-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 28px 22px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center;
  font-size: 28px; font-weight: 700; color: var(--c-primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.login-sub { text-align: center; color: var(--c-text-mute); font-size: 13px; margin-bottom: 20px; }
.login-step-label { color: var(--c-text-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.login-card .form-row { margin-bottom: 14px; }
.login-card .btn-primary { width: 100%; }
.login-card .login-back { display: block; width: 100%; background: transparent; color: var(--c-text-mute); border: 0; padding: 10px; margin-top: 8px; font-size: 13px; }
.login-remember { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 13px; color: var(--c-text-soft); cursor: pointer; user-select: none; }
.login-remember input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--c-primary); margin: 0; cursor: pointer; }
.login-error { color: var(--c-danger); font-size: 13px; margin: 6px 0 12px; min-height: 18px; }

/* ── Forms ─────────────────────────────────────────── */
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 12px; color: var(--c-text-soft); font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  padding: 12px 14px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--c-text);
  outline: none;
  font-size: 16px;
  width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}
.form-row textarea { min-height: 90px; resize: vertical; }

/* ── Buttons ───────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  border: 0;
  min-height: 44px;
  transition: filter 0.1s, background 0.1s;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:active { filter: brightness(0.9); }
.btn-primary:disabled { background: var(--c-border-strong); color: #fff; opacity: 0.7; }
.btn-secondary { background: #fff; color: var(--c-primary); border: 1px solid var(--c-primary); }
.btn-secondary:active { background: var(--c-primary-light); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-primary); }

.btn-block { width: 100%; }

/* ── Page title ────────────────────────────────────── */
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 14px;
  color: var(--c-text);
}

/* ── Tile menu (home) ──────────────────────────────── */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tile {
  background: var(--c-card);
  border-radius: var(--r-lg);
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-height: 110px; justify-content: center;
  transition: transform 0.1s, box-shadow 0.15s;
}
.tile:active { transform: scale(0.97); box-shadow: var(--shadow-md); }
.tile-icon {
  font-size: 32px;
  line-height: 1;
}
.tile-label {
  font-size: 13px; font-weight: 600; color: var(--c-text);
  line-height: 1.2;
}

/* ── Page header (sub-page) ────────────────────────── */
.page-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.page-head h1 {
  flex: 1; margin: 0;
  font-size: 20px; font-weight: 600;
}
.page-head .head-action {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary);
  color: #fff;
  border: 0; border-radius: 50%;
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}

/* ── Search bar ────────────────────────────────────── */
.search-bar {
  position: sticky; top: calc(var(--header-h) + var(--safe-top));
  background: var(--c-bg);
  padding: 8px 0;
  z-index: 10;
  margin: -4px -4px 8px -4px;
  padding-left: 4px; padding-right: 4px;
}
.search-bar input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-xl);
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23888" stroke-width="2"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>') no-repeat 12px center;
  background-size: 18px;
  font-size: 15px;
  outline: none;
}
.search-bar input:focus { border-color: var(--c-primary); }

/* ── List items ────────────────────────────────────── */
.list {
  display: flex; flex-direction: column; gap: 8px;
}
.list-item {
  background: var(--c-card);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.list-item:active { background: #fafbfc; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title {
  font-size: 15px; font-weight: 600; color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-item .li-sub {
  font-size: 13px; color: var(--c-text-mute);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-item .li-meta {
  font-size: 12px; color: var(--c-text-mute);
  margin-top: 4px;
}
.list-item .li-trail {
  font-size: 13px; color: var(--c-primary); font-weight: 600;
  white-space: nowrap;
}
.list-item .li-chevron { color: var(--c-text-mute); font-size: 18px; }

/* ── Empty / loading states ────────────────────────── */
.state {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-mute);
}
.state .state-icon { font-size: 40px; margin-bottom: 8px; }
.state .state-msg { font-size: 14px; }

/* ── Detail page sections ──────────────────────────── */
.section {
  background: var(--c-card);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
}
.section h2 {
  margin: 0 0 10px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--c-text-mute);
  font-weight: 600;
}
.kv-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--c-text-soft); font-size: 13px; }
.kv-row .v { color: var(--c-text); font-size: 14px; font-weight: 500; text-align: right; word-break: break-word; }

/* ── Floating action button (FAB) ──────────────────── */
.fab {
  position: fixed;
  right: max(16px, var(--safe-right));
  bottom: calc(20px + var(--safe-bottom));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  border: 0;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 30;
}
.fab:active { transform: scale(0.95); }

/* ── Toast / inline error ──────────────────────────── */
.toast {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(80px + var(--safe-bottom));
  background: rgba(34,34,34,0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-xl);
  font-size: 14px;
  z-index: 200;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.err { background: var(--c-danger); }

/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px; font-weight: 600;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.badge.ok { background: #e3f5e8; color: var(--c-success); }
.badge.warn { background: #fdf1da; color: var(--c-warning); }
.badge.err { background: #fbe2e2; color: var(--c-danger); }

/* ── Scan overlay ──────────────────────────────────── */
.scan-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 300;
  display: flex; flex-direction: column;
}
.scan-overlay video { flex: 1; width: 100%; object-fit: cover; background: #000; }
.scan-overlay .scan-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 70vw; max-width: 320px; aspect-ratio: 1.6;
  border: 3px solid #fff;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
}
.scan-overlay .scan-close {
  position: absolute; top: calc(var(--safe-top) + 12px); right: 14px;
  background: rgba(0,0,0,0.6); color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; font-size: 20px;
}
.scan-overlay .scan-hint {
  position: absolute; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 24px);
  text-align: center; color: #fff; font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* ── Save bar (sticky bottom for forms) ────────────── */
.save-bar {
  position: sticky; bottom: 0;
  background: #fff;
  padding: 10px 12px calc(10px + var(--safe-bottom)) 12px;
  margin: 12px -12px -12px -12px;
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  display: flex; gap: 10px;
}
.save-bar .btn-primary { flex: 1; }

/* ── Responsive: tablette portrait ─────────────────── */
@media (min-width: 600px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .tile { min-height: 130px; padding: 22px 14px; }
  .tile-icon { font-size: 36px; }
  .tile-label { font-size: 14px; }
  .app-main { padding: 16px; }
}

/* ── Responsive: tablette / iPad portrait ──────────── */
@media (min-width: 768px) {
  .tile-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .tile { min-height: 150px; }
  .tile-icon { font-size: 40px; }
  .tile-label { font-size: 15px; }
  .app-main { padding: 20px max(20px, calc((100vw - 760px) / 2)); }
}

/* ── Responsive: iPad paysage / desktop ────────────── */
@media (min-width: 1024px) {
  .tile-grid { grid-template-columns: repeat(5, 1fr); }
  .app-main { padding: 24px max(24px, calc((100vw - 1100px) / 2)); }
  .list-item .li-sub { white-space: normal; }
}

/* ── Mode sombre auto ──────────────────────────────── */
@media (prefers-color-scheme: dark) {
  /* Désactivé en v1 — l'app reste claire pour cohérence avec le desktop */
}

/* ── Hero card (en-tête de fiche détail) ───────────── */
.hero-card {
  background: var(--c-card);
  border-radius: var(--r-md);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  overflow: hidden;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-primary-light);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-body { padding: 14px 16px 10px; }
.hero-title {
  font-size: 20px; font-weight: 700; color: var(--c-text);
  margin: 0 0 4px; line-height: 1.25;
}
.hero-subtitle { color: var(--c-text-soft); font-size: 13px; margin-bottom: 8px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: var(--c-border);
  border-top: 1px solid var(--c-border);
}
.hero-stat { background: var(--c-card); padding: 10px 12px; text-align: center; }
.hero-stat-l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--c-text-mute); }
.hero-stat-v { font-size: 16px; font-weight: 700; color: var(--c-primary-dark); margin-top: 2px; }

/* ── Tabs (onglets de fiche détail) ───────────────── */
.tabs-host { margin-bottom: 12px; }
.tabs-nav {
  display: flex; overflow-x: auto;
  background: var(--c-card);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  margin-bottom: 12px;
  scrollbar-width: none;
  position: sticky; top: 56px; z-index: 5;
  box-shadow: var(--shadow-sm);
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 0 0 auto;
  background: transparent; border: 0; cursor: pointer;
  padding: 12px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--c-text-mute);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active { color: var(--c-primary-dark); border-bottom-color: var(--c-primary); }
.tab-btn:active { background: var(--c-primary-light); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Carte unité immobilier ────────────────────────── */
.unit-card {
  background: var(--c-card);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.unit-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.unit-card-title { font-size: 16px; font-weight: 700; color: var(--c-text); }
.unit-card-rent { font-size: 16px; font-weight: 700; color: var(--c-primary-dark); }
.unit-card-occupant {
  font-size: 13px; color: var(--c-text-soft);
  padding: 6px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 8px;
}
.unit-card-occupant.libre { color: var(--c-text-mute); font-style: italic; }
.unit-card-meta {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px;
  font-size: 12px;
}
.unit-card-meta div { display: flex; justify-content: space-between; }
.unit-card-meta .lbl { color: var(--c-text-mute); }
.unit-card-meta .val { color: var(--c-text); font-weight: 500; }

/* ── Doc / fichier ─────────────────────────────────── */
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
}
.doc-row .doc-icon {
  width: 40px; height: 40px; flex: 0 0 40px;
  background: var(--c-primary-light); color: var(--c-primary-dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.doc-row .doc-name { font-size: 14px; font-weight: 500; color: var(--c-text); }
.doc-row .doc-meta { font-size: 11px; color: var(--c-text-mute); }
.doc-row .doc-body { flex: 1; min-width: 0; }
.doc-row .doc-body > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Bloc notes ────────────────────────────────────── */
.notes-block {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

/* ── Audit trail (créé par / modifié par) ──────────── */
.audit-trail {
  font-size: 11px; color: var(--c-text-mute);
  padding: 8px 14px;
  text-align: right;
}
.audit-trail div { margin: 1px 0; }

/* ── Bottom navigation (style desktop main menu) ──── */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--c-card);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  z-index: 60;
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
.bn-item {
  flex: 1;
  background: transparent;
  border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  padding: 8px 4px 6px;
  color: var(--c-text-mute);
  min-height: 58px;
  position: relative;
  transition: color 0.15s, background 0.15s;
}
.bn-item:active { background: rgba(46,135,181,0.08); }
.bn-item .bn-icon { font-size: 22px; line-height: 1; }
.bn-item .bn-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.bn-item.active { color: var(--c-primary); }
.bn-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 18%; right: 18%;
  height: 3px;
  background: var(--c-primary);
  border-radius: 0 0 3px 3px;
}

/* Padding bas pour ne pas que le contenu passe sous la barre */
.app-main.has-bottom-nav {
  padding-bottom: calc(72px + var(--safe-bottom));
}

/* ── Home (menu principal) ─────────────────────────── */
.home-hero {
  margin: -12px -12px 16px;
  padding: 28px 16px 22px;
  background: linear-gradient(160deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  text-align: center;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  box-shadow: var(--shadow-md);
}
.home-logo-wrap {
  display: inline-block;
  position: relative;
  margin-bottom: 8px;
}
.home-logo {
  display: block;
  width: 160px; height: 56px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.home-tagline {
  position: absolute;
  right: 6px; bottom: -4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 6px;
  color: rgba(255,255,255,0.85);
}
.home-company {
  font-size: 16px;
  font-weight: 600;
  margin-top: 12px;
  opacity: 0.95;
}
.home-welcome {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

.home-section { margin-bottom: 18px; }
.home-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-mute);
  margin: 4px 4px 10px;
}

.tile-grid.favorites .tile {
  background: linear-gradient(160deg, #ffffff 0%, #f1f8fc 100%);
  border-color: var(--c-primary-light);
}
.tile-grid.favorites .tile .tile-icon { font-size: 38px; }
.tile-grid.favorites .tile .tile-label { color: var(--c-primary-dark); }
