/* La surface de l'app est la seule zone de défilement du téléphone. */
html.in-phone, html.in-phone body { height: 100%; overflow: hidden; background: #141518; }
.in-phone #screen { height: 100%; margin: 0; }
.stage.ios-stage {
  --sys-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --blue:#0879eb;
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr);
  place-items:center; gap:0; position:relative; margin:0;
  width:100%; max-width:none; height:100vh; height:100dvh; padding:12px;
  background:radial-gradient(ellipse at 48% 30%,#35363b 0%,#24252a 42%,#111216 100%);
  font-family:var(--sys-font); color:#17181c; line-height:1.33;
}
.device.ios-device {
  --system-bg:#fff; --system-fg:#151619;
  --status-height:46px; --gesture-height:36px;
  display:grid; grid-template-rows:var(--status-height) minmax(0,1fr) var(--gesture-height);
  position:relative; isolation:isolate;
  width:min(414px,calc((100dvh - 24px)*.496)); max-width:100%;
  height:min(calc(100dvh - 24px),850px); min-height:0;
  border:6px solid #151518; outline:2px solid #55565c; border-radius:49px;
  background:var(--system-bg); color:var(--system-fg);
  overflow:hidden; box-shadow:0 0 0 3px #08090c,0 16px 65px #0008;
}
.ios-device .ios-content { position:relative; min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:none; background:transparent; }
.ios-content::-webkit-scrollbar,.os-home-scroll::-webkit-scrollbar { display:none; }
.ios-device[data-route="feed"] .ios-content { overflow:hidden; }
.ios-content>#socialfeed { height:100%; min-height:0; margin:0; padding:0; }
.ios-device .status.os-status {
  display:flex; position:relative; z-index:5; justify-content:space-between; align-items:center;
  padding:3px 7.9% 0 9%; height:100%; color:var(--system-fg); background:transparent;
  font:650 15px/1 var(--sys-font); letter-spacing:-.025em;
}
.os-clock-button { padding:6px; margin-left:-6px; color:inherit;background:none;border:none;font:inherit; }
.os-radio { width:68px;height:18px; }
.os-island { position:absolute; left:50%; top:8px; width:82px; height:24px; transform:translateX(-50%); background:#08090a; box-shadow:inset 0 0 0 1px #111; border-radius:50px; pointer-events:none; }
.os-island::after { content:""; position:absolute; right:8px; top:8px; width:7px; height:7px; border-radius:50%; background:radial-gradient(circle at 35% 28%,#24334b,#090c12 65%); }
.os-glyph { height:22px; width:22px; flex:none; vertical-align:middle; }
.os-home-indicator { display:grid; place-items:center; background:var(--system-bg); border:0; width:100%; height:100%; z-index:5; padding:0; color:var(--system-fg); touch-action:none; }
.os-home-indicator span { height:5px; width:112px; max-width:38%; background:currentColor; border-radius:7px; align-self:end; margin-bottom:8px; }
.ios-device:is(.homeframe,.locked,.pinmode) { --system-bg:transparent; --system-fg:white; background:#383b39; }
.ios-device:is(.homeframe,.locked,.pinmode)::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,#18202a25,#080b1030),var(--os-wall) center center/cover no-repeat; pointer-events:none; }
.ios-device.pinmode::before { inset:-26px; filter:blur(19px); }
.ios-device.pinmode::after { content:""; position:absolute; inset:0; background:#11182285; z-index:-1; }
.ios-device.homeframe::before { background:linear-gradient(180deg,#171f3322,#151a2036 62%,#15171b44),var(--os-wall) center/cover; }
.ios-device[data-app="tactik"],.ios-device[data-route="feed"][data-profile="luna"] { --system-fg:#fff; --system-bg:#09090a; }
.ios-device[data-route="notifications"] { --system-bg:#e8eaee; }
.ios-device .os-lock {
  display:flex; flex-direction:column; justify-content:space-between; background:transparent;
  min-height:100%; color:white; padding:clamp(12px,3vh,32px) 15px 0; text-align:center;
}
.os-lock-top>.os-glyph { width:19px; height:19px; margin-bottom:7px; }
.os-lock-date { font-size:clamp(18px,2.5vh,23px); font-weight:540; letter-spacing:-.035em; text-shadow:0 1px 8px #0005; }
.os-lock h1 { margin:-2px 0 0; font:660 clamp(64px,12vh,100px)/1 var(--sys-font); letter-spacing:-.08em; color:#fffcf8; text-shadow:0 1px 14px #0002; }
.os-lock-bottom { margin-top:28px; }
#incoming { width:100%; display:grid; gap:7px; }
.os-notice { --ios-icon-size:37px; border:0; border-radius:22px; padding:10px 12px; width:100%;
  display:flex; gap:11px; align-items:center; text-align:left; background:#f6f6f4e0; color:#16171b; box-shadow:0 1px 7px #0002; backdrop-filter:blur(28px) saturate(1.4); }
.os-notice-text { flex:1; min-width:0; display:grid; }
.os-notice-text>span:last-child { font-size:13px; line-height:1.3; }
.os-notice-text>strong { font-size:14px; line-height:1.34; }
.os-notice-meta { display:flex; gap:6px; justify-content:space-between; color:#56575b; font-size:11px; line-height:1.3; }
.os-notice-meta b { font-weight:550; } .os-notice-meta small { font-size:10px; }
.os-unlock-text { border:0; color:white; font-size:13px; font-weight:620; background:none; padding:12px 18px 1px; text-shadow:0 1px 5px #0009; }
.os-unlock-text,.os-pin-actions button,.os-clock-button,.os-pin .os-finger,.os-notifications-pill,.ios-content .audiozone .sound { min-height:44px; }
.ios-device .os-pin { min-height:100%; padding:12px 14px 9px; background:transparent; color:white; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.os-pin>h2 { font:540 20px/1.2 var(--sys-font); letter-spacing:-.03em; margin:9px 0 4px; }
.os-pin .dots { margin:2px auto 12px; }
.os-pin .os-keys { width:min(256px,87%); gap:8px 12px; margin:5px auto 9px; justify-items:center; }
.os-pin .os-digit { width:clamp(50px,8vh,69px); height:clamp(50px,8vh,69px); border:0; color:white; background:#ffffff30; display:grid; place-content:center; gap:0; font-family:var(--sys-font); }
.os-digit:last-child { grid-column:2; }
.os-digit b { font:410 29px/1 var(--sys-font); } .os-digit small { min-height:8px; font-size:8px; font-weight:700; letter-spacing:.15em; }
.os-pin #pinmsg { font-size:12px; min-height:1em; margin:5px 0; }
.os-pin .os-finger { padding:6px 12px; color:white; background:transparent; border:1px solid #ffffff68; border-radius:24px; font-size:12px; display:flex; align-items:center; gap:7px; }
.os-finger.holding { background:#ffffff40; } .os-pin details { margin:5px; font-size:12px; }
.os-pin-actions { width:min(280px,85%); display:flex; justify-content:space-between; }
.os-pin-actions button { color:white; background:none; border:0; padding:9px; font-size:14px; }
.ios-device .os-home {
  height:100%; min-height:0; padding:0; display:flex; flex-direction:column; background:transparent;
  color:white; --tile:clamp(48px,7.2vh,61px); --ios-icon-size:var(--tile);
}
.os-home-scroll { flex:1; min-height:0; overflow:auto; scrollbar-width:none; padding:13px 18px 4px; }
.os-widgets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:0 5px; margin:0 0 19px; }
.os-widgets>div { min-width:0; text-align:center; } .os-widgets>div>span,.os-tile-label { display:block; margin-top:5px; color:white; font:530 12px/1.18 var(--sys-font); letter-spacing:-.015em; text-shadow:0 1px 4px #000c,0 0 8px #0006; }
.os-widget { width:100%; aspect-ratio:1.02; border-radius:22%; border:0; overflow:hidden; position:relative; text-align:left; box-shadow:0 2px 8px #0002; }
.os-agenda-widget { display:flex; flex-direction:column; padding:12% 11% 10%; background:#fffdfa; color:#19191b; }
.os-red { color:#ba312f; font:670 10px/1.1 var(--sys-font); } .os-day { font:360 clamp(31px,4.4vh,43px)/1 var(--sys-font); letter-spacing:-.06em; }
.os-event { display:grid; gap:1px; border-left:3px solid #f16c58; padding-left:6px; margin-top:auto; }
.os-event strong { font-size:12px; line-height:1.22; letter-spacing:-.02em; } .os-event small { color:#65656b; font-size:10px; }
.os-photo-widget { display:block; padding:0; background:#68635b; color:white; }
.os-photo-widget img { width:100%; height:100%; display:block; object-fit:cover; object-position:center 53%; }
.os-photo-widget>span { position:absolute; inset:auto 0 0; background:linear-gradient(transparent,#050709a6); display:grid; padding:20px 11px 11px; }
.os-photo-widget small { font-size:8px; font-weight:720; letter-spacing:.12em; } .os-photo-widget strong { font-size:15px; letter-spacing:-.025em; }
.os-home .os-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px 4px; margin:0; }
.os-tile,.os-home .apptile { border:0; background:none; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:0; padding:0 1px 2px; min-width:0; color:white; }
.os-tile .os-tile-label { max-width:100%; }
.os-tile-pic { position:relative; display:block; width:var(--tile); height:var(--tile); filter:drop-shadow(0 2px 3px #0002); }
.os-tile .os-badge { position:absolute; top:-5px; right:-6px; min-width:19px; height:19px; padding:0 4px; border-radius:12px; background:#ef353f; color:white; font:500 12px/19px var(--sys-font); text-align:center; }
.os-badge .os-glyph { width:12px;height:12px; }
.os-tile:disabled { filter:grayscale(1); opacity:.63; }
.os-tile.off:enabled { filter:grayscale(1); opacity:.76; cursor:pointer; }
.os-calendar-icon,.os-contacts-icon { width:var(--ios-icon-size); height:var(--ios-icon-size); border-radius:22%; overflow:hidden; display:inline-grid; place-content:center; }
.os-calendar-icon { background:#fff; color:#111; }
.os-calendar-icon small { font:bold 10px/1 var(--sys-font);color:#d3302e; } .os-calendar-icon b { font:350 31px/.95 var(--sys-font); letter-spacing:-.08em; }
.os-contacts-icon { background:linear-gradient(90deg,#c3b6a6 0 86%,#aba49a 86%); color:white; } .os-contacts-icon .os-glyph { width:36px; height:36px; }
.os-home-bottom { flex:0 0 auto; padding:3px 10px 3px; text-align:center; }
.os-notifications-pill { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border:0; border-radius:22px; background:#282b303e; backdrop-filter:blur(12px); color:#fff; font-size:11px; }
.os-notifications-pill .os-glyph { width:13px;height:13px; }
.os-home .os-dock { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:3px; margin:10px 0 0; padding:11px 5px; border:0; border-radius:28px; background:#f7f6fc52; backdrop-filter:blur(24px) saturate(1.55); }
.os-dock-item .os-tile-label { position:absolute; clip-path:inset(100%); width:1px;height:1px; overflow:hidden; }
.os-alert-stack { margin:16px 0 0;display:grid;gap:8px; } .os-alert-stack:empty {display:none;}
.os-navigation { position:sticky; top:0; z-index:4; display:grid; grid-template-columns:48px 1fr 48px; align-items:center; min-height:45px; color:var(--system-fg); background:var(--system-bg); border-bottom:1px solid #85858c35; text-align:center; font-size:16px; }
.os-back { height:44px; border:0; background:none; color:var(--blue); }
.os-list-screen,.os-center { min-height:100%; padding:20px 16px; color:#161619; background:#f2f2f7; }
.os-list-screen h1,.os-center h1 { font:720 32px/1.1 var(--sys-font); letter-spacing:-.048em; margin:8px 0 17px; }
.os-owner { display:flex; align-items:center; gap:12px; padding:13px; border-radius:13px; background:white; }
.os-owner img { width:53px; height:53px; border-radius:50%; object-fit:cover; }
.os-owner span,.os-list-row>span:not(.dst-ios-icon):not(.os-contacts-icon) { display:grid; gap:3px; flex:1; }
.os-owner b { font-size:20px; } .os-owner small,.os-list-row small { font-size:12px; color:#62626a; }
.os-list { margin:17px 0; padding:0 12px; border-radius:14px; background:#fff; }
.os-list-row { display:flex; width:100%; align-items:center; gap:11px; min-height:51px; text-align:left; border:0; background:white; color:#17171c; padding:8px 0; --ios-icon-size:29px; }
.os-list-row+.os-list-row { border-top:1px solid #e3e3e8; }
.os-list-row strong { font-size:15px; font-weight:510; }.os-list-row>.os-glyph { color:#999ba2; width:14px; }
.os-center>.os-notice { margin:10px 0; } .os-center>.os-list-row { padding:10px; border-radius:14px; margin-top:21px; }
.os-agenda article { padding:15px 17px; border-radius:13px; background:white; border-left:4px solid #e56b55; }
.os-agenda article small,.os-agenda>p { color:#b6372d; font-size:12px; font-weight:600; }
.os-souvenir { margin:0; background:#111; color:white; min-height:100%; padding:12px; text-align:center; }
.os-souvenir img { width:100%; max-height:65vh; object-fit:contain; } .os-souvenir figcaption { display:grid; gap:4px; }
.ios-content>.sheet, .ios-content .finalpage { font-family:var(--sys-font); }
.ios-content>.sheet h2,.ios-content .finalpage h2 { font:710 29px/1.09 var(--sys-font); letter-spacing:-.04em; }
.ios-content>.appview { min-height:100%; padding:0; }
.ios-content .hs :is(.hs-fold,.hs-more)>summary,.ios-content .audiozone details>summary,
.ios-content #task details>summary { min-height:44px; align-content:center; }
.ios-content .ff-pager button,.ios-content .ff-luna .ff-pager button { min-height:44px; min-width:44px; }
.ios-content .ff-luna .ff-pager { grid-template-columns:44px; }
.os-sr { position:absolute!important; width:1px!important;height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip-path:inset(50%)!important; }
@media(max-width:640px), (pointer:coarse) and (orientation:landscape) and (max-height:540px) {
  .stage.ios-stage { padding:0; }
  .ios-stage>.device.ios-device { width:100%; inline-size:100%; min-width:100%; max-width:100%; justify-self:stretch; height:100%; max-height:none; border:0; border-radius:0; outline:0; box-shadow:none;
    --status-height:max(44px,env(safe-area-inset-top,0px)); --gesture-height:max(44px,env(safe-area-inset-bottom,0px)); }
  .ios-device .ios-content { padding-left:env(safe-area-inset-left,0px); padding-right:env(safe-area-inset-right,0px); }
}
@media(max-height:670px) {
  .os-widgets { gap:12px; margin-bottom:12px; }
  .os-widget { aspect-ratio:1.35; border-radius:22px; }
  .os-home-scroll { padding-top:7px; } .os-home .os-grid { gap:11px 3px; }
  .os-pin .os-keys { gap:5px 13px; margin:3px auto; }
  .os-pin>h2 { margin:3px; } .os-pin .dots { margin:0 auto 6px; }
}
@media (max-height:470px) {
  .os-home-bottom { padding:1px 10px 2px; } .os-home .os-dock { padding:4px; max-width:370px; margin:3px auto 0; }
  .os-widgets { display:none; } .os-home { --tile:42px; } .os-notifications-pill { padding:2px 8px; }
}
@supports (-webkit-touch-callout:none) {
  @media (display-mode:standalone) {
    .ios-device .status.os-status { background:#141518; }
    .ios-device .status.os-status > * { visibility:hidden; }
    .device.ios-device { --status-height: max(20px,env(safe-area-inset-top,0px)); }
  }
}
