/* MSTNSEE — interface tablette */
:root {
  --font: -apple-system, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --txt: #f5f6fa;
  --mut: rgba(235, 238, 248, .62);
  --faint: rgba(235, 238, 248, .38);
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(22, 24, 32, .46);
  --glass-hi: rgba(255, 255, 255, .1);
  --surface: #101218;
  --surface-2: #181b24;
  --surface-3: #222633;
  --acc: #ff5a36;
  --acc-2: #ff8a3d;
  --ok: #34d399;
  --warn: #ffb020;
  --bad: #ff4d5e;
  --s-received: #ffb020;
  --s-preparing: #4c9dff;
  --s-ready: #34d399;
  --s-delivering: #a78bfa;
  --s-delivered: #8b93a7;
  --s-cancelled: #ff4d5e;
  --r: 26px;
  --status-h: 34px;
  --ease: cubic-bezier(.2, .9, .25, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--txt); font-family: var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: var(--txt); user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
.glass { background: var(--glass); backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%); border: 1px solid var(--line); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Fond d'écran ---------- */
#wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.wall-img { position: absolute; inset: -4%; background: #0c0d12 center / cover no-repeat; transition: transform 1.1s var(--ease), filter 1.1s var(--ease), opacity .6s; }
.wall-dim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.05) 30%, rgba(0,0,0,.2) 70%, rgba(0,0,0,.55)); }
body.unlocked .wall-img { transform: scale(1.06); filter: blur(var(--home-blur, 0px)); }
body.app-open .wall-img { filter: blur(22px) brightness(.6); }
.wall-g-nuit { background-image: radial-gradient(1200px 800px at 85% 10%, #3b2a8f 0, transparent 60%), radial-gradient(900px 700px at 10% 90%, #0e5a8a 0, transparent 60%), radial-gradient(700px 500px at 50% 50%, #1b1442 0, transparent 70%), linear-gradient(160deg, #07060f, #0b1022) !important; }
.wall-g-braise { background-image: radial-gradient(1000px 700px at 15% 15%, #ff5a36 0, transparent 55%), radial-gradient(900px 700px at 90% 80%, #b3125a 0, transparent 60%), radial-gradient(600px 500px at 70% 20%, #ff9e3d 0, transparent 60%), linear-gradient(160deg, #1a0606, #12030b) !important; }

/* ---------- Barre d'état ---------- */
#status { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: calc(var(--status-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 22px 0; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.35); pointer-events: none; }
#status > * { pointer-events: auto; }
.st-left { display: flex; gap: 10px; align-items: baseline; min-width: 160px; }
#st-date { color: var(--mut); font-weight: 500; }
body:not(.unlocked) .st-left { visibility: hidden; }
.st-right { display: flex; align-items: center; gap: 12px; min-width: 160px; justify-content: flex-end; padding: 6px 0 6px 12px; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--mut); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,211,153,.18); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(255,77,94,.2); }
.bat { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.bat-b { width: 24px; height: 12px; border: 1.5px solid currentColor; border-radius: 4px; padding: 1.5px; position: relative; opacity: .9; }
.bat-b::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: currentColor; }
.bat-b i { display: block; height: 100%; border-radius: 1.5px; background: currentColor; }
.bat.low .bat-b i { background: var(--bad); }
.bat.chg .bat-b i { background: var(--ok); }
.island { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 4px); transform: translateX(-50%); height: 28px; max-width: 320px; padding: 0 14px 0 10px; border-radius: 999px; background: #000; display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.4); animation: islandIn .5s var(--spring); }
.island-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
@keyframes islandIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--acc-2); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
.eq.paused i { animation: none; transform: scaleY(.3); }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- Écrans ---------- */
.screen { position: fixed; inset: 0; z-index: 10; }

/* Verrouillage */
#lock { z-index: 40; display: flex; flex-direction: column; align-items: center; padding: calc(var(--status-h) + env(safe-area-inset-top) + 2vh) 24px calc(env(safe-area-inset-bottom) + 24px); transition: transform .55s var(--ease), opacity .45s; }
body.unlocked #lock { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.lock-top { text-align: center; margin-top: 2vh; }
.lock-ic { height: 22px; opacity: .9; }
.lock-ic .ic { width: 20px; height: 20px; }
.lock-date { font-size: clamp(18px, 2.4vw, 24px); font-weight: 600; text-transform: capitalize; margin-top: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.lock-time { font-size: clamp(96px, 15vw, 168px); font-weight: 650; line-height: .95; letter-spacing: -.035em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, rgba(255,255,255,.82)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(0,0,0,.35)); }
.lock-weather { margin-top: 8px; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.85); min-height: 20px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.lock-mid { flex: 1; width: min(560px, 100%); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 18px 0; min-height: 0; overflow: hidden; }
.notifs { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.notif { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; animation: notifIn .5s var(--spring) both; cursor: pointer; }
.notif-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--acc-2), var(--acc)); }
.notif-ic .ic { width: 20px; height: 20px; }
.notif-b { flex: 1; min-width: 0; }
.notif-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.notif-t { font-weight: 650; font-size: 15px; margin-top: 2px; }
.notif-s { font-size: 14px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-more { text-align: center; font-size: 13px; color: var(--mut); }
@keyframes notifIn { from { transform: translateY(16px) scale(.96); opacity: 0; } }
.lock-music { border-radius: 24px; padding: 14px; display: grid; grid-template-columns: 64px 1fr; gap: 6px 14px; align-items: center; }
.lock-music .art { width: 64px; height: 64px; border-radius: 12px; background: #222 center / cover; grid-row: span 2; }
.lock-music .lm-t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-music .lm-s { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-music .ctl { grid-column: 1 / -1; justify-content: center; }
.lock-bottom { width: min(420px, 100%); text-align: center; }
.lock-hint { margin: 12px 0 0; font-size: 13px; color: var(--mut); min-height: 18px; }

/* Glisser pour déverrouiller */
.slider { position: relative; height: 68px; border-radius: 999px; padding: 6px; background: rgba(0,0,0,.32); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border: 1px solid rgba(255,255,255,.16); overflow: hidden; touch-action: none; outline: none; }
.slider:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.slider-text { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 50px; font-size: 19px; font-weight: 500; letter-spacing: .01em;
  background: linear-gradient(100deg, rgba(255,255,255,.35) 0 40%, #fff 50%, rgba(255,255,255,.35) 60% 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.6s linear infinite; transition: opacity .2s; pointer-events: none; }
@keyframes shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.slider-knob { position: relative; z-index: 2; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(180deg, #fff, #e6e8ef); box-shadow: 0 4px 14px rgba(0,0,0,.35); display: grid; place-items: center; color: #15171f; cursor: grab; will-change: transform; }
.slider-knob .ic { width: 26px; height: 26px; }
.slider.drag .slider-knob { cursor: grabbing; }
.slider:not(.drag) .slider-knob { transition: transform .45s var(--spring); }
.slider-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(255,90,54,.0), rgba(255,138,61,.35)); border-radius: 999px; pointer-events: none; }
.slider:not(.drag) .slider-fill { transition: width .45s var(--spring); }

/* Code PIN */
.pin { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(0,0,0,.35); backdrop-filter: blur(30px) saturate(140%); -webkit-backdrop-filter: blur(30px) saturate(140%); animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.pin-box { text-align: center; }
.pin-title { font-size: 20px; font-weight: 600; }
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 22px 0 6px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid #fff; transition: background .15s; }
.pin-dots i.on { background: #fff; }
.pin-dots.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-12px); } 40%, 80% { transform: translateX(12px); } }
.pin-err { min-height: 20px; font-size: 14px; color: #ffb4b4; margin-bottom: 14px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 82px); gap: 16px 26px; justify-content: center; }
.pin-pad button { width: 82px; height: 82px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 32px; font-weight: 400; display: grid; place-items: center; line-height: 1; transition: background .12s; }
.pin-pad button small { display: block; font-size: 10px; letter-spacing: .2em; font-weight: 700; opacity: .8; margin-top: 2px; }
.pin-pad button:active { background: rgba(255,255,255,.4); }
.pin-pad button.blank { visibility: hidden; }
.pin-pad button.del { background: none; font-size: 16px; }
.pin-cancel { margin-top: 26px; font-size: 16px; color: var(--mut); padding: 8px 16px; }

/* ---------- Accueil ---------- */
#home { padding: calc(var(--status-h) + env(safe-area-inset-top) + 14px) 28px calc(env(safe-area-inset-bottom) + 18px); display: flex; flex-direction: column; gap: 18px; transform: scale(1.08); opacity: 0; transition: transform .6s var(--ease) .05s, opacity .45s .05s; }
body.unlocked #home { transform: none; opacity: 1; }
body.app-open #home { transform: scale(.93); opacity: .0; transition: transform .45s var(--ease), opacity .3s; }
.widgets { flex: 1; min-height: 0; display: grid; gap: 18px; grid-template-columns: 1fr 1.35fr 1.05fr; grid-template-rows: 1fr 1fr; grid-template-areas: "clock orders music" "stats orders music"; }
.w { border-radius: var(--r); padding: 20px; min-height: 0; min-width: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; text-align: left; box-shadow: 0 10px 40px rgba(0,0,0,.18); transition: transform .2s var(--ease); animation: wIn .7s var(--ease) both; }
body.unlocked .w:nth-child(2) { animation-delay: .04s; } body.unlocked .w:nth-child(3) { animation-delay: .08s; } body.unlocked .w:nth-child(4) { animation-delay: .12s; } body.unlocked .w:nth-child(5) { animation-delay: .16s; }
button.w:active { transform: scale(.98); }
@keyframes wIn { from { transform: translateY(18px); opacity: 0; } }
.w-clock { grid-area: clock; } .w-orders { grid-area: orders; } .w-music { grid-area: music; } .w-stats { grid-area: stats; }
.wc-timers { margin: 14px 0 12px; }
.wt-more { font-size: 13px; color: var(--mut); font-weight: 600; text-align: left; padding: 2px 4px; }
.w-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin-bottom: 12px; }
.w-h .ic { width: 16px; height: 16px; }
.w-h span { display: inline-flex; gap: 8px; align-items: center; }

.wc-time { font-size: clamp(54px, 6.4vw, 84px); font-weight: 300; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.wc-date { margin-top: 8px; font-size: 17px; color: var(--mut); text-transform: capitalize; font-weight: 500; }
.wc-weather { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.w-clock { padding-bottom: 16px; }
.wc-wi .wx { width: 46px; height: 46px; }
.lock-weather .wx { width: 20px; height: 20px; vertical-align: -4px; margin-right: 2px; }
.wc-wt { font-size: 32px; font-weight: 300; }
.wc-ws { font-size: 13px; color: var(--mut); line-height: 1.4; }

.wo-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.wo-c { border-radius: 16px; padding: 10px 12px; background: rgba(255,255,255,.07); }
.wo-c b { display: block; font-size: 28px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wo-c small { font-size: 11.5px; color: var(--mut); font-weight: 600; white-space: nowrap; }
.wo-c.hot { background: rgba(255,176,32,.2); }
.wo-c.hot b { color: var(--s-received); }
.wo-list { display: flex; flex-direction: column; gap: 8px; overflow: hidden; flex: 1; min-height: 0; }
.wo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.06); }
.wo-row .sb { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.wo-row .t { flex: 1; min-width: 0; }
.wo-row .t b { font-size: 15px; } .wo-row .t div { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-row .age { font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; }
.wo-row .age.late { color: var(--bad); font-weight: 700; }
.w-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--mut); font-size: 15px; line-height: 1.5; padding: 10px; }
.w-empty .big { font-size: 34px; display: block; margin-bottom: 4px; }

.wm-art { position: relative; border-radius: 18px; overflow: hidden; background: #0003 center / cover; flex: 1 1 auto; min-height: 120px; max-height: 340px; width: 100%; }
.wm-art.empty { display: grid; place-items: center; background: linear-gradient(135deg, rgba(255,90,54,.4), rgba(167,139,250,.35)); }
.wm-art.empty .ic { width: 42px; height: 42px; opacity: .85; }
.wm-meta { margin-top: 12px; min-width: 0; }
.wm-t { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-s { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.prog { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 10px; }
.prog i { display: block; height: 100%; background: #fff; border-radius: 4px; width: 0; }
.w-music .ctl { margin-top: 8px; justify-content: center; gap: 22px; }
.w-music .ctl button { width: 42px; height: 42px; } .w-music .ctl .play { width: 50px; height: 50px; }
.w-music .wm-meta { margin-top: 10px; }
.w > * { width: 100%; }

.ctl { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ctl button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: transform .12s, background .15s; }
.ctl button:active { transform: scale(.88); background: rgba(255,255,255,.12); }
.ctl button .ic { width: 24px; height: 24px; }
.ctl .play { width: 60px; height: 60px; background: #fff; color: #111; }
.ctl .play .ic { width: 28px; height: 28px; }
.ctl button.on { color: var(--acc-2); }
.ctl button.dim { opacity: .5; }

.ws-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.kpi { border-radius: 16px; background: rgba(255,255,255,.06); padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; }
.kpi b { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi small { color: var(--mut); font-size: 12px; font-weight: 600; }

.wt-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wt-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.07); }
.wt-row b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wt-row span { flex: 1; color: var(--mut); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-row.ring { background: rgba(255,77,94,.28); animation: pulse 1s infinite; }
.wt-quick { display: flex; gap: 8px; }
.wt-quick button { flex: 1; height: 36px; border-radius: 12px; background: rgba(255,255,255,.12); font-weight: 650; font-size: 14px; }
.wt-quick button:active { background: rgba(255,255,255,.25); }
@keyframes pulse { 50% { background: rgba(255,77,94,.5); } }

/* Dock */
.dock { align-self: center; display: flex; gap: 18px; padding: 12px 16px; border-radius: 32px; animation: dockIn .7s var(--ease) .1s both; }
@keyframes dockIn { from { transform: translateY(40px); opacity: 0; } }
.app-ic { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.92); }
.app-ic i { width: 66px; height: 66px; border-radius: 17px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(0,0,0,.25); transition: transform .15s var(--ease), filter .15s; }
.app-ic i .ic { width: 32px; height: 32px; stroke-width: 2.1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.app-ic:active i { transform: scale(.88); filter: brightness(.8); }
.badge { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--bad); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); animation: pop .4s var(--spring); }
@keyframes pop { from { transform: scale(0); } }
.g-orders { background: linear-gradient(160deg, #ffa347, #ff4d2e); }
.g-music { background: linear-gradient(160deg, #ff5f7e, #e3123a); }
.g-timer { background: linear-gradient(160deg, #3d3f4d, #16171d); }
.g-stats { background: linear-gradient(160deg, #3ee08f, #0d9f63); }
.g-site { background: linear-gradient(160deg, #ffcf52, #ff8a1f); }
.g-settings { background: linear-gradient(160deg, #a5abb8, #5d6372); }

/* ---------- Fenêtres d'application ---------- */
.win { position: fixed; z-index: 30; inset: 0; padding-top: calc(var(--status-h) + env(safe-area-inset-top)); display: flex; flex-direction: column; background: rgba(12,13,18,.78); backdrop-filter: blur(40px) saturate(150%); -webkit-backdrop-filter: blur(40px) saturate(150%); transform-origin: var(--ox, 50%) var(--oy, 100%); animation: winIn .48s var(--ease) both; }
.win.closing { animation: winOut .34s var(--ease) both; pointer-events: none; }
@keyframes winIn { from { transform: scale(.18); opacity: 0; border-radius: 40px; } }
@keyframes winOut { to { transform: scale(.18); opacity: 0; border-radius: 40px; } }
.win-h { display: flex; align-items: center; gap: 14px; padding: 10px 26px 14px; }
.win-h h1 { margin: 0; font-size: 30px; font-weight: 750; letter-spacing: -.02em; flex: 1; display: flex; align-items: center; gap: 12px; }
.win-h h1 small { font-size: 14px; font-weight: 600; color: var(--mut); letter-spacing: 0; }
.win-x { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.win-x .ic { width: 22px; height: 22px; }
.win-b { flex: 1; min-height: 0; padding: 0 26px calc(env(safe-area-inset-bottom) + 30px); display: flex; flex-direction: column; gap: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.1); }
.seg button { padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--mut); transition: background .2s, color .2s; white-space: nowrap; }
.seg button.on { background: rgba(255,255,255,.2); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 14px; background: rgba(255,255,255,.12); font-weight: 650; font-size: 15px; transition: transform .12s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn.pri { background: linear-gradient(180deg, var(--acc-2), var(--acc)); color: #fff; box-shadow: 0 6px 18px rgba(255,90,54,.3); }
.btn.danger { background: rgba(255,77,94,.16); color: #ff8b97; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.1); display: grid; place-items: center; flex: none; }
.icon-btn:active { background: rgba(255,255,255,.22); }
.field { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid transparent; outline: none; font-size: 16px; }
.field:focus { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.14); }
.field::placeholder { color: var(--faint); }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--mut); padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.07); }
.sync.bad { color: #ffb4bc; background: rgba(255,77,94,.15); }

/* Commandes */
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; scrollbar-width: none; }
.col { min-height: 0; display: flex; flex-direction: column; border-radius: 22px; background: rgba(255,255,255,.05); padding: 12px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 700; font-size: 15px; }
.col-h i { width: 10px; height: 10px; border-radius: 50%; }
.col-h b { margin-left: auto; font-size: 13px; min-width: 26px; height: 22px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.12); padding: 0 8px; }
.col-l { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.col-empty { color: var(--faint); font-size: 14px; text-align: center; padding: 26px 8px; border: 1.5px dashed rgba(255,255,255,.12); border-radius: 16px; }
.oc { flex: none; border-radius: 18px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.06); padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; position: relative; overflow: hidden; animation: ocIn .45s var(--spring) both; }
.oc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sc); }
@keyframes ocIn { from { transform: scale(.92); opacity: 0; } }
.oc.flash { animation: ocFlash 1.2s 3; }
@keyframes ocFlash { 50% { box-shadow: 0 0 0 3px var(--s-received); } }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oc-ref { font-weight: 750; font-size: 16px; letter-spacing: .01em; }
.oc-age { font-size: 13px; font-weight: 700; color: var(--mut); font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.07); }
.oc-age.warn { color: var(--warn); background: rgba(255,176,32,.14); }
.oc-age.late { color: #fff; background: var(--bad); }
.oc-who { font-size: 14px; color: var(--mut); display: flex; align-items: center; gap: 6px; }
.oc-who .ic { width: 14px; height: 14px; }
.oc-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.oc-items li { font-size: 15px; line-height: 1.3; }
.oc-items b { color: var(--acc-2); margin-right: 4px; }
.oc-items small { display: block; color: var(--mut); font-size: 13px; }
.oc-note { margin: 0; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: rgba(255,176,32,.12); color: #ffd58a; }
.oc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--mut); }
.oc-foot b { color: var(--txt); font-size: 15px; }
.oc-go { width: 100%; height: 48px; border-radius: 14px; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--sn); color: #0b0c10; transition: transform .12s, filter .15s; }
.oc-go:active { transform: scale(.97); filter: brightness(.9); }
.oc-go .ic { width: 18px; height: 18px; }
.oc.busy { opacity: .55; pointer-events: none; }
.s-received { --sc: var(--s-received); } .s-preparing { --sc: var(--s-preparing); } .s-ready { --sc: var(--s-ready); } .s-delivering { --sc: var(--s-delivering); } .s-delivered { --sc: var(--s-delivered); } .s-cancelled { --sc: var(--s-cancelled); }
.n-preparing { --sn: var(--s-preparing); } .n-ready { --sn: var(--s-ready); } .n-delivering { --sn: var(--s-delivering); } .n-delivered { --sn: #e9ecf3; }
.done-list { display: flex; flex-direction: column; gap: 8px; }
.done-row { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.05); text-align: left; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: color-mix(in srgb, var(--sc) 22%, transparent); color: var(--sc); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.banner-err { padding: 14px 18px; border-radius: 16px; background: rgba(255,77,94,.15); color: #ffc2c8; font-weight: 600; display: flex; gap: 12px; align-items: center; }

/* Musique */
.mu { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, .9fr) 1.1fr; gap: 22px; }
.mu-now { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.mu-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; background: #000 center / cover; position: relative; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); flex: none; }
.mu-video.empty { display: grid; place-items: center; background: linear-gradient(135deg, rgba(255,90,54,.35), rgba(76,157,255,.3)); }
.mu-video.empty .ic { width: 56px; height: 56px; opacity: .8; }
.mu-video .remote { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.6); backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.mu-video .remote .ic { width: 16px; height: 16px; }
.mu-t { font-size: 22px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mu-s { color: var(--mut); font-size: 15px; margin-top: 4px; }
.seek { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 10px; font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; }
.seek span:last-child { text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; touch-action: none; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.2) var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255,255,255,.2) var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; margin-top: -7px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; }
.vol { display: flex; align-items: center; gap: 12px; color: var(--mut); }
.out-btn { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.08); font-weight: 600; }
.out-btn .ic:first-child { width: 22px; height: 22px; color: var(--acc-2); }
.out-btn span { flex: 1; } .out-btn small { color: var(--mut); font-weight: 500; display: block; font-size: 12.5px; }
.warn-box { padding: 12px 14px; border-radius: 14px; background: rgba(255,176,32,.14); color: #ffd58a; font-size: 14px; font-weight: 600; line-height: 1.4; }
.mu-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.search-row { display: flex; gap: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 14px; font-weight: 600; }
.chip:active { background: rgba(255,255,255,.25); }
.results, .queue { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.tr { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; transition: background .15s; }
.tr:active { background: rgba(255,255,255,.08); }
.tr.cur { background: rgba(255,90,54,.16); }
.tr-img { width: 104px; height: 58px; border-radius: 10px; background: #222 center / cover; flex: none; position: relative; }
.tr-img em { position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: rgba(0,0,0,.75); }
.tr-b { flex: 1; min-width: 0; cursor: pointer; }
.tr-t { font-weight: 600; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-s { font-size: 13px; color: var(--mut); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-a { display: flex; gap: 6px; }
.tr-n { width: 26px; text-align: center; color: var(--faint); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: #fff; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { color: var(--mut); text-align: center; padding: 30px 16px; line-height: 1.5; font-size: 15px; }

/* Minuteur */
.tm { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px; }
.tm-new { display: flex; flex-direction: column; gap: 14px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.presets button { height: 74px; border-radius: 18px; background: rgba(255,255,255,.08); font-size: 22px; font-weight: 650; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.presets button small { font-size: 12px; color: var(--mut); font-weight: 600; }
.presets button:active { background: rgba(255,255,255,.2); transform: scale(.96); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px; border-radius: 20px; background: rgba(255,255,255,.06); }
.stepper b { font-size: 54px; font-weight: 300; font-variant-numeric: tabular-nums; min-width: 190px; text-align: center; }
.tm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-content: start; }
.tcard { border-radius: 22px; background: rgba(255,255,255,.07); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.tcard.ring { background: rgba(255,77,94,.25); animation: pulse 1s infinite; }
.ring-svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring-svg circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring-svg .bg { stroke: rgba(255,255,255,.1); }
.ring-svg .fg { stroke: var(--acc-2); transition: stroke-dashoffset 1s linear; }
.tcard .tval { position: absolute; top: 16px; height: 150px; display: grid; place-items: center; font-size: 32px; font-weight: 500; font-variant-numeric: tabular-nums; width: 150px; text-align: center; line-height: 1.1; }
.tcard .tval small { display: block; font-size: 13px; color: var(--mut); font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .trow { display: flex; gap: 8px; align-items: center; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { border-radius: 22px; background: rgba(255,255,255,.07); padding: 18px; }
.stat b { display: block; font-size: 36px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat small { color: var(--mut); font-weight: 600; font-size: 13px; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { border-radius: 22px; background: rgba(255,255,255,.05); padding: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; color: var(--mut); font-weight: 700; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 130px 1fr 44px; gap: 12px; align-items: center; font-size: 14px; }
.bar div { height: 12px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar div i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
.hours { display: flex; align-items: flex-end; gap: 6px; height: 130px; }
.hours div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 11px; color: var(--faint); }
.hours i { width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--acc-2), var(--acc)); min-height: 3px; }

/* Réglages */
.set { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-content: start; }
.group { border-radius: 22px; background: rgba(255,255,255,.06); padding: 6px 0; }
.group h3 { margin: 0; padding: 14px 18px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); font-weight: 700; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; min-height: 56px; }
.group .row + .row { border-top: 1px solid rgba(255,255,255,.07); }
.row > span { flex: 1; font-size: 16px; } .row > span small { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; }
.row select { background: rgba(255,255,255,.1); border: 0; border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.toggle { position: relative; width: 52px; height: 32px; border-radius: 16px; background: rgba(255,255,255,.2); transition: background .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .25s var(--spring); }
.toggle.on { background: var(--ok); }
.toggle.on::after { transform: translateX(20px); }
.walls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 8px 18px 14px; }
.wthumb { aspect-ratio: 16 / 10; border-radius: 12px; background: #222 center / cover; position: relative; border: 2px solid transparent; overflow: hidden; }
.wthumb.on { border-color: #fff; box-shadow: 0 0 0 2px var(--acc); }
.wthumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 700; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.wthumb.add { display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1.5px dashed rgba(255,255,255,.3); }
.credits { font-size: 12px; color: var(--faint); padding: 4px 18px 14px; line-height: 1.5; }
.credits a { color: var(--mut); }

/* Lecteur YouTube flottant */
.yt { position: fixed; z-index: 35; left: 0; top: 0; border-radius: 16px; overflow: hidden; background: #000; transition: transform .45s var(--ease), width .45s var(--ease), height .45s var(--ease), border-radius .45s, opacity .3s; will-change: transform; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.yt.pip { z-index: 55; box-shadow: 0 16px 50px rgba(0,0,0,.6); }
.yt.instant { transition: none; }
.yt.under { z-index: 15; }
#yt-host, #yt-host > div, #yt-host iframe { width: 100%; height: 100%; display: block; border: 0; }
.yt-cover { position: absolute; inset: 0; display: none; }
.yt.pip .yt-cover { display: block; cursor: grab; touch-action: none; }

/* Centre de contrôle */
.cc { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadeIn .25s; }
.cc-panel { position: absolute; top: calc(var(--status-h) + env(safe-area-inset-top) + 4px); right: 18px; width: 380px; max-width: calc(100vw - 36px); border-radius: 30px; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; animation: ccIn .4s var(--spring); transform-origin: top right; background: rgba(30,32,42,.62); }
@keyframes ccIn { from { transform: scale(.85) translateY(-10px); opacity: 0; } }
.cc-tile { border-radius: 22px; background: rgba(255,255,255,.1); padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; font-weight: 600; font-size: 14px; min-height: 92px; justify-content: space-between; }
.cc-tile .ic { width: 26px; height: 26px; }
.cc-tile.on { background: #fff; color: #111; }
.cc-tile.wide { grid-column: 1 / -1; }
.cc-tile small { color: var(--mut); font-weight: 500; font-size: 12.5px; }
.cc-tile.on small { color: #555; }
.cc-music { display: grid; grid-template-columns: 56px 1fr; gap: 10px 12px; align-items: center; }
.cc-music .art { width: 56px; height: 56px; border-radius: 12px; background: #333 center / cover; }
.cc-music .ctl { grid-column: 1 / -1; }

/* Bannières (notifications en haut) */
.banners { position: fixed; z-index: 80; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.bn { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 22px; background: rgba(36,38,50,.78); backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.4); animation: bnIn .5s var(--spring) both; cursor: pointer; }
.bn.out { animation: bnOut .3s var(--ease) both; }
@keyframes bnIn { from { transform: translateY(-120%) scale(.9); opacity: 0; } }
@keyframes bnOut { to { transform: translateY(-120%) scale(.9); opacity: 0; } }
.bn .notif-ic { width: 34px; height: 34px; }
.bn.info .notif-ic { background: linear-gradient(135deg, #6b7280, #374151); }
.bn.alarm .notif-ic { background: linear-gradient(135deg, #ff6b7a, #e3123a); }

/* Feuille modale */
.sheet { position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 20px; animation: fadeIn .25s; }
.sheet-card { width: min(560px, 100%); max-height: calc(100vh - 60px); overflow-y: auto; border-radius: 30px; background: #1b1d27; border: 1px solid var(--line); padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: sheetIn .4s var(--spring); scrollbar-width: none; }
@keyframes sheetIn { from { transform: translateY(40px) scale(.96); opacity: 0; } }
.sheet-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.01em; }
.sheet-card .sub { margin: 0 0 18px; color: var(--mut); line-height: 1.45; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.dev { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); margin-bottom: 8px; width: 100%; text-align: left; }
.dev.on { background: rgba(255,90,54,.18); outline: 2px solid var(--acc); }
.dev .ic { width: 26px; height: 26px; }
.dev span { flex: 1; font-weight: 600; } .dev small { display: block; color: var(--mut); font-weight: 500; font-size: 13px; }
.dev.off { opacity: .5; }
.qr { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.qr-img { background: #fff; border-radius: 18px; padding: 12px; width: 220px; height: 220px; }
.qr-img svg, .qr-img img { width: 100%; height: 100%; display: block; }
.qr-code { font-size: 34px; font-weight: 750; letter-spacing: .12em; font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.qr ol { margin: 0; padding-left: 20px; color: var(--mut); line-height: 1.6; font-size: 15px; }
.od-items { margin: 14px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.od-items li { display: flex; gap: 10px; font-size: 17px; } .od-items li b { color: var(--acc-2); min-width: 32px; } .od-items small { display: block; color: var(--mut); font-size: 14px; }
.od-info { display: grid; grid-template-columns: 24px 1fr; gap: 10px 12px; align-items: start; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); font-size: 15px; line-height: 1.4; }
.od-info .ic { width: 20px; height: 20px; color: var(--mut); margin-top: 1px; }
.od-info a { color: #9cc7ff; text-decoration: none; }

/* Alarme plein écran */
.alarm { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 40%, rgba(255,77,94,.55), rgba(20,0,5,.92)); animation: fadeIn .3s; }
.alarm h2 { font-size: 64px; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.alarm p { font-size: 22px; color: rgba(255,255,255,.8); margin: 10px 0 34px; }
.alarm .btn { height: 70px; padding: 0 60px; font-size: 22px; border-radius: 35px; background: #fff; color: #111; }

/* Barre d'accueil (geste) */
.homebar { position: fixed; z-index: 65; bottom: 0; left: 50%; transform: translateX(-50%); width: 260px; height: calc(26px + env(safe-area-inset-bottom)); display: grid; place-items: center; padding-bottom: env(safe-area-inset-bottom); touch-action: none; cursor: grab; opacity: 0; pointer-events: none; transition: opacity .3s; }
.homebar i { width: 150px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.85); box-shadow: 0 1px 6px rgba(0,0,0,.4); }
body.app-open .homebar { opacity: 1; pointer-events: auto; }

/* ---------- Adaptations ---------- */
@media (max-width: 1100px) {
  .widgets { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "clock music" "orders orders" "stats stats"; }
  .w-music { min-height: 330px; }
  .mu { grid-template-columns: 1fr; overflow-y: auto; }
  .tm { grid-template-columns: 1fr; overflow-y: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .set { grid-template-columns: 1fr; overflow-y: auto; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .board { grid-template-columns: repeat(4, minmax(260px, 80vw)); scroll-snap-type: x mandatory; }
  .board .col { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  :root { --r: 22px; }
  #home { overflow-y: auto; padding-left: 16px; padding-right: 16px; }
  .widgets { display: flex; flex-direction: column; flex: none; }
  .w { min-height: 220px; }
  .dock { position: sticky; bottom: 0; gap: 10px; padding: 10px 12px; flex-wrap: wrap; justify-content: center; }
  .app-ic i { width: 54px; height: 54px; border-radius: 14px; }
  .app-ic { font-size: 11px; }
  .win-h { padding: 8px 16px 12px; } .win-h h1 { font-size: 24px; } .win-b { padding: 0 16px 30px; }
  .panels, .stats { grid-template-columns: 1fr; }
  .presets { grid-template-columns: repeat(3, 1fr); }
  .qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pin-pad { grid-template-columns: repeat(3, 72px); gap: 14px 22px; } .pin-pad button { width: 72px; height: 72px; }
  #st-food { display: none; }
}
@media (max-height: 640px) and (orientation: landscape) {
  .lock-time { font-size: 84px; }
  .pin-pad { grid-template-columns: repeat(3, 62px); gap: 8px 20px; } .pin-pad button { width: 62px; height: 62px; font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Écran verrouillé par-dessus tout : on masque les applis et on garde le fond net */
#apps { transition: opacity .3s; }
body:not(.unlocked) #apps { opacity: 0; pointer-events: none; }
body.app-open:not(.unlocked) .wall-img { filter: none; transform: none; }
.wt-quick button { text-align: center; }
.lock-music .lm-t { align-self: end; } .lock-music .lm-s { align-self: start; }
.w-empty .big .ic { width: 40px; height: 40px; opacity: .7; }

/* v2.1 */
.ic.mini { width: 14px; height: 14px; vertical-align: -2px; }
.wc-ws .ic.mini { width: 12px; height: 12px; margin-right: 1px; }
.chips-h { display: flex; align-items: center; gap: 6px; margin: 14px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .ic.mini { width: 11px; height: 11px; color: var(--acc-2); }
.res-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px; color: var(--mut); font-size: 13px; font-weight: 600; }
.alarm-ic .ic { width: 84px; height: 84px; margin-bottom: 8px; }
.warn-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* v2.2 — YouTube : accueil, Mix, compte */
.ic.flip { transform: rotate(180deg); }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 18px 4px 10px; font-size: 16px; font-weight: 700; }
.sec-h .ic { width: 18px; height: 18px; color: var(--acc-2); }
.sec-row { display: flex; align-items: center; justify-content: space-between; } .sec-row .sec-h { margin-right: 10px; }
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
.tile { display: flex; flex-direction: column; gap: 4px; text-align: left; min-width: 0; }
.tile:active { transform: scale(.97); }
.tile-img { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; background: #222 center / cover; overflow: hidden; margin-bottom: 4px; }
.tile.mix .tile-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.65)); }
.tile-img em { position: absolute; z-index: 1; left: 8px; bottom: 8px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.6); display: inline-flex; align-items: center; gap: 4px; }
.tile b { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(255,90,54,.16), rgba(76,157,255,.12)); border: 1px solid var(--line); flex-wrap: wrap; }
.g-card > div { flex: 1; min-width: 200px; } .g-card p { margin: 4px 0 0; color: var(--mut); font-size: 14px; line-height: 1.45; }
.g-logo { width: 38px; height: 38px; color: #fff; }
.g-me { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.g-me img, .g-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.g-me div { flex: 1; } .g-me small { display: block; color: var(--mut); font-size: 13px; }
.g-code { flex: 1; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.3); word-break: break-all; user-select: all; -webkit-user-select: all; }
.g-form { flex-wrap: wrap; } .g-form .field { flex: 1 1 240px; height: 44px; font-size: 14px; }
.mix-btn { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.08); font-weight: 600; text-align: left; }
.mix-btn .ic { width: 24px; height: 24px; color: var(--acc-2); }
.mix-btn small { display: block; color: var(--mut); font-weight: 500; font-size: 12.5px; }
.mix-btn.on { background: rgba(255,90,54,.16); }
#mu-tabs button { display: inline-flex; align-items: center; gap: 6px; }
#mu-tabs .ic { width: 16px; height: 16px; }
.g-card.warn { background: linear-gradient(135deg, rgba(255,176,32,.18), rgba(255,90,54,.1)); }

/* ===================== v2.3 — refonte visuelle ===================== */
.glass { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 18px 50px rgba(0,0,0,.28); }
.w { border-radius: 30px; isolation: isolate; }
.w-bg { position: absolute; inset: -40px; z-index: -1; width: auto !important; background: center / cover no-repeat; filter: blur(42px) saturate(1.7) brightness(.5); opacity: .95; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(255,138,61,.22); color: #ffc29a; font-size: 11px; letter-spacing: .06em; }
.dock { border-radius: 36px; padding: 14px 20px; }
.app-ic i { width: 70px; height: 70px; border-radius: 19px; }

/* Musique : fond aux couleurs du morceau, vidéo toujours entière */
.win-music { isolation: isolate; overflow: hidden; background: rgba(6,7,10,.86); }
.mu-bg { position: absolute; inset: -20%; z-index: -1; background: center / cover no-repeat; filter: blur(90px) saturate(1.9) brightness(.55); opacity: .95; transition: background-image .8s; }
.mu { grid-template-columns: minmax(360px, 1fr) minmax(400px, 1.05fr); gap: 28px; }
.mu-now { overflow: hidden; gap: 16px; padding-bottom: 4px; }
.mu-stage { flex: 1 1 auto; min-height: 150px; container-type: size; display: flex; align-items: center; justify-content: center; }
.mu-video { width: min(100cqw, calc(100cqh * 16 / 9)); max-width: 100%; aspect-ratio: 16 / 9; flex: none; border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
.mu-meta { padding: 0 2px; }
.mu-t { font-size: 26px; font-weight: 760; letter-spacing: -.015em; line-height: 1.18; }
.mu-s { font-size: 16px; color: rgba(255,255,255,.68); margin-top: 6px; }
.mu-now .ctl { justify-content: center; gap: 28px; }
.mu-now .ctl .play { width: 76px; height: 76px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.mu-now .ctl .play .ic { width: 32px; height: 32px; }
.mu-row { display: flex; align-items: center; gap: 16px; }
.mu-row .mix-btn { flex: none; padding: 10px 14px; }
.mu-row .vol { flex: 1; min-width: 120px; }
.mu-side { background: rgba(8,9,14,.38); border: 1px solid rgba(255,255,255,.08); border-radius: 28px; padding: 16px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.mu-side .seg { background: rgba(255,255,255,.08); }
.tiles { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; }
.tile b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.tile-img { box-shadow: 0 10px 26px rgba(0,0,0,.35); transition: transform .2s var(--ease); }
.tile:hover .tile-img { transform: translateY(-2px); }
.mixnote { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; margin-bottom: 6px; background: linear-gradient(135deg, rgba(255,90,54,.2), rgba(167,139,250,.16)); }
.mixnote > .ic { width: 26px; height: 26px; color: var(--acc-2); }
.mixnote small { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; line-height: 1.35; }

/* Mini-lecteur (bandeau) quand la musique joue derrière une autre appli */
.miniplayer { position: fixed; z-index: 50; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 30px); transform: translateX(-50%); width: min(720px, calc(100vw - 32px)); height: 78px; border-radius: 24px; padding: 10px 14px 12px 11px; display: flex; align-items: center; gap: 14px; overflow: hidden;
  background: rgba(30,32,44,.74); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 22px 60px rgba(0,0,0,.5); animation: miniIn .5s var(--spring); }
@keyframes miniIn { from { transform: translate(-50%, 140%); } }
.mini-art { width: 98px; height: 55px; border-radius: 12px; background: #000 center / cover; flex: none; }
.mini-info { flex: 1; min-width: 0; text-align: left; }
.mini-info b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-info small { display: block; color: var(--mut); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.miniplayer .ctl { gap: 2px; flex: none; }
.miniplayer .ctl button { width: 46px; height: 46px; }
.miniplayer .ctl .play { width: 52px; height: 52px; }
.mini-prog { position: absolute; left: 18px; right: 18px; bottom: 5px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.mini-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc-2), var(--acc)); }
body.has-mini .win-b { padding-bottom: calc(env(safe-area-inset-bottom) + 124px); }
.yt.on-mini { z-index: 56; box-shadow: none; }
.yt.on-mini .yt-cover { display: block; }
.yt.on-lock { z-index: 45; box-shadow: none; }
.yt.parked { width: 2px !important; height: 2px !important; opacity: 0; pointer-events: none; }

/* Écran verrouillé : vignette vidéo dans la carte musique */
.lock-music { grid-template-columns: 128px 1fr; gap: 12px 16px; }
.lock-music .art { width: 128px; height: 72px; grid-row: auto; border-radius: 12px; }
.lock-music .lm-meta { min-width: 0; }
.lock-music .prog { margin-top: 8px; }

/* Volet du haut (centre de contrôle) */
.cc { background: rgba(0,0,0,.3); }
.cc.closing { animation: fadeOut .26s forwards; }
.cc.closing .cc-panel { animation: ccUp .26s var(--ease) forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.cc-panel { left: 50%; right: auto; top: calc(env(safe-area-inset-top) + 8px); width: min(580px, calc(100vw - 24px)); max-width: none; padding: 10px 18px 18px; display: block; border-radius: 36px; transform: translateX(-50%);
  background: rgba(28,30,42,.58); backdrop-filter: blur(44px) saturate(190%); -webkit-backdrop-filter: blur(44px) saturate(190%); animation: ccDrop .5s var(--spring); }
@keyframes ccDrop { from { transform: translate(-50%, -115%); } }
@keyframes ccUp { to { transform: translate(-50%, -115%); } }
.cc-grab { width: 46px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); margin: 0 auto 14px; }
.cc-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 98px; gap: 12px; grid-template-areas: "m m m v" "m m m v" ". . . v"; }
.cc-music { grid-area: m; position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; background: rgba(255,255,255,.1); padding: 16px 16px 10px; display: flex; flex-direction: column; justify-content: space-between; }
.cc-bg { position: absolute; inset: -30px; z-index: -1; background: center / cover; filter: blur(30px) saturate(1.7) brightness(.5); }
.cc-top { display: flex; gap: 14px; align-items: center; }
.cc-art { width: 66px; height: 66px; border-radius: 14px; background: rgba(255,255,255,.12) center / cover; flex: none; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.cc-meta { min-width: 0; }
.cc-meta b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta small { display: block; color: rgba(255,255,255,.7); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.cc-music .ctl { justify-content: center; gap: 24px; }
.cc-vol { grid-area: v; position: relative; overflow: hidden; border-radius: 28px; background: rgba(255,255,255,.13); touch-action: none; cursor: ns-resize; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 14px 0 16px; outline: none; }
.cc-vol:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.cc-vol .fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); background: #fff; transition: height .15s var(--ease); }
.cc-vol.drag .fill { transition: none; }
.cc-vol-v, .cc-vol-ic { position: relative; z-index: 1; color: #fff; mix-blend-mode: difference; }
.cc-vol-v { font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; }
.cc-vol-ic .ic { width: 30px; height: 30px; }
.cc-btn { border-radius: 28px; background: rgba(255,255,255,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 650; transition: transform .12s, background .2s; text-align: center; }
.cc-btn .ic { width: 26px; height: 26px; }
.cc-btn:active { transform: scale(.94); }
.cc-btn.on { background: #fff; color: #111; }
.cc-btn.hot { background: linear-gradient(135deg, var(--acc-2), var(--acc)); color: #fff; }
.cc-btn.wide { grid-column: span 2; flex-direction: row; gap: 10px; font-size: 14px; }
@media (max-width: 640px) { .cc-grid { grid-auto-rows: 84px; gap: 10px; } .mini-art { width: 72px; height: 40px; } .miniplayer .ctl button:not(.play) { width: 38px; } }
@media (max-width: 1100px) { .mu-stage { min-height: 220px; flex: none; height: 46vh; } .mu-now { overflow: visible; } }
.yt, .yt.pip { box-shadow: none; }
