/* Bible FIFP 9 — styles communs (appli mobile, connexion, administration) */
/* Polices hébergées sur le serveur (pas d'appel à Google) — licence SIL OFL, voir fonts/ */
@font-face { font-family: Inter; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url(fonts/inter-tight.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #F6F5F2; --card: #FFFFFF; --ink: #16171A; --ink-2: #3F434B; --muted: #6B6F78; --faint: #8A8D94;
  --line: #F0EEEA; --line-2: #E1DED8; --soft: #F3F2EF; --soft-2: #EAE8E3; --chip: #F0EEEA;
  --accent: #FF7A2E;
  --ok-bg: #DDF3E3; --ok: #1E6B34; --warn-bg: #FFF4D6; --warn: #7A5200; --bad-bg: #FDE8E8; --bad: #A61B1B; --info-bg: #E6EEFF; --info: #2747A0;
  --shadow: 0 1px 2px rgba(22, 23, 26, .05), 0 6px 20px rgba(22, 23, 26, .04);
  --r-card: 24px; --r-sm: 14px;
  --display: 'Inter Tight', Inter, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
a { color: var(--ink); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- boutons, champs, puces ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 25px; border: none; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-soft { background: var(--chip); color: var(--ink); }
.btn-line { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-green { background: #0B6B57; color: #fff; }
.btn-red { background: var(--bad-bg); color: var(--bad); }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 19px; font-size: 14px; }
.btn-block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea, .input { height: 50px; padding: 0 14px; border-radius: var(--r-sm); border: none; background: var(--soft); color: var(--ink); font-size: 16px; width: 100%; }
.field textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 84px; }
.field input:disabled, .field select:disabled { opacity: .55; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.chip-live { background: var(--accent); color: var(--ink); font-weight: 700; }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-dark { background: var(--ink); color: #fff; font-weight: 700; }
.pill-dark { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.flash { padding: 12px 14px; border-radius: 16px; font-size: 14px; }
.flash.err { background: var(--bad-bg); color: var(--bad); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: #6E4A00; }
.flash.info { background: var(--info-bg); color: #1B2F66; }
.switch { flex: none; width: 52px; height: 32px; border-radius: 16px; border: none; padding: 3px; display: flex; background: #D9D6D0; transition: background .2s; }
.switch[aria-checked="true"] { background: var(--ink); justify-content: flex-end; }
.switch.red[aria-checked="true"] { background: #C42B2B; }
.switch::after { content: ""; width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 2px 6px rgba(22, 23, 26, .2); }
.seg { display: flex; padding: 4px; border-radius: 16px; background: var(--soft-2); }
.seg button { flex: 1; height: 38px; border-radius: 12px; border: none; background: transparent; color: #5B5F68; font-size: 14px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22, 23, 26, .12); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { height: 38px; padding: 0 14px; border-radius: 19px; border: none; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); }

/* ---------- connexion / installation ---------- */
.auth { min-height: 100vh; display: flex; justify-content: center; padding: 32px 20px 40px; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.auth-card.wide { max-width: 760px; }
.auth-title { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.auth-title.big { font-size: 40px; line-height: 1; }
.section-title { margin: 8px 0 0; font-family: var(--display); font-size: 20px; font-weight: 700; }
.who { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.who-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 17px; flex: none; }
.who-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.who-label { font-size: 12px; color: var(--muted); }
.who select { border: none; background: transparent; font-size: 17px; font-weight: 700; padding: 2px 0; height: 32px; width: 100%; }
.pin-zone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pin-dots { display: flex; gap: 14px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; background: #DAD7D1; }
.pin-dots span.on { background: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; padding: 0 18px; }
.key { height: 64px; border-radius: 32px; border: none; background: #fff; font-family: var(--display); font-size: 26px; font-weight: 600; box-shadow: 0 1px 2px rgba(22, 23, 26, .06), 0 4px 12px rgba(22, 23, 26, .05); }
.key:active { background: var(--soft-2); }
.key-ghost { background: transparent; box-shadow: none; font-size: 22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 12px 14px; }
.table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
@media print { .btn { display: none; } body { background: #fff; } .table { box-shadow: none; } }

/* ---------- appli mobile ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.topbar { position: sticky; top: 0; z-index: 4; background: rgba(246, 245, 242, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 8px; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.topbar-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.topbar-actions { display: flex; gap: 8px; }
.round { width: 42px; height: 42px; border-radius: 21px; border: none; background: #fff; box-shadow: 0 1px 2px rgba(22, 23, 26, .06), 0 4px 14px rgba(22, 23, 26, .06); display: flex; align-items: center; justify-content: center; }
.round.me { background: var(--accent); font-family: var(--display); font-weight: 800; font-size: 16px; box-shadow: none; }
.page-title { margin: 6px 0 0; font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.content { padding: 10px 16px calc(112px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.h2 { margin: 8px 4px 0; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 54px; height: 64px; border-radius: 20px; border: none; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.day span:first-child { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.day span:last-child { font-family: var(--display); font-size: 20px; font-weight: 700; }
.day[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(22, 23, 26, .2); }
.day.today:not([aria-pressed="true"]) span:last-child { color: #C2410C; }
.summary { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); padding: 0 4px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 15px; background: #fff; border-radius: 24px; }

.slot { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.slot.live { box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(22, 23, 26, .08); }
.slot.dim { opacity: .55; }
.slot-main { all: unset; cursor: pointer; display: flex; gap: 14px; padding: 16px 16px 12px; }
.slot-main:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--r-card); }
.slot-time { width: 50px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.slot-time b { font-family: var(--display); font-size: 18px; font-weight: 700; }
.slot-time span { font-size: 13px; color: var(--muted); }
.slot-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.slot-title { font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.slot-title.cancel, .strike { text-decoration: line-through; }
.slot-lieu { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.slot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.phrase { align-self: flex-start; font-size: 13.5px; font-weight: 600; padding: 6px 10px; border-radius: 12px; background: var(--soft); }
.note-blue { font-size: 12.5px; color: var(--info); }
.note-warn { font-size: 12.5px; color: #8A5A00; display: flex; gap: 6px; align-items: center; }
.slot-actions { display: flex; gap: 8px; padding: 0 16px 16px 80px; }
.btn-ok { flex: 1; height: 44px; border-radius: 22px; border: none; background: var(--ink); color: #fff; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-ok.done { background: var(--ok-bg); color: var(--ok); }
.btn-bell { height: 44px; padding: 0 14px; border-radius: 22px; border: none; background: var(--chip); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.btn-bell[aria-pressed="true"] { background: var(--accent); }
.assign { display: flex; flex-direction: column; gap: 8px; margin: 0 12px 12px; padding: 12px; border-radius: 18px; background: #FFF8E8; }
.assign label { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: #4A3A10; }
.assign label span { width: 96px; flex: none; }
.assign select { flex: 1; min-width: 0; height: 42px; padding: 0 10px; border-radius: 12px; border: none; background: #fff; font-size: 14.5px; }

.hero { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 28px; background: var(--ink); color: #fff; box-shadow: 0 12px 30px rgba(22, 23, 26, .18); }
.hero-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: #B9BBC2; }
.hero-title { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.15; }
.hero .phrase { background: rgba(255, 255, 255, .12); color: #fff; }
.live-card { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.bar { height: 6px; border-radius: 3px; background: #EFEDE9; overflow: hidden; }
.bar i { display: block; height: 6px; border-radius: 3px; background: var(--accent); }
.list-card { display: flex; flex-direction: column; border-radius: 22px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.row-btn { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; }
.row-btn + .row-btn { border-top: 1px solid var(--line); }
.row-line { font-size: 13px; display: flex; gap: 6px; padding-left: 18px; }
.row-line b { font-weight: 400; color: var(--muted); width: 78px; flex: none; }
.who-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }

.frise-wrap { overflow-x: auto; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.frise { position: relative; }
.frise-hours { display: flex; height: 32px; position: relative; }
.frise-hours span.h { position: absolute; top: 10px; font-size: 11px; font-weight: 600; color: var(--faint); }
.frise-row { display: flex; height: 62px; border-top: 1px solid var(--line); position: relative; }
.frise-lieu { position: sticky; left: 0; z-index: 3; width: 108px; flex: none; border: none; background: #fff; font-size: 12.5px; font-weight: 600; text-align: left; padding: 0 8px 0 14px; display: flex; align-items: center; gap: 6px; box-shadow: 6px 0 10px -8px rgba(22, 23, 26, .25); }
.frise-blk { position: absolute; top: 7px; bottom: 7px; box-sizing: border-box; padding: 4px 8px; border-radius: 12px; border: none; display: flex; flex-direction: column; justify-content: center; text-align: left; overflow: hidden; z-index: 1; }
.frise-blk b { font-size: 11px; font-weight: 700; }
.frise-blk span { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frise-now { position: absolute; top: 26px; bottom: 0; width: 2px; background: var(--ink); z-index: 2; }

.notif { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif-ico { flex: none; width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.unread-dot { width: 9px; height: 9px; border-radius: 5px; background: var(--accent); }
.settings { display: flex; flex-direction: column; gap: 18px; padding: 18px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.setting-row { display: flex; gap: 12px; align-items: center; }

.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px 20px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.avatar-xl { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 32px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }
.kv { display: flex; flex-direction: column; padding: 4px 18px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); font-size: 14.5px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv > div > span:first-child { color: var(--muted); }

.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 5; width: calc(100% - 28px); max-width: 532px; height: 68px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 6px; border-radius: 34px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 32px rgba(22, 23, 26, .14), 0 1px 0 rgba(22, 23, 26, .04); }
.tab { border: none; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; color: #5B5F68; }
.tab .pill-ico { position: relative; width: 50px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.tab span.lbl { font-size: 10.5px; font-weight: 500; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .pill-ico { background: var(--ink); color: #fff; }
.tab[aria-current="page"] span.lbl { font-weight: 700; }
.badge { position: absolute; top: -4px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--ink); border: 2px solid #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }

/* ---------- feuille du bas ---------- */
/* La fenêtre défile dans le fond sombre (et non à l'intérieur d'elle-même) : sur iPhone et iPad,
   le clavier ne la fait plus « flotter ». */
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(22, 23, 26, .32); display: flex; flex-direction: column; align-items: center; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: max(env(safe-area-inset-top, 0px), 28px); animation: fade .15s ease-out; }
.sheet { width: 100%; max-width: 560px; flex: none; margin-top: auto; background: #fff; border-radius: 32px 32px 0 0; padding: 0 20px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; box-shadow: 0 -10px 40px rgba(22, 23, 26, .12); animation: up .2s ease-out; }
.sheet > .sheet-head { position: sticky; top: 0; z-index: 2; background: #fff; margin: 0 -20px; padding: 10px 20px 0; height: 54px; border-radius: 32px 32px 0 0; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; justify-content: center; position: relative; height: 44px; align-items: center; flex: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: #DAD7D1; }
.sheet-close { position: absolute; right: 20px; top: 12px; width: 36px; height: 36px; border-radius: 18px; border: none; background: var(--chip); display: flex; align-items: center; justify-content: center; }
.sheet-title { margin: -8px 0 0; font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.me-phrase { font-size: 15px; font-weight: 700; padding: 12px 14px; border-radius: 16px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 10px; }
.info-row { display: flex; gap: 12px; align-items: center; }
.info-row.btnlike { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.ico-tile { width: 40px; height: 40px; border-radius: 13px; background: var(--soft); display: flex; align-items: center; justify-content: center; flex: none; }
.box { display: flex; flex-direction: column; padding: 14px; border-radius: 18px; gap: 4px; }
.box-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.box.orange { background: #FFF1E6; } .box.orange .box-title { color: #8A3A00; }
.box.green { background: #EEF8F4; } .box.green .box-title { color: #0B6B57; }
.box.violet { background: #F3EFFF; } .box.violet .box-title { color: #5134A6; }
.box.grey { background: var(--bg); }
.box-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 14.5px; }
.box-line + .box-line { border-top: 1px solid rgba(22, 23, 26, .06); }
.team-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.avatar { border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 16px; background: var(--bg); font-size: 14.5px; }
.add-role { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
.add-role select { height: 46px; padding: 0 8px; border-radius: 14px; border: none; background: var(--soft); font-size: 14px; min-width: 0; }
.icon-btn { width: 46px; height: 46px; border-radius: 23px; border: none; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.icon-btn.light { width: 36px; height: 36px; background: #fff; color: var(--ink-2); }
.lock-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: #EEECE8; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; }
.tagbox button { height: 34px; padding: 0 12px; border-radius: 17px; border: none; background: var(--soft); font-size: 13px; font-weight: 600; }
.tagbox button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mat-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 36px; gap: 6px; align-items: center; }
.mat-row input { height: 42px; border-radius: 12px; border: none; background: #fff; padding: 0 10px; font-size: 14.5px; min-width: 0; }

.toast { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 520px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 22px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.35; box-shadow: 0 10px 30px rgba(22, 23, 26, .3); animation: fade .15s; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); flex: none; }
.toast.err::before { background: #FF6B6B; }
.toast { pointer-events: none; }
[hidden] { display: none !important; }

/* ---------- administration ---------- */
.admin { min-height: 100vh; }
.admin-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 18px 32px; border-bottom: 1px solid var(--line-2); background: var(--bg); position: sticky; top: 0; z-index: 4; }
.admin-brand { display: flex; flex-direction: column; gap: 4px; }
.admin-brand b { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 24px 32px 60px; display: flex; flex-direction: column; gap: 18px; }
.admin .seg { min-width: 0; flex-wrap: wrap; }
.admin .seg button { flex: none; padding: 0 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tile { padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.tile b { font-family: var(--display); font-size: 32px; font-weight: 800; }
.tile span { font-size: 13px; color: var(--muted); }
.scroll { overflow-x: auto; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.scroll .table { box-shadow: none; border-radius: 0; }
.table select, .table input { height: 38px; padding: 0 10px; border-radius: 12px; border: none; background: var(--soft); font-size: 13.5px; }
.table select.todo { background: var(--warn-bg); }
.form-card { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.form-card .field { flex: 1 1 180px; }
.modal { position: fixed; inset: 0; z-index: 10; background: rgba(22, 23, 26, .32); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-box { width: 100%; max-width: 600px; background: #fff; border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 60px rgba(22, 23, 26, .2); }
@media (max-width: 700px) { .admin-top, .admin-main { padding-left: 16px; padding-right: 16px; } }

/* ---------- rôles attendus (éditeur) ---------- */
.need-row { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: #FFF8E8; }
.need-label { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.need-label b { font-weight: 600; }
.need-pick { background: #fff !important; height: 46px; }
.chip-draft { background: #EEECE8; color: #3F434B; border: 1px dashed #B9B5AD; }
.hours { display: flex; flex-direction: column; border-radius: 22px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.hours-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 14.5px; }
.hours-row + .hours-row { border-top: 1px solid var(--line); }
.hours-row .hrs { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.hours-row.open .hrs { color: var(--ok); font-weight: 600; }
.hours-row.closed { color: var(--muted); }
.hgrid input[type=time] { width: 92px; height: 34px; padding: 0 6px; }
.hgrid td { white-space: nowrap; }
.offline-bar { margin: 0 16px; padding: 10px 14px; border-radius: 16px; background: #FFF4D6; color: #6E4A00; font-size: 13.5px; font-weight: 500; }

/* ---------- tablettes (iPad), grands téléphones à l'horizontale ---------- */
@media (min-width: 700px) {
  .app { max-width: 760px; }
  .tabbar { max-width: 600px; }
  .content { padding-left: 24px; padding-right: 24px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .overlay { justify-content: flex-start; padding: 6vh 24px 6vh; }
  .sheet { max-width: 640px; margin: 0 auto; border-radius: 28px; padding-bottom: 28px; box-shadow: 0 24px 70px rgba(22, 23, 26, .22); animation: pop .18s ease-out; }
  .sheet > .sheet-head { border-radius: 28px 28px 0 0; }
  .sheet .grabber { display: none; }
  .toast { max-width: 560px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .overlay { justify-content: flex-start; padding: 12px 24px; }
  .sheet { max-width: 640px; margin: 0 auto; border-radius: 24px; padding-bottom: 20px; }
  .sheet > .sheet-head { border-radius: 24px 24px 0 0; }
  .tabbar { height: 58px; bottom: calc(8px + var(--safe-b)); }
}
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
