/* Use a compact scale for dense actions, while preserving a larger touch target. */
:root {
  --action-label: clamp(1.125rem, calc(1.05rem + .22vw), 1.25rem);
  --action-compact-label: clamp(1rem, calc(.945rem + .17vw), 1.125rem);
  --record-action-label: clamp(1.0625rem, calc(.98rem + .24vw), 1.1875rem);
  --action-height: 2.75rem;
  --action-compact-height: 2.5rem;
}
:where(table, .table-scroll, .cell-actions) .button,
.button:is(.small, .small-button) {
  --action-size: var(--action-compact-label);
  --action-target: var(--action-compact-height);
}
body .button:not(.icon-button),
body #sig-content :is(button,.btn),
body :is(.public-account-dialog .public-account-button, #interest-dialog .interest-send, #checkout-content .checkout-editor-save) {
  font-size: var(--action-size, var(--action-label)) !important;
  line-height: 1.25;
  min-height: var(--action-target, var(--action-height));
  height: auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
#modal .sd132-more {
  margin: .65rem 0 0;
  color: #543f32;
  font-weight: 650;
}
@media (max-width: 760px), (max-height: 600px) {
  /* The toolbar scrolls with the record so every action and field is reachable. */
  body[data-portal] #modal.v64-record-modal .modal-inner {
    display: block;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    overflow: auto;
  }
  body[data-portal] #modal.v64-record-modal .modal-body {
    overflow: visible;
    max-height: none;
  }
  body[data-portal] #modal.v64-record-modal .modal-header { position: static; }
  body[data-portal] #modal.v64-record-modal .v64-record-toolbar > .button {
    min-width: 0;
    max-width: 100%;
  }
}
@media (pointer: coarse), (max-width: 760px) {
  :root { --action-compact-height: 2.75rem; }
  body[data-portal] :is(#app, #modal, dialog, [role="dialog"]) .button,
  body[data-portal] :is(#app, #modal) .toolbar button {
    min-height: var(--action-compact-height) !important;
  }
  body[data-portal] :is(#app, #modal, dialog) .button.icon-button {
    min-width: var(--action-compact-height);
  }
}
@media (max-width: 700px) {
  body[data-portal] #modal .v64-record-footer {
    display: flex;
    flex-wrap: wrap;
  }
  body[data-portal] #modal .v76-client-access-commands {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  }
  body[data-portal] #modal.v64-record-modal .client-contact-values {
    grid-template-columns: minmax(0,1fr);
  }
}
@media (min-width: 651px) {
  #modal .v64-record-grid > .sd130-record:has(+ .v84-exchanges-card) { grid-column-start: 1; }
}
body .site-header .public-header-actions .header-action {
  font-size: var(--action-label) !important;
  min-height: var(--action-height);
  white-space: normal;
  text-align: center;
}
@media (min-width: 1240px) and (max-width: 1510px) {
  body .site-header:has(.public-header-actions) {
    grid-template-columns: minmax(0,1fr) auto;
  }
  body .site-header .identity-row .public-header-actions { grid-column: 2; }
  body .site-header #main-nav { grid-column: 1/-1; grid-row: 2; }
}
body.home-photo { overflow-x: clip; }
.record-billing-lines { display: grid; justify-items: start; gap: .2rem; }
@media (max-width: 980px) {
  body.home-photo #panel-accueil .photo-backdrop { transform: none; width: 100%; }
}

