/* 2B Agenda — « Liquid Glass » : verre dépoli flottant, reflets, capsules, fond coloré doux. Clair et sombre. */
:root {
  --bg: #eef0f6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface2: rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.52);
  --glass-strong: rgba(250, 250, 253, 0.8);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-edge: rgba(15, 20, 40, 0.07);
  --glass-hi: inset 0 1px 0.5px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 12px 34px rgba(25, 35, 80, 0.13), 0 2px 6px rgba(25, 35, 80, 0.07);
  --lens: rgba(255, 255, 255, 0.92);
  --label: #0b0b10;
  --label2: rgba(60, 60, 72, 0.64);
  --label3: rgba(60, 60, 72, 0.34);
  --sep: rgba(60, 60, 80, 0.12);
  --sep2: rgba(60, 60, 80, 0.22);
  --fill: rgba(120, 120, 140, 0.13);
  --fill2: rgba(120, 120, 140, 0.07);
  --tint: #ff3b30;
  --red: #ff3b30;
  --green: #34c759;
  --blue: #007aff;
  --ink: #000000;
  --chip: 19%;
  --chip-bg: #ffffff;
  --weekend: rgba(120, 120, 140, 0.035);
  --shadow: 0 30px 80px rgba(20, 30, 70, 0.25), 0 4px 14px rgba(20, 30, 70, 0.1);
  --backdrop: rgba(20, 24, 40, 0.18);
  --hour: 56px;
  --r: 22px;
  --blur: blur(26px) saturate(190%);
  --tabh: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050609;
    --surface: rgba(26, 27, 33, 0.66);
    --surface2: rgba(40, 41, 48, 0.86);
    --glass: rgba(48, 50, 60, 0.42);
    --glass-strong: rgba(30, 31, 38, 0.82);
    --glass-border: rgba(255, 255, 255, 0.13);
    --glass-edge: rgba(0, 0, 0, 0.4);
    --glass-hi: inset 0 1px 0.5px rgba(255, 255, 255, 0.26), inset 0 -1px 1px rgba(255, 255, 255, 0.06), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    --lens: rgba(255, 255, 255, 0.16);
    --label: #ffffff;
    --label2: rgba(235, 235, 245, 0.62);
    --label3: rgba(235, 235, 245, 0.3);
    --sep: rgba(255, 255, 255, 0.09);
    --sep2: rgba(255, 255, 255, 0.17);
    --fill: rgba(130, 130, 150, 0.24);
    --fill2: rgba(130, 130, 150, 0.12);
    --tint: #ff453a;
    --red: #ff453a;
    --green: #30d158;
    --blue: #0a84ff;
    --ink: #ffffff;
    --chip: 34%;
    --chip-bg: #16171c;
    --weekend: rgba(255, 255, 255, 0.02);
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    --backdrop: rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: var(--bg); }
body {
  background: transparent;
  color: var(--label);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  overflow: hidden;
}
/* Fond « liquide » : lueurs colorées qui transparaissent sous le verre */
body::before {
  content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 32% at 12% 8%, rgba(64, 112, 240, 0.32), transparent 70%),
    radial-gradient(34% 30% at 92% 14%, rgba(120, 80, 224, 0.28), transparent 70%),
    radial-gradient(40% 34% at 78% 92%, rgba(255, 92, 140, 0.18), transparent 72%),
    radial-gradient(36% 30% at 8% 88%, rgba(40, 200, 220, 0.16), transparent 72%);
  filter: saturate(115%);
  animation: drift 40s ease-in-out infinite alternate;
}
@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(42% 34% at 12% 6%, rgba(64, 112, 240, 0.42), transparent 70%),
      radial-gradient(38% 32% at 92% 12%, rgba(120, 80, 224, 0.38), transparent 70%),
      radial-gradient(40% 34% at 80% 96%, rgba(255, 60, 120, 0.14), transparent 72%),
      radial-gradient(36% 30% at 6% 90%, rgba(30, 180, 210, 0.12), transparent 72%);
  }
}
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(2%, -2%, 0) scale(1.06); } }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg { flex: none; }
[hidden] { display: none !important; }
.ico { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ico.s { width: 18px; height: 18px; }
.ico.xs { width: 13px; height: 13px; stroke-width: 2.2; }

/* ——— Matière « verre » ——— */
.glass, .g-btn, .seg, .tabbar, .toast, .actions .grp, .sheet, .side, .search, .login-card {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.glass {
  background: var(--glass); border: 0.5px solid var(--glass-border);
  box-shadow: var(--glass-hi), var(--glass-shadow);
}
.card {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--glass-hi), 0 6px 24px rgba(25, 35, 80, 0.07), 0 0 0 0.5px var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
}
@media (prefers-color-scheme: dark) { .card { box-shadow: var(--glass-hi), 0 8px 30px rgba(0, 0, 0, 0.35); } }

/* Boutons capsule en verre */
.g-btn {
  height: 40px; min-width: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--glass); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), 0 4px 14px rgba(25, 35, 80, 0.1);
  font-weight: 600; font-size: 15px; color: var(--label); white-space: nowrap; position: relative; overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.2s;
}
.g-btn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 42%); opacity: 0.6; }
@media (prefers-color-scheme: dark) { .g-btn::after { opacity: 0.18; } }
.g-btn:active { transform: scale(0.92); }
.g-btn.round { padding: 0; width: 40px; }
.g-btn.tinted { background: var(--tint); color: #fff; border-color: rgba(255, 255, 255, 0.35); box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.5), 0 6px 18px color-mix(in srgb, var(--tint) 40%, transparent); }
.g-btn.tinted::after { opacity: 0.35; }
.g-btn.label2 { color: var(--label2); }
.g-btn .ico { width: 20px; height: 20px; }
.g-btn.sm { height: 32px; min-width: 32px; padding: 0 12px; font-size: 13.5px; }
.g-btn.sm.round { width: 32px; padding: 0; }

.btn { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--fill); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1); }
.btn:active { transform: scale(0.95); }
.btn.primary { background: var(--tint); color: #fff; box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.45), 0 6px 18px color-mix(in srgb, var(--tint) 35%, transparent); }
.btn.big { height: 54px; font-size: 17px; justify-content: center; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: default; }
.txt { color: var(--tint); font-size: 17px; height: 44px; padding: 0 6px; display: inline-flex; align-items: center; }
.txt.b { font-weight: 600; }
.txt:disabled { color: var(--label3); }
.ib { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--label2); transition: background 0.2s; }
.ib:hover { background: var(--fill2); }

/* ——— Démarrage / connexion ——— */
.splash { height: 100dvh; display: grid; place-items: center; }
.splash img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 16px 40px rgba(64, 112, 240, 0.35); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.6; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.login { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 18px 24px; }
.login-card {
  width: 100%; max-width: 380px; text-align: center; padding: 34px 24px 26px; border-radius: 34px;
  background: var(--glass); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), var(--glass-shadow);
}
.login-card img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 16px 40px rgba(64, 112, 240, 0.38); }
.login-card h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; margin-top: 18px; }
.login-card p { color: var(--label2); margin-top: 4px; }
.login-card form { margin-top: 26px; display: grid; gap: 12px; }
.code-input {
  width: 100%; height: 58px; border-radius: 18px; border: 0; background: var(--surface2); text-align: center;
  font-size: 26px; letter-spacing: 0.26em; font-variant-numeric: tabular-nums; outline: none; box-shadow: inset 0 0 0 0.5px var(--sep2);
}
.code-input:focus { box-shadow: inset 0 0 0 2px var(--tint); }
.err { color: var(--red); min-height: 20px; font-size: 14px; }

/* ——— Structure ——— */
.shell { display: flex; height: 100dvh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.top { flex: none; position: relative; z-index: 5; padding-top: env(safe-area-inset-top); }
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabh) + 26px + env(safe-area-inset-bottom)); }
.view.fixed { overflow: hidden; display: flex; flex-direction: column; padding: 0 10px calc(var(--tabh) + 22px + env(safe-area-inset-bottom)); }

/* Barre d'onglets flottante */
.tabbar {
  position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 420px); height: var(--tabh); border-radius: 999px; padding: 5px; display: flex; gap: 2px;
  background: var(--glass); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), 0 16px 40px rgba(25, 35, 80, 0.2), 0 2px 8px rgba(25, 35, 80, 0.08);
}
@media (prefers-color-scheme: dark) { .tabbar { box-shadow: var(--glass-hi), 0 16px 40px rgba(0, 0, 0, 0.55); } }
.tabbar::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 40%); opacity: 0.5; }
@media (prefers-color-scheme: dark) { .tabbar::after { opacity: 0.12; } }
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; color: var(--label); position: relative; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.tabbar button:active { transform: scale(0.9); }
.tabbar button.on { color: var(--tint); background: var(--lens); box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.7), 0 3px 10px rgba(25, 35, 80, 0.1); animation: lens 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
@media (prefers-color-scheme: dark) { .tabbar button.on { box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.2); } }
@keyframes lens { from { transform: scale(0.86); opacity: 0.4; } to { transform: none; opacity: 1; } }
.tabbar .ico { width: 24px; height: 24px; }
.badge-n {
  position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
}

/* Barre du haut (téléphone) */
.nav { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 0; gap: 8px; }
.nav .grow { flex: 1; }
.bigtitle { display: flex; align-items: flex-end; justify-content: space-between; padding: 6px 14px 10px 20px; }
.bigtitle h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.bigtitle h1 span { color: var(--tint); font-weight: 700; }
.arrows { display: flex; gap: 6px; }
.seg {
  display: inline-flex; border-radius: 999px; padding: 3px; gap: 2px; position: relative;
  background: var(--glass); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), 0 4px 14px rgba(25, 35, 80, 0.1);
}
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--label); transition: background 0.25s, transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
.seg button:active { transform: scale(0.92); }
.seg button.on { background: var(--lens); color: var(--tint); box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.8), 0 2px 8px rgba(25, 35, 80, 0.12); }
@media (prefers-color-scheme: dark) { .seg button.on { box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.22); } }
.wkhdr { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: var(--label2); text-align: center; padding: 0 14px 6px; font-weight: 600; }
.wkhdr .we { color: var(--label3); }
.searchbar { padding: 0 14px 12px; }
.search {
  display: flex; align-items: center; gap: 7px; height: 44px; border-radius: 999px; padding: 0 16px; color: var(--label2);
  background: var(--glass); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), 0 4px 14px rgba(25, 35, 80, 0.08);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; color: var(--label); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { opacity: 0.5; }
.search input::placeholder { color: var(--label2); }

/* Bandeau de la semaine (vue jour, téléphone) */
.strip { display: grid; grid-template-columns: repeat(7, 1fr); margin: 0 10px 8px; padding: 6px 4px; border-radius: 26px; touch-action: pan-y; }
.strip button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0; border-radius: 18px; }
.strip .l { font-size: 11px; color: var(--label2); font-weight: 600; }
.strip .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
.strip button:active .n { transform: scale(0.88); }
.strip .today .n { color: var(--tint); }
.strip .sel .n { background: var(--label); color: var(--bg); }
.strip .sel.today .n { background: var(--tint); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tint) 45%, transparent); }
.strip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--label3); }
.strip .dot.off { visibility: hidden; }
.daytitle { text-align: center; font-size: 15px; font-weight: 600; padding: 0 0 8px; color: var(--label2); }

/* ——— Mois (téléphone) ——— */
.cmonth { margin: 0 10px; padding: 6px 6px 8px; border-radius: 28px; touch-action: pan-y; }
.cweek { display: grid; grid-template-columns: repeat(7, 1fr); }
.cday { height: 50px; display: flex; flex-direction: column; align-items: center; padding-top: 4px; gap: 3px; border-radius: 16px; }
.cday .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.2s; }
.cday:active .n { transform: scale(0.86); }
.cday.we:not(.other) .n { color: var(--label2); }
.cday.today .n { color: var(--tint); font-weight: 700; }
.cday.sel .n { background: var(--label); color: var(--bg); font-weight: 700; }
.cday.sel.today .n { background: var(--tint); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tint) 45%, transparent); }
.dots { display: flex; gap: 3px; height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.daylist { margin: 12px 10px 0; padding: 4px 0 6px; border-radius: 28px; overflow: hidden; }
.daylist h3 { font-size: 15px; font-weight: 600; padding: 12px 18px 6px; color: var(--label2); }
.daylist h3 b { color: var(--label); font-weight: 700; }
.empty { color: var(--label2); padding: 26px 16px; text-align: center; }
.empty .btn { margin-top: 12px; }
.view > .empty { margin: 8px 10px; border-radius: 28px; background: var(--surface); box-shadow: var(--glass-hi), 0 0 0 0.5px var(--glass-edge); }

/* Lignes d'événements (listes) */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: stretch; gap: 11px; text-align: left; padding: 9px 16px 9px 14px; min-height: 56px; width: 100%; position: relative; transition: background 0.15s; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 72px; right: 14px; border-top: 0.5px solid var(--sep); }
.row:active, .row:hover { background: var(--fill2); }
.row.past { opacity: 0.55; }
.row-time { width: 46px; flex: none; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--label); padding-top: 3px; line-height: 1.3; text-align: right; }
.row-time small { display: block; color: var(--label2); font-size: 12px; font-weight: 500; }
.row-bar { width: 4px; border-radius: 2px; background: var(--c); flex: none; box-shadow: 0 0 8px color-mix(in srgb, var(--c) 45%, transparent); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.row-main b { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--label2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.row .ub { align-self: center; }
.ub {
  width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; font-style: normal;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--u) 70%, #fff) 0%, var(--u) 55%, color-mix(in srgb, var(--u) 80%, #000) 100%);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.5), 0 2px 6px color-mix(in srgb, var(--u) 35%, transparent);
  display: inline-grid; place-items: center; flex: none; line-height: 1;
}
.ub.s { width: 16px; height: 16px; font-size: 8.5px; box-shadow: inset 0 0.5px 0.5px rgba(255, 255, 255, 0.5); }
.ub.l { width: 38px; height: 38px; font-size: 16px; }
.dayhead { padding: 18px 26px 7px; font-size: 13px; font-weight: 700; color: var(--label2); text-transform: uppercase; letter-spacing: 0.03em; }
.dayhead.today { color: var(--tint); }
.list-wrap .rows { margin: 0 10px; border-radius: 24px; overflow: hidden; background: var(--surface); box-shadow: var(--glass-hi), 0 6px 24px rgba(25, 35, 80, 0.06), 0 0 0 0.5px var(--glass-edge); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }

/* ——— Mois (ordinateur) ——— */
.month { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; }
.mhdr { display: grid; grid-template-columns: repeat(7, 1fr); flex: none; border-bottom: 0.5px solid var(--sep); }
.mhdr div { text-align: right; padding: 9px 12px 7px; font-size: 12px; color: var(--label2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.mweeks { flex: 1; min-height: 0; display: grid; }
.mweek { position: relative; border-bottom: 0.5px solid var(--sep); min-height: 0; }
.mweek:last-child { border-bottom: 0; }
.mdays { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.mday { border-right: 0.5px solid var(--sep); padding: 5px 7px; display: flex; justify-content: flex-end; cursor: default; transition: background 0.15s; }
.mday:last-child { border-right: 0; }
.mday:hover { background: var(--fill2); }
.mday.we { background: var(--weekend); }
.mday.other .mnum { color: var(--label3); }
.mday.sel { background: color-mix(in srgb, var(--tint) 7%, transparent); }
.mnum { height: 26px; min-width: 26px; padding: 0 7px; border-radius: 13px; display: grid; place-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mday.today .mnum { background: var(--tint); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tint) 40%, transparent); }
.mitems { position: absolute; left: 0; right: 0; top: 33px; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 21px; row-gap: 1px; pointer-events: none; }
.mitems > * { pointer-events: auto; min-width: 0; }
.mbar {
  margin: 0 5px; padding: 0 6px 0 8px; border-radius: 7px; font-size: 12px; font-weight: 600; line-height: 20px; height: 20px;
  background: color-mix(in srgb, var(--c) var(--chip), var(--chip-bg)); color: color-mix(in srgb, var(--c) 68%, var(--ink));
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; display: flex; align-items: center; gap: 5px;
  transition: filter 0.15s, transform 0.2s;
}
.mbar.solid { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff), var(--c)); color: #fff; box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.45), 0 2px 6px color-mix(in srgb, var(--c) 30%, transparent); }
.mbar.solid .ub { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6); }
.mbar.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mbar.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mbar span, .mpill .n { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.mbar:hover { filter: brightness(1.05) saturate(1.1); }
.mpill {
  margin: 0 5px; padding: 0 6px; height: 20px; border-radius: 7px; font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-align: left; transition: background 0.15s;
}
.mpill:hover { background: var(--fill); }
.mpill.past { opacity: 0.55; }
.mpill .d { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 6px color-mix(in srgb, var(--c) 60%, transparent); }
.mpill .t { color: var(--label2); font-variant-numeric: tabular-nums; flex: none; }
.mmore { margin: 0 5px; padding: 0 7px; font-size: 12px; font-weight: 700; color: var(--label2); text-align: left; border-radius: 7px; }
.mmore:hover { background: var(--fill); color: var(--label); }

/* ——— Semaine / jour (frise horaire) ——— */
.tl { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; }
.tl-head, .tl-allday { display: flex; flex: none; }
.tl-head { border-bottom: 0.5px solid var(--sep); }
.gut { width: 54px; flex: none; }
.tl-days { flex: 1; display: grid; min-width: 0; }
.tl-dh { text-align: center; padding: 7px 0; font-size: 12px; font-weight: 600; color: var(--label2); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; cursor: pointer; text-transform: uppercase; }
.tl-dh b { font-size: 18px; font-weight: 600; color: var(--label); font-variant-numeric: tabular-nums; min-width: 32px; height: 32px; border-radius: 16px; display: inline-grid; place-items: center; padding: 0 4px; text-transform: none; }
.tl-dh.today { color: var(--tint); }
.tl-dh.today b { background: var(--tint); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tint) 40%, transparent); }
.tl-allday { border-bottom: 0.5px solid var(--sep2); max-height: 28vh; overflow-y: auto; }
.tl-allday .gut { font-size: 10.5px; font-weight: 600; color: var(--label2); text-align: right; padding: 6px 8px 0 0; }
.tl-ad { flex: 1; display: grid; grid-auto-rows: 22px; row-gap: 2px; padding: 4px 0; min-width: 0; min-height: 30px; position: relative; }
.tl-ad .mbar { margin: 0 3px; }
.tl-ad .mbar.cl { margin-left: 0; }
.tl-ad .mbar.cr { margin-right: 0; }
.tl-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.tl-grid { display: flex; position: relative; height: calc(var(--hour) * 24 + 20px); padding-top: 10px; }
.tl-hours { width: 54px; flex: none; position: relative; }
.tl-hours span { position: absolute; right: 9px; transform: translateY(-50%); font-size: 11px; font-weight: 500; color: var(--label2); font-variant-numeric: tabular-nums; }
.tl-hours .nowlbl { color: #fff; font-weight: 700; background: var(--tint); padding: 1px 5px; border-radius: 6px; z-index: 2; right: 4px; box-shadow: 0 2px 8px color-mix(in srgb, var(--tint) 40%, transparent); }
.tl-cols { flex: 1; display: grid; position: relative; min-width: 0;
  background-image: linear-gradient(to bottom, var(--sep) 0.5px, transparent 0.5px); background-size: 100% var(--hour); }
.tl-col { position: relative; border-left: 0.5px solid var(--sep); min-width: 0; }
.tl-col.we { background-color: var(--weekend); }
.blk {
  position: absolute; border-radius: 9px; padding: 4px 7px 3px 10px; overflow: hidden; text-align: left; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--c) var(--chip), var(--chip-bg)); color: color-mix(in srgb, var(--c) 70%, var(--ink));
  font-size: 12px; line-height: 1.25; box-shadow: inset 3.5px 0 0 var(--c), inset 0 1px 0.5px rgba(255, 255, 255, 0.45), 0 0 0 1px color-mix(in srgb, var(--chip-bg) 80%, transparent);
  transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), filter 0.15s;
}
.blk:hover { filter: brightness(1.04) saturate(1.1); z-index: 3; }
.blk { container-type: inline-size; }
@container (max-width: 96px) { .blk.tiny span, .blk.tiny .ub { display: none; } .blk.tiny b { padding-right: 0; } }
@container (max-width: 60px) { .blk .ub { display: none; } .blk b { padding-right: 0; } }
.blk:active { transform: scale(0.97); }
.blk b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; padding-right: 16px; }
.blk span { opacity: 0.82; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.tiny { flex-direction: row; gap: 5px; align-items: center; padding-top: 0; padding-bottom: 0; }
.blk.tiny b { -webkit-line-clamp: 1; white-space: nowrap; }
.blk .ub { position: absolute; top: 4px; right: 4px; }
.blk.tiny .ub { top: 50%; transform: translateY(-50%); }
.blk.past { opacity: 0.55; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--tint); z-index: 4; pointer-events: none; box-shadow: 0 0 8px color-mix(in srgb, var(--tint) 60%, transparent); }
.nowline::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--tint); }
.ghost-btn { border-radius: 9px; }
.ghost { position: absolute; border-radius: 9px; background: color-mix(in srgb, var(--tint) 16%, transparent); border: 1.5px dashed var(--tint); pointer-events: none; display: grid; place-items: center; }
.ghost::after { content: '+ Nouvel événement'; color: var(--tint); font-size: 12px; font-weight: 700; }

/* ——— Liste « À venir » ——— */
.list-wrap { padding-bottom: 10px; }
.list-end { color: var(--label3); text-align: center; padding: 24px; font-size: 13px; }

/* ——— Activité ——— */
.acts { margin: 4px 10px 0; border-radius: 26px; overflow: hidden; }
.act { display: flex; gap: 12px; padding: 13px 16px; align-items: flex-start; width: 100%; text-align: left; position: relative; transition: background 0.15s; }
.act + .act::before { content: ''; position: absolute; top: 0; left: 66px; right: 14px; border-top: 0.5px solid var(--sep); }
.act:hover { background: var(--fill2); }
.act .ub { margin-top: 1px; }
.act-main { flex: 1; min-width: 0; }
.act-main p { font-size: 15px; }
.act-main q { font-weight: 700; quotes: '« ' ' »'; }
.act-main small { color: var(--label2); font-size: 13px; display: block; margin-top: 2px; }
.act.new { background: color-mix(in srgb, var(--tint) 8%, transparent); }
.act.new .act-main p::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tint); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 8px var(--tint); }

/* ——— Réglages / formulaires groupés ——— */
.grouped { min-height: 100%; padding: 0 0 20px; }
.gtitle { font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; letter-spacing: 0.03em; padding: 18px 30px 7px; }
.gfoot { font-size: 13px; color: var(--label2); padding: 8px 30px 0; }
.group {
  background: var(--surface); margin: 0 12px; border-radius: var(--r); overflow: hidden;
  box-shadow: var(--glass-hi), 0 6px 24px rgba(25, 35, 80, 0.06), 0 0 0 0.5px var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
}
.cell { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 18px; position: relative; width: 100%; text-align: left; }
.cell + .cell::before, .cell + .sub::before, .sub + .cell::before { content: ''; position: absolute; top: 0; left: 18px; right: 0; border-top: 0.5px solid var(--sep); }
.cell > span:first-child, .cell > label:first-child { flex: 1; min-width: 0; }
.cell .val { color: var(--label2); text-align: right; }
.cell.link { color: var(--tint); font-weight: 600; }
.cell.danger { color: var(--red); justify-content: center; font-weight: 600; }
.cell input[type="text"], .cell input[type="url"], .cell input:not([type]) {
  flex: 1; border: 0; outline: 0; background: none; font-size: 17px; min-width: 0; padding: 14px 0;
}
.cell #f-title { font-size: 19px; font-weight: 600; }
.cell input::placeholder, .cell textarea::placeholder { color: var(--label3); }
.cell textarea { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; resize: none; min-height: 100px; padding: 14px 0; }
.cell select {
  border: 0; outline: 0; background: none; color: var(--label2); font-size: 16px; text-align: right; text-align-last: right;
  -webkit-appearance: none; appearance: none; padding: 12px 18px 12px 0; max-width: 64%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'%3E%3Cpath d='M2 7l4-4 4 4M2 13l4 4 4-4' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: 9px 15px;
}
.cell .pick { display: flex; gap: 6px; }
.cell .pick input, .sub select, .sub input[type="time"], .sub input[type="number"], .sub input[type="date"], .cell input[type="number"] {
  border: 0; outline: 0; border-radius: 10px; background: var(--fill); padding: 7px 11px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums;
  min-width: 0; -webkit-appearance: none; appearance: none; color: var(--label);
}
.cell .pick input[type="date"] { width: 8.4em; }
.cell .pick input[type="time"] { width: 4.6em; }
.cell .pick input::-webkit-calendar-picker-indicator, .sub input::-webkit-calendar-picker-indicator { display: none; }
.cell .pick input::-webkit-datetime-edit, .sub input::-webkit-datetime-edit { padding: 0; }
input[type="date"], input[type="time"] { cursor: pointer; text-align: center; }
.cell .pick input.bad { color: var(--red); text-decoration: line-through; }
.sub { padding: 10px 18px 13px; position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sub input[type="number"], .cell input[type="number"] { width: 66px; text-align: center; }
.sub .lbl { color: var(--label2); font-size: 15px; }
.toggle { position: relative; width: 52px; height: 32px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle i { position: absolute; inset: 0; border-radius: 16px; background: var(--fill); transition: background 0.25s; box-shadow: inset 0 0.5px 1px rgba(0, 0, 0, 0.08); }
.toggle i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16), 0 1px 1px rgba(0, 0, 0, 0.14); transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), width 0.2s; }
.toggle input:active + i::after { width: 34px; }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle input:checked:active + i::after { transform: translateX(14px); }
.colors { display: flex; flex-wrap: wrap; gap: 11px; padding: 14px 18px 16px; }
.colors button {
  width: 32px; height: 32px; border-radius: 50%; position: relative; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--c) 65%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 82%, #000) 100%);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.55), 0 3px 8px color-mix(in srgb, var(--c) 35%, transparent);
}
.colors button:active { transform: scale(0.85); }
.colors button.on { transform: scale(1.08); }
.colors button.on::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--c); }
.wdays { display: flex; gap: 6px; flex-wrap: wrap; }
.wdays button { width: 40px; height: 36px; border-radius: 999px; background: var(--fill); font-size: 13.5px; font-weight: 600; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
.wdays button:active { transform: scale(0.88); }
.wdays button.on { background: var(--tint); color: #fff; box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.45), 0 3px 10px color-mix(in srgb, var(--tint) 35%, transparent); }

/* ——— Feuilles (détail, édition) ——— */
#sheets { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.backdrop { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; transition: opacity 0.3s; pointer-events: auto; }
.sheet {
  position: absolute; left: 6px; right: 6px; bottom: 6px; top: calc(env(safe-area-inset-top) + 14px);
  background: var(--glass-strong); border: 0.5px solid var(--glass-border); border-radius: 34px;
  display: flex; flex-direction: column; pointer-events: auto; overflow: hidden;
  -webkit-backdrop-filter: blur(40px) saturate(190%); backdrop-filter: blur(40px) saturate(190%);
  transform: translateY(108%); transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1); box-shadow: var(--glass-hi), var(--shadow);
}
.sheet .group { background: var(--surface2); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 0.5px var(--glass-edge); }
@media (prefers-color-scheme: dark) { .sheet .group { box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.08); } }
.sheet.in { transform: none; }
.backdrop.in { opacity: 1; }
.sh-head { flex: none; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 0; position: relative; }
.sh-head h2 { position: absolute; left: 100px; right: 100px; text-align: center; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.sh-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; border-radius: 3px; background: var(--label3); transform: translateX(-50%); }
.sh-body { flex: 1; overflow-y: auto; padding-bottom: calc(30px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sh-body .group { margin-bottom: 20px; }
.sh-body .gtitle { padding-top: 0; }
@media (min-width: 700px) {
  .sheet {
    top: 50%; bottom: auto; left: 50%; right: auto; width: 560px; max-height: min(88vh, 880px); border-radius: 34px;
    transform: translate(-50%, -46%) scale(0.96); opacity: 0; transition: transform 0.35s cubic-bezier(0.2, 1.2, 0.3, 1), opacity 0.2s ease;
  }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sh-head::before { display: none; }
}

/* Détail d'un événement */
.dt { padding: 4px 22px 6px; }
.dt h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; display: flex; gap: 11px; align-items: baseline; word-break: break-word; line-height: 1.15; }
.dt h2 i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; transform: translateY(-2px); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.dt .loc { color: var(--label2); margin-top: 6px; font-size: 16px; }
.dt .loc a { color: var(--tint); text-decoration: none; font-weight: 600; }
.dt .when { margin-top: 14px; font-size: 17px; line-height: 1.45; font-weight: 600; }
.dt .when span { color: var(--label2); font-weight: 500; }
.dt .rep { color: var(--label2); font-size: 15px; margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.notes { white-space: pre-wrap; padding: 14px 18px; font-size: 16px; word-break: break-word; }
.notes a { color: var(--tint); }
.who { display: flex; gap: 12px; align-items: center; padding: 12px 18px; position: relative; }
.who + .who::before { content: ''; position: absolute; top: 0; left: 68px; right: 0; border-top: 0.5px solid var(--sep); }
.who div { font-size: 14px; color: var(--label2); }
.who b { color: var(--label); font-weight: 700; }

/* Feuille d'actions (choix pour les répétitions) */
.actions { position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); pointer-events: auto; transform: translateY(130%); transition: transform 0.45s cubic-bezier(0.2, 1.1, 0.3, 1); max-width: 440px; margin: 0 auto; }
.actions.in { transform: none; }
@media (min-width: 700px) { .actions { bottom: auto; top: 50%; transform: translateY(-40%) scale(0.95); opacity: 0; transition: transform 0.3s cubic-bezier(0.2, 1.2, 0.3, 1), opacity 0.2s; } .actions.in { transform: translateY(-50%); opacity: 1; } }
.actions .grp { background: var(--glass-strong); border: 0.5px solid var(--glass-border); border-radius: 28px; overflow: hidden; margin-top: 8px; box-shadow: var(--glass-hi), var(--shadow); }
.actions p { text-align: center; color: var(--label2); font-size: 13px; font-weight: 500; padding: 15px 18px; }
.actions button { display: block; width: 100%; height: 56px; font-size: 18px; font-weight: 500; color: var(--blue); border-top: 0.5px solid var(--sep); }
.actions p + button { border-top: 0.5px solid var(--sep); }
.actions .grp > button:first-child { border-top: 0; }
.actions button:active { background: var(--fill2); }
.actions button.red { color: var(--red); }
.actions button.b { font-weight: 700; }
.actions .grp:last-child button { font-weight: 700; }

/* ——— Messages dans la page ——— */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + 22px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast {
  pointer-events: auto; max-width: 440px; width: 100%; display: flex; gap: 11px; align-items: center; padding: 10px 12px 10px 12px; border-radius: 26px;
  background: var(--glass-strong); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), var(--shadow);
  transform: translateY(24px) scale(0.94); opacity: 0; transition: transform 0.45s cubic-bezier(0.2, 1.3, 0.3, 1), opacity 0.3s ease; text-align: left;
}
.toast.in { transform: none; opacity: 1; }
.toast div { flex: 1; min-width: 0; }
.toast b { display: block; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast small { display: block; color: var(--label2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .bell { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(160deg, #ff6b5f, var(--tint)); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.5); }
.offline { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 70; color: var(--label); font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  background: var(--glass-strong); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), var(--glass-shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.offline::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff9f0a; margin-right: 7px; vertical-align: 1px; }

/* ——— Ordinateur ——— */
.side, .tb { display: none; }
@media (min-width: 900px) {
  :root { --hour: 50px; }
  body { font-size: 14px; }
  .shell { padding: 12px; gap: 12px; }
  .tabbar { display: none; }
  .view { padding-bottom: 12px; }
  .view.fixed { padding: 0 0 0; }
  #toasts { bottom: 24px; left: auto; right: 24px; align-items: flex-end; }
  .side {
    display: flex; flex-direction: column; width: 272px; flex: none; border-radius: 30px; padding: 18px 14px 14px; gap: 18px; overflow-y: auto;
    background: var(--glass); border: 0.5px solid var(--glass-border); box-shadow: var(--glass-hi), var(--glass-shadow);
  }
  .brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; padding: 2px 6px; }
  .brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 16px rgba(64, 112, 240, 0.35); }
  .mini-wrap { background: var(--surface); border-radius: 22px; padding: 10px 8px 8px; box-shadow: var(--glass-hi), 0 0 0 0.5px var(--glass-edge); }
  .mini-h { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 8px; font-weight: 700; font-size: 14px; text-transform: capitalize; }
  .mini-h .ib { width: 28px; height: 28px; }
  .mini { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; row-gap: 2px; }
  .mini .wd { color: var(--label2); font-size: 10.5px; font-weight: 700; padding-bottom: 4px; }
  .mini button { height: 29px; width: 29px; margin: 0 auto; border-radius: 50%; font-variant-numeric: tabular-nums; font-weight: 500; position: relative; transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
  .mini button:hover { background: var(--fill); }
  .mini button:active { transform: scale(0.85); }
  .mini button.other { color: var(--label3); }
  .mini button.has::after { content: ''; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--label3); }
  .mini button.inr { background: var(--fill2); }
  .mini button.today { color: var(--tint); font-weight: 800; }
  .mini button.sel { background: var(--label); color: var(--bg); font-weight: 700; }
  .mini button.sel.today { background: var(--tint); color: #fff; }
  .snav { display: flex; flex-direction: column; gap: 2px; }
  .snav button { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 999px; font-weight: 600; text-align: left; position: relative; transition: background 0.2s; }
  .snav button:hover { background: var(--fill2); }
  .snav button.on { background: var(--lens); box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.7), 0 3px 10px rgba(25, 35, 80, 0.08); }
  .snav .ico { color: var(--tint); }
  .snav .badge-n { position: static; margin-left: auto; }
  .stitle { font-size: 11.5px; font-weight: 700; color: var(--label2); padding: 0 12px 6px; text-transform: uppercase; letter-spacing: 0.04em; }
  .cal-row { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 999px; width: 100%; text-align: left; font-weight: 500; }
  .cal-row:hover { background: var(--fill2); }
  .cal-row .box { width: 19px; height: 19px; border-radius: 6px; border: 2px solid var(--u); display: grid; place-items: center; color: #fff; transition: background 0.2s; }
  .cal-row.on .box { background: var(--u); box-shadow: 0 2px 6px color-mix(in srgb, var(--u) 40%, transparent); }
  .cal-row .box svg { opacity: 0; }
  .cal-row.on .box svg { opacity: 1; }
  .up { display: flex; flex-direction: column; gap: 1px; }
  .up button { display: flex; gap: 9px; text-align: left; padding: 7px 12px; border-radius: 14px; }
  .up button:hover { background: var(--fill2); }
  .up .row-bar { width: 3px; }
  .up b { font-weight: 700; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .up small { color: var(--label2); font-size: 12px; display: block; }
  .up div { min-width: 0; flex: 1; }
  .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 2px; border-top: 0.5px solid var(--sep); }
  .me div { flex: 1; font-size: 13px; font-weight: 700; }
  .me small { display: block; color: var(--label2); font-size: 12px; font-weight: 500; }
  .top { padding-top: 0; }
  .tb { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px 8px; gap: 14px; }
  .tb-l, .tb-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .tb h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 6px; }
  .tb h1 span { font-weight: 600; color: var(--label2); }
  .tb .search { width: clamp(150px, 16vw, 240px); height: 40px; }
  .tb-l { flex: 1; }
  .tb .search input { font-size: 14px; }
  .row-main b { font-size: 14.5px; }
  .grouped .group, .grouped .gtitle, .grouped .gfoot { max-width: 660px; margin-left: auto; margin-right: auto; }
  .grouped .gtitle, .grouped .gfoot { padding-left: 18px; padding-right: 18px; }
  .wide-col { max-width: 760px; margin: 0 auto; }
  .list-wrap .rows { margin: 0; }
  .dayhead { padding-left: 16px; }
  .acts { margin: 0 auto; }
  .view > .empty { max-width: 560px; margin: 40px auto; }
}

/* Petites animations de changement de page */
.slide-l { animation: slideL 0.32s cubic-bezier(0.2, 1, 0.3, 1); }
.slide-r { animation: slideR 0.32s cubic-bezier(0.2, 1, 0.3, 1); }
@keyframes slideL { from { transform: translateX(34px); opacity: 0.3; } to { transform: none; opacity: 1; } }
@keyframes slideR { from { transform: translateX(-34px); opacity: 0.3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  body::before, .slide-l, .slide-r, .tabbar button.on { animation: none; }
  .sheet, .backdrop, .toast, .actions { transition: none; }
}
