/* Cette feuille est chargee uniquement a 900 px et moins, hors impression. */
@media screen and (max-width:900px){
 html{scrollbar-gutter:auto;scroll-padding-top:12px}
 html.pg-mobile-menu-open{overflow:hidden}
 body{min-width:0;min-height:100vh;min-height:100dvh}
 .shell{display:block;min-width:0;width:100%;min-height:100dvh}
 .shell>.stage{width:100%;min-width:0;max-width:100%}
 .stage .content{padding:18px 12px!important;min-width:0;max-width:100%}
 .shell>.sidebar,.shell>.sidebar.compact{position:fixed!important;inset:0 auto 0 0;width:min(300px,88vw)!important;max-width:88vw;flex:none!important;height:100vh;height:100dvh;padding:16px!important;z-index:61;transform:translateX(-105%);visibility:hidden;overflow-y:auto;overscroll-behavior:contain;transition:transform .18s ease}
 .shell>.sidebar.pg-mobile-open{transform:translateX(0);visibility:visible}
 .shell>.sidebar .logo,.shell>.sidebar.compact .logo{width:153px!important;height:62px!important;margin:6px auto 12px!important}
 .shell>.sidebar .nav-title{display:block!important;white-space:normal}
 .shell>.sidebar .abbr,.shell>.sidebar #sidebarToggle{display:none!important}
 .shell>.sidebar .navlink,.shell>.sidebar .crm-toggle{justify-content:flex-start!important;min-height:44px;padding:12px!important;gap:10px}
 .shell>.sidebar .crm-children{margin:4px 0 8px 12px!important;padding-left:8px!important;border-left:1px solid #ffffff25}
 .shell>.sidebar .crm-children[hidden]{display:none!important}
 .shell>.sidebar .v36-preprod{display:block!important}
 .pg-mobile-menu-close{align-self:flex-end;min-height:44px;color:#fff;background:#ffffff16;border:1px solid #ffffff55;padding:10px 14px;border-radius:8px}
 .pg-mobile-menu-backdrop{position:fixed;inset:0;z-index:60;border:0;margin:0;padding:0;border-radius:0;background:#05213999;cursor:pointer}
 .stage>.top{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;height:auto!important;min-height:76px;gap:8px 12px;padding:10px 12px!important}
 .pg-mobile-menu-toggle{min-width:44px;min-height:44px;align-self:center;background:#052a4c;color:#fff;border:1px solid #052a4c;padding:10px 12px;border-radius:8px;font:600 14px 'Segoe UI',sans-serif}
 .v36-head-left{min-width:0;gap:8px;justify-content:flex-end}
 .v36-company{width:48px;height:38px}
 .v36-bonjour{min-width:0;max-width:100%;font-size:13px!important;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .v36-head-right{grid-column:1/-1;min-width:0;width:100%;gap:8px;justify-content:space-between}
 .v36-notifications{display:flex;gap:8px;min-width:0}
 .v36-notifications button{min-height:44px;min-width:44px;padding:8px!important;font-size:13px!important}
 .v36-profile-button{min-height:44px;padding:10px!important;font-size:13px!important;white-space:nowrap}
 .v36-profile-menu{top:calc(100% + 6px);max-width:calc(100vw - 24px)}
 .v36-profile-menu a,.v36-profile-menu button{min-height:44px;display:flex;align-items:center}
 .v36-top-popup{left:12px!important;right:12px!important;top:var(--pg-mobile-header-bottom,128px)!important;width:auto;max-height:calc(100dvh - var(--pg-mobile-header-bottom,128px) - 16px);max-width:calc(100vw - 24px)}
 .stage h1{font-size:25px;overflow-wrap:anywhere}.stage h2{overflow-wrap:anywhere}
 .crm-shell,.editor-top,.editor-columns,.project-grid,.bottom-grid,.conditions-grid,.field-grid,.form-grid,.detail-grid,.member-grid,.member-form .row,.access-grid,.rights,.library-layout,.op-form-grid,.organization-row,.organization-agencies,.cat-global,.cat-group,.cat-ref-row,.cat-option-row,.cat-extra-category,.cat-extra-item,.client-create-dialog .quick-grid{grid-template-columns:minmax(0,1fr)!important;min-width:0}
 .card-lite,.left,.right,.settings-panel,.member-detail,.member-list,.cat-detail,.cat-section,.quote-box,.op-panel,.folders,.files-panel{min-width:0;max-width:100%}
 .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .dash-stat{padding:14px 12px}.dash-stat strong{font-size:22px;overflow-wrap:anywhere}
 .dash-finances,.dash-grid,.dash-grid-bottom,.dash-link-grid{grid-template-columns:minmax(0,1fr)!important}
 .dash-card{padding:16px 12px}
 .dashboard-agency{flex-wrap:wrap;max-width:100%}.dashboard-agency select{min-width:0;width:100%}
 .quote-heading,.quote-heading-end,.quote-toolbar,.quote-footer,.editor-actions,.row-buttons,.form-actions,.invoice-resize-bar,.op-header,.op-filters,.op-footer,.collab-heading,.permissions-toolbar,.cat-heading,.cat-heading-actions,.toolbar,.library-head,.breadcrumb,.heading-row,.file-row .actions{flex-wrap:wrap;gap:10px;max-width:100%}
 .quote-toolbar>input,.quote-toolbar>select,.op-filters>input,.op-filters>select,.toolbar>label,.toolbar>select,.filters>input,.filters>select{flex:1 1 160px;min-width:0;max-width:100%}
 .quote-heading-end{justify-content:flex-start}.quote-footer{align-items:center}
 .quote-heading h1,.quote-heading h2,.quote-heading-end>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .row-buttons>button,.editor-actions>button,.form-actions>button{flex:1 1 130px;white-space:normal}
 .settings-tabs,.op-tabs,.crm-tabs,.tabs{flex-wrap:wrap;min-width:0;gap:4px}
 .settings-tabs button{padding:10px 12px;white-space:normal}
 .settings-panel{padding:16px 12px}
 input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{font-size:16px!important;min-width:0;max-width:100%}
 input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:44px}
 textarea{min-height:88px}
 button,.btn,.module-link,summary{min-height:44px;touch-action:manipulation}
 button{white-space:normal}
 input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px;max-width:24px;flex-shrink:0}
 .check,.checkline,.show-archive,.right-row,.access-grid label{min-height:44px;align-items:center}
 #entryForm #leaveControl{display:flex;align-items:center;gap:10px}
 .invoice-column-resize-handle,.quote-column-resize-handle{display:none!important}
 .quote-scroll,.op-scroll,.planning-scroll,.organization-scroll,.files-panel,.pg-mobile-table-scroll{min-width:0;max-width:100%;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .pg-mobile-scroll-region{position:relative;scrollbar-width:thin}
 .pg-mobile-scroll-region[data-pg-overflow]::before{content:'Faites glisser pour voir la suite →';display:block;position:sticky;left:0;width:100%;padding:10px 8px;color:#385a75;background:#edf4fb;font-size:12px;font-weight:600;text-align:left}
 .pg-mobile-scroll-region:focus-visible{outline:3px solid #4a8cc6;outline-offset:2px}
 .pg-mobile-table-scroll table{min-width:640px}
 .quote-box tbody tr,.op-table tbody tr{height:48px}
 .planning-scroll{max-height:68vh;max-height:68dvh}
 .planning-toolbar>label,.planning-toolbar>button{min-width:0;flex:1 1 140px;max-width:100%}
 .planning-toolbar label:has(input[type=checkbox]){flex:1 1 100%;white-space:normal}
 .planning-time{min-width:50px}.slot-add{min-height:44px}
 .planning-header{scroll-margin-top:8px}.planning-chip{min-height:44px}
 .crm-table-head,.crm-row{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr);gap:8px}
 .crm-row>*{min-width:0;overflow-wrap:anywhere}
 .filters{padding:12px}.heading,.client-head,.client-body{padding:16px 12px}
 .modal-backdrop,.reminder-modal-backdrop,.v36-reminder-backdrop{padding:12px;align-items:center}
 dialog,.dialog,.modal-card,.invoice-dialog,.reminder-modal-card,.v36-reminder-dialog,.organization-dialog{box-sizing:border-box;width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:18px!important;overflow:auto;overscroll-behavior:contain}
 dialog::backdrop{background:#05213999}
 .dialog .choices,.invoice-dialog .choices{grid-template-columns:minmax(0,1fr)}
 .modal-actions,.dialog-actions,.v36-dialog-actions{display:flex;flex-wrap:wrap;gap:8px}
 .modal-actions>button,.dialog-actions>button,.v36-dialog-actions>button{flex:1 1 120px}
 .panel{min-width:0;max-width:100%;padding:24px 18px!important}
 body:not(:has(.shell))>.top{padding:12px 16px;gap:12px}
 body:not(:has(.shell))>.top img{width:132px!important;max-width:55%}
 body:not(:has(.shell)) main{padding:22px 12px;min-width:0;width:100%}
 .panel form,.panel label{min-width:0}.panel input,.panel select,.panel textarea{width:100%}
 .panel .check input{width:auto}
 .panel h1{font-size:25px;overflow-wrap:anywhere}
 .panel button{max-width:100%;line-height:1.4}
 .panel a{overflow-wrap:anywhere}
 [hidden]{display:none!important}
}
@media screen and (max-width:360px){.v36-company{display:none}.v36-bonjour{font-size:12px!important}.v36-notifications{gap:3px}.v36-notifications button{font-size:12px!important}.dash-stat strong{font-size:20px}}
@media screen and (max-width:900px) and (prefers-reduced-motion:reduce){.shell>.sidebar{transition:none}}

/* Recherche et filtres communs aux listes de devis et factures. */
@media screen and (max-width:900px){
 .quote-main #listView>.quote-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:10px}
 .quote-main #listView>.quote-toolbar>#search{grid-column:1/-1;width:100%;box-sizing:border-box;min-height:44px}
 .quote-main #listView>.quote-toolbar>select,.quote-main #listView>.quote-toolbar>label{width:100%;min-width:0;margin:0;box-sizing:border-box}
 .quote-main #listView>.quote-toolbar>label select{width:100%;box-sizing:border-box}
}
