/* Adaptation SIGAH-CRB : ordinateur, tablette et téléphone */
img,video,canvas{max-width:100%}
.workspace,.container,.table-card{min-width:0}
.detail-actions,.actions,.hero-actions{flex-wrap:wrap}
.beneficiary-filters{display:grid;grid-template-columns:minmax(240px,1.5fr) repeat(3,minmax(160px,1fr)) auto auto;align-items:center}
.beneficiary-filters select{width:100%;margin:0}

@media (max-width:1024px){
  .app-shell{display:block}
  .sidebar{position:static;width:100%;min-height:auto;padding:12px 14px}
  .brand{padding:4px 6px 12px;margin-bottom:8px}
  .brand small{max-width:330px}
  .side-nav{display:flex!important;gap:5px;overflow-x:auto;padding:2px 0 5px;scrollbar-width:thin}
  .side-nav .nav-section,.sidebar-version{display:none}
  .side-nav a{flex:0 0 auto;white-space:nowrap;padding:9px 12px}
  .workspace{display:block}
  .topbar{padding:0 18px}
  .container{max-width:100%;padding:24px 20px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid{max-width:none}
  .beneficiary-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .beneficiary-filters .search-field{grid-column:1/-1}
  .table-card{overflow-x:auto;-webkit-overflow-scrolling:touch}
}

@media (max-width:700px){
  body{font-size:14px}
  .sidebar{padding:9px 10px}
  .brand{padding-bottom:8px}
  .brand-mark{width:34px;height:34px}
  .brand b{font-size:15px}
  .brand small{font-size:9px;line-height:1.25}
  .side-nav a{font-size:13px;padding:8px 10px}
  .topbar{min-height:58px;height:auto;padding:8px 12px;gap:10px}
  .topbar-title b{font-size:14px}
  .status-dot,.top-user summary>span:nth-child(2){display:none}
  .top-actions{gap:8px}
  .container,.container.guest{padding:16px 10px}
  .page-head,.section-head{margin:16px 0 12px}
  .page-head h1,.section-head h1{font-size:23px;line-height:1.2}
  .section-head h2{font-size:18px}
  .detail-header{align-items:stretch}
  .detail-header h1{font-size:22px;overflow-wrap:anywhere}
  .detail-actions{width:100%}
  .detail-actions .button{flex:1 1 100%;width:100%}
  .stats,.stats.compact{grid-template-columns:1fr;gap:8px;margin-bottom:18px}
  .stats article,.stats.compact article{padding:13px 15px}
  .stats strong,.stats.compact strong{font-size:24px}
  .form-grid{grid-template-columns:1fr;gap:14px}
  .wide{grid-column:auto}
  .form-card,.panel{padding:14px}
  .form-actions,.actions{width:100%}
  .form-actions button,.actions button{flex:1 1 auto}
  .table-toolbar,.table-toolbar.inline{display:grid;width:100%;grid-template-columns:1fr;gap:8px}
  .beneficiary-filters{grid-template-columns:1fr}
  .beneficiary-filters .search-field{grid-column:auto}
  .search-field,.table-toolbar select{min-width:0;width:100%}
  .table-card table{min-width:720px}
  th,td{padding:10px 12px}
  .pagination-meta{font-size:12px}
  dialog{width:calc(100% - 20px);max-width:none;max-height:92vh;overflow-y:auto;padding:18px}
  .login-card{padding:22px 18px}
  .program{grid-template-columns:48px minmax(0,1fr);gap:12px}
}

@media (min-width:1025px){
  .scanner.panel{margin-inline:auto}
}
