.amv-mobile-tools{max-width:1305px;margin:0 auto 28px;padding:22px 26px;background:#fff;border:1px solid #e0e5f0;border-left:5px solid #ed7a1b;border-radius:12px;box-shadow:0 6px 20px #202d5307}.amv-mobile-tools strong{color:#202d53;font-size:19px}.amv-mobile-tools p{margin:8px 0;color:#62708d}.amv-mobile-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.amv-mobile-tools details{font-size:13px;margin-top:12px}.amv-mobile-tools summary{color:#62708d}#amvPushStatus:empty{display:none}#amvPushStatus{font-size:14px;padding-top:8px}#amvInstallDialog{max-width:720px}#amvInstallDialog li{margin:10px 0}#amvInstallDialog h3{margin-top:26px}#amvInstallNow[hidden]{display:none}@media(max-width:650px){.amv-mobile-tools{margin:0 5% 22px;padding:18px}.amv-mobile-actions{display:grid;grid-template-columns:1fr}.amv-mobile-actions button{width:100%;text-align:center}}

/* Phone layout: search first, compact installation tools, full-width document actions. */
@media (max-width:700px){
 body{-webkit-text-size-adjust:100%}
 header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:14px 16px}
 .brand{gap:9px;min-width:0}.brand>div{min-width:0}
 .brand .logo{width:48px!important;height:48px!important;flex:none}
 header h1{font-size:18px;line-height:1.2;letter-spacing:-.25px}
 .brand span{font-size:11px;line-height:1.4;margin-top:4px}
 header .toolbar{gap:0}
 #helpButton{font-size:0;padding:0;width:44px;min-height:44px;border-radius:10px}
 #helpButton::after{content:'Aide';font-size:12px}
 main{display:flex;flex-direction:column;gap:14px;padding:20px 16px 24px}
 main>.intro{order:1;margin:0}
 .intro h2{font-size:24px;line-height:1.2;letter-spacing:-.4px;margin-bottom:7px}
 .intro p{font-size:14px;line-height:1.5}.intro .count{font-size:12px;margin-top:8px}
 .layout,.layout>section{display:contents}
 .search{order:2;margin:0;padding:14px;border-radius:12px;min-width:0}
 .search label{font-size:15px;line-height:1.35;margin-bottom:9px}
 .search input{min-height:48px;font-size:16px;line-height:1.4;padding:11px 12px;min-width:0}
 aside{order:3;width:100%;padding:11px 13px;border-radius:12px;min-width:0}
 .mobile-themes label{font-size:13px;margin:0 0 6px}
 .mobile-themes select{min-height:46px;font-size:16px;padding:9px 10px}
 #amvMobileTools{order:4;width:100%;margin:0;padding:12px 13px;border-left-width:3px;border-radius:12px;box-shadow:none;min-width:0}
 #amvMobileTools>div:first-child>strong{font-size:14px;line-height:1.35}
 #amvMobileTools>div:first-child>p{display:none}
 .amv-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
 .amv-mobile-actions button{font-size:13px;font-weight:600;line-height:1.35;min-height:52px;padding:9px 8px;border-radius:9px;min-width:0}
 .amv-mobile-tools details{font-size:12px;margin-top:8px}
 .amv-mobile-tools summary{padding:5px 0;min-height:30px}
 .amv-mobile-tools details p{font-size:13px;line-height:1.55}
 #amvPushStatus{font-size:13px;line-height:1.5;margin-bottom:0}
 #results{order:5;min-width:0}#empty{order:6}
 .group-title{font-size:18px;line-height:1.35;margin:22px 0 11px}#results>.group-title:first-child{margin-top:4px}
 .cards{grid-template-columns:minmax(0,1fr);gap:13px}
 .card{padding:18px;min-width:0;border-radius:13px}
 .card .tag{font-size:11px;letter-spacing:.6px;margin-bottom:8px}
 .card h3{font-size:20px;line-height:1.3;letter-spacing:-.2px;overflow-wrap:anywhere}
 .card p{font-size:14px;line-height:1.6;margin-bottom:16px}
 .card .actions{width:100%}.card .actions .button{display:block;min-height:48px;width:100%;text-align:center;font-size:15px;padding:12px}
 .annexes{margin-top:12px;padding-top:6px}
 .annexes summary{min-height:44px;display:flex;align-items:center;font-size:14px;gap:8px}
 .annexes summary::before{content:'+';font-size:20px;font-weight:400;line-height:1}
 .annexes[open] summary::before{content:'−'}
 .annexe-link{font-size:13px;line-height:1.5;min-height:46px;padding:11px 12px;margin:7px 0;overflow-wrap:anywhere}
 footer{padding:16px 16px calc(22px + env(safe-area-inset-bottom));font-size:12px;line-height:1.6}
 footer p{margin:9px 0}footer a{display:inline-block;line-height:1.8}
 dialog{width:calc(100% - 24px);max-height:calc(100dvh - 28px);padding:20px;border-radius:16px;overflow:auto}
 dialog h2{font-size:22px;line-height:1.25}dialog h2:focus{outline:none}dialog h3{font-size:18px}dialog p,dialog li{font-size:15px;line-height:1.55}
 dialog .toolbar button{min-height:46px}
}
@media(max-width:350px){header h1{font-size:16px}.brand span{font-size:10px}.brand .logo{width:40px!important;height:44px!important}.intro h2{font-size:22px}.amv-mobile-actions button{font-size:12px}}

/* Keep document discovery first; app tools and catalogue totals follow the fiches. */
@media(max-width:700px){main>.intro{display:contents}.intro>div:not(.count){order:1}.intro .count{order:7;margin:4px 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:13px}#amvMobileTools{order:8}}


/* Desktop: keep document discovery above installation and notification tools. */
@media(min-width:701px){
body>header{padding:18px max(28px,calc((100vw - 1320px)/2));gap:24px;flex-wrap:nowrap}
body>header .brand .logo{width:74px!important;height:62px!important;flex:none}
body>header .brand{gap:18px}body>header h1{font-size:24px!important;line-height:1.25}
body>header .brand span{font-size:14px;margin-top:5px}
body>header #helpButton{font-size:14px;padding:10px 16px;white-space:nowrap}
main{max-width:1380px;padding:24px 30px 32px}
main>.intro{margin-bottom:12px;min-height:0}.intro .count{font-size:13px}
.layout{grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start}
.layout>section{min-width:0}.layout aside{padding:14px 12px;top:20px}
.layout aside h2{font-size:12px}.layout aside button{font-size:14px;padding:11px 10px;margin:3px 0;line-height:1.4}
.search{padding:17px 20px;border-radius:13px;margin-bottom:20px}
.search label{font-size:16px}.search input{font-size:15px;min-height:46px}
.group-title{font-size:20px;margin:24px 0 12px}.search+.group-title{margin-top:0}
.cards{gap:18px;align-items:stretch}.card{padding:22px;border-radius:13px;box-shadow:0 3px 12px #202d5305}
.card .tag{font-size:11px;letter-spacing:.6px;margin-bottom:9px}.card h3{font-size:20px;line-height:1.35}
.card p{font-size:14px;line-height:1.6}.card .amv-date{flex:0;margin:0 0 12px!important}
.card .actions{margin-top:auto}.card .actions .button{font-size:14px;padding:10px 15px}
.card .annexes{margin-top:14px;padding-top:10px;font-size:14px}
#amvMobileTools{width:100%;max-width:none;margin:32px 0 0;padding:20px 24px;border-left-width:3px;box-shadow:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;align-items:center}
#amvMobileTools strong{font-size:17px}#amvMobileTools p{font-size:14px;margin:5px 0}
#amvMobileTools .amv-mobile-actions{margin:0;gap:10px}#amvMobileTools button{font-size:13px;min-height:44px;padding:10px 13px}
#amvMobileTools details,#amvPushStatus{grid-column:1/-1}#amvMobileTools details{margin-top:2px;font-size:12px}
body>footer{max-width:1320px;margin:0 auto;padding:20px 30px!important;background:transparent!important;font-size:13px!important}body>footer p{margin:6px 0}
}
@media(min-width:701px) and (max-width:1050px){#amvMobileTools{grid-template-columns:1fr}.layout{grid-template-columns:205px minmax(0,1fr)}.cards{grid-template-columns:minmax(0,1fr)}body>header{padding:16px 28px}body>header h1{font-size:21px!important}}




/* Navigation refinement, shared by desktop and phone. */
.amv-results-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 14px;min-height:34px;color:#53617e;font-size:14px}
.amv-reset{border:1px solid #dce2ef;background:white;color:#29449b;border-radius:9px;padding:8px 12px;font:600 13px system-ui;cursor:pointer;min-height:40px}
.amv-reset[hidden],.amv-find-again[hidden]{display:none!important}
.amv-theme-count{margin-left:auto;background:#eef1fa;border-radius:6px;padding:2px 7px;font-size:11px;line-height:1.5;color:#445585;flex:none}
#themes button{display:flex;align-items:center;gap:8px;text-align:left}
.card .tag{display:none}.card{border-top-width:2px}.card h3{margin-top:0}.card .amv-date{font-size:12px!important;line-height:1.5}
.card .annexes summary{cursor:pointer}.card .actions .button{min-height:44px}.card .annexe-link{display:block}
.amv-find-again{position:fixed;right:20px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:80;background:#344ba5;color:white;border:1px solid white;border-radius:24px;box-shadow:0 3px 14px #202d5326;padding:12px 18px;min-height:46px;font:600 14px system-ui;cursor:pointer}
input,select,button,a,summary{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #ed7a1b;outline-offset:3px}
@media(min-width:701px){
 .search{margin-bottom:12px;padding:15px 18px}.card{padding:19px}.card h3{font-size:19px;line-height:1.35;margin-bottom:9px}.card p{margin-top:0;margin-bottom:12px;line-height:1.55}.card .annexes{margin-top:10px;padding-top:7px}.group-title{margin-top:20px}.layout aside{position:sticky;max-height:calc(100vh - 40px);overflow:auto}.layout aside button{padding:10px 9px}.cards{gap:16px}
}
@media(max-width:700px){
 body>header{padding:12px 16px;gap:8px}.brand .logo{width:42px!important;height:44px!important}body>header h1{font-size:17px!important}.brand span{font-size:11px!important}
 main{padding-top:14px;gap:12px}.search{padding:12px}.search label{font-size:14px;margin-bottom:7px}.search input{min-height:46px}
 .layout aside{position:sticky;top:0;z-index:50;padding:8px 12px;box-shadow:0 3px 10px #202d5310;background:#fff}.mobile-themes label{font-size:12px;margin-bottom:4px}.mobile-themes select{min-height:44px;padding:8px 10px}
 .amv-results-bar{order:4;margin:0;min-height:28px;font-size:12px}.amv-reset{min-height:36px;padding:6px 10px;font-size:12px}
 #results{order:5}.group-title{font-size:16px;margin:20px 0 10px}.cards{gap:11px}
 .card{padding:15px;border-radius:12px;box-shadow:none}.card h3{font-size:18px;line-height:1.3;margin-bottom:8px}.card p{font-size:14px;line-height:1.5;margin-top:0;margin-bottom:10px}.card .amv-date{margin:0 0 10px!important}
 .card .actions .button{font-size:14px;min-height:44px;padding:10px 12px;border-radius:9px}.annexes{margin-top:9px;padding-top:0}.annexes summary{min-height:42px;font-size:13px}.annexe-link{padding:10px;min-height:44px;font-size:14px}
 .amv-find-again{right:14px;font-size:13px;padding:10px 14px}footer{padding-bottom:calc(85px + env(safe-area-inset-bottom))!important}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
