:root {
  color-scheme: light;
  --page: #e9ebef; --bg: #f5f6f8; --surface: #fff; --surface2: #eceef2; --bubble: #fff; --tabs: #fff;
  --line: rgba(15,17,21,.08); --line2: rgba(15,17,21,.16);
  --text: #0f1115; --muted: #626874; --placeholder: #8b909a;
  --accent: #2563eb; --accent-text: #1d55d0; --accent-soft: rgba(37,99,235,.1); --accent-ink: #fff;
  --calm: #07825c; --red: #d92d3a; --red-ink: #bb1f2c;
  --hero-from: #d7e4ff; --hero-to: #fff; --premium-from: #e4e0ff; --premium-to: #fff;
  --toast-bad: #fff0f1; --toast-good: #e8f8f2; --shadow: 0 1px 3px rgba(15,17,21,.06), 0 6px 18px rgba(15,17,21,.04);
  --av-bg: 30%; --av-fg: 42%; --scrim: rgba(15,17,21,.42);
  --radius: 22px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
[data-theme=dark] {
  color-scheme: dark;
  --page: #000; --bg: #000; --surface: #16171b; --surface2: #25262c; --bubble: #25262c; --tabs: #000;
  --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.15);
  --text: #fff; --muted: #989ba5; --placeholder: #70737c;
  --accent: #3d7bff; --accent-text: #80a9ff; --accent-soft: rgba(61,123,255,.18); --accent-ink: #fff;
  --calm: #38d9a0; --red: #ec3f4c; --red-ink: #ff8f97;
  --hero-from: #233a7d; --hero-to: #17181e; --premium-from: #2b2a6b; --premium-to: #17181e;
  --toast-bad: #2c1619; --toast-good: #10291f; --shadow: none;
  --av-bg: 22%; --av-fg: 100%; --scrim: rgba(0,0,0,.62);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--page); color: var(--text); font: 16px/1.5 Inter, Heebo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
#app { width: 100%; max-width: 480px; height: 100vh; height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); position: relative; overflow: hidden; }
@media (min-width: 520px) { #app { border-inline: 1px solid var(--line); } }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: 30px; font-weight: 700; line-height: 1.14; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3 { letter-spacing: 0; }
.muted { color: var(--muted); font-size: 15px; }
.small { font-size: 13px; }
.lead { margin: 8px 0 24px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; }
svg.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir=rtl] svg.flip { transform: scaleX(-1); }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 18px; min-height: 52px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-align: center; transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: var(--surface2); color: var(--text); }
.btn.sm { display: inline-flex; width: auto; padding: 7px 15px; min-height: 40px; font-size: 14px; flex: none; }
.link { color: var(--accent-text); font-size: 14px; font-weight: 500; flex: none; }
.quiet { color: var(--muted); font-size: 14px; display: block; width: 100%; text-align: center; padding: 10px; min-height: 44px; }

/* Champs : jamais plus larges que leur colonne, quel que soit le navigateur */
.field { display: block; min-width: 0; margin-bottom: 18px; }
.field > span { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 500; color: var(--muted); }
input, select, textarea { display: block; width: 100%; max-width: 100%; min-width: 0; padding: 13px 15px; min-height: 52px; font-size: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line2); outline: none; transition: border-color .15s; -webkit-appearance: none; appearance: none; text-align: start; }
textarea { resize: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input[type=date], input[type=datetime-local] { line-height: 1.4; }
input::-webkit-date-and-time-value { text-align: start; margin: 0; }
select { padding-inline-end: 34px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23878b95' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: right 11px center; }
[dir=rtl] select { background-position: left 11px center; }
option, optgroup { background: var(--surface); color: var(--text); }
input[type=checkbox] { display: block; width: 22px; min-height: 22px; height: 22px; flex: none; accent-color: var(--accent); margin: 1px 0 0; padding: 0; -webkit-appearance: checkbox; appearance: auto; }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr); gap: 8px; }
.date-row select { padding-inline-start: 12px; padding-inline-end: 28px; background-size: 15px; background-position: right 8px center; }
[dir=rtl] .date-row select { background-position: left 8px center; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check > span { min-width: 0; }
.error { color: var(--red-ink); font-size: 14px; margin-top: 12px; }

.screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: calc(16px + var(--safe-t)) 18px 28px; }
.stack > * + * { margin-top: 14px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card { display: block; width: 100%; background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
button.card { transition: opacity .15s; }
button.card:active { opacity: .75; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding-inline: 18px; }
.chips.scroll .chip { flex: none; }
.chip { padding: 8px 15px; min-height: 40px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); font-size: 14px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
span.chip { min-height: 0; padding: 5px 12px; font-size: 13px; border-color: var(--line); }
span.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

.avatar { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 17px; overflow: hidden; background: color-mix(in srgb, var(--c) var(--av-bg), var(--surface)); color: color-mix(in srgb, var(--c) var(--av-fg), var(--text)); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 30px; height: 30px; font-size: 13px; }
.avatar.sm { width: 56px; height: 56px; font-size: 21px; }
.avatar.xl { width: 104px; height: 104px; font-size: 40px; }
.c0 { --c: #f26f62; } .c1 { --c: #ee9f2c; } .c2 { --c: #5fbf4b; } .c3 { --c: #1fb8a0; }
.c4 { --c: #4b8df5; } .c5 { --c: #9270f2; } .c6 { --c: #ec6aaa; } .c7 { --c: #8d93a1; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; max-width: 360px; }
.swatch { aspect-ratio: 1; border-radius: 50%; background: var(--c); border: 3px solid var(--bg); outline: 2px solid transparent; }
.swatch.on { outline-color: var(--text); }
.photo-edit { position: relative; width: 104px; margin: 0 auto 12px; }
.photo-badge { position: absolute; bottom: 0; inset-inline-end: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 3px solid var(--bg); }
.photo-badge svg.icon { width: 17px; height: 17px; }
.photo-hint { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.tabs { display: flex; flex: none; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); background: var(--tabs); }
.tabs button { flex: 1; min-width: 0; padding: 9px 1px 8px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 58px; }
.tabs button.on { color: var(--text); font-weight: 600; }
.tab-icon { position: relative; display: block; height: 22px; }
.badge { position: absolute; top: -5px; inset-inline-end: -11px; min-width: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 17px; text-align: center; font-weight: 700; }

.topbar { display: flex; align-items: center; gap: 11px; padding: calc(9px + var(--safe-t)) 12px 9px; border-bottom: 1px solid var(--line); flex: none; background: var(--tabs); }
.back { width: 42px; height: 42px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; flex: none; }
.topbar b { display: block; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Inscription */
.signup { display: flex; flex-direction: column; min-height: 100%; }
.signup-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 24px; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.lang { font-size: 13px; padding: 7px 13px; min-height: 36px; border-radius: 999px; background: var(--surface2); }
.round { width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; flex: none; }
.round svg.icon { width: 18px; height: 18px; }
.progress { display: flex; gap: 6px; margin-bottom: 24px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface2); }
.progress i.on { background: var(--accent); }
.signup-body { flex: 1; min-width: 0; }
.signup-foot { margin-top: 24px; }
.signup-foot > * + * { margin-top: 8px; }
.hero-mark { width: 72px; height: 72px; border-radius: 24px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 22px; }
.hero-mark svg.icon { width: 36px; height: 36px; }
.features { list-style: none; margin: 24px 0 0; padding: 0; }
.features li { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; }
.features svg.icon { color: var(--accent-text); }

/* Accueil */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.status { background: linear-gradient(150deg, var(--hero-from), var(--hero-to) 78%); padding: 22px 20px; }
.status h2 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
[dir=rtl] .status h2 { letter-spacing: 0; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--calm); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--calm); flex: none; }
.alert-strip { display: flex; align-items: center; gap: 12px; background: var(--red); color: #fff; width: 100%; padding: 16px; border-radius: var(--radius); font-weight: 600; line-height: 1.3; }
.strip { display: flex; gap: 14px; overflow-x: auto; margin-inline: -18px; padding-inline: 18px; }
.strip button { flex: none; width: 62px; text-align: center; font-size: 12px; color: var(--muted); }
.strip .avatar { margin: 0 auto 5px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.steps li + li { margin-top: 12px; }
.steps b { width: 24px; height: 24px; border-radius: 50%; background: var(--surface2); color: var(--text); font-size: 12px; display: grid; place-items: center; flex: none; }

/* Découvrir */
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.person { display: block; width: 100%; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.person-tile { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 46px; font-weight: 600; background: color-mix(in srgb, var(--c) var(--av-bg), var(--surface)); color: color-mix(in srgb, var(--c) var(--av-fg), var(--text)); }
.person-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person-info { padding: 10px 12px 12px; }
.person-info b { display: block; }
.person-sub { color: var(--muted); font-size: 13px; }
.person-info .tag { margin-top: 7px; }

/* Alerte : mêmes couleurs dans les deux thèmes */
.alert-full { position: absolute; inset: 0; z-index: 20; background: radial-gradient(circle at 50% 22%, #e9545a, #a81f27 72%); color: #fff; display: flex; flex-direction: column; padding: calc(28px + var(--safe-t)) 24px calc(24px + var(--safe-b)); overflow-y: auto; }
.alert-center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }
.alert-full h1 { font-size: 36px; }
.alert-full p { font-size: 17px; }
.alert-full .small { font-size: 14px; opacity: .88; }
.alert-ring { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; margin-bottom: 8px; animation: pulse 1.6s ease-out infinite; }
.alert-ring svg.icon { width: 36px; height: 36px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.4); } 100% { box-shadow: 0 0 0 26px rgba(255,255,255,0); } }
.alert-full .btn { background: #fff; color: #8f1a21; flex: none; }
.alert-full .btn.ghost { background: transparent; color: #fff; margin-top: 8px; }
.sim { background: rgba(0,0,0,.28); padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }

/* Discussions */
.chat { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 12px; display: flex; flex-direction: column; }
.line { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; max-width: 86%; }
.line.same { margin-top: 3px; }
.line.me { align-self: flex-end; flex-direction: row-reverse; }
.line .spacer { width: 30px; flex: none; }
.msg { background: var(--bubble); padding: 8px 13px; border-radius: 18px; overflow-wrap: anywhere; min-width: 0; box-shadow: var(--shadow); }
.line.me .msg { background: var(--accent); color: var(--accent-ink); }
.msg .who { display: block; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.msg .who em { font-style: normal; font-weight: 400; color: var(--muted); }
.msg time { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.line.me .msg time { color: rgba(255,255,255,.76); }
.empty { color: var(--muted); text-align: center; padding: 44px 24px; font-size: 15px; margin: auto; }
.empty svg.icon { display: block; width: 34px; height: 34px; margin: 0 auto 12px; }
.composer { display: flex; gap: 8px; padding: 9px 12px calc(9px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; background: var(--tabs); }
.composer input { flex: 1; min-height: 46px; padding-block: 10px; border-radius: 23px; background: var(--surface2); border-color: transparent; }
.composer button { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.toast { position: absolute; inset-inline: 14px; bottom: 80px; z-index: 40; background: var(--toast-bad); border: 1px solid var(--red); padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.toast.good { background: var(--toast-good); border-color: var(--calm); }

/* Salon */
.count { font-variant-numeric: tabular-nums; }
.segments { display: flex; flex: none; border-bottom: 1px solid var(--line); background: var(--tabs); }
.segments button { flex: 1; min-width: 0; padding: 12px 2px; font-size: 14px; color: var(--muted); text-align: center; min-height: 46px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.segments button.on { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.pane { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 12px 18px; }
.bar { height: 4px; border-radius: 2px; background: var(--surface2); overflow: hidden; margin: 10px 0 14px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.quiz-a { display: block; width: 100%; padding: 13px 15px; min-height: 50px; border-radius: 14px; background: var(--surface2); margin-top: 8px; border: 1px solid transparent; }
.quiz-a.good { background: color-mix(in srgb, var(--calm) 16%, var(--surface)); border-color: var(--calm); }
.quiz-a.bad { background: color-mix(in srgb, var(--red) 13%, var(--surface)); border-color: var(--red); }
.score { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; border-top: 1px solid var(--line); }
.score:first-of-type { border-top: 0; }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; background: var(--surface2); }
.photos figcaption { font-size: 12px; color: var(--muted); padding: 5px 2px; display: flex; justify-content: space-between; gap: 6px; }
.linkish { color: var(--muted); font-size: 12px; text-decoration: underline; }
.hidden-input { display: none; }

/* Sorties */
.date-tile { width: 56px; flex: none; text-align: center; background: var(--surface2); border-radius: 16px; padding: 8px 2px; line-height: 1.15; }
.date-tile b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.date-tile span { font-size: 12px; color: var(--muted); }
.outing { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.seats { display: flex; gap: 4px; flex: none; }
.seats i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line2); }
.seats i.on { background: var(--accent); border-color: var(--accent); }
.outing-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.outing-head { flex: none; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--tabs); }
.outing-head > * + * { margin-top: 10px; }

/* Profil */
.profile-hero { text-align: center; padding: 10px 0 4px; }
.profile-hero > .avatar { margin: 0 auto 12px; }
.profile-hero h2 { font-size: 24px; font-weight: 700; }
.profile-hero .bio { margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border-radius: 20px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.list { padding: 0; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; min-height: 54px; color: inherit; text-decoration: none; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.premium { background: linear-gradient(150deg, var(--premium-from), var(--premium-to) 75%); }
.premium ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.premium li { display: flex; gap: 9px; align-items: center; padding: 4px 0; }
.premium svg.icon { width: 17px; height: 17px; color: var(--accent-text); }
.seg-control { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 13px; background: var(--surface2); }
.seg-control button { min-height: 38px; border-radius: 10px; font-size: 13px; text-align: center; color: var(--muted); }
.seg-control button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

/* Recherche et paramètres */
.search-box { position: relative; }
.search-box svg.icon { position: absolute; top: 14px; inset-inline-start: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-box input { padding-inline-start: 44px; min-height: 48px; border-radius: 24px; background: var(--surface2); border-color: transparent; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.block { display: block; }
.center { justify-content: center; }
.link-chip { color: var(--accent-text); text-decoration: none; font-size: 13px; padding: 5px 12px; min-height: 0; border-color: var(--line2); }
.me-top { display: flex; justify-content: flex-end; }
.me-top + .profile-hero { margin-top: -12px; padding-top: 0; }
.card-title { margin-bottom: 10px; }
.group { margin-top: 22px !important; color: var(--muted); font-size: 13px; font-weight: 600; padding-inline: 4px; }
.group:first-child { margin-top: 0 !important; }
.group + .card { margin-top: 8px; }
.hint { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--muted); font-weight: 400; }
.hint.ok { color: var(--calm); }
.hint.bad { color: var(--red-ink); }
.row-value { max-width: 42%; }
svg.dim { width: 16px; height: 16px; color: var(--muted); }
.accent-icon { color: var(--accent-text); }
.danger-text { color: var(--red-ink); }
button.list-row { text-align: start; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.screen.stack > .card.list, .list .list-row > .grow { min-width: 0; }
input.switch { -webkit-appearance: none; appearance: none; position: relative; width: 48px; height: 28px; min-height: 28px; margin: 0; padding: 0; border: 0; border-radius: 14px; background: var(--line2); cursor: pointer; transition: background .15s; flex: none; }
input.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: inset-inline-start .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { inset-inline-start: 23px; }

/* Fenêtres */
.sheet-bg { position: absolute; inset: 0; z-index: 30; background: var(--scrim); display: flex; align-items: flex-end; animation: fade .15s; }
.sheet { width: 100%; min-width: 0; background: var(--surface); border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + var(--safe-b)); max-height: 90%; overflow-y: auto; overflow-x: hidden; animation: rise .2s ease-out; }
.sheet > * + * { margin-top: 12px; }
.sheet input, .sheet select, .sheet textarea { background: var(--bg); }
.sheet .swatch { border-color: var(--surface); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
