/* WebApp – tout est limité à html.webapp-active */
.webapp-ui{display:none}
html.webapp-active .wa-appbar,html.webapp-active .wa-bottom{display:flex}
html.webapp-active .wa-drawer,html.webapp-active .wa-overlay,html.webapp-active .wa-progress{display:block}
html.webapp-active .wa-ptr{display:flex}
html.webapp-active .wa-install.is-show{display:flex}
.wa-i{width:24px;height:24px;flex:none}
.wa-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;flex:none}
.wa-btn[hidden]{display:none!important}

html.webapp-active{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.webapp-active body{font-size:var(--wa-fs)}
html.webapp-active body.wa-colors{background-color:var(--wa-bg);color:var(--wa-text)}
html.webapp-active body.wa-colors a{color:var(--wa-accent)}
html.webapp-active body.wa-has-appbar{padding-top:calc(var(--wa-ab-h) + var(--wa-sat))}
html.webapp-active body.wa-has-bottom{padding-bottom:calc(var(--wa-bt-h) + var(--wa-sab))}
html.webapp-active body.wa-noover{overscroll-behavior-y:none}
html.webapp-active body.wa-notap,html.webapp-active body.wa-notap *{-webkit-tap-highlight-color:transparent}
html.webapp-active body.wa-lock{overflow:hidden}

html.webapp-active body.wa-touch a,html.webapp-active body.wa-touch button,html.webapp-active body.wa-touch input,html.webapp-active body.wa-touch select,html.webapp-active body.wa-touch textarea{touch-action:manipulation}
html.webapp-active body.wa-touch button,html.webapp-active body.wa-touch input[type=button],html.webapp-active body.wa-touch input[type=submit],html.webapp-active body.wa-touch .button,html.webapp-active body.wa-touch .wp-block-button__link{min-height:44px}
html.webapp-active body.wa-touch input:not([type=checkbox]):not([type=radio]):not([type=range]),html.webapp-active body.wa-touch select,html.webapp-active body.wa-touch textarea{min-height:44px;font-size:16px}
html.webapp-active body.wa-media img,html.webapp-active body.wa-media video{max-width:100%;height:auto}
html.webapp-active body.wa-media iframe,html.webapp-active body.wa-media embed,html.webapp-active body.wa-media object{max-width:100%}
html.webapp-active body.wa-tables table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
html.webapp-active body.wa-nosel{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html.webapp-active body.wa-nosel input,html.webapp-active body.wa-nosel textarea{-webkit-user-select:text;user-select:text}
html.webapp-active .wp-block-button__link,html.webapp-active .button,html.webapp-active input[type=submit],html.webapp-active button[type=submit]{border-radius:var(--wa-radius)}
html.webapp-active .entry-content img,html.webapp-active .wp-block-image img{border-radius:var(--wa-radius)}

/* Barre d’application */
.wa-appbar{position:absolute;top:0;left:0;right:0;z-index:99990;box-sizing:border-box;height:calc(var(--wa-ab-h) + var(--wa-sat));padding:var(--wa-sat) max(8px,var(--wa-sar)) 0 max(8px,var(--wa-sal));align-items:center;gap:4px;background:var(--wa-ab-bg);color:var(--wa-ab-text)}
body.wa-ab-fixed .wa-appbar{position:fixed}
body.wa-ab-shadow .wa-appbar{box-shadow:0 1px 6px rgba(0,0,0,.12)}
.wa-brand{flex:1;display:flex;align-items:center;gap:8px;min-width:0;color:inherit!important;text-decoration:none!important;font-weight:600;font-size:18px}
.wa-logo{height:var(--wa-logo-h);width:auto;max-width:50vw;display:block}
.wa-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Navigation du bas */
.wa-bottom{position:fixed;left:0;right:0;bottom:0;z-index:99990;box-sizing:border-box;height:calc(var(--wa-bt-h) + var(--wa-sab));padding:0 var(--wa-sar) var(--wa-sab) var(--wa-sal);background:var(--wa-bt-bg);box-shadow:0 -1px 6px rgba(0,0,0,.1);justify-content:space-around;transition:transform .25s}
.wa-bottom.is-hidden{transform:translateY(100%)}
.wa-item{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0;border:0;background:none;color:var(--wa-bt-text)!important;font:inherit;font-size:11px;line-height:1.2;text-decoration:none!important;cursor:pointer}
.wa-item.is-active{color:var(--wa-bt-active)!important}
.wa-item span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body:not(.wa-bt-labels) .wa-item span{display:none}

/* Tiroir */
.wa-overlay{position:fixed;inset:0;z-index:99995;background:rgba(0,0,0,.45);opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s}
.wa-overlay.is-open{opacity:1;visibility:visible}
.wa-drawer{position:fixed;top:0;bottom:0;z-index:99996;width:min(82vw,320px);box-sizing:border-box;overflow-y:auto;padding:var(--wa-sat) 0 var(--wa-sab);background:var(--wa-ab-bg);color:var(--wa-ab-text);transition:transform .28s ease,visibility .28s;visibility:hidden}
.wa-drawer.wa-left{left:0;transform:translateX(-102%)}
.wa-drawer.wa-right{right:0;transform:translateX(102%)}
.wa-drawer.is-open{transform:none;visibility:visible}
.wa-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 8px 8px 20px;border-bottom:1px solid rgba(128,128,128,.25);font-weight:600}
.wa-drawer-brand{display:flex;align-items:center;gap:8px;min-width:0}
.wa-list,.wa-list ul{list-style:none;margin:0;padding:0}
.wa-list a{display:block;padding:14px 20px;color:inherit!important;text-decoration:none!important;font-size:1.05em}
.wa-list ul a{padding-left:36px;font-size:.95em;opacity:.85}
.wa-list .current-menu-item>a,.wa-list .current_page_item>a{color:var(--wa-accent)!important;font-weight:600}

/* Divers */
.wa-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:99999;background:var(--wa-accent);opacity:0}
.wa-progress.is-run{width:80%;opacity:1;transition:width 8s cubic-bezier(.1,.7,.2,1)}
.wa-ptr{position:fixed;top:calc(var(--wa-ab-h) + var(--wa-sat) - 40px);left:50%;z-index:99989;width:36px;height:36px;margin-left:-18px;align-items:center;justify-content:center;border-radius:50%;background:#fff;color:var(--wa-accent);box-shadow:0 2px 8px rgba(0,0,0,.25);opacity:0;pointer-events:none}
.wa-ptr .wa-i{width:20px;height:20px}
.wa-ptr.is-spin{opacity:1;animation:wa-spin .8s linear infinite}
@keyframes wa-spin{to{transform:rotate(360deg)}}
.wa-install{position:fixed;left:12px;right:12px;bottom:calc(var(--wa-sab) + 12px);z-index:99991;align-items:center;gap:8px;padding:10px 6px 10px 14px;border-radius:var(--wa-radius);background:#111827;color:#fff;font-size:14px;box-shadow:0 4px 16px rgba(0,0,0,.3)}
body.wa-has-bottom .wa-install{bottom:calc(var(--wa-bt-h) + var(--wa-sab) + 12px)}
.wa-install-text{flex:1}
.wa-install-btn{padding:8px 14px;border:0;border-radius:var(--wa-radius);background:var(--wa-accent);color:#fff;font:inherit;font-weight:600;cursor:pointer}
.wa-install-x{width:36px;height:36px}
@media (prefers-reduced-motion:reduce){.wa-drawer,.wa-overlay,.wa-bottom{transition:none}}
