/* Phase 225: densite adaptative, lisibilite et navigation preservee */
*,*::before,*::after{box-sizing:border-box}
:root{--p225-gap:8px}
/* Ne jamais masquer la navigation globale pour gagner de la place. */
#site-head .dj-nav,#site-head nav{display:revert!important}
/* Formulaires: hauteur compacte sans imposer 3 colonnes a tous les composants. */
.row,.fg{min-width:0}
@media(min-width:1050px){.row,.fg{grid-template-columns:revert!important}}
@media(max-width:700px){.row,.fg{grid-template-columns:revert!important}}
@media(max-width:420px){.row,.fg{grid-template-columns:revert!important}}
/* Empêcher les en-tetes et boutons d'etre coupes sur petits ecrans. */
.card,.panel,fieldset{min-width:0}
.card input,.card select,.card textarea,.panel input,.panel select,.panel textarea{max-width:100%}
button,.btn,.action{white-space:normal;overflow-wrap:anywhere}
.tw,.scroll,.table-wrap{max-height:min(55dvh,620px);overflow:auto;overscroll-behavior:contain}
.tw table,.scroll table,.table-wrap table{width:100%}
.tw thead th,.scroll thead th,.table-wrap thead th{position:sticky;top:0;z-index:2}
/* Zone de travail de l'administration, navigation toujours visible. */
@media(min-width:1050px) and (min-height:670px){
 body.admin215-layout #pane{min-width:0;max-height:calc(100dvh - 175px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 body.admin215-layout #pane .card{margin-bottom:7px!important}
 body.admin215-layout #pane .tw{max-height:calc(100dvh - 370px)}
 body.client-connected .phase192-content{min-width:0;max-height:calc(100dvh - 155px);overflow:auto;overscroll-behavior:contain}
}
/* Les formulaires longs defilent localement au lieu de cacher les champs. */
@media(min-width:800px){
 .admin216-form,.formgrid{gap:8px!important}
 .admin216-form textarea,.formgrid textarea{min-height:60px!important}
}
/* Les menus du client restent accessibles sur mobile. */
@media(max-width:800px){
 body.client-connected #client-menu-163{max-height:32dvh;overflow:auto;overscroll-behavior:contain}
 body.client-connected .phase192-content{min-width:0}
}
/* Tables larges: defilement horizontal dans le tableau, jamais coupe. */
@media(max-width:700px){
 .tw,.scroll,.table-wrap{width:100%;max-width:100%;overflow:auto}
 table{max-width:none}
 .admin216-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media print{#site-head nav,.admin215-side,.admin215-top,.admin215-help{display:none!important}.tw,.scroll,.table-wrap,#pane{max-height:none!important;overflow:visible!important}body{background:white!important}}
