/* Échos Santé — mode application sur mobile (≤ 760 px). Rien ne change sur ordinateur. */
.app-tabbar,.app-sheet,.app-install{display:none}

@media (max-width:760px){
	body.echos-app{--tabbar-h:64px;--safe-b:env(safe-area-inset-bottom,0px);padding-bottom:calc(var(--tabbar-h) + var(--safe-b));-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}
	body.echos-app ::selection{background:#d6ff73;color:#073c2b}

	/* En-tête compact, qui se replie au défilement */
	body.echos-app header{padding-top:env(safe-area-inset-top,0px);transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .2s;will-change:transform}
	body.echos-app.app-scrolled header{box-shadow:0 6px 24px rgba(3,34,23,.10)}
	body.echos-app.app-header-hidden header{transform:translateY(-100%)}
	body.echos-app .masthead{min-height:0;padding-top:10px;padding-bottom:10px}
	body.echos-app .masthead .icon-button{width:40px;height:40px;min-width:40px}
	body.echos-app.app-scrolled .masthead .brand small,body.echos-app.app-scrolled .masthead .brand-tagline{display:none}

	/* Éléments fixes du bas : au-dessus de la barre d'onglets */
	body.echos-app .sticky-share{bottom:calc(var(--tabbar-h) + var(--safe-b) + 10px)}
	body.echos-app .toast{bottom:calc(var(--tabbar-h) + var(--safe-b) + 14px)}
	body.echos-app .newspaper-promo{bottom:calc(var(--tabbar-h) + var(--safe-b) + 10px);width:calc(100% - 20px);max-height:calc(100vh - var(--tabbar-h) - 90px);overflow:auto}
	body.echos-app .footer-up{display:none}
	body.echos-app footer{padding-bottom:12px}

	/* Barre d'onglets */
	body.echos-app .app-tabbar{position:fixed;z-index:60;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,1fr);height:calc(var(--tabbar-h) + var(--safe-b));padding:0 6px var(--safe-b);background:rgba(255,255,255,.88);border-top:1px solid rgba(7,60,43,.10);-webkit-backdrop-filter:saturate(1.6) blur(18px);backdrop-filter:saturate(1.6) blur(18px);box-shadow:0 -8px 30px rgba(3,34,23,.08)}
	body.echos-app .app-tab{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;margin:0;padding:6px 0 4px;border:0;background:none;color:#5f6f64;font-family:inherit;font-weight:600;font-size:10.5px;line-height:1.1;letter-spacing:.1px;text-decoration:none;cursor:pointer;transition:color .2s}
	body.echos-app .app-tab svg{width:24px;height:24px;padding:3px 14px;box-sizing:content-box;border-radius:100px;transition:background .25s,color .2s,transform .2s}
	body.echos-app .app-tab.is-active{color:#073c2b}
	body.echos-app .app-tab.is-active svg{background:#d6ff73;color:#073c2b}
	body.echos-app .app-tab.is-active[data-tab="saved"] svg{fill:currentColor}
	body.echos-app .app-tab.is-pressed svg,body.echos-app .app-tab:active svg{transform:scale(.88)}
	body.echos-app .app-tab:focus-visible{outline:2px solid #009035;outline-offset:-4px;border-radius:14px}
	body.echos-app .app-badge{position:absolute;top:4px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;border:2px solid #fff;border-radius:20px;background:#e23d3d;color:#fff;font-size:9.5px;font-weight:700;line-height:13px;text-align:center}

	/* Feuille « Rubriques » */
	body.echos-app .app-sheet{display:block;position:fixed;inset:auto 0 0 0;width:100%;max-width:none;max-height:82vh;margin:0;padding:8px 18px calc(18px + var(--safe-b));box-sizing:border-box;overflow:auto;border:0;border-radius:24px 24px 0 0;background:var(--surface,#fff);color:var(--ink,#0d2a20);box-shadow:0 -20px 60px rgba(3,34,23,.25);transform:translateY(105%);transition:transform .26s cubic-bezier(.2,.8,.2,1)}
	body.echos-app .app-sheet:not([open]){display:none}
	body.echos-app .app-sheet.is-open{transform:none}
	body.echos-app .app-sheet::backdrop{background:rgba(3,34,23,.45);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
	.app-sheet-handle{width:42px;height:5px;margin:2px auto 12px;border-radius:5px;background:#c9d3c4}
	.app-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
	.app-sheet-head h2{margin:0;font-size:22px;letter-spacing:-.4px}
	.app-sheet-head form{margin:0}
	.app-sheet-close{width:36px;height:36px;border:0;border-radius:50%;background:#eef2ea;color:#073c2b;font-size:15px;cursor:pointer}
	.app-sheet-links{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 16px;padding:0;list-style:none}
	.app-sheet-links a{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;padding:10px 14px;box-sizing:border-box;border:1px solid var(--line,#d9e2d3);border-radius:14px;background:var(--paper,#f7f9f4);color:inherit;font-weight:600;font-size:14px;line-height:1.25;text-decoration:none}
	.app-sheet-links a:active{background:#d6ff73;color:#073c2b}
	.app-sheet-links small{flex:none;padding:2px 7px;border-radius:20px;background:#073c2b;color:#d6ff73;font-size:10.5px;font-weight:700}
	.app-sheet-actions{display:flex;flex-wrap:wrap;gap:8px}
	.app-sheet-actions>*{flex:1 1 140px;display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 16px;border:0;border-radius:100px;background:#073c2b;color:#fff;font-family:inherit;font-weight:600;font-size:14px;line-height:1;text-decoration:none;cursor:pointer}
	.app-sheet-actions>[data-app-action="dark"]{background:#eef2ea;color:#073c2b}
	.app-sheet-actions>[data-app-action="install"]{background:#d6ff73;color:#073c2b}
	.app-sheet-actions>[hidden]{display:none}

	/* Recherche plein écran */
	body.echos-app #search-dialog{width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:calc(18px + env(safe-area-inset-top,0px)) 18px 18px;box-sizing:border-box;border:0;border-radius:0}
	body.echos-app #search-dialog input[type=search]{font-size:16px}

	/* Toucher : réponse visuelle façon application */
	body.echos-app article,body.echos-app .story-card{transition:transform .15s ease}
	body.echos-app .is-pressed:not(.app-tab){transform:scale(.985)}
	body.echos-app a,body.echos-app button{touch-action:manipulation}

	/* Bandeau d'installation */
	body.echos-app .app-install,body .app-install{position:fixed;z-index:65;left:10px;right:10px;bottom:calc(var(--tabbar-h,0px) + var(--safe-b,0px) + 10px);display:grid;grid-template-columns:44px 1fr auto auto;align-items:center;gap:12px;padding:12px 12px 12px 14px;border-radius:18px;background:#073c2b;color:#fff;box-shadow:0 16px 40px rgba(3,34,23,.35);transform:translateY(20px);opacity:0;transition:transform .3s,opacity .3s}
	.app-install.is-visible{transform:none;opacity:1}
	.app-install img{width:44px;height:44px;border-radius:12px}
	.app-install strong{display:block;font-size:14px}
	.app-install span{display:block;margin-top:2px;color:#b9d4c3;font-size:12px;line-height:1.35}
	.app-install-go{padding:9px 14px;border:0;border-radius:100px;background:#d6ff73;color:#073c2b;font-family:inherit;font-weight:700;font-size:13px;line-height:1;cursor:pointer}
	.app-install-x{width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;cursor:pointer}

	/* Hors ligne */
	body.echos-app.is-offline .app-tabbar{border-top-color:#f0a000}
	body.echos-app.is-offline .app-tabbar:before{content:"Hors ligne";position:absolute;top:-22px;left:50%;transform:translateX(-50%);padding:3px 10px;border-radius:20px;background:#f0a000;color:#1d2327;font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}

	/* Application installée : barre d'état intégrée */
	.is-standalone body.echos-app .utility{padding-top:env(safe-area-inset-top,0px)}

	/* Mode sombre */
	body.echos-app.dark .app-tabbar{background:rgba(9,26,20,.88);border-top-color:rgba(214,255,115,.12)}
	body.echos-app.dark .app-tab{color:#9fb5a8}
	body.echos-app.dark .app-tab.is-active{color:#d6ff73}
	body.echos-app.dark .app-tab.is-active svg{background:rgba(214,255,115,.16);color:#d6ff73}
	body.echos-app.dark .app-badge{border-color:#091a14}
	body.echos-app.dark .app-sheet-close,body.echos-app.dark .app-sheet-actions>[data-app-action="dark"]{background:rgba(255,255,255,.08);color:#e9f2ec}
}

@media (max-width:760px) and (prefers-reduced-motion:reduce){
	body.echos-app header,body.echos-app .app-sheet,.app-install{transition:none}
}
@media print{.app-tabbar,.app-sheet,.app-install{display:none!important}}
