/* VetCRM v3.5.331 — adaptation Android portrait/paysage globale */
html.v35163-android-shell,html.v35163-android-shell body{min-height:100%;min-height:100dvh;max-width:100vw;overflow-x:hidden}
html.v35163-android-shell body{overscroll-behavior-y:none}
html.v35163-android-shell .app-main{min-width:0;max-width:100vw}
html.v35163-android-shell .module,html.v35163-android-shell .panel,html.v35163-android-shell .search-panel,html.v35163-android-shell .result-card,html.v35163-android-shell .demo-card,html.v35163-android-shell .demo-group{min-width:0;max-width:100%}
html.v35163-android-shell img,html.v35163-android-shell svg,html.v35163-android-shell canvas{max-width:100%;height:auto}
html.v35163-android-shell input,html.v35163-android-shell select,html.v35163-android-shell textarea{min-width:0;max-width:100%}
html.v35163-android-shell .table-wrap{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
html.v35163-android-shell .action-row{max-width:100%}

/* Fenêtres : plein écran utile sur téléphone, défilement interne, actions toujours accessibles. */
@media (max-width:760px){
 html.v35163-android-shell .modal-overlay{inset:0!important;padding:0!important;align-items:stretch!important;justify-content:stretch!important;overflow:hidden!important;background:#fff!important}
 html.v35163-android-shell .modal-overlay>.modal,
 html.v35163-android-shell .modal-overlay .modal{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding:12px 12px calc(14px + env(safe-area-inset-bottom,0px))!important;overflow:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;align-self:stretch!important}
 html.v35163-android-shell .modal>.section-head:first-child{position:sticky;top:-12px;z-index:30;background:#fff;padding:12px 0 9px;margin-top:-12px;border-bottom:1px solid #e2e8f0}
 html.v35163-android-shell .modal>.action-row.end:last-child{position:sticky;bottom:calc(-14px - env(safe-area-inset-bottom,0px));z-index:25;background:linear-gradient(to bottom,rgba(255,255,255,.92),#fff 28%);padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px));margin-bottom:calc(-14px - env(safe-area-inset-bottom,0px))}
 html.v35163-android-shell .modal .two-cols,html.v35163-android-shell .modal .form-grid,html.v35163-android-shell .modal .machine-grid,html.v35163-android-shell .modal .admin-grid,html.v35163-android-shell .modal .editor-grid{grid-template-columns:1fr!important}
 html.v35163-android-shell .modal .field.grow{min-width:0}
 html.v35163-android-shell .modal textarea{min-height:76px;max-height:34dvh}
 html.v35163-android-shell .modal button,html.v35163-android-shell .modal .button-like{min-height:42px}
 html.v35163-android-shell .modal .action-row>button,html.v35163-android-shell .modal .action-row>.button-like{flex:1 1 130px}
 html.v35163-android-shell .v35316-account-modal{margin:0!important;height:100dvh!important;max-height:100dvh!important}
 html.v35163-android-shell .v3561-matrix-modal,html.v35163-android-shell .v3562-modal,html.v35163-android-shell .v3565-comparison-modal,html.v35163-android-shell .agenda-day-modal,html.v35163-android-shell .v35327-overlay .modal{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important}
}

/* Portrait : priorité à la lisibilité, une seule colonne. */
@media (max-width:760px) and (orientation:portrait){
 html.v35163-android-shell .app-main{padding:10px}
 html.v35163-android-shell .topbar{padding:9px 10px;gap:8px}
 html.v35163-android-shell .brand{font-size:1.35rem}
 html.v35163-android-shell .header-status{order:3;flex-basis:100%;min-width:0;font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html.v35163-android-shell .header-actions{gap:5px;margin-left:auto}
 html.v35163-android-shell .header-actions #exportFull,html.v35163-android-shell .header-actions label.button-like{display:none!important}
 html.v35163-android-shell .nav{padding:6px 8px;gap:6px}
 html.v35163-android-shell .nav button{padding:9px 12px;min-height:40px}
 html.v35163-android-shell .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 html.v35163-android-shell .v35327-inv-list>div{grid-template-columns:1fr!important}
}

/* Paysage Android : conserver le maximum de hauteur pour le contenu. */
@media (orientation:landscape) and (max-height:600px) and (max-width:1200px){
 html.v35163-android-shell .topbar{min-height:44px;padding:5px 8px;gap:7px;flex-wrap:nowrap}
 html.v35163-android-shell .brand-lockup{display:flex;align-items:center;gap:6px;flex:0 0 auto}
 html.v35163-android-shell .brand{font-size:1.15rem;line-height:1}
 html.v35163-android-shell .version{font-size:.58rem!important;padding:3px 6px}
 html.v35163-android-shell .header-status{min-width:0;flex:1;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html.v35163-android-shell .header-actions{display:flex;gap:5px;flex:0 0 auto;flex-wrap:nowrap}
 html.v35163-android-shell .header-actions #exportFull,html.v35163-android-shell .header-actions label.button-like{display:none!important}
 html.v35163-android-shell .v35322-account-button{max-width:100px!important;min-height:34px!important;padding:6px 8px!important}
 html.v35163-android-shell .nav{padding:3px 6px;gap:5px;min-height:38px}
 html.v35163-android-shell .nav button{padding:6px 10px;min-height:32px;font-size:.82rem}
 html.v35163-android-shell .app-main{padding:7px 9px}
 html.v35163-android-shell .module-head{margin-bottom:7px;gap:7px}
 html.v35163-android-shell .module-head h1{font-size:1.3rem;margin-bottom:2px}
 html.v35163-android-shell .panel,html.v35163-android-shell .search-panel,html.v35163-android-shell .demo-card,html.v35163-android-shell .demo-group{padding:9px}
 html.v35163-android-shell button,html.v35163-android-shell .button-like{padding:7px 10px;min-height:34px}
 html.v35163-android-shell .field{gap:3px}
 html.v35163-android-shell .field>span{font-size:.76rem}
 html.v35163-android-shell .field input,html.v35163-android-shell .field select,html.v35163-android-shell .field textarea{padding:7px 9px}
 html.v35163-android-shell .modal-overlay{background:#fff!important}
 html.v35163-android-shell .modal-overlay .modal{padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px))!important}
 html.v35163-android-shell .modal>.section-head:first-child{top:-8px;margin-top:-8px;padding:7px 0 6px}
 html.v35163-android-shell .modal>.section-head:first-child h2,html.v35163-android-shell .modal>.section-head:first-child h3{font-size:1.1rem;margin:0}
 html.v35163-android-shell .modal>.action-row.end:last-child{padding:7px 0 calc(7px + env(safe-area-inset-bottom,0px))}
 html.v35163-android-shell .modal .two-cols,html.v35163-android-shell .modal .form-grid,html.v35163-android-shell .modal .machine-grid,html.v35163-android-shell .modal .admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px 10px}
 html.v35163-android-shell .modal .wide,html.v35163-android-shell .modal .field.wide{grid-column:1/-1}
 html.v35163-android-shell .modal textarea{min-height:54px;max-height:24dvh}
 html.v35163-android-shell .modal button,html.v35163-android-shell .modal .button-like{min-height:34px}
 html.v35163-android-shell .modal .callout{padding:7px 9px;margin-top:7px}
 html.v35163-android-shell .v35316-mfa-enroll{grid-template-columns:minmax(120px,180px) 1fr!important;gap:10px}
 html.v35163-android-shell .v35319-mfa-qr{max-width:150px}
 html.v35163-android-shell .v35316-security-lines{grid-template-columns:minmax(130px,1fr) minmax(100px,1fr);gap:4px 10px}
 html.v35163-android-shell .v35327-inv-list>div{grid-template-columns:minmax(130px,1.3fr) minmax(100px,1fr) minmax(120px,1fr) auto!important;gap:6px;font-size:.82rem}
 html.v35163-android-shell .v35327-direct-list article{flex-direction:row!important;align-items:center!important;padding:7px 9px}
 html.v35163-android-shell .demo325-compat-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 html.v35163-android-shell .metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 html.v35163-android-shell .metric{padding:8px}.metric strong{font-size:1.25rem}
 html.v35163-android-shell .calendar-cell{min-height:52px;padding:4px}
 html.v35163-android-shell .calendar-weekdays>div{padding:4px;font-size:.75rem}
}

/* Très petit paysage : ne jamais sacrifier le bouton Fermer/Enregistrer. */
@media (orientation:landscape) and (max-height:430px){
 html.v35163-android-shell .modal-overlay .modal{font-size:.9rem}
 html.v35163-android-shell .modal>.section-head:first-child{min-height:38px}
 html.v35163-android-shell .modal .action-row{gap:5px}
 html.v35163-android-shell .modal .action-row>button,html.v35163-android-shell .modal .action-row>.button-like{flex:0 1 auto;min-width:96px}
 html.v35163-android-shell .v3562-map,html.v35163-android-shell .v3565-google-map{height:180px!important}
}
