/* NIA FIT PWA — couche applicative partagée */
:root{--pwa-safe-top:env(safe-area-inset-top,0px);--pwa-safe-right:env(safe-area-inset-right,0px);--pwa-safe-bottom:env(safe-area-inset-bottom,0px);--pwa-safe-left:env(safe-area-inset-left,0px)}
html.pwa-standalone,html.pwa-standalone body{min-height:100%;min-height:100dvh}
html.pwa-standalone body{overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}
html.pwa-standalone .client-app-header{padding-top:var(--pwa-safe-top)}
html.pwa-standalone .admin-topbar{height:calc(72px + var(--pwa-safe-top));padding-top:var(--pwa-safe-top)}
.pwa-install-card,.pwa-update-card,.pwa-network-toast{position:fixed;z-index:12000;font-family:Manrope,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-sizing:border-box}
.pwa-install-card,.pwa-update-card{left:50%;bottom:calc(22px + var(--pwa-safe-bottom));transform:translate(-50%,18px);width:min(560px,calc(100vw - 28px));display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:14px 14px 14px 16px;border:1px solid rgba(100,40,58,.12);border-radius:22px;background:rgba(248,246,240,.96);box-shadow:0 18px 60px rgba(40,20,27,.2);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s ease}
.pwa-install-card.is-visible,.pwa-update-card.is-visible{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.pwa-install-icon{width:48px;height:48px;border-radius:15px;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(100,40,58,.08);background:#d8d9c9}.pwa-install-icon img{display:block;width:100%;height:100%}
.pwa-install-copy strong,.pwa-update-card strong{display:block;color:#3a2028;font-size:13px;line-height:1.25}.pwa-install-copy span,.pwa-update-card span{display:block;margin-top:3px;color:#755f67;font-size:11px;line-height:1.4}
.pwa-install-actions,.pwa-update-actions{display:flex;align-items:center;gap:7px}.pwa-install-action,.pwa-update-action,.pwa-dismiss{appearance:none;border:0;font:600 11px/1 Manrope,system-ui,sans-serif;cursor:pointer}.pwa-install-action,.pwa-update-action{border-radius:999px;padding:11px 14px;background:#64283a;color:#fff;white-space:nowrap}.pwa-dismiss{width:34px;height:34px;border-radius:50%;background:transparent;color:#78666c;font-size:17px}
.pwa-network-toast{left:50%;bottom:calc(92px + var(--pwa-safe-bottom));transform:translate(-50%,12px);max-width:calc(100vw - 32px);padding:10px 15px;border-radius:999px;background:#2f2528;color:#fff;box-shadow:0 10px 32px rgba(0,0,0,.2);font-size:11px;font-weight:600;opacity:0;pointer-events:none;transition:.2s ease}.pwa-network-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.pwa-ios-help{position:fixed;inset:0;z-index:12010;display:grid;place-items:end center;padding:20px 14px calc(20px + var(--pwa-safe-bottom));background:rgba(28,17,21,.42);opacity:0;pointer-events:none;transition:opacity .2s ease}.pwa-ios-help.is-visible{opacity:1;pointer-events:auto}.pwa-ios-help-card{width:min(480px,100%);padding:24px;border-radius:26px;background:#f8f6f0;box-shadow:0 24px 70px rgba(0,0,0,.24);color:#3a2028}.pwa-ios-help-card h2{margin:0 0 9px;font-family:Georgia,"Times New Roman",serif;font-size:28px;font-weight:500;color:#64283a}.pwa-ios-help-card p{margin:0 0 18px;font-size:13px;line-height:1.6;color:#6f5b62}.pwa-ios-help-card ol{margin:0 0 20px;padding-left:20px;font-size:13px;line-height:1.8}.pwa-ios-help-card button{width:100%;border:0;border-radius:999px;background:#64283a;color:#fff;padding:14px;font:600 12px/1 Manrope,system-ui,sans-serif;cursor:pointer}
@media(max-width:640px){.pwa-install-card,.pwa-update-card{bottom:calc(82px + var(--pwa-safe-bottom));grid-template-columns:auto 1fr;padding:12px;border-radius:20px}.client-layout .pwa-install-card,.client-layout .pwa-update-card{bottom:calc(88px + var(--pwa-safe-bottom))}.pwa-install-icon{width:44px;height:44px;border-radius:14px}.pwa-install-actions,.pwa-update-actions{grid-column:1/-1;justify-content:flex-end}.pwa-network-toast{bottom:calc(144px + var(--pwa-safe-bottom))}}
@media(display-mode:standalone){body{user-select:auto}.pwa-install-card{display:none!important}}
@media(prefers-reduced-motion:reduce){.pwa-install-card,.pwa-update-card,.pwa-network-toast,.pwa-ios-help{transition:none}}

@media(max-width:900px){html.pwa-standalone .site-header{top:calc(10px + var(--pwa-safe-top))}html.pwa-standalone .mobile-menu{padding-top:calc(82px + var(--pwa-safe-top))}html.pwa-standalone .admin-topbar{height:calc(66px + var(--pwa-safe-top))}}
@media(max-width:620px){html.pwa-standalone .site-header{top:calc(8px + var(--pwa-safe-top))}html.pwa-standalone .mobile-menu{padding-top:calc(86px + var(--pwa-safe-top))}}


/* =========================================================
   NIA FIT PWA 3.9.4 — APP SHELL CLIENT
   Le navigateur garde le site public. L’application installée
   se concentre sur les fonctions utiles aux clientes du studio.
   ========================================================= */
.pwa-app-page-title,.pwa-app-account,.pwa-app-desktop-nav,.dock-pwa-only{display:none!important}

html.pwa-standalone body.site-front:not(.client-layout){background:var(--ivory,#fbf9f5)}
html.pwa-standalone body.site-front:not(.client-layout) main{padding-top:calc(64px + var(--pwa-safe-top))!important}
html.pwa-standalone body.site-front:not(.client-layout) .site-footer,
html.pwa-standalone body.site-front:not(.client-layout) .mobile-menu{display:none!important}

/* Barre haute PWA. transform:none corrige le décalage créé par le header web flottant. */
html.pwa-standalone body.site-front:not(.client-layout) .site-header,
html.pwa-standalone body.site-front:not(.client-layout) .site-header.menu-opened{
  inset:0 0 auto 0!important;top:0!important;left:0!important;right:0!important;
  width:100%!important;height:calc(64px + var(--pwa-safe-top))!important;margin:0!important;
  transform:none!important;padding-top:var(--pwa-safe-top)!important;border:0!important;
  border-bottom:1px solid rgba(100,40,58,.09)!important;border-radius:0!important;
  background:rgba(251,249,245,.96)!important;color:var(--ink,#2f2528)!important;box-shadow:none!important;
  backdrop-filter:blur(20px)!important;-webkit-backdrop-filter:blur(20px)!important;
}
html.pwa-standalone body.site-front:not(.client-layout) .header-inner{
  width:min(1180px,100%)!important;max-width:none!important;height:64px!important;min-height:64px!important;
  margin-inline:auto!important;padding:0 max(18px,var(--pwa-safe-right)) 0 max(18px,var(--pwa-safe-left))!important;
  display:grid!important;grid-template-columns:96px minmax(0,1fr) 44px!important;align-items:center!important;gap:14px!important;
}
html.pwa-standalone body.site-front:not(.client-layout) .brand{grid-column:1!important;width:84px!important;min-width:0!important;height:46px!important;justify-self:start!important}
html.pwa-standalone body.site-front:not(.client-layout) .brand img{width:82px!important;height:auto!important;display:block!important}
html.pwa-standalone body.site-front:not(.client-layout) .desktop-nav,
html.pwa-standalone body.site-front:not(.client-layout) .header-account,
html.pwa-standalone body.site-front:not(.client-layout) .header-book,
html.pwa-standalone body.site-front:not(.client-layout) .menu-toggle{display:none!important}
html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-desktop-nav{
  grid-column:2!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;min-width:0;
}
html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-desktop-nav a{
  min-height:38px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;
  color:#746864;font:700 10px/1 Manrope,system-ui,sans-serif;white-space:nowrap;transition:background .18s ease,color .18s ease;
}
html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-desktop-nav a:hover,
html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-desktop-nav a.is-active{
  background:#fff;color:var(--wine,#64283a);box-shadow:inset 0 0 0 1px rgba(100,40,58,.10);
}
html.pwa-standalone body.site-front:not(.client-layout) .header-actions{
  grid-column:3!important;width:44px!important;min-width:44px!important;margin:0!important;justify-self:end!important;display:grid!important;place-items:center!important;
}
html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-account{
  display:grid!important;width:40px;height:40px;place-items:center;border:1px solid rgba(100,40,58,.12);border-radius:50%;background:#fff;color:var(--wine,#64283a);
}
html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-account svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}

html.pwa-standalone body.pwa-auth-surface.site-front:not(.client-layout) .pwa-app-desktop-nav{display:none!important}
html.pwa-standalone body.pwa-auth-surface.site-front:not(.client-layout) .pwa-app-page-title{
  display:block!important;grid-column:2!important;justify-self:center;color:var(--wine-deep,#3a2028);font:700 12px/1.2 Manrope,system-ui,sans-serif;
}
html.pwa-standalone body.client-layout .client-app-footer{display:none!important}

@media (max-width:900px){
  html.pwa-standalone body.site-front:not(.client-layout){padding-bottom:calc(72px + var(--pwa-safe-bottom))}
  html.pwa-standalone body.pwa-auth-surface.site-front:not(.client-layout){padding-bottom:0}
  html.pwa-standalone body.site-front:not(.client-layout) main{padding-top:calc(58px + var(--pwa-safe-top))!important}
  html.pwa-standalone body.site-front:not(.client-layout) .site-header,
  html.pwa-standalone body.site-front:not(.client-layout) .site-header.menu-opened{height:calc(58px + var(--pwa-safe-top))!important}
  html.pwa-standalone body.site-front:not(.client-layout) .header-inner{
    width:100%!important;height:58px!important;min-height:58px!important;
    padding:0 max(16px,var(--pwa-safe-right)) 0 max(16px,var(--pwa-safe-left))!important;
    grid-template-columns:76px minmax(0,1fr) 42px!important;gap:8px!important;
  }
  html.pwa-standalone body.site-front:not(.client-layout) .brand{width:72px!important;height:42px!important}
  html.pwa-standalone body.site-front:not(.client-layout) .brand img{width:70px!important}
  html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-desktop-nav{display:none!important}
  html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-page-title{
    display:block!important;grid-column:2!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    justify-self:center;color:var(--wine-deep,#3a2028);font:700 12px/1.2 Manrope,system-ui,sans-serif;letter-spacing:.01em;
  }
  html.pwa-standalone body.site-front:not(.client-layout) .header-actions{width:42px!important;min-width:42px!important}
  html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-account{width:38px;height:38px}

  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock{
    z-index:175!important;left:0!important;right:0!important;bottom:0!important;transform:none!important;width:100%!important;
    height:calc(68px + var(--pwa-safe-bottom))!important;min-height:calc(68px + var(--pwa-safe-bottom))!important;
    padding:7px max(8px,var(--pwa-safe-right)) var(--pwa-safe-bottom) max(8px,var(--pwa-safe-left))!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;align-items:center!important;gap:0!important;
    border:0!important;border-top:1px solid rgba(100,40,58,.10)!important;border-radius:0!important;
    background:rgba(251,249,245,.97)!important;box-shadow:0 -10px 28px rgba(48,25,31,.06)!important;
    backdrop-filter:blur(22px)!important;-webkit-backdrop-filter:blur(22px)!important;
  }
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock .dock-web-only{display:none!important}
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock .dock-pwa-only{display:grid!important}
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock a{
    appearance:none;border:0;background:transparent;min-width:0;min-height:52px;margin:0;padding:3px 2px;
    display:grid;justify-items:center;align-content:center;gap:4px;border-radius:14px;color:#81746f;font:700 8px/1 Manrope,system-ui,sans-serif;
  }
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock .dock-icon{
    width:27px;height:27px;display:grid;place-items:center;border-radius:10px;transition:background .18s ease,color .18s ease,transform .18s ease;
  }
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock a.is-active:not(.dock-book){color:var(--wine,#64283a)!important}
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock a.is-active:not(.dock-book) .dock-icon{background:rgba(100,40,58,.09)}
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock .dock-book{position:relative;transform:translateY(-8px);background:transparent!important;color:var(--wine,#64283a)!important}
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock .dock-book .dock-icon{
    width:44px!important;height:44px!important;border-radius:50%!important;background:var(--wine,#64283a)!important;color:#fff!important;box-shadow:0 8px 22px rgba(100,40,58,.24);
  }
  html.pwa-standalone body.site-front:not(.client-layout) .mobile-dock .dock-book .dock-label{transform:translateY(-1px)}
  html.pwa-standalone body.pwa-auth-surface.site-front:not(.client-layout) .mobile-dock{display:none!important}
}

@media (max-width:420px){
  html.pwa-standalone body.site-front:not(.client-layout) .header-inner{grid-template-columns:68px minmax(0,1fr) 40px!important;padding-inline:12px!important}
  html.pwa-standalone body.site-front:not(.client-layout) .brand{width:64px!important}
  html.pwa-standalone body.site-front:not(.client-layout) .brand img{width:62px!important}
  html.pwa-standalone body.site-front:not(.client-layout) .pwa-app-page-title{font-size:11px}
}

/* Espace client installé : chrome PWA natif, sans dock flottant de site. */
html.pwa-standalone body.client-layout .client-app-header{
  top:0!important;
  padding-top:var(--pwa-safe-top)!important;
  border-bottom:1px solid rgba(100,40,58,.09)!important;
  background:rgba(250,247,241,.97)!important;
  backdrop-filter:blur(20px)!important;
  -webkit-backdrop-filter:blur(20px)!important;
}

@media (max-width:820px){
  html.pwa-standalone body.client-layout .client-mobile-dock{
    left:0!important;right:0!important;bottom:0!important;width:100%!important;
    min-height:calc(68px + var(--pwa-safe-bottom))!important;
    padding:7px max(8px,var(--pwa-safe-right)) var(--pwa-safe-bottom) max(8px,var(--pwa-safe-left))!important;
    align-items:center!important;
    border:0!important;border-top:1px solid rgba(100,40,58,.10)!important;border-radius:0!important;
    background:rgba(251,249,245,.97)!important;box-shadow:0 -10px 28px rgba(48,25,31,.06)!important;
    backdrop-filter:blur(22px)!important;-webkit-backdrop-filter:blur(22px)!important;
  }
  html.pwa-standalone body.client-layout .client-mobile-dock>a{
    min-height:52px;padding:3px 2px;border-radius:14px;font-size:8px;gap:4px;
  }
  html.pwa-standalone body.client-layout .client-mobile-dock>a>svg{width:20px;height:20px}
  html.pwa-standalone body.client-layout .client-mobile-book{transform:translateY(-8px)}
  html.pwa-standalone body.client-layout .client-mobile-book-icon{width:44px;height:44px}
}

/* NIA PWA 3.9.4 — zone sûre au-dessus de la navigation applicative */
@media (max-width:820px){
  html.pwa-standalone body.client-layout .client-page{padding-bottom:calc(118px + var(--pwa-safe-bottom))!important}
  html.pwa-standalone body.client-layout .purchase-client-page{padding-bottom:calc(138px + var(--pwa-safe-bottom))!important}
  html.pwa-standalone body.client-layout{scroll-padding-bottom:calc(104px + var(--pwa-safe-bottom))}
}
