/* FLC final cleanup for Cloudflare deploy */
*{box-sizing:border-box!important;-webkit-tap-highlight-color:transparent}html,body{width:100%;max-width:100%;overflow-x:hidden!important}body{padding-bottom:calc(112px + env(safe-area-inset-bottom))!important}a,button{touch-action:manipulation}.page,.screen,main{max-width:760px;margin-left:auto;margin-right:auto}.page,.screen{overflow:visible!important}.screen{padding-bottom:calc(150px + env(safe-area-inset-bottom))!important}.nav-shield,.hidden-menu,.menu-hidden,.bottom-shadow,.ghost-menu{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}.bottom{position:fixed!important;left:50%!important;right:auto!important;bottom:calc(12px + env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:min(94vw,520px)!important;height:78px!important;min-height:78px!important;z-index:9999!important;padding:7px!important;border-radius:28px!important;overflow:hidden!important;background:rgba(3,8,18,.92)!important;border:1px solid rgba(0,119,255,.28)!important;box-shadow:0 0 22px rgba(0,119,255,.16),0 -8px 28px rgba(0,0,0,.45)!important;backdrop-filter:blur(16px)!important}.bottom a{min-height:60px!important;height:60px!important;border-radius:22px!important;font-size:clamp(.66rem,2.7vw,.78rem)!important;font-weight:750!important;line-height:1.05!important;padding:4px 2px!important}.bottom a svg{width:25px!important;height:25px!important}.bottom a:before{font-size:1.45rem!important}.bottom a.active{box-shadow:0 0 18px rgba(0,119,255,.42)!important}.actions{bottom:calc(102px + env(safe-area-inset-bottom))!important;z-index:1000!important}.actions .btn,.btn.primary,.btn.secondary{height:40px!important;min-height:40px!important;border-radius:14px!important;font-size:clamp(.68rem,2.8vw,.82rem)!important}.logo,.dashboard-logo,img.logo,img[src*="assets/pwa/icon-"]{border-radius:50%!important;aspect-ratio:1/1!important;object-fit:cover!important;overflow:hidden!important;background-color:#000!important}.settings-logo,.page:before,.login-card:before{border-radius:50%!important;background-size:cover!important;overflow:hidden!important}.card,.panel,.setting-card,.profile-card,.finance,.mission,.option,.mission-category{backdrop-filter:blur(14px)!important}.card,.panel,.setting-card{box-shadow:0 0 14px rgba(0,119,255,.14),inset 0 0 20px rgba(0,60,160,.05)!important}.panel h2 svg,.content .panel>h2 svg{width:34px!important;height:34px!important;min-width:34px!important}.bigicon{width:88px!important;height:88px!important}.layout{max-width:100%!important;overflow:visible!important}.content{min-width:0!important;max-width:100%!important}.side{backdrop-filter:blur(14px)!important;overflow:hidden!important}.side svg{width:24px!important;height:24px!important}.side b{font-size:.72rem!important;line-height:1.08!important}.side small{font-size:.58rem!important;line-height:1.12!important}.row{min-width:0!important}.row>div,.row b,.row small{min-width:0!important;overflow-wrap:anywhere}.toggle{flex:0 0 auto!important}.dropdown{z-index:10000!important}@media(max-width:760px){.layout{display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;gap:12px!important}.side{width:112px!important;max-width:112px!important;padding:7px 5px!important;border-radius:16px!important}.side a{grid-template-columns:28px minmax(0,1fr)!important;gap:6px!important;padding:9px 6px!important;border-radius:13px!important}.panel{padding:15px!important;border-radius:18px!important}.content{gap:12px!important}.logo{width:min(30vw,150px)!important}.title h1{font-size:clamp(1.35rem,5vw,1.9rem)!important}.title p{font-size:.94rem!important}.row{grid-template-columns:30px minmax(0,1fr) auto!important;gap:8px!important;min-height:50px!important;padding:9px 0!important}.row svg{width:23px!important;height:23px!important}.row b{font-size:.84rem!important}.row small{font-size:.68rem!important}.value{font-size:.78rem!important}.swatches{gap:6px!important}.dot{width:19px!important;height:19px!important}.toggle{width:42px!important;height:24px!important}.toggle:before{width:19px!important;height:19px!important}.toggle.on:before{left:19px!important}}@media(max-width:430px){.page{padding-left:14px!important;padding-right:14px!important}.layout{grid-template-columns:104px minmax(0,1fr)!important;gap:10px!important}.side{width:104px!important;max-width:104px!important}.side a{grid-template-columns:26px minmax(0,1fr)!important}.side svg{width:22px!important;height:22px!important}.side b{font-size:.68rem!important}.side small{font-size:.55rem!important}.panel h2{font-size:.98rem!important}.panel h2 svg{width:30px!important;height:30px!important}.bottom{height:74px!important;border-radius:26px!important}.bottom a{height:56px!important;min-height:56px!important}.actions{bottom:calc(96px + env(safe-area-inset-bottom))!important}}@media(max-height:760px){.logo{width:min(26vw,132px)!important}.top{margin-bottom:8px!important}.panel{padding:13px!important}.bottom{height:72px!important}.bottom a{height:54px!important;min-height:54px!important}.actions{bottom:calc(92px + env(safe-area-inset-bottom))!important}}

/* FLC cleanup vFinal: remove any old/hidden background menus and keep only the real bottom navbar */
.nav-shield,
.hidden-menu,
.menu-hidden,
.ghost-menu,
.bottom-shadow,
.old-menu,
.old-bottom,
.background-menu,
.bg-menu,
.menu-bg,
.mobile-menu:not(.bottom),
.bottom-menu:not(.bottom),
.bottom-nav:not(.bottom),
.nav-bottom:not(.bottom),
.floating-menu:not(.bottom),
.floating-nav:not(.bottom),
.tabbar:not(.bottom),
.tabs-menu:not(.bottom),
.dock:not(.bottom){
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

body::before, body::after{pointer-events:none!important;}
.bottom{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(12px + env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  width:min(94vw,520px)!important;
  height:74px!important;
  min-height:74px!important;
  max-height:74px!important;
  display:grid!important;
  grid-template-columns:repeat(5,1fr)!important;
  z-index:2147483000!important;
  overflow:hidden!important;
  isolation:isolate!important;
}
.bottom a{
  height:56px!important;
  min-height:56px!important;
  max-height:56px!important;
  font-size:clamp(.64rem,2.4vw,.76rem)!important;
  line-height:1.05!important;
  overflow:hidden!important;
}
.bottom a:before{font-size:1.34rem!important;line-height:1!important;}
.bottom svg{width:23px!important;height:23px!important;max-width:23px!important;max-height:23px!important;}
@media(min-width:900px){
  .bottom{width:520px!important;height:76px!important;max-height:76px!important;}
  .bottom a{height:58px!important;min-height:58px!important;max-height:58px!important;font-size:.72rem!important;}
  .bottom a:before{font-size:1.38rem!important;}
}

/* FLC S25 Ultra visual polish - 2026-05-10
   Target: Samsung Galaxy S25 Ultra / OneUI / QHD+ mobile density.
   Goals: compact premium spacing, no hidden menus, no horizontal overflow, round logos. */
html{
  -webkit-text-size-adjust:100%!important;
  text-size-adjust:100%!important;
  scroll-behavior:smooth;
}
body{
  overflow-x:hidden!important;
  overscroll-behavior-y:none;
  background:#000!important;
  padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;
}
body::before,body::after{pointer-events:none!important;}
*{max-width:100%;}

/* Kill every old/duplicated menu layer except the active bottom nav. */
.nav-shield,.hidden-menu,.menu-hidden,.ghost-menu,.bottom-shadow,.old-menu,.old-bottom,.background-menu,.bg-menu,.menu-bg,.menu-backdrop,.menu-copy,.fake-menu,
.mobile-menu:not(.bottom),.bottom-menu:not(.bottom),.bottom-nav:not(.bottom),.nav-bottom:not(.bottom),.floating-menu:not(.bottom),.floating-nav:not(.bottom),.tabbar:not(.bottom),.tabs-menu:not(.bottom),.dock:not(.bottom){
  display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important;overflow:hidden!important;
}

/* Main mobile canvas: S25 Ultra visual density. */
.page,.screen,main{
  width:100%!important;
  max-width:430px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  overflow-x:hidden!important;
}
.page{padding-left:15px!important;padding-right:15px!important;padding-bottom:calc(108px + env(safe-area-inset-bottom))!important;}
.screen{padding-left:18px!important;padding-right:18px!important;padding-bottom:calc(122px + env(safe-area-inset-bottom))!important;}

/* Logos stay circular on every page, including background div logos. */
.logo,.dashboard-logo,.settings-logo,.topbar .logo,img.logo,img[class*="logo"],img[src*="assets/pwa/icon-"],div.logo[aria-label]{
  border-radius:50%!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  background-size:cover!important;
  background-position:center!important;
  overflow:hidden!important;
  filter:drop-shadow(0 0 14px rgba(0,127,255,.42))!important;
}
.topbar .logo{width:130px!important;height:130px!important;min-width:130px!important;max-width:130px!important;}

/* Bottom navbar: thinner and better placed for OneUI gesture bar. */
.bottom{
  position:fixed!important;
  left:50%!important;right:auto!important;
  bottom:calc(11px + env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  width:min(calc(100vw - 28px),404px)!important;
  height:70px!important;min-height:70px!important;max-height:70px!important;
  padding:6px!important;
  border-radius:26px!important;
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;
  background:rgba(3,8,18,.94)!important;
  border:1px solid rgba(0,112,255,.24)!important;
  box-shadow:0 -8px 26px rgba(0,0,0,.55),0 0 18px rgba(0,112,255,.12)!important;
  backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important;
  z-index:2147483000!important;
  overflow:hidden!important;
}
.bottom a{
  min-width:0!important;
  width:100%!important;
  height:58px!important;min-height:58px!important;max-height:58px!important;
  padding:3px 1px!important;
  border-radius:21px!important;
  font-size:11px!important;
  line-height:1.05!important;
  font-weight:800!important;
  gap:4px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.bottom a svg,.bottom svg{width:22px!important;height:22px!important;min-width:22px!important;max-width:22px!important;}
.bottom a:before{font-size:22px!important;line-height:1!important;}
.bottom a.active{
  box-shadow:0 0 15px rgba(0,119,255,.36)!important;
  background:linear-gradient(145deg,rgba(0,122,255,.95),rgba(0,65,215,.92))!important;
}

/* Dashboard: prevent clipping and make 4-column cards readable on S25. */
.dashboard-page{padding-top:14px!important;}
.dashboard-page .logo{width:132px!important;height:132px!important;margin-bottom:16px!important;}
.dashboard-page .title{font-size:clamp(2.25rem,9vw,3rem)!important;letter-spacing:-.04em!important;}
.dashboard-page .subtitle{font-size:1rem!important;margin-top:8px!important;}
.date-pill,.datebox{
  width:100%!important;max-width:370px!important;height:46px!important;
  border-radius:17px!important;margin:16px auto 18px!important;
  font-size:.98rem!important;white-space:nowrap!important;
}
.grid4,.metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
  overflow:visible!important;
}
.card,.metrics .card{
  min-width:0!important;
  border-radius:15px!important;
  padding:13px 7px!important;
  min-height:136px!important;
  box-shadow:0 0 12px rgba(0,119,255,.12),inset 0 0 18px rgba(0,60,160,.04)!important;
}
.icon-ring,.metrics .icon,.card .icon{
  width:44px!important;height:44px!important;min-width:44px!important;
  font-size:1.25rem!important;margin-bottom:10px!important;
  box-shadow:0 0 14px rgba(0,119,255,.18),inset 0 0 14px rgba(0,119,255,.10)!important;
}
.card h3,.metrics .title{
  font-size:.66rem!important;
  line-height:1.18!important;
  min-height:34px!important;
  letter-spacing:-.01em!important;
  word-break:normal!important;
}
.big,.metrics .amount{font-size:1.35rem!important;line-height:1.05!important;white-space:nowrap!important;}
.money .big{font-size:1.02rem!important;letter-spacing:-.04em!important;}
.up,.down,.pink-t,.trend{font-size:.72rem!important;margin-top:7px!important;}
.note,.small{font-size:.70rem!important;}
.section{margin-top:20px!important;}
.section-title{font-size:1.08rem!important;line-height:1.1!important;}
.activity-list{border-radius:16px!important;overflow:hidden!important;}
.activity{
  grid-template-columns:48px minmax(0,1fr) auto 14px!important;
  gap:8px!important;
  min-height:76px!important;
  padding:11px 10px!important;
}
.activity .icon-ring{width:42px!important;height:42px!important;min-width:42px!important;margin:0!important;}
.activity h4{font-size:.98rem!important;overflow-wrap:anywhere!important;}
.activity p,.kicker{font-size:.74rem!important;}
.amount{font-size:.88rem!important;max-width:96px!important;}
.tag{font-size:.62rem!important;padding:4px 8px!important;}
.arrow{font-size:1.5rem!important;}

/* Missions / Devis landing pages: reduce dead space while keeping buttons just above nav. */
.screen > .logo{width:min(52vw,210px)!important;height:auto!important;margin-top:18px!important;}
.intro{margin-top:18px!important;margin-bottom:0!important;}
.intro h1{font-size:1.55rem!important;line-height:1.12!important;}
.intro p{font-size:1.05rem!important;line-height:1.32!important;}
.actions{
  position:fixed!important;
  left:50%!important;transform:translateX(-50%)!important;
  bottom:calc(92px + env(safe-area-inset-bottom))!important;
  width:min(72vw,300px)!important;max-width:300px!important;
  gap:8px!important;z-index:2147482000!important;
}
.actions .btn,.btn.primary,.btn.secondary{
  height:39px!important;min-height:39px!important;
  border-radius:14px!important;
  font-size:.72rem!important;
  letter-spacing:.03em!important;
}

/* Comptabilité: circular logo, tighter grid, chart full-width. */
.screen .topbar{width:100%!important;display:flex!important;justify-content:center!important;align-items:center!important;position:relative!important;}
.screen .topbar .back{position:absolute!important;left:0!important;top:8px!important;}
.metrics .card{min-height:132px!important;text-align:left!important;align-items:flex-start!important;}
.metrics .title{font-size:.67rem!important;text-align:left!important;}
.metrics .amount{font-size:1.22rem!important;}
.chart-card{width:100%!important;border-radius:15px!important;padding:14px 10px!important;overflow:hidden!important;}
.chart{height:185px!important;max-height:185px!important;}
.chart-head{font-size:.82rem!important;gap:6px!important;}
.chart-labels span{font-size:.64rem!important;}
.breakdown{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;width:100%!important;}
.list-card{min-width:0!important;padding:14px 9px!important;border-radius:15px!important;}
.list-card h3{font-size:.82rem!important;line-height:1.1!important;}
.list-card .bigline{font-size:1.28rem!important;}
.list-card .row{grid-template-columns:22px minmax(0,1fr) auto 10px!important;gap:6px!important;min-height:42px!important;}
.list-card .row strong,.list-card .row span{font-size:.72rem!important;}

/* Paramètres and subpages: keep the premium look without horizontal overflow. */
.param-page,.settings-page{max-width:430px!important;overflow-x:hidden!important;}
.setting-card,.profile-card,.panel,.list-card{
  border-radius:18px!important;
  box-shadow:0 0 12px rgba(0,119,255,.12),inset 0 0 18px rgba(0,60,160,.04)!important;
}
.setting-card{min-height:auto!important;padding:18px!important;}
.setting-card .icon,.setting-card svg{flex-shrink:0!important;}
.layout{grid-template-columns:96px minmax(0,1fr)!important;gap:10px!important;width:100%!important;overflow:hidden!important;}
.side{width:96px!important;max-width:96px!important;min-width:96px!important;padding:7px 5px!important;border-radius:17px!important;overflow:hidden!important;}
.side a{grid-template-columns:24px minmax(0,1fr)!important;gap:5px!important;padding:8px 5px!important;border-radius:13px!important;}
.side svg{width:21px!important;height:21px!important;}
.side b{font-size:.62rem!important;line-height:1.02!important;}
.side small{font-size:.51rem!important;line-height:1.05!important;}
.content{min-width:0!important;width:100%!important;gap:10px!important;overflow:hidden!important;}
.panel{padding:13px!important;overflow:hidden!important;}
.panel h2{font-size:.95rem!important;line-height:1.15!important;gap:8px!important;}
.panel h2 svg,.content .panel>h2 svg{width:28px!important;height:28px!important;min-width:28px!important;}
.bigicon{width:72px!important;height:72px!important;}
.row{grid-template-columns:28px minmax(0,1fr) auto!important;gap:8px!important;min-height:48px!important;padding:8px 0!important;}
.row b,.row h3{font-size:.78rem!important;line-height:1.15!important;}
.row small,.row p{font-size:.63rem!important;line-height:1.15!important;}
.value{font-size:.70rem!important;white-space:nowrap!important;}
.toggle{width:40px!important;height:23px!important;}
.toggle:before{width:18px!important;height:18px!important;top:2.5px!important;}
.toggle.on:before{left:19px!important;}

/* Desktop browser preview: don't look lost on a wide monitor, but keep mobile frame centered. */
@media (min-width:800px){
  .page,.screen,main{max-width:560px!important;}
  .dashboard-page{max-width:620px!important;}
  .bottom{width:520px!important;max-width:520px!important;height:74px!important;}
  .bottom a{height:60px!important;font-size:.72rem!important;}
}

/* Very tall S25 viewport: use a bit more breathing room, not massive empty gaps. */
@media (max-width:520px) and (min-height:850px){
  .screen > .logo{margin-top:26px!important;}
  .actions{bottom:calc(96px + env(safe-area-inset-bottom))!important;}
}

/* Small browser UI / landscape-ish height: keep controls visible. */
@media (max-height:760px){
  .dashboard-page .logo{width:112px!important;height:112px!important;}
  .dashboard-page .title{font-size:2rem!important;}
  .screen > .logo{width:min(45vw,170px)!important;margin-top:8px!important;}
  .intro{margin-top:10px!important;}
  .intro h1{font-size:1.35rem!important;}
  .intro p{font-size:.92rem!important;}
  .bottom{height:66px!important;min-height:66px!important;max-height:66px!important;border-radius:24px!important;}
  .bottom a{height:54px!important;min-height:54px!important;max-height:54px!important;font-size:10.5px!important;}
  .actions{bottom:calc(86px + env(safe-area-inset-bottom))!important;}
}

/* FIX 2026-05-10: restore vertical scrolling on Accueil and Parametres for Samsung/S25 Ultra PWA/browser. */
html,
body{
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
body[data-page="settings"]{
  overflow-y:auto!important;
  height:auto!important;
  min-height:100dvh!important;
}
.dashboard-page,
body[data-page="settings"] .page{
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-y:contain!important;
  padding-bottom:calc(150px + env(safe-area-inset-bottom))!important;
}
.dashboard-page{
  display:block!important;
}
body[data-page="settings"] .settings-list{
  padding-bottom:calc(84px + env(safe-area-inset-bottom))!important;
}
/* Do not let the fixed navbar capture vertical swipes outside its own buttons. */
.bottom{
  touch-action:pan-y!important;
}
