/* Responsive : page acces (fenêtre étroite → large). Tout est scopé body.embed. */

body.embed #page-raccourcis{container:acces / inline-size;min-width:0}
body.embed #page-raccourcis .dv-head{padding:clamp(12px,2.2cqi,20px)}
body.embed #page-raccourcis .dv-head .filters-row{gap:12px 16px;flex-wrap:wrap}
body.embed #page-raccourcis .dv-lead{flex:1 1 320px;min-width:0!important;max-width:75ch}
body.embed #page-raccourcis #btn-new-raccourci{min-height:40px;flex:none;white-space:nowrap}
body.embed #page-raccourcis .raccourcis-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,clamp(240px,26cqi,320px)),1fr));gap:clamp(10px,1.6cqi,16px);align-items:stretch}
body.embed #page-raccourcis .raccourci-card{min-width:0;min-height:76px;padding:clamp(12px,1.6cqi,16px);gap:clamp(10px,1.4cqi,14px)}
body.embed #page-raccourcis .raccourci-icon{flex:none}
body.embed #page-raccourcis .raccourci-nom{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.embed #page-raccourcis .raccourci-chemin{white-space:normal;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}
body.embed #page-raccourcis .raccourci-edit{width:40px;height:40px;min-width:40px;flex:none;margin:-6px -6px -6px 0;opacity:.75}
body.embed #page-raccourcis .raccourci-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@container acces (max-width:560px){
  body.embed #page-raccourcis .dv-head .filters-row{flex-direction:column;align-items:stretch}
  body.embed #page-raccourcis .dv-lead{flex:none}
  body.embed #page-raccourcis #btn-new-raccourci{width:100%;margin-left:0!important;min-height:44px}
  body.embed #page-raccourcis .raccourcis-grid{grid-template-columns:1fr}
  body.embed #page-raccourcis .raccourci-nom{white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}
}
@container acces (min-width:1500px){
  body.embed #page-raccourcis .raccourcis-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
}

/* fenêtre d'ajout / modification */
body.embed #raccourci-modal.modal-backdrop{padding:clamp(8px,2vw,16px);align-items:center;overflow:auto}
body.embed #raccourci-modal .modal{width:min(520px,100%);max-width:100%;max-height:calc(100dvh - 24px);overflow:auto;padding:clamp(16px,3vw,24px);box-sizing:border-box;overscroll-behavior:contain}
body.embed #raccourci-modal .input{min-height:40px;width:100%;box-sizing:border-box}
body.embed #raccourci-modal .modal-actions{flex-wrap:wrap;position:sticky;bottom:calc(-1 * clamp(16px,3vw,24px));background:var(--card);padding:12px 0 2px;margin-top:14px;border-top:1px solid var(--border)}
body.embed #raccourci-modal .modal-actions .btn{min-height:40px}
body.embed #raccourci-modal #btn-delete-raccourci{margin-right:auto}
@media (max-width:640px){
  body.embed #raccourci-modal .modal-actions .btn{flex:1 1 auto}
  body.embed #raccourci-modal #btn-delete-raccourci{flex-basis:100%;order:3;margin-right:0}
}
@media (max-height:640px){
  body.embed #raccourci-modal h3{margin-bottom:8px;font-size:17px}
  body.embed #raccourci-modal .form-grid{gap:8px}
}

/* testeur final : badge de synchro vide ne doit pas laisser un trait fantome */
.badge[hidden],.topbar [hidden]{display:none!important}
