/* Densité commune pour une tablette 13 pouces : mêmes titres, champs et actions. */
:root{
  --tablet-dialog-gap:8px;
  --tablet-card-pad:11px;
  --tablet-title-size:21px;
  --tablet-section-title-size:15px;
  --tablet-control-height:34px;
  --tablet-control-font:13px;
}

body.admin-shell dialog{box-sizing:border-box}
body.admin-shell dialog>.dialog-inner,
body.admin-shell dialog>form.dialog-inner{font-size:13px;line-height:1.3}
body.admin-shell dialog .dialog-head h2,
body.admin-shell .settings-head h2,
body.admin-shell .notification-history-head h2{font:750 var(--tablet-title-size)/1.15 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.25px}
body.admin-shell dialog .eyebrow{font-size:9px;letter-spacing:1.1px}
body.admin-shell dialog .field{font-size:11px}
body.admin-shell dialog .field input,
body.admin-shell dialog .field select,
body.admin-shell dialog .field textarea{font-size:var(--tablet-control-font)}
body.admin-shell dialog .icon-btn{width:34px;height:34px;min-height:34px;padding:0}

/* La fermeture et les actions restent toujours accessibles. */
body.admin-shell #office-form{max-height:calc(100dvh - 10px);overflow:auto}
body.admin-shell #office-form .dialog-head{z-index:6}
body.admin-shell #office-form footer{position:sticky;bottom:0;z-index:6;gap:7px}
body.admin-shell #office-form footer button{min-height:34px;padding:7px 11px;font-size:12px}
body.admin-shell #office-form .choices .type{min-height:36px;padding:5px 7px;font-size:12px}
body.admin-shell #office-form .field input,
body.admin-shell #office-form .field select{min-height:34px}
body.admin-shell #office-form .field textarea{min-height:38px}
body.admin-shell #office-form .complete-date-button,
body.admin-shell #office-form .complete-date-picker{min-height:34px!important;height:34px!important}

/* Client et Destination : largeur utile, sans occuper toute la tablette. */
body.admin-shell #gestion-editor{width:min(780px,calc(100vw - 26px));max-height:calc(100dvh - 18px)}
body.admin-shell #gestion-editor>.dialog-inner{padding:8px}
body.admin-shell #gestion-editor .dialog-head{padding:9px 11px}
body.admin-shell #gestion-editor .dialog-head h2{font-size:var(--tablet-title-size)}
body.admin-shell #gestion-editor .gestion-client-frame{height:min(650px,calc(100dvh - 92px))}
body.admin-shell #gestion-editor #gestion-destination{max-height:calc(100dvh - 18px);overflow:auto}
body.admin-shell #gestion-editor #gestion-destination>.section{padding:11px;margin-top:8px}
body.admin-shell #gestion-editor #gestion-destination footer{position:sticky;bottom:0;z-index:4;margin-top:8px;padding:9px 11px}

/* Doublons : cadre fixe, seule la liste défile verticalement. */
body.admin-shell .duplicate-review-dialog{box-sizing:border-box;width:min(820px,calc(100vw - 26px));max-width:none;max-height:calc(100dvh - 22px);padding:0;overflow:hidden}
body.admin-shell .duplicate-review-dialog .dialog-inner{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;width:100%;max-height:calc(100dvh - 22px);padding:8px;overflow:hidden;background:#e5e9ed}
body.admin-shell .duplicate-review-dialog .dialog-head{margin:0;padding:10px 12px}
body.admin-shell .duplicate-review-dialog .dialog-head h2{flex:1}
body.admin-shell .duplicate-review-intro{margin:8px 0 0;padding:9px 11px;border:1px solid #d5dadf;border-radius:9px;background:#fff;font-size:12px}
body.admin-shell .duplicate-review-dialog [data-duplicate-list]{min-width:0;padding:0 2px;overflow:auto}
body.admin-shell .duplicate-review-group{min-width:0;margin:8px 0;padding:10px;border-radius:9px}
body.admin-shell .duplicate-review-group>h3{font-size:13px}
body.admin-shell .duplicate-review-cards{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:7px}
body.admin-shell .duplicate-review-card{min-width:0;padding:9px;font-size:12px}
body.admin-shell .duplicate-review-dialog footer{margin:0;padding:8px 10px}

/* Notifications : même bandeau de titre que les autres rubriques. */
body.admin-shell .notification-history{padding:10px 8px}
body.admin-shell .notification-history-card{background:#fff}
body.admin-shell .notification-history-head{min-height:76px;padding:13px 16px;border:1px solid #d5dadf;border-radius:10px 10px 0 0;background:#f3f5f7}
body.admin-shell .notification-history-list{max-height:calc(100dvh - 156px);padding:12px 16px}

/* Fiches chargées dans Gestion. */
body.directory-frame{font-size:13px}
body.directory-frame .toolbar{padding:11px 13px}
body.directory-frame .toolbar h1,
body.directory-frame .toolbar h2{font-size:21px}
body.directory-frame .toolbar p{font-size:12px}
body.directory-frame .record{padding:10px 12px}
body.directory-frame .record h2,
body.directory-frame .record h3{font-size:14px}
body.directory-frame .meta{font-size:11px}
body.directory-frame button{min-height:34px;padding:7px 10px;font-size:12px}
body.directory-frame dialog .dialog-head h2{font:750 21px/1.15 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.directory-frame dialog footer{position:sticky;bottom:0;z-index:5;background:#fff}
body.directory-frame dialog#editor .dialog-inner{gap:6px 8px;padding:7px}
body.directory-frame dialog#editor .dialog-head{padding:8px 10px}
body.directory-frame dialog#editor .driver-heading-copy{min-width:0;flex:1}
body.directory-frame dialog#editor .driver-title-line{display:flex;align-items:center;gap:10px;min-width:0}
body.directory-frame dialog#editor .driver-title-line h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.directory-frame dialog#editor .driver-title-line small{flex:none;padding:3px 7px;border-radius:999px;background:#f1f3f5;color:#4d545a;font-size:10px;font-weight:750}
body.directory-frame dialog#editor .dialog-head>#modify{flex:none;align-self:center}
body.directory-frame dialog#editor .modebar{padding:5px 8px}
body.directory-frame dialog#editor .driver-overview{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 8px}
body.directory-frame dialog#editor .driver-overview-column{display:grid;align-content:start;gap:6px;min-width:0}
body.directory-frame dialog#editor .section{padding:8px 10px}
body.directory-frame dialog#editor .section h3{margin-bottom:6px;font-size:15px;line-height:1.15}
body.directory-frame dialog#editor .grid{gap:6px 8px}
body.directory-frame dialog#editor label.field{font-size:11px}
body.directory-frame dialog#editor label.field input,
body.directory-frame dialog#editor label.field select,
body.directory-frame dialog#editor label.field textarea{min-height:32px;margin-top:2px;padding:6px 8px;font-size:12px}
body.directory-frame dialog#editor label.field textarea{min-height:44px}
body.directory-frame dialog#editor .checks{gap:5px}
body.directory-frame dialog#editor .check{min-height:32px;padding:6px 8px;font-size:12px}
body.directory-frame dialog#editor .rule-note{padding:6px 8px;font-size:10px}
body.directory-frame dialog#editor footer{padding:7px 9px}

/* Fiche Client intégrée. */
#taxi-client{font-size:13px;line-height:1.35}
#taxi-client .tx-window{padding:5px}
#taxi-client #tx-main,#taxi-client .tx-person{padding:11px}
#taxi-client h2{font-size:19px}
#taxi-client h3{font-size:14px}
#taxi-client p{margin:4px 0 8px}
#taxi-client .tx-muted{font-size:11px}
#taxi-client .tx-grid{gap:8px 10px}
#taxi-client input:not([type=checkbox]),#taxi-client textarea,#taxi-client select{margin-top:3px;padding:7px 8px;min-height:34px;font-size:13px}
#taxi-client textarea{min-height:48px}
#taxi-client button{min-height:34px;padding:7px 10px;font-size:12px}
#taxi-client .tx-section{margin-top:9px}
#taxi-client .tx-checks{gap:16px;margin:9px 0}
#taxi-client hr{margin:10px 0}
#taxi-client .tx-footer{position:sticky;bottom:0;z-index:3;margin-top:10px;padding:7px 0;background:#fff}

@media(max-width:700px){
  body.admin-shell #office-form footer{flex-wrap:wrap}
  body.admin-shell .duplicate-review-cards{grid-template-columns:1fr}
}
@media(max-width:520px){body.directory-frame dialog#editor .driver-overview{grid-template-columns:1fr}}
