/* BOW Chantiers : coque de l'app (barre du haut, menu latéral, barre du bas) */
.shell { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 10px var(--gut); min-height: 56px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar .brand img { height: 26px; width: auto; }
.topbar .brand span { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.topbar .grow { flex: 1; }
.me-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; border-radius: 999px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: inline-grid; place-items: center; font-size: .8rem; font-weight: 600; flex: none; letter-spacing: .02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }
.avatar.lg { width: 48px; height: 48px; font-size: 1.05rem; }
.avatar.alt { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2); }

.side { display: none; }
.main { padding: 18px var(--gut) calc(var(--tab-h) + var(--safe-b) + 28px); max-width: 960px; margin: 0 auto; }
#view { min-height: 50vh; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--paper); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + var(--safe-b));
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
  text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 500;
  background: none; border: 0; position: relative; border-radius: 12px;
}
.tabbar svg.i { width: 24px; height: 24px; }
.tabbar .on { color: var(--ink); font-weight: 600; }
.tabbar .on svg.i { stroke-width: 2.2; }
.count {
  position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--alert); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.count.neutral { background: var(--ink); }

@media (min-width: 1000px) {
  .shell { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .side {
    display: block; position: sticky; top: 56px; align-self: start; height: calc(100dvh - 56px);
    padding: 18px 14px; border-right: 1px solid var(--line); overflow-y: auto;
  }
  .side a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    text-decoration: none; color: var(--ink-2); font-weight: 500; position: relative; margin-bottom: 2px;
  }
  .side a:hover { background: var(--bg-2); }
  .side a.on { background: var(--ink); color: var(--bg); }
  .side .count { position: static; margin: 0 0 0 auto; }
  .side .sep { height: 1px; background: var(--line); margin: 12px 6px; }
  .side .cap { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 12px; }
  .tabbar { display: none; }
  .main { padding: 28px 32px 60px; max-width: 1040px; margin: 0; width: 100%; }
}
