/* Stych créneaux, même langage que Clôture et Colis : un instrument plutôt qu'une vitrine.
   Monochrome graphite, chiffres en Geist Mono, une seule paire de couleurs porteuse de sens
   (libre / problème). Rayons : surfaces 20 px, petits éléments 12 px, tout ce qui se touche en pilule.
   Sombre par défaut, thème clair au choix. Aucun backdrop-filter : fluidité mobile. */

@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0b0c0e; --surface: #131417; --surface-2: #1a1b1f; --surface-3: #24262b;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12);
  --ink: #ededee; --ink-2: #a3a5ab; --ink-3: #7d8088;
  --gain: #22a891; --loss: #e55c38;
  --gain-ink: #3fc7ad; --loss-ink: #f27a58;
  --cta: #ededee; --cta-ink: #0b0c0e;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f3f4; --surface: #ffffff; --surface-2: #f0f0f2; --surface-3: #e4e4e8;
  --line: rgba(17, 18, 20, .08); --line-2: rgba(17, 18, 20, .14);
  --ink: #111214; --ink-2: #4f5157; --ink-3: #6d7076;
  --gain: #0f8f7c; --loss: #d1492a;
  --gain-ink: #0b7a69; --loss-ink: #b83d21;
  --cta: #111214; --cta-ink: #f3f3f4;
  --shadow: 0 12px 32px rgba(17, 18, 20, .12);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden; overscroll-behavior-y: contain;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; text-align: inherit; }
button:active:not(:disabled), a:active { transform: scale(.97); }
svg { display: block; flex: none; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.app { max-width: 560px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px 32px; }
body.has-nav .app { padding-bottom: calc(env(safe-area-inset-bottom) + 120px); }

/* ---------- En-tête ---------- */
.top { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { font-weight: 650; font-size: 19px; letter-spacing: -.03em; }
.top-r { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: transform .15s, color .2s;
}
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chiffre clé ---------- */
.hero { margin: 22px 0 6px; }
.hero-lbl { font-size: 13px; color: var(--ink-3); }
.hero-num { font: 600 clamp(48px, 15vw, 72px)/1.02 var(--mono); letter-spacing: -.05em; margin: 6px 0 10px; }
.hero-sub { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.sync { display: inline-flex; align-items: center; gap: 7px; }
.sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.sync-ok::before { background: var(--gain); box-shadow: 0 0 0 3px color-mix(in oklab, var(--gain) 25%, transparent); }
.sync-bad::before { background: var(--loss); }
.hero.enter { animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; height: 36px; padding: 0 14px 0 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; font-weight: 500;
  transition: transform .15s;
}
.pill svg { width: 15px; height: 15px; color: var(--ink-2); }

/* ---------- Boutons, champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap;
  color: var(--ink-2); border: 1px solid var(--line-2); background: none;
  transition: transform .15s, color .2s, background .2s;
}
.btn:hover { color: var(--ink); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--cta); color: var(--cta-ink); border-color: transparent; font-weight: 600; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; height: 52px; font-size: 15px; }
.btn.plain { border-color: transparent; margin-top: 6px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field-label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin: 0 0 7px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; min-width: 0;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 500 15px var(--font);
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.input.area { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; font: 12.5px/1.45 var(--mono); }
input[type="date"].input { font-family: var(--mono); }
.error { color: var(--loss-ink); font-size: 12px; min-height: 1.4em; margin: 8px 0 10px; }

/* ---------- Bandeaux ---------- */
.notice {
  display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; padding: 12px 12px 12px 14px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13px;
  animation: viewIn .45s var(--ease);
}
.notice-ico { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); flex: none; }
.notice-ico svg { width: 17px; height: 17px; }
.notice-alert .notice-ico { color: var(--loss-ink); }
.notice-txt { flex: 1; min-width: 0; }
.notice-txt b { display: block; font-weight: 600; font-size: 14px; color: var(--ink); }
.notice-txt span { display: block; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }

/* ---------- Titres de groupe ---------- */
.group-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 30px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; letter-spacing: -.01em;
}
.group-title span { font: 500 12px var(--mono); color: var(--ink-3); }

/* ---------- Filtres ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 22px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap;
  color: var(--ink-2); border: 1px solid var(--line-2); transition: background .2s, color .2s, transform .15s;
}
.chip.on { background: var(--cta); color: var(--cta-ink); border-color: transparent; }

/* ---------- Bande de jours ---------- */
.days {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  margin: 14px -16px 0; padding: 4px 16px 6px; scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.dpill {
  position: relative; flex: none; scroll-snap-align: start; width: 60px; padding: 10px 0 9px; border-radius: 20px;
  display: grid; justify-items: center; gap: 1px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: background .25s, color .25s, border-color .25s, transform .15s;
}
.dpill small { font-size: 11px; color: var(--ink-3); }
.dpill b { font-size: 21px; font-weight: 600; letter-spacing: -.04em; color: var(--ink); line-height: 1.15; }
.dpill i {
  position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-style: normal;
  display: grid; place-items: center; font-size: 10px; font-weight: 600; background: var(--surface-3); color: var(--ink); box-shadow: 0 0 0 2px var(--bg);
}
.dpill.on { background: var(--cta); border-color: transparent; }
.dpill.on small, .dpill.on b { color: var(--cta-ink); }
.dpill.on i { background: var(--gain); color: #fff; }

/* ---------- Horaires d'un jour ---------- */
.day-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 26px 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.day-title span { font: 500 12px var(--mono); color: var(--ink-3); }
.period { margin-top: 18px; }
.period-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.period-title span { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  display: grid; gap: 2px; padding: 12px 12px 11px; border-radius: 16px; text-align: left; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: transform .15s, border-color .2s;
}
.tile:hover { border-color: var(--line-2); }
.tile b { font-size: 19px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.tile small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .period:first-of-type { margin-top: 6px; }
.slot-dur { flex: none; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink); }

/* ---------- Calendrier du planning ---------- */
.cal { margin-top: 16px; padding: 14px 12px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.cal-head b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.cal-head .icon-btn { width: 32px; height: 32px; }
.cal-head .icon-btn.back svg { transform: rotate(180deg); }
.cal-head .icon-btn[disabled] { opacity: .35; pointer-events: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--ink-3); padding-bottom: 4px; }
.cday {
  position: relative; aspect-ratio: 1 / 1.08; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 1px;
  font-size: 13.5px; color: var(--ink-3); border: 1px solid transparent; transition: transform .15s, background .2s;
}
.cday.blank { visibility: hidden; }
.cday.past { opacity: .4; }
.cday.has { color: var(--ink); background: var(--surface-2); font-weight: 600; cursor: pointer; }
.cday.has i { font-style: normal; font-size: 10px; font-weight: 500; color: var(--ink-3); }
.cday.in { background: color-mix(in oklab, var(--gain) 16%, var(--surface)); }
.cday.in i { color: var(--gain-ink); }
.cday.today { border-color: var(--ink-3); }
.cday-flag { position: absolute; top: 3px; right: 4px; color: var(--gain-ink); }
.cday-flag svg { width: 11px; height: 11px; }
.legend { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-size: 12px; color: var(--ink-3); }
.legend .sw-in { width: 12px; height: 12px; border-radius: 4px; background: color-mix(in oklab, var(--gain) 30%, var(--surface)); }

/* ---------- Cours réservés ---------- */
.lessons { display: grid; gap: 8px; }
.lesson {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 20px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: transform .15s, border-color .2s;
}
.lesson:hover { border-color: var(--line-2); }
.lesson-date {
  flex: none; width: 54px; padding: 8px 0 7px; border-radius: 14px; display: grid; justify-items: center; gap: 0;
  background: var(--surface-3);
}
.lesson-date small { font-size: 11px; color: var(--ink-3); }
.lesson-date b { font-size: 22px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.lesson-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lesson-time { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.lesson-time small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.lesson-line { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.lesson-line svg { width: 13px; height: 13px; color: var(--ink-3); }
.lesson-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-when { flex: none; align-self: flex-start; font-size: 11.5px; color: var(--ink-3); }

/* ---------- Activité ---------- */
.feed { display: grid; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed-ico { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); flex: none; }
.feed-ico svg { width: 18px; height: 18px; }
.feed-ico.on { background: var(--cta); color: var(--cta-ink); }
.feed-ico.ok { background: color-mix(in oklab, var(--gain) 20%, transparent); color: var(--gain-ink); }
.feed-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.feed-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-3); }
.tag { font: 600 11px var(--font); padding: 2px 8px; border-radius: 999px; background: color-mix(in oklab, var(--gain) 18%, transparent); color: var(--gain-ink); }
.feed-title { font-size: 14px; font-weight: 600; }
.feed-lines { display: grid; gap: 1px; font-size: 12.5px; color: var(--ink-2); }
.feed-lines span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-lines .more { color: var(--ink-3); }

/* ---------- États vides et chargement ---------- */
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 48px 24px; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.empty-ico { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); color: var(--ink-3); margin-bottom: 8px; }
.empty-ico svg { width: 24px; height: 24px; }
.skeleton-page { padding-top: 64px; display: grid; gap: 14px; }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-title { height: 56px; width: 40%; }
.sk-line { height: 13px; width: 70%; margin-bottom: 18px; }
.sk-card { height: 74px; border-radius: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Dock (pilule flottante, l'onglet actif montre son nom) ---------- */
.dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 96%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.tab {
  height: 48px; min-width: 48px; padding: 0 14px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink-3); font-size: 14px; font-weight: 500; transition: background .25s, color .25s, transform .15s;
}
.tab-ico { position: relative; }
.tab-ico svg { width: 21px; height: 21px; }
.tab-lbl { display: none; }
.tab.on { background: var(--surface-3); color: var(--ink); padding: 0 18px 0 16px; }
.tab.on .tab-lbl { display: inline; }
.tab-count {
  position: absolute; top: -7px; left: 13px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; font-style: normal;
  background: var(--cta); color: var(--cta-ink); font-size: 10px; font-weight: 600; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Feuilles ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 40; animation: fade .3s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding-bottom: calc(env(safe-area-inset-bottom) + 22px);
  animation: up .5s var(--ease);
}
.sheet.closing { animation: down .22s ease forwards; }
.scrim.closing { animation: fade .22s ease reverse forwards; }
@keyframes up { from { transform: translateY(105%); } }
@keyframes down { to { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; } }
.grab { position: sticky; top: 0; z-index: 3; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 10px auto -14px; }
.sheet-close { position: sticky; top: 14px; margin: 14px 14px -50px auto; z-index: 2; }
.sheet-pad { padding: 24px 18px 0; }
.sheet-kicker { margin: 0 0 4px; font-size: 13px; color: var(--ink-3); }
.sheet-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; padding-right: 48px; }
.sheet-lead { margin: 8px 0 18px; color: var(--ink-2); font-size: 14px; }
.sheet-title.mono { font: 600 30px var(--mono); letter-spacing: -.04em; }
.sheet-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }

/* Feuille créneau */
.facts { margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 20px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.facts > div { background: var(--bg); padding: 12px 14px; min-width: 0; }
.facts > div:last-child:nth-child(odd) { grid-column: span 2; }
.facts dt { font-size: 12px; color: var(--ink-3); }
.facts dd { margin: 3px 0 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.facts dd small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
#book-zone { margin-top: 18px; display: grid; gap: 10px; }
#book-zone .error { margin: 0; min-height: 0; font-size: 13px; }
.wallet { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.wallet svg { width: 15px; height: 15px; color: var(--ink-3); }
.wallet b { color: var(--ink); font-weight: 600; }
.confirm { padding: 16px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line-2); display: grid; gap: 6px; animation: viewIn .35s var(--ease); }
.confirm p { font-size: 14px; color: var(--ink-2); }
.confirm p b { color: var(--ink); font-weight: 600; }
.confirm .actions { margin-top: 10px; }
.booked { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 0 0; animation: viewIn .45s var(--ease); }
.booked-ico { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in oklab, var(--gain) 20%, transparent); color: var(--gain-ink); margin-bottom: 4px; }
.booked-ico svg { width: 28px; height: 28px; }
.booked b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.booked span { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.actions .btn { flex: 1; }

/* Réglages */
.settings { display: grid; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting.col { flex-direction: column; align-items: stretch; }
.setting-row { display: flex; align-items: center; gap: 12px; }
.setting-ico { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.setting-ico svg { width: 17px; height: 17px; }
.setting-txt { flex: 1; min-width: 0; display: grid; }
.setting-txt b { font-weight: 600; font-size: 14px; }
.setting-txt span { color: var(--ink-3); font-size: 13px; }

/* Sélecteur d'intervalle */
.seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg button {
  display: grid; justify-items: center; gap: 0; padding: 8px 0 7px; border-radius: 12px; color: var(--ink-3);
  transition: background .25s, color .25s, transform .15s;
}
.seg b { font-size: 16px; font-weight: 600; line-height: 1.1; }
.seg small { font-size: 10.5px; }
.seg button.on { background: var(--cta); color: var(--cta-ink); }
.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.hint.warn { color: var(--loss-ink); }

.guide { counter-reset: g; list-style: none; margin: 0 0 20px; display: grid; gap: 12px; }
.guide li { counter-increment: g; display: flex; gap: 12px; font-size: 14px; color: var(--ink-2); }
.guide li::before { content: counter(g); flex: none; width: 24px; height: 24px; border-radius: 999px; background: var(--surface-3); color: var(--ink); font: 600 12px var(--mono); display: grid; place-items: center; }
.guide b { color: var(--ink); font-weight: 600; }

/* ---------- Connexion (comme l'écran d'accueil de Clôture) ---------- */
.login { min-height: 92dvh; display: grid; place-items: center; align-content: center; text-align: center; padding: 24px 0; animation: viewIn .6s var(--ease); }
.login-brand { font-size: 40px; font-weight: 650; letter-spacing: -.04em; }
.login-tag { color: var(--ink-3); font-size: 14px; margin: 4px 0 34px; max-width: 30ch; }
.login-form { width: 100%; max-width: 360px; text-align: left; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); z-index: 80;
  transform: translate(-50%, 12px); opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .35s var(--ease), visibility .25s;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: 13px;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Apparition au changement d'onglet ---------- */
@media (prefers-reduced-motion: no-preference) {
  #panel.enter .tile, #panel.enter .cal, #panel.enter .lesson, #panel.enter .feed-item {
    animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms);
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }

@media (min-width: 960px) {
  .app { max-width: 720px; padding: 24px 32px 150px; }
  .tab .tab-lbl { display: inline; } .tab { padding: 0 18px 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
