/* West African Beach — espace équipe
   Thème : panneaux de verre posés sur le ciel de Dakar, qui suit l'heure réelle. */

:root {
  --font-ui: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --lagoon: #17b8a6;
  --lagoon-deep: #0b7f73;
  --bissap: #e0356f;
  --mango: #f5ad2f;
  --atlantic: #3a8fe0;
  --coral: #ff7a52;
  --late: #8f72f2;
  --stone: #8b9aa2;
  --ok: #2bc48a;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --pad: 16px;
  --nav-h: 74px;
  --top-h: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.2, .9, .25, 1.08);
  --blur: blur(20px) saturate(1.45);
  color-scheme: dark;
}

/* Nuit par défaut ; « dark » et « light » sont acceptés comme alias. */
:root, [data-theme="nuit"], [data-theme="dark"] {
  --text: #f1f7f8;
  --text-2: rgba(241, 247, 248, .74);
  --text-3: rgba(241, 247, 248, .52);
  --glass: rgba(8, 27, 37, .50);
  --glass-2: rgba(8, 27, 37, .70);
  --glass-3: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .13);
  --line-2: rgba(255, 255, 255, .22);
  --hover: rgba(255, 255, 255, .07);
  --input: rgba(255, 255, 255, .08);
  --shadow: 0 22px 50px -24px rgba(0, 0, 0, .65);
  --on-accent: #052a26;
  color-scheme: dark;
}
[data-theme="jour"], [data-theme="light"] {
  --text: #0b2a33;
  --text-2: rgba(11, 42, 51, .74);
  --text-3: rgba(11, 42, 51, .52);
  --glass: rgba(255, 255, 255, .60);
  --glass-2: rgba(255, 255, 255, .84);
  --glass-3: rgba(11, 42, 51, .05);
  --line: rgba(11, 42, 51, .12);
  --line-2: rgba(11, 42, 51, .2);
  --hover: rgba(11, 42, 51, .06);
  --input: rgba(255, 255, 255, .78);
  --shadow: 0 20px 44px -26px rgba(14, 64, 84, .55);
  --on-accent: #ffffff;
  --lagoon: #0f9d8e;
  --mango: #d98a06;
  color-scheme: light;
}
[data-lite="1"] { --blur: none; }
[data-lite="1"][data-theme="nuit"], [data-lite="1"][data-theme="dark"] { --glass: rgba(9, 30, 41, .9); --glass-2: rgba(9, 30, 41, .96); }
[data-lite="1"][data-theme="jour"], [data-lite="1"][data-theme="light"] { --glass: rgba(255, 255, 255, .93); --glass-2: rgba(255, 255, 255, .98); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font: 16px/1.5 var(--font-ui);
  color: var(--text);
  background: #0b2c3b;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 20px; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Le ciel ---------- */
#sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--sky-a, #0d2440) 0%, var(--sky-b, #2c4f7c) 46%, var(--sky-c, #e7a07a) 62%, var(--sea-a, #0f3e50) 62.2%, var(--sea-b, #072431) 100%);
  transition: background 2s linear; }
#sky .sun { position: absolute; left: var(--sun-x, 70%); top: var(--sun-y, 50%); width: 110px; height: 110px; margin: -55px 0 0 -55px;
  border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--sun-core, #fff4d6) 0 38%, var(--sun-glow, rgba(255, 196, 120, .55)) 39%, transparent 70%);
  filter: blur(.3px); opacity: var(--sun-o, 1); transition: left 2s linear, top 2s linear, opacity 2s; }
#sky .moon { position: absolute; left: var(--moon-x, 20%); top: var(--moon-y, 20%); width: 34px; height: 34px; margin: -17px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fdfbf2, #d9dce6 70%); box-shadow: 0 0 40px 8px rgba(220, 228, 255, .25); opacity: var(--moon-o, 0); transition: opacity 2s; }
#sky .stars { position: absolute; inset: 0 0 40% 0; opacity: var(--stars-o, 0); transition: opacity 3s;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 33% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 58% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 77% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 88% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 38%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 44%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 67% 40%, #fff 50%, transparent 51%); }
#sky .glitter { position: absolute; left: var(--sun-x, 70%); top: 62%; width: 160px; height: 38%; margin-left: -80px;
  background: repeating-linear-gradient(180deg, var(--glitter, rgba(255, 220, 160, .55)) 0 2px, transparent 2px 9px);
  -webkit-mask: radial-gradient(60% 100% at 50% 0, #000 20%, transparent 75%); mask: radial-gradient(60% 100% at 50% 0, #000 20%, transparent 75%);
  opacity: var(--glitter-o, .7); transition: left 2s linear, opacity 2s; }
#sky .waves { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; }
#sky .wave { position: absolute; left: 0; width: 200%; height: 40px; background-repeat: repeat-x; background-size: 50% 40px; opacity: .35;
  animation: swell 38s linear infinite; }
#sky .wave.w1 { top: 8%; }
#sky .wave.w2 { top: 30%; animation-duration: 52s; animation-direction: reverse; opacity: .25; }
#sky .wave.w3 { top: 58%; animation-duration: 70s; opacity: .18; }
@keyframes swell { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { #sky .wave { animation: none; } }

/* ---------- Coquille de l'application ---------- */
#app { position: relative; z-index: 1; min-height: 100%; }
.shell { min-height: 100vh; min-height: 100dvh; padding-top: calc(var(--top-h) + env(safe-area-inset-top)); padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
.topbar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; gap: 12px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); }
.topbar .back { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; margin-left: -6px; }
.topbar .back:hover { background: var(--hover); }
.topbar h1 { font: 800 21px/1.1 var(--font-display); letter-spacing: -.015em; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .mark { width: 34px; height: 34px; flex: none; }
.content { max-width: 1120px; margin: 0 auto; padding: 18px var(--pad) 24px; }
.view-enter { animation: viewIn .38s var(--ease) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .view-enter { animation: none; } }

.avatar { --c: var(--lagoon); width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 28%, transparent); color: var(--text); border: 2px solid var(--c);
  font: 700 15px/1 var(--font-display); text-transform: uppercase; cursor: pointer; position: relative; padding: 0; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; border-width: 1.5px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; border-width: 3px; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--glass-2); }

/* Navigation du bas (téléphone) */
.tabbar { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 64px; border-radius: 24px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px;
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tab { position: relative; height: 56px; border: 0; background: none; border-radius: 18px; display: grid; place-items: center; align-content: center; gap: 2px;
  font-size: 11.5px; font-weight: 600; color: var(--text-2); cursor: pointer; text-decoration: none; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--text); }
.tab.on::before { content: ''; position: absolute; inset: 4px 10px; border-radius: 16px; background: var(--hover); z-index: -1; }
.tab .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.tab.plus { width: 58px; height: 58px; margin: -26px auto 0; border-radius: 22px; background: var(--lagoon); color: var(--on-accent);
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--lagoon) 80%, black), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .2s var(--spring); }
.tab.plus svg { width: 28px; height: 28px; }
.tab.plus:active { transform: scale(.92); }

/* Menu latéral (ordinateur) */
.sidenav { display: none; }
@media (min-width: 960px) {
  .shell { padding-left: 264px; padding-bottom: 24px; }
  .topbar { left: 264px; }
  .tabbar { display: none; }
  .sidenav { display: flex; flex-direction: column; position: fixed; z-index: 25; top: 0; bottom: 0; left: 0; width: 264px; padding: 18px 14px;
    background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-right: 1px solid var(--line); overflow-y: auto; }
  .sidenav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
  .sidenav .brand .mark { width: 38px; height: 38px; }
  .sidenav .brand b { font: 800 17px/1.1 var(--font-display); }
  .sidenav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--text-2); font-weight: 600; }
  .sidenav a svg { width: 21px; height: 21px; flex: none; }
  .sidenav a:hover { background: var(--hover); color: var(--text); }
  .sidenav a.on { background: var(--hover); color: var(--text); box-shadow: inset 3px 0 0 var(--lagoon); }
  .sidenav .grp { margin: 14px 12px 4px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
  .sidenav .badge { margin-left: auto; }
}

/* ---------- Surfaces ---------- */
.panel { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel.pad { padding: 16px; }
.panel.flat { box-shadow: none; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 2px 10px; }
.section-title:first-child { margin-top: 4px; }
.section-title h2 { margin: 0; font: 800 19px/1.2 var(--font-display); letter-spacing: -.015em; }
.link svg { width: 17px; height: 17px; vertical-align: -3px; }
.li > svg { flex: none; color: var(--text-3); }
.link { font-size: 14.5px; font-weight: 600; color: var(--lagoon); background: none; border: 0; cursor: pointer; padding: 0; text-decoration: none; font-family: inherit; }
.section-title .link svg { width: 17px; height: 17px; vertical-align: -3px; }
.li > svg { flex: none; color: var(--text-3); }
.link { font-size: 14.5px; font-weight: 600; color: var(--lagoon); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 4px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > .li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); min-height: 60px; }
.list > :first-child { border-top: 0; }
.list .li-btn { cursor: pointer; }
.list .li-btn:hover { background: var(--hover); }
.list .li-main { flex: 1; min-width: 0; }
.list .li-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .li-sub { display: block; font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .amt { font: 700 16px/1.2 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ic-bubble { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--glass-3); color: var(--text-2); }
.ic-bubble svg { width: 22px; height: 22px; }
.ic-bubble.tint { background: color-mix(in srgb, var(--c, var(--lagoon)) 20%, transparent); color: var(--c, var(--lagoon)); }
.empty { text-align: center; padding: 30px 20px; color: var(--text-2); }
.empty svg { width: 34px; height: 34px; opacity: .6; margin: 0 auto 8px; display: block; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--text-2); font-size: 14.5px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- Boutons ---------- */
.btn { --c: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 15px;
  border: 1px solid var(--line-2); background: var(--glass-3); color: var(--text); font-weight: 700; font-size: 15.5px; cursor: pointer; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s; user-select: none; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--lagoon); border-color: transparent; color: var(--on-accent); box-shadow: 0 10px 24px -14px var(--lagoon), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.warm { background: var(--mango); border-color: transparent; color: #2b1a00; }
.btn.danger { background: color-mix(in srgb, var(--bissap) 16%, transparent); border-color: color-mix(in srgb, var(--bissap) 55%, transparent); color: var(--text); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.lg { min-height: 56px; font-size: 17px; border-radius: 18px; padding: 0 22px; }
.btn.sm { min-height: 38px; padding: 0 13px; font-size: 14.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 46px; padding: 0; }
.btn.icon.sm { width: 38px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--text) transparent var(--text) transparent; animation: spin .7s linear infinite; }
.btn.primary.loading::after { border-color: var(--on-accent) transparent var(--on-accent) transparent; }
@keyframes spin { to { transform: rotate(1turn); } }

.chip { --c: var(--stone); display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 13.5px; font-weight: 700;
  background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); white-space: nowrap; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.chip.plain::before { display: none; }
.chip svg { width: 15px; height: 15px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bissap); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.c-libre { --c: var(--lagoon); } .c-arrivee, .c-retard { --c: var(--mango); } .c-reservee { --c: var(--atlantic); }
.c-occupee { --c: var(--bissap); } .c-depart { --c: var(--coral); } .c-tardif { --c: var(--late); } .c-hors_service { --c: var(--stone); }
.c-prete { --c: var(--ok); } .c-a_preparer { --c: var(--mango); } .c-en_cours { --c: var(--atlantic); }
.c-ouverte { --c: var(--atlantic); } .c-emise { --c: var(--mango); } .c-payee { --c: var(--ok); } .c-annulee { --c: var(--stone); }
.c-ouvert { --c: var(--bissap); } .c-resolu { --c: var(--ok); }

/* Choix (pastilles cliquables) */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 42px; padding: 0 15px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--glass-3); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.pick svg { width: 18px; height: 18px; }
.pick[aria-pressed="true"], .pick.on { background: color-mix(in srgb, var(--lagoon) 24%, transparent); border-color: var(--lagoon); box-shadow: inset 0 0 0 1px var(--lagoon); }
.pick[disabled] { opacity: .45; cursor: not-allowed; }

/* Contrôle segmenté (états du ménage) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--glass-3); border: 1px solid var(--line); }
.seg button { min-height: 46px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; font-size: 14.5px; color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .25s var(--ease), color .2s; padding: 0 6px; }
.seg button svg { width: 18px; height: 18px; }
.seg button.on { color: var(--text); background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 0 0 1.5px var(--c); }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 16px; }
.field textarea { min-height: 90px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field select option { color: #0b2a33; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lagoon) 30%, transparent); }
.field.auto input, .field.auto select { border-color: color-mix(in srgb, var(--lagoon) 70%, transparent); background: color-mix(in srgb, var(--lagoon) 10%, var(--input)); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.money-input { font: 700 30px/1 var(--font-display) !important; text-align: center; min-height: 66px !important; letter-spacing: .01em; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--input); min-height: 50px; }
.stepper button { width: 50px; align-self: stretch; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--hover); }
.stepper output { flex: 1; text-align: center; font: 700 19px/1 var(--font-display); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; cursor: pointer; }
.switch input { appearance: none; width: 52px; height: 32px; border-radius: 99px; background: var(--glass-3); border: 1px solid var(--line-2); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s var(--spring); }
.switch input:checked { background: var(--lagoon); border-color: var(--lagoon); }
.switch input:checked::after { transform: translateX(20px); }
.switch .txt b { display: block; font-weight: 600; }
.switch .txt small { color: var(--text-2); font-size: 13.5px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-3); }
.search input { padding-left: 44px !important; }

/* ---------- Feuilles (bas d'écran) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(3, 14, 20, .5); animation: fadeIn .25s both; }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column;
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .5); animation: sheetUp .42s var(--spring) both; }
.sheet.full { height: 94vh; height: 94dvh; }
.sheet-head { padding: 10px 18px 10px; display: flex; align-items: center; gap: 10px; flex: none; }
.sheet-head .grip { position: absolute; top: 7px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 9px; background: var(--line-2); }
.sheet-head h3 { margin: 12px 0 0; font: 700 21px/1.2 var(--font-display); flex: 1; min-width: 0; }
.sheet-head .sub { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.sheet-head .x { width: 42px; height: 42px; margin-top: 8px; border-radius: 50%; border: 0; background: var(--glass-3); cursor: pointer; display: grid; place-items: center; flex: none; }
.sheet-body { padding: 6px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; display: flex; gap: 10px; }
.sheet-foot > .btn { flex: 1; }
.sheet-wrap.closing .sheet { animation: sheetDown .26s var(--ease) both; }
.sheet-wrap.closing .sheet-back { animation: fadeOut .26s both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 20px; }
  .sheet { border-radius: var(--r-xl); border-bottom: 1px solid var(--line); max-height: 88vh; animation: popIn .32s var(--spring) both; }
  .sheet.full { height: 88vh; }
  .sheet-wrap.closing .sheet { animation: popOut .2s var(--ease) both; }
  .sheet-head .grip { display: none; }
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes popOut { to { opacity: 0; transform: scale(.96); } }

/* Message éphémère */
.toasts { position: fixed; z-index: 200; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 10px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; font-weight: 600;
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); animation: toastIn .4s var(--spring) both; cursor: pointer; }
.toast svg { width: 22px; height: 22px; flex: none; }
.toast.ok svg { color: var(--ok); } .toast.err { border-color: color-mix(in srgb, var(--bissap) 60%, transparent); } .toast.err svg { color: var(--bissap); }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* Chargement */
.skel { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--glass-3), var(--hover), var(--glass-3)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loader { display: grid; place-items: center; padding: 50px; }
.loader i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--lagoon); animation: spin .8s linear infinite; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.login-box { width: 100%; max-width: 400px; display: grid; gap: 22px; }
.login-brand { text-align: center; display: grid; justify-items: center; gap: 10px; }
.login-brand .mark { width: 92px; height: 92px; animation: rise 1.1s var(--spring) both; }
.login-brand h1 { margin: 0; font: 800 34px/1 var(--font-display); letter-spacing: -.02em; animation: viewIn .7s .35s var(--ease) both; text-wrap: balance; }
.login-brand p { margin: 0; color: var(--text-2); animation: viewIn .7s .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.8); } }
.login-card { padding: 20px; animation: viewIn .6s .6s var(--ease) both; }
.who { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 4px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-3); transition: background .15s, transform .2s var(--spring), border-color .15s; }
.pin-dots i.on { background: var(--lagoon); border-color: var(--lagoon); transform: scale(1.12); }
.pin-dots.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 62px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass-3); font: 700 26px/1 var(--font-display); cursor: pointer; transition: transform .1s, background .15s; }
.keypad button:active { transform: scale(.94); background: var(--hover); }
.keypad button.fn { font: 600 15px/1 var(--font-ui); color: var(--text-2); background: transparent; border-color: transparent; }
.keypad button svg { width: 26px; height: 26px; margin: auto; }
.login .err { text-align: center; color: var(--text); font-weight: 600; min-height: 24px; }
.login .err.bad { color: color-mix(in srgb, var(--bissap) 70%, var(--text)); }

/* ---------- Accueil ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 2px 16px; }
.hello h2 { margin: 0; font: 800 clamp(28px, 7vw, 40px)/1.02 var(--font-display); letter-spacing: -.025em; }
.hello .when { color: var(--text-2); font-weight: 600; margin-top: 6px; }
.hello .clock { font: 700 34px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick button, .quick a { --c: var(--lagoon); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px; min-height: 104px; padding: 14px;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  text-align: left; font-weight: 700; font-size: 15.5px; line-height: 1.25; cursor: pointer; text-decoration: none; transition: transform .15s var(--ease); }
.quick button:active, .quick a:active { transform: scale(.97); }
.quick .ic-bubble { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.strip a { text-decoration: none; display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.strip .n { --c: var(--lagoon); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 20px/1 var(--font-display);
  background: color-mix(in srgb, var(--c) 26%, transparent); box-shadow: inset 0 0 0 2px var(--c); }
.strip small { font-size: 11.5px; font-weight: 700; color: var(--text-2); text-align: center; line-height: 1.15; }
.banner { --c: var(--mango); display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--c) 18%, var(--glass));
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); margin-bottom: 12px; }
.banner svg { width: 24px; height: 24px; flex: none; color: var(--c); margin-top: 2px; }
.banner b { display: block; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; }
.stat .v { font: 800 26px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .l { color: var(--text-2); font-size: 14px; font-weight: 600; }

/* ---------- Chambres ---------- */
.daynav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.daynav .d { flex: 1; text-align: center; font: 700 17px/1.2 var(--font-display); }
.daynav .d small { display: block; font: 600 13px/1.3 var(--font-ui); color: var(--text-2); }
.rooms { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.room { --c: var(--lagoon); position: relative; overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: transform .2s var(--ease), border-color .4s; }
.room::before { content: ''; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent); transition: background .5s; pointer-events: none; }
.room:active { transform: scale(.99); }
.room-head { display: flex; gap: 14px; align-items: center; position: relative; }
.porthole { width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 28px/1 var(--font-display);
  background: color-mix(in srgb, var(--c) 24%, transparent); box-shadow: inset 0 0 0 2.5px var(--c), 0 8px 22px -12px var(--c); transition: background .5s, box-shadow .5s; }
.room-name { font: 700 18px/1.2 var(--font-display); }
.room-guest { color: var(--text-2); font-size: 14.5px; margin-top: 2px; }
.room-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.room .acts { display: grid; gap: 8px; position: relative; margin-top: auto; }
.room .seg button svg { display: none; }
.room .acts .btn-row > .btn { flex-basis: 120px; }
@media (max-width: 440px) { .room .seg button { font-size: 14px; } }
.room.flash { animation: flash .9s var(--ease); }
@keyframes flash { 30% { box-shadow: 0 0 0 3px var(--c), var(--shadow); } }
.next-line { font-size: 13.5px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.next-line svg { width: 16px; height: 16px; }

/* Planning */
.planning { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan { display: grid; grid-template-columns: 96px repeat(var(--days), minmax(46px, 1fr)); min-width: calc(96px + var(--days) * 46px); }
.plan .hd { padding: 8px 2px; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-2); border-bottom: 1px solid var(--line); line-height: 1.15; }
.plan .hd.today { color: var(--text); background: color-mix(in srgb, var(--lagoon) 16%, transparent); border-radius: 10px 10px 0 0; }
.plan .hd b { display: block; font: 800 16px/1.1 var(--font-display); color: var(--text); }
.plan .rn { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; padding: 0 10px; font: 700 14px/1.1 var(--font-display); background: var(--glass-2); border-bottom: 1px solid var(--line); min-height: 54px; }
.plan .cell { border-bottom: 1px solid var(--line); border-left: 1px dashed var(--line); min-height: 54px; }
.plan .bar { --c: var(--atlantic); align-self: center; height: 38px; margin: 0 3px; border-radius: 12px; padding: 0 10px; display: flex; align-items: center; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--c) 34%, transparent); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; z-index: 1; }
.plan .bar.arrive { --c: var(--bissap); } .plan .bar.reservee { --c: var(--atlantic); } .plan .bar.parti { --c: var(--stone); }

/* ---------- Caisse et commandes ---------- */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats .pick { flex: none; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.item-tile { position: relative; min-height: 96px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass-3); text-align: left; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; transition: transform .12s var(--ease), background .2s, border-color .2s; user-select: none; }
.item-tile b { font-weight: 700; line-height: 1.2; }
.item-tile .p { font: 700 15px/1 var(--font-display); color: var(--text-2); font-variant-numeric: tabular-nums; }
.item-tile:active { transform: scale(.95); }
.item-tile.has { border-color: var(--lagoon); background: color-mix(in srgb, var(--lagoon) 16%, transparent); }
.item-tile .q { position: absolute; top: -8px; right: -6px; min-width: 30px; height: 30px; border-radius: 99px; background: var(--lagoon); color: var(--on-accent);
  font: 800 15px/30px var(--font-display); text-align: center; padding: 0 8px; box-shadow: 0 6px 14px -6px var(--lagoon); animation: pop .3s var(--spring); }
.item-tile .minus { position: absolute; bottom: 8px; right: 8px; width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--glass-2); display: grid; place-items: center; }
.item-tile .minus svg { width: 18px; height: 18px; }
@keyframes pop { from { transform: scale(.4); } }
.cartbar { display: flex; align-items: center; gap: 12px; }
.cartbar .tot { font: 800 24px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.lines .li { min-height: 56px; padding: 10px 14px; }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 12px; }
.qty button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.qty button svg { width: 16px; height: 16px; }
.qty output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals { display: grid; gap: 6px; padding: 14px 16px; }
.totals .row { justify-content: space-between; }
.totals .big { font: 800 24px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.methods .pick { justify-content: center; min-height: 54px; }
.success { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 20px 10px 6px; }
.success .seal { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 22%, transparent); box-shadow: inset 0 0 0 3px var(--ok); animation: pop .5s var(--spring); }
.success .seal svg { width: 44px; height: 44px; color: var(--ok); stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s var(--ease) forwards; }
.success h4 { margin: 4px 0 0; font: 800 24px/1.15 var(--font-display); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Caisse (comptabilité) ---------- */
.hero-balance { padding: 18px; position: relative; overflow: hidden; }
.hero-balance .l { color: var(--text-2); font-weight: 600; }
.hero-balance .v { font: 800 clamp(34px, 9vw, 48px)/1.05 var(--font-display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.hero-balance .v.neg { color: color-mix(in srgb, var(--bissap) 70%, var(--text)); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex: none; min-height: 42px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); font-weight: 700; color: var(--text-2); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.tabs .on { color: var(--text); border-color: var(--lagoon); box-shadow: inset 0 0 0 1px var(--lagoon); }
.day-head { padding: 10px 16px 6px; font-size: 13.5px; font-weight: 700; color: var(--text-2); display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.day-head:first-child { border-top: 0; }
.plus-amt { color: var(--ok); } .minus-amt { color: color-mix(in srgb, var(--bissap) 75%, var(--text)); }
.bars { display: grid; gap: 10px; }
.bars .b { display: grid; gap: 4px; }
.bars .track { height: 10px; border-radius: 99px; background: var(--glass-3); overflow: hidden; }
.bars .fill { height: 100%; border-radius: 99px; background: var(--c, var(--lagoon)); transform-origin: left; animation: grow .8s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Messagerie ---------- */
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 90px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); align-self: flex-start; white-space: pre-wrap; word-break: break-word; animation: viewIn .25s var(--ease) both; }
.msg.me { align-self: flex-end; background: color-mix(in srgb, var(--lagoon) 30%, var(--glass)); border-color: color-mix(in srgb, var(--lagoon) 50%, transparent); border-bottom-right-radius: 6px; }
.msg:not(.me) { border-bottom-left-radius: 6px; }
.msg .who { font-size: 12.5px; font-weight: 700; color: var(--c, var(--text-2)); margin-bottom: 2px; }
.msg time { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 3px; text-align: right; }
.chat .sep { align-self: center; font-size: 12.5px; font-weight: 700; color: var(--text-2); padding: 4px 12px; border-radius: 99px; background: var(--glass); margin: 8px 0; }
.composer { position: fixed; z-index: 35; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 8px; border-radius: 24px;
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; padding: 11px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--input); resize: none; }
.composer .btn { width: 46px; padding: 0; border-radius: 16px; }
.in-chat .tabbar { display: none; }
@media (min-width: 960px) { .composer { left: calc(264px + 20px); right: 20px; max-width: 1080px; margin: 0 auto; } }

/* ---------- Pièces d'identité ---------- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot { position: relative; aspect-ratio: 1.45; border-radius: 18px; border: 2px dashed var(--line-2); background: var(--glass-3); display: grid; place-items: center; text-align: center;
  cursor: pointer; overflow: hidden; padding: 8px; font-weight: 700; }
.shot svg { width: 30px; height: 30px; margin: 0 auto 6px; color: var(--lagoon); }
.shot small { display: block; font-weight: 600; color: var(--text-2); font-size: 12.5px; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot.has { border-style: solid; border-color: var(--lagoon); }
.shot .lbl { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
.scanning { position: relative; border-radius: 18px; overflow: hidden; }
.scanning img { width: 100%; max-height: 46vh; object-fit: contain; background: #000; }
.scanning::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: var(--lagoon); box-shadow: 0 0 18px 6px color-mix(in srgb, var(--lagoon) 70%, transparent); animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 4%; } to { top: 94%; } }
.doc-thumb { width: 56px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--glass-3); flex: none; }
.notice { --c: var(--atlantic); display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); font-size: 14.5px; }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--c); margin-top: 1px; }
.notice.ok { --c: var(--ok); } .notice.warn { --c: var(--mango); } .notice.bad { --c: var(--bissap); }

/* Équipe */
.perm-group { margin-top: 14px; }
.perm-group h4 { margin: 0 0 4px; font-size: 14px; color: var(--text-2); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.colors button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; background: var(--c); cursor: pointer; }
.colors button.on { border-color: var(--text); }
.bigcode { font: 800 46px/1 var(--font-display); letter-spacing: .14em; text-align: center; padding: 18px; border-radius: 18px; background: var(--glass-3); border: 1px dashed var(--line-2); font-variant-numeric: tabular-nums; }

@media print { #sky, .tabbar, .topbar, .sidenav { display: none !important; } }
