/* BuccoSoin — feuille de style principale (mobile-first) */

:root {
  --mint: #02C39A;
  --mint-d: #019c7c;
  --mint-l: #e8faf5;
  --mint-l2: #cdf2e8;
  --ink: #0b2b2c;
  --ink-2: #1b4445;
  --muted: #6c8785;
  --muted-2: #94aaa8;
  --bg: #f2f7f6;
  --card: #ffffff;
  --line: #e2ecea;
  --line-2: #eff5f4;
  --warn: #c47c1c;
  --warn-l: #fdf4e6;
  --danger: #d0453f;
  --danger-l: #fdeeee;
  --info: #2f6fed;
  --info-l: #ecf2fe;
  --r: 16px;
  --r-sm: 10px;
  --r-lg: 22px;
  --sh: 0 1px 2px rgba(11, 43, 44, .05), 0 8px 24px rgba(11, 43, 44, .05);
  --sh-lg: 0 16px 44px rgba(11, 43, 44, .16);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(var(--tabbar) + 26px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--mint-d); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ------------------------------------------------------------- structure */

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 16px; }
.wrap-sm { width: 100%; max-width: 620px; margin: 0 auto; padding: 16px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  max-width: 1080px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--mint), var(--mint-d));
  color: #fff; display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(2, 195, 154, .32);
}
.brand-txt { min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em; }
.brand-sub { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--ink-2);
  cursor: pointer; position: relative;
}
.icon-btn:hover { border-color: var(--mint-l2); color: var(--mint-d); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--danger); border: 2px solid #fff;
}

.page-head { padding: 20px 0 10px; }
.page-head h1 { font-size: 1.5rem; }
.page-head p { color: var(--muted); margin-top: 6px; font-size: .92rem; }

.section { margin: 22px 0; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-head h2 { font-size: 1.06rem; }
.section-head .link { margin-left: auto; font-size: .82rem; font-weight: 600; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.grid-3 { grid-template-columns: minmax(0, 1fr); }
.grid-4 { grid-template-columns: minmax(0, 1fr); }
.grid-tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }

/* ------------------------------------------------------------------ cartes */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
}
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 16px 0; }
.card-head h3 { font-size: .98rem; }
.card-head .right { margin-left: auto; font-size: .78rem; color: var(--muted); }
.card-body { padding: 14px 16px 16px; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; box-shadow: var(--sh);
}
.stat-label { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat-value { font-size: 1.55rem; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.stat-value span { font-size: .85rem; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-sub { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--mint-l); color: var(--mint-d); display: grid; place-items: center; margin-bottom: 10px; }

/* ---------------------------------------------------------------- tableau de bord */

.score-card {
  background: linear-gradient(150deg, #05383a 0%, #0a5150 55%, #0a6a5c 100%);
  color: #fff; border-radius: var(--r-lg); padding: 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 18px 40px rgba(5, 56, 58, .28);
}
.score-card .score-txt { min-width: 160px; flex: 1 1 180px; }
.score-card h1 { font-size: 1.22rem; }
.score-card .score-note { color: rgba(255, 255, 255, .78); font-size: .88rem; margin-top: 6px; }
.score-card .score-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.score-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
  padding: 6px 10px; border-radius: 999px;
}
.ring { position: relative; width: 128px; height: 128px; flex: 0 0 auto; margin: 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 11; }
.ring-bar { fill: none; stroke: #4ce0b8; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .7s ease; }
.ring-num {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.ring-num b { font-size: 1.9rem; font-weight: 800; display: block; line-height: 1; }
.ring-num i { font-style: normal; font-size: .68rem; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .08em; }

.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--mint-d)); transition: width .5s ease; }

.bars { display: flex; align-items: flex-end; gap: 7px; height: 128px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; min-width: 0; }
.bar-col .bar {
  width: 100%; border-radius: 7px 7px 3px 3px; min-height: 5px;
  background: linear-gradient(180deg, var(--mint) 0%, var(--mint-l2) 100%);
}
.bar-col.is-today .bar { background: linear-gradient(180deg, #0b6b5c 0%, var(--mint-d) 100%); }
.bar-col .bar-lbl { font-size: .68rem; color: var(--muted); text-transform: lowercase; }
.bar-col .bar-val { font-size: .68rem; color: var(--muted-2); }

/* ------------------------------------------------------------------ boutons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px; border: 1px solid transparent;
  background: var(--mint); color: #fff; font-weight: 650; font-size: .92rem;
  cursor: pointer; transition: transform .12s ease, filter .12s ease, background .15s ease;
  text-align: center;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--mint); }
.btn-dark { background: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint-d); }
.btn-mint-soft { background: var(--mint-l); color: var(--mint-d); border-color: var(--mint-l2); }
.btn-danger { background: var(--danger-l); color: var(--danger); border-color: #f6d5d3; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: .82rem; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }

/* ------------------------------------------------------------------ formulaires */

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.label { font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-l); }
.textarea { min-height: 110px; resize: vertical; }
.hint { font-size: .78rem; color: var(--muted); }
.error-text { font-size: .78rem; color: var(--danger); font-weight: 600; }
.form-error {
  display: flex; gap: 8px; align-items: flex-start; background: var(--danger-l); color: #8f2f2b;
  border: 1px solid #f6d5d3; border-radius: 12px; padding: 11px 13px; font-size: .85rem; font-weight: 600;
}
.form-ok {
  background: var(--mint-l); color: var(--mint-d); border: 1px solid var(--mint-l2);
  border-radius: 12px; padding: 11px 13px; font-size: .85rem; font-weight: 600;
}
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 44px; height: 26px; appearance: none; background: #d8e6e4; border-radius: 99px; position: relative; cursor: pointer; transition: background .2s ease; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--mint); }
.switch input:checked::after { transform: translateX(18px); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: 0 0 auto; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: .82rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------------ listes */

.list { display: grid; gap: 10px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh);
}
.list-item.tappable { cursor: pointer; }
.list-item.tappable:hover { border-color: var(--mint-l2); }
.li-main { min-width: 0; flex: 1; }
.li-title { font-weight: 650; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: .79rem; color: var(--muted); margin-top: 3px; }
.li-right { margin-left: auto; text-align: right; flex: 0 0 auto; }
.li-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--mint-l); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-inline { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--mint-l); }
.avatar-inline img { width: 100%; height: 100%; object-fit: cover; }
.initiales {
  width: 100%; height: 100%; display: grid; place-items: center; font-weight: 700; font-size: .82rem;
  color: var(--mint-d); background: var(--mint-l2); letter-spacing: .02em;
}
.initiales.on-dark { background: rgba(255, 255, 255, .2); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.badge-ok { background: var(--mint-l); color: var(--mint-d); }
.badge-warn { background: var(--warn-l); color: var(--warn); }
.badge-off { background: #eef2f2; color: var(--muted); }
.badge-danger { background: var(--danger-l); color: var(--danger); }
.badge-info { background: var(--info-l); color: var(--info); }

.tag { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--mint-d); background: var(--mint-l); border-radius: 8px; padding: 3px 8px; }

.empty {
  text-align: center; padding: 30px 18px; color: var(--muted);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--r);
}
.empty svg { color: var(--mint); margin-bottom: 10px; }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: .95rem; }

.loading { display: grid; place-items: center; padding: 34px; color: var(--muted); font-size: .88rem; gap: 10px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--mint-l2); border-top-color: var(--mint); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------- navigation basse */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 9px 4px; color: var(--muted); font-size: .66rem; font-weight: 650; text-align: center;
}
.tab-ico { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 9px; }
.tab.is-active { color: var(--mint-d); }
.tab.is-active .tab-ico { background: var(--mint-l); }
.tab-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* --------------------------------------------------------- note, feuilles */

.toasts { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: calc(var(--tabbar) + 22px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; border-radius: 13px; padding: 12px 14px; font-size: .87rem; font-weight: 600;
  box-shadow: var(--sh-lg); animation: fade .3s ease both;
}
.toast-ok { background: #0b6b5c; }
.toast-err { background: #a5322d; }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(6, 32, 33, .5);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.sheet {
  background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0;
  box-shadow: var(--sh-lg); max-height: 92vh; overflow: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px); animation: up .28s ease both;
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.sheet-head h3 { font-size: 1.04rem; }
.sheet-close { margin-left: auto; border: 0; background: var(--line-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--ink-2); font-size: 1rem; line-height: 1; }
.sheet-body { padding: 8px 18px 18px; }
.sheet-foot { display: flex; gap: 10px; padding: 0 18px 18px; }
.sheet-foot .btn { flex: 1; }
.sheet-grab { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 10px auto 0; }

/* -------------------------------------------------------- page publique */

.public-hero { position: relative; color: #fff; }
.public-hero img { width: 100%; height: 340px; object-fit: cover; }
.public-hero .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 40, 41, .72) 0%, rgba(5, 40, 41, .82) 60%, rgba(5, 40, 41, .95) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 18px 26px;
}
.public-hero h1 { font-size: 1.7rem; max-width: 620px; }
.public-hero p { color: rgba(255, 255, 255, .84); margin-top: 10px; max-width: 560px; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.public-hero .btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); }

.conseil-card { overflow: hidden; padding: 0; }
.conseil-card img { height: 168px; width: 100%; object-fit: cover; }
.conseil-card .cc-body { padding: 14px 16px 16px; }
.conseil-card h3 { font-size: 1rem; }
.conseil-card p { color: var(--muted); font-size: .86rem; margin-top: 6px; }

.auth-shell { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 18px 16px 30px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-top {
  background: linear-gradient(140deg, #05383a, #0a6a5c); color: #fff; padding: 22px 18px 20px;
  border-radius: var(--r-lg); margin-bottom: 16px;
}
.auth-top h1 { font-size: 1.28rem; }
.auth-top p { color: rgba(255, 255, 255, .8); font-size: .88rem; margin-top: 6px; }
.auth-alt { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 14px; }

.install-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: linear-gradient(135deg, var(--mint-l), #fff); border: 1px solid var(--mint-l2);
  border-radius: var(--r);
}
.install-banner .ib-txt { min-width: 0; flex: 1; }
.install-banner b { display: block; font-size: .93rem; }
.install-banner span { font-size: .8rem; color: var(--muted); }
.install-steps { display: grid; gap: 12px; }
.install-step { display: flex; gap: 12px; }
.install-step .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--mint-l); color: var(--mint-d);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: 0 0 auto;
}
.install-step p { font-size: .87rem; }
.stores { display: flex; gap: 10px; justify-content: center; margin-top: 16px; color: var(--mint-d); }
.stores .store { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; }

/* ------------------------------------------------------ minuteur brossage */

.timer-shell { text-align: center; padding: 8px 0 4px; }
.timer-ring { position: relative; width: 232px; height: 232px; margin: 0 auto; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring .t-track { fill: none; stroke: var(--line-2); stroke-width: 14; }
.timer-ring .t-bar { fill: none; stroke: var(--mint); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .4s linear; }
.timer-num { position: absolute; inset: 0; display: grid; place-items: center; }
.timer-num b { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; display: block; }
.timer-num i { font-style: normal; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.zone {
  padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: #fff;
  font-size: .84rem; font-weight: 650; color: var(--muted); display: flex; align-items: center; gap: 8px;
}
.zone.is-current { border-color: var(--mint); background: var(--mint-l); color: var(--mint-d); }
.zone.is-done { border-color: var(--mint-l2); background: #fff; color: var(--ink); }
.zone .check { margin-left: auto; }

.moment-pick { display: flex; gap: 10px; justify-content: center; margin: 14px 0 4px; }

/* ------------------------------------------------------------ messagerie */

.chat { display: grid; gap: 10px; }
.bubble { max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: .9rem; box-shadow: var(--sh); }
.bubble.me { margin-left: auto; background: var(--mint); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble .b-date { display: block; font-size: .7rem; opacity: .75; margin-top: 6px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.chat-form .textarea { min-height: 46px; max-height: 130px; }
.chat-form .btn { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; }

/* --------------------------------------------------------------- admin */

.admin-hero { background: linear-gradient(140deg, #062b2c, #0b5148); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.admin-hero .topbar-inner { padding-top: 14px; padding-bottom: 14px; }
.admin-hero .brand-logo { background: rgba(255, 255, 255, .14); box-shadow: none; }
.admin-hero .brand-sub { color: rgba(255, 255, 255, .7); }
.admin-hero .icon-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.admin-hero .tabbar-admin { position: static; background: transparent; border-bottom: 1px solid rgba(255, 255, 255, .16); border-top: 0; }
.admin-hero .tab { color: rgba(255, 255, 255, .72); }
.admin-hero .tab.is-active { color: #fff; }
.admin-hero .tab.is-active .tab-ico { background: rgba(255, 255, 255, .18); }
.tabbar-admin { display: flex; gap: 2px; overflow-x: auto; }

.lock-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, #05383a, #0a6a5c); padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.lock-card { width: 100%; max-width: 440px; background: #fff; border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-lg); }

.kpi-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { display: none; }
.panel.is-visible { display: block; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 520px; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table thead th { background: #f8fbfa; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tbody tr:last-child td { border-bottom: 0; }

.membre-row { align-items: flex-start; }
.metrics { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric { background: var(--line-2); border-radius: 12px; padding: 10px 12px; }
.metric span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.metric b { display: block; font-size: 1.05rem; margin-top: 3px; }

.footer-note { text-align: center; color: var(--muted); font-size: .76rem; padding: 22px 16px 6px; }

/* --------------------------------------------------------------- bureau */

@media (min-width: 700px) {
  body { font-size: 15.5px; }
  .wrap { padding: 22px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zones { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .public-hero img { height: 460px; }
  .public-hero h1 { font-size: 2.3rem; }
  .sheet-backdrop { align-items: center; padding: 22px; }
  .sheet { border-radius: 20px; max-width: 620px; }
  .sheet-grab { display: none; }
  .toasts { left: auto; right: 22px; width: 380px; }
  .tabbar { max-width: none; }
  .tab { font-size: .7rem; }
}

