/* ============================================================
   Coque applicative — barre de navigation, conteneur, footer
   ============================================================ */

/* ---- Barre supérieure ---- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(150deg, var(--brand), var(--brand-700));
  box-shadow: 0 6px 14px rgba(14, 159, 110, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .kicker {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--brand-700);
}
.brand-text .name { font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--ink); }

/* ---- Onglets desktop ---- */
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--brand-700); background: var(--brand-50); }
.nav a.admin { color: var(--warn); }
.nav .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.nav .logout { color: var(--muted); }

/* ---- Conteneur ---- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-7);
}

.page-head { margin-bottom: var(--sp-5); }
.page-head .kicker {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 6px;
}
.page-head p.sub { color: var(--muted); margin-top: 6px; max-width: 60ch; }

/* ---- Barre d'onglets mobile ---- */
.tabbar { display: none; }

/* ---- Footer ---- */
.site-foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-7);
  color: var(--faint);
  font-size: .8rem;
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .nav .tab, .nav .sep { display: none; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    height: var(--tabbar-h);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: .66rem;
    font-weight: 600;
    color: var(--muted);
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a .ic { font-size: 1.2rem; line-height: 1; }
  .tabbar a.active { color: var(--brand-700); }
  body { padding-bottom: var(--tabbar-h); }
  main { padding-top: var(--sp-4); }
}
