/* GestionFrais — compléments au DSFR. Couleurs = variables du DSFR (clair/sombre automatique).
   La police Marianne est réservée aux services de l'État : police système à la place. */
:root {
  --gf-font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gf-radius: 8px;
  --gf-header-h: 56px;
  --gf-bottom-h: 64px;
  --gf-debit: var(--text-default-error);
  --gf-credit: var(--text-default-success);
}
html, body { font-family: var(--gf-font); }
body { background: var(--background-alt-grey); min-height: 100vh; }
.gf-noscroll { overflow: hidden; }
.gf-hidden { display: none !important; }
.gf-grow { flex: 1; min-width: 0; }
.gf-block { display: block; }
.gf-m0 { margin: 0 !important; }
.gf-mr { margin-right: .75rem; }
.gf-right { text-align: right; }
.gf-nowrap { white-space: nowrap; }
.gf-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875rem; }
.gf-muted { color: var(--text-mention-grey); }
.gf-ok { color: var(--text-default-success); }
.gf-text-error { color: var(--text-default-error); }
.gf-text-warn { color: var(--text-default-warning); font-weight: 700; }
.gf-debit { color: var(--gf-debit); }
.gf-credit { color: var(--gf-credit); }
.gf-full { width: 100%; justify-content: center; }
.gf-row { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.gf-row--wrap { display: flex; }
.gf-row--end { justify-content: flex-end; }
.gf-stack > * + * { margin-top: .5rem; }
.gf-h100 { height: 100%; }
.gf-narrow { max-width: 28rem; }
.gf-w-cur { max-width: 6rem; text-transform: uppercase; }
.gf-w-rate { max-width: 5rem; }
.gf-money { text-align: right; font-variant-numeric: tabular-nums; }
.gf-amount { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.gf-clickable { cursor: pointer; }
.gf-clickable:hover td { background: var(--background-contrast-grey-hover); }
.gf-btn--danger { background-color: var(--background-action-high-error) !important; }
.gf-busy { position: relative; color: transparent !important; }
.gf-busy::after { content: ''; position: absolute; inset: 50% auto auto 50%; width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem; border: 2px solid var(--text-inverted-grey, #fff); border-top-color: transparent; border-radius: 50%; animation: gf-spin .7s linear infinite; }
.fr-btn--secondary.gf-busy::after, .fr-btn--tertiary.gf-busy::after, .fr-btn--tertiary-no-outline.gf-busy::after { border-color: var(--text-action-high-blue-france); border-top-color: transparent; }

/* ---------- Chargement ---------- */
.gf-loading { display: flex; justify-content: center; padding: 4rem 0; }
.gf-spinner { width: 2rem; height: 2rem; border: 3px solid var(--border-default-grey); border-top-color: var(--background-action-high-blue-france); border-radius: 50%; animation: gf-spin .8s linear infinite; display: inline-block; }
.gf-spinner--sm { width: 1rem; height: 1rem; border-width: 2px; vertical-align: middle; }
@keyframes gf-spin { to { transform: rotate(360deg); } }

/* ---------- En-tête et navigation ---------- */
.gf-header { position: sticky; top: 0; z-index: 100; background: var(--background-default-grey); box-shadow: 0 1px 0 var(--border-default-grey); }
.gf-header__inner { display: flex; align-items: center; gap: .75rem; height: var(--gf-header-h); padding: 0 1rem; max-width: 78rem; margin: 0 auto; }
.gf-brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; background: none; color: var(--text-title-grey); font-weight: 700; font-size: 1.125rem; }
.gf-brand img { border-radius: 8px; }
.gf-company-name { font-size: .875rem; color: var(--text-mention-grey); border-left: 1px solid var(--border-default-grey); padding-left: .75rem; max-width: 14rem; }
.gf-company-select { width: auto; max-width: 14rem; margin: 0; padding-top: .375rem; padding-bottom: .375rem; font-size: .875rem; }
.gf-nav { max-width: 78rem; margin: 0 auto; padding: 0 .5rem; overflow-x: auto; }
.gf-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: .25rem; }
.gf-nav li { padding: 0; }
.gf-nav a { display: inline-flex; align-items: center; gap: .375rem; padding: .625rem .75rem; font-size: .875rem; color: var(--text-default-grey); text-decoration: none; background: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.gf-nav a [class*='fr-icon-']::before { --icon-size: 1rem; }
.gf-nav a:hover { background: var(--background-default-grey-hover); }
.gf-nav a[aria-current='page'] { color: var(--text-active-blue-france); border-bottom-color: var(--border-active-blue-france); font-weight: 700; }
.gf-user { position: relative; }
.gf-userbtn { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; padding: .25rem .5rem; border-radius: var(--gf-radius); cursor: pointer; color: var(--text-default-grey); }
.gf-userbtn:hover { background: var(--background-default-grey-hover); }
.gf-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--background-action-low-blue-france); color: var(--text-action-high-blue-france); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; }
.gf-menu { position: absolute; right: 0; top: calc(100% + .25rem); min-width: 15rem; background: var(--background-overlap-grey); box-shadow: 0 6px 18px rgba(0, 0, 18, .16); border-radius: var(--gf-radius); padding: .375rem; z-index: 200; }
.gf-menu__head { display: flex; flex-direction: column; padding: .5rem .75rem; border-bottom: 1px solid var(--border-default-grey); margin-bottom: .25rem; }
.gf-menu a, .gf-menu > button { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .75rem; text-align: left; background: none; border: 0; font-size: .875rem; color: var(--text-default-grey); text-decoration: none; cursor: pointer; border-radius: 4px; }
.gf-menu a:hover, .gf-menu > button:hover { background: var(--background-default-grey-hover); }
.gf-menu__langs { display: flex; gap: .25rem; padding: .375rem .75rem; }
.gf-menu__langs button { flex: 1; padding: .25rem; font-size: .75rem; border: 1px solid var(--border-default-grey); background: none; border-radius: 4px; cursor: pointer; color: var(--text-default-grey); }
.gf-menu__langs button[aria-pressed='true'] { background: var(--background-action-high-blue-france); color: var(--text-inverted-blue-france); border-color: transparent; }

/* Barre du bas et tiroir (mobile) */
.gf-bottombar { display: none; }
.gf-drawer { position: fixed; inset: 0; z-index: 300; background: rgba(22, 22, 22, .5); }
.gf-drawer__panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--background-default-grey); border-radius: 16px 16px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.gf-drawer ul { list-style: none; margin: 0; padding: 0; }
.gf-drawer a { display: flex; gap: .75rem; align-items: center; padding: .875rem .5rem; color: var(--text-default-grey); text-decoration: none; background: none; border-bottom: 1px solid var(--border-default-grey); }
.gf-drawer a[aria-current='page'] { color: var(--text-active-blue-france); font-weight: 700; }

.gf-main { padding-bottom: 3rem; }
.gf-page { padding-top: 1.5rem; }
.gf-page__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.gf-page__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.gf-title { margin-bottom: .25rem; }
.gf-subtitle { margin: 0; }
.gf-crumbs { font-size: .8125rem; margin-bottom: .25rem; color: var(--text-mention-grey); }
.gf-crumbs a { color: inherit; }

@media (max-width: 767px) {
  .gf-hide-sm { display: none !important; }
  .gf-nav { display: none; }
  .gf-header__inner { padding: 0 .75rem; gap: .5rem; }
  .gf-brand__name { display: none; }
  .gf-company-name { border: 0; padding: 0; color: var(--text-title-grey); font-weight: 700; font-size: 1rem; }
  .gf-main { padding-bottom: calc(var(--gf-bottom-h) + 2rem + env(safe-area-inset-bottom)); }
  .gf-page { padding-top: 1rem; }
  .gf-bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; height: calc(var(--gf-bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--background-default-grey); box-shadow: 0 -1px 0 var(--border-default-grey); align-items: stretch; }
  .gf-bottombar > a, .gf-bottombar > button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .6875rem; color: var(--text-mention-grey);
    text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
  .gf-bottombar > a[aria-current='page'] { color: var(--text-active-blue-france); font-weight: 700; }
  .gf-bottombar__camera { flex: 0 0 4.5rem !important; }
  .gf-bottombar__camera span { width: 3.5rem; height: 3.5rem; margin-top: -1.5rem; border-radius: 50%; background: var(--background-action-high-blue-france); color: var(--text-inverted-blue-france);
    display: flex !important; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 145, .35); }
  .gf-bottombar__camera span::before { --icon-size: 1.75rem; }
  .gf-page__actions { width: 100%; }
  .gf-page__actions .fr-btn { flex: 1; justify-content: center; }
}

/* ---------- Onglets, filtres, listes ---------- */
.gf-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--border-default-grey); margin-bottom: 1.25rem; }
.gf-tab { padding: .625rem 1rem; white-space: nowrap; font-size: .875rem; color: var(--text-default-grey); text-decoration: none; background: none; border-bottom: 2px solid transparent; }
.gf-tab:hover { background: var(--background-default-grey-hover); }
.gf-tab[aria-current='page'] { color: var(--text-active-blue-france); border-bottom-color: var(--border-active-blue-france); font-weight: 700; }
.gf-filters { margin-bottom: 1rem; }
.gf-filters__row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gf-filters__row .fr-select, .gf-filters__row .fr-input { width: auto; min-width: 10rem; margin: 0; }
.gf-chips { margin-bottom: .5rem !important; }
.gf-count { margin-left: .375rem; font-weight: 700; }
.gf-search { display: flex; gap: .25rem; align-items: center; }
.gf-search .fr-input { margin: 0; min-width: 12rem; }
.gf-listbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; min-height: 2.25rem; }
.gf-list { list-style: none; margin: 0; padding: 0; }
.gf-list li { padding: 0; }
.gf-list__item { display: flex; align-items: center; gap: .75rem; padding: .75rem .25rem; border-bottom: 1px solid var(--border-default-grey); color: inherit; text-decoration: none; background: none; }
a.gf-list__item:hover { background: var(--background-default-grey-hover); }
.gf-thumb { width: 2.75rem; height: 2.75rem; border-radius: 6px; overflow: hidden; background: var(--background-contrast-grey); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.gf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gf-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-mention-grey); }
.gf-empty-icon::before { --icon-size: 2.5rem; }
.gf-empty p { margin: .5rem 0 1rem; }
.fr-table { margin-bottom: 1rem; }
.fr-table .fr-table__wrapper { margin-bottom: .5rem; }
.fr-table td.gf-right, .fr-table th.gf-right { text-align: right; }
.gf-scroll-table .fr-table__container { max-height: 50vh; overflow: auto; }

/* ---------- Cartes, tuiles ---------- */
.gf-card { background: var(--background-default-grey); border: 1px solid var(--border-default-grey); border-radius: var(--gf-radius); padding: 1.25rem; margin-bottom: 1rem; }
.gf-card--accent { border-left: 4px solid var(--border-active-blue-france); }
.gf-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.gf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.gf-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .75rem; align-items: center; padding: 1rem; border-radius: var(--gf-radius);
  background: var(--background-default-grey); border: 1px solid var(--border-default-grey); text-decoration: none; color: var(--text-default-grey); }
.gf-tile:hover { background: var(--background-default-grey-hover); }
.gf-tile__icon { grid-row: span 2; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--background-contrast-grey); }
.gf-tile__n { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.gf-tile__label { font-size: .8125rem; color: var(--text-mention-grey); }
.gf-tile--warn .gf-tile__icon { background: var(--background-contrast-warning); color: var(--text-default-warning); }
.gf-tile--error .gf-tile__icon { background: var(--background-contrast-error); color: var(--text-default-error); }
.gf-tile--info .gf-tile__icon { background: var(--background-contrast-info); color: var(--text-default-info); }
.gf-tile--ok .gf-tile__icon { background: var(--background-contrast-success); color: var(--text-default-success); }
.gf-tile--ok .gf-tile__n { color: var(--text-mention-grey); }

/* Histogramme mensuel */
.gf-bars { display: flex; align-items: flex-end; gap: .5rem; height: 10rem; margin-bottom: .5rem; }
.gf-bar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.gf-bar__track { flex: 1; width: 100%; max-width: 3rem; display: flex; align-items: flex-end; }
.gf-bar__fill { width: 100%; background: var(--background-action-low-blue-france); border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.gf-bar__done { width: 100%; background: var(--background-action-high-blue-france); }
.gf-bar__label { font-size: .6875rem; color: var(--text-mention-grey); }
.gf-bar__value { font-size: .6875rem; font-weight: 700; }
.gf-legend { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; background: var(--background-action-low-blue-france); vertical-align: middle; margin: 0 .25rem 0 .5rem; }
.gf-legend--done { background: var(--background-action-high-blue-france); margin-left: 0; }

/* ---------- Dépôt ---------- */
.gf-paidby { margin-bottom: 1rem; }
.gf-paidby__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; width: 100%; }
.gf-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.gf-radio-card label { display: flex; flex-direction: column; gap: .125rem; height: 100%; padding: .75rem; border: 1px solid var(--border-default-grey); border-radius: var(--gf-radius); cursor: pointer; font-size: .875rem; }
.gf-radio-card label span.fr-text--xs { color: var(--text-mention-grey); margin: 0; }
.gf-radio-card input:checked + label { border: 2px solid var(--border-active-blue-france); background: var(--background-action-low-blue-france); padding: calc(.75rem - 1px); }
.gf-radio-card input:focus-visible + label { outline: 2px solid #0a76f6; outline-offset: 2px; }
.gf-radio-card input:disabled + label { cursor: default; opacity: .7; }
@media (max-width: 575px) { .gf-paidby__opts { grid-template-columns: 1fr; } .gf-radio-card label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem; } .gf-radio-card label span.fr-text--xs { flex-basis: 100%; } }
.gf-capture { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.gf-capture .fr-btn { justify-content: center; width: 100%; max-width: none; }
.gf-capture__main { min-height: 4rem; font-size: 1.125rem !important; }
.gf-dropzone { border: 2px dashed var(--border-default-grey); border-radius: var(--gf-radius); padding: 1.5rem; text-align: center; cursor: pointer; }
.gf-dropzone--over { border-color: var(--border-active-blue-france); background: var(--background-action-low-blue-france); }
.gf-dropzone__icon::before { --icon-size: 2rem; }
.gf-queue { list-style: none; margin: 0; padding: 0; }
.gf-queue__item { display: flex; gap: .75rem; padding: .75rem; border-radius: var(--gf-radius); border: 1px solid var(--border-default-grey); margin-bottom: .5rem; }
.gf-queue__item--ok { border-left: 4px solid var(--border-plain-success); }
.gf-queue__item--warn { border-left: 4px solid var(--border-plain-warning); }
.gf-queue__item--error { border-left: 4px solid var(--border-plain-error); }
.gf-queue__thumb { width: 3.5rem; height: 3.5rem; border-radius: 6px; overflow: hidden; flex: none; background: var(--background-contrast-grey); display: flex; align-items: center; justify-content: center; }
.gf-queue__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gf-progress { height: 4px; background: var(--background-contrast-grey); border-radius: 2px; overflow: hidden; margin-top: .375rem; }
.gf-progress__fill { height: 100%; width: 0; background: var(--background-action-high-blue-france); transition: width .2s; }
.gf-progress--busy .gf-progress__fill { width: 40% !important; animation: gf-indet 1.2s ease-in-out infinite; }
@keyframes gf-indet { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- Fiche justificatif ---------- */
.gf-sticky { position: sticky; top: calc(var(--gf-header-h) + 3rem); }
@media (max-width: 991px) { .gf-sticky { position: static; } }
.gf-viewer { background: var(--background-default-grey); border: 1px solid var(--border-default-grey); border-radius: var(--gf-radius); padding: .5rem; margin-bottom: 1rem; }
.gf-viewer__pages { display: flex; gap: .25rem; margin-bottom: .5rem; }
.gf-viewer__stage { background: var(--background-contrast-grey); border-radius: 4px; max-height: 75vh; overflow: auto; display: flex; justify-content: center; }
.gf-viewer__stage img { max-width: 100%; height: auto; cursor: zoom-in; }
.gf-viewer__stage img.gf-zoom { max-width: none; cursor: zoom-out; }
.gf-viewer__pdf { width: 100%; height: 75vh; border: 0; background: #fff; }
@media (max-width: 991px) { .gf-viewer__stage { max-height: 50vh; } .gf-viewer__pdf { height: 60vh; } }
.gf-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; align-items: center; }
.gf-actions--secondary { margin-top: .5rem; }
.gf-details > summary { cursor: pointer; font-weight: 700; padding: .25rem 0; }
.gf-details[open] > summary { margin-bottom: .75rem; }
.gf-mini-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.gf-mini-table th, .gf-mini-table td { padding: .25rem .375rem; border-bottom: 1px solid var(--border-default-grey); text-align: left; vertical-align: middle; }
.gf-mini-table .fr-input { margin: 0; padding-top: .375rem; padding-bottom: .375rem; }
.gf-history { list-style: none; padding: 0; margin: 0; font-size: .8125rem; }
.gf-history li { padding: .25rem 0; border-bottom: 1px solid var(--border-default-grey); }
.gf-score { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 1.5rem; padding: 0 .375rem; border-radius: 1rem; font-size: .75rem; font-weight: 700; background: var(--background-contrast-grey); }
.gf-score--mid { background: var(--background-contrast-warning); color: var(--text-default-warning); }
.gf-score--high { background: var(--background-contrast-success); color: var(--text-default-success); }

/* ---------- Rapprochement ---------- */
.gf-recon { display: grid; grid-template-columns: minmax(16rem, 2fr) 3fr; gap: 1rem; align-items: start; }
.gf-recon__left { background: var(--background-default-grey); border: 1px solid var(--border-default-grey); border-radius: var(--gf-radius); max-height: calc(100vh - 14rem); overflow: auto; position: sticky; top: calc(var(--gf-header-h) + 3rem); }
.gf-recon__list { list-style: none; margin: 0; padding: 0; }
.gf-recon__list li { padding: 0; }
.gf-recon__item { display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left; padding: .625rem .75rem; border: 0; border-bottom: 1px solid var(--border-default-grey); background: none; cursor: pointer; color: var(--text-default-grey); font-size: .875rem; }
.gf-recon__item:hover { background: var(--background-default-grey-hover); }
.gf-recon__item[aria-current='true'] { background: var(--background-action-low-blue-france); box-shadow: inset 4px 0 0 var(--border-active-blue-france); }
.gf-recon__line { border-left: 4px solid var(--border-active-blue-france); }
@media (max-width: 991px) { .gf-recon { grid-template-columns: 1fr; } .gf-recon__left { position: static; max-height: 40vh; } }

/* Import : aperçu brut */
.gf-raw { overflow: auto; max-height: 16rem; margin-top: .75rem; font-size: .75rem; }
.gf-raw td, .gf-raw th { white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.gf-raw__header td { font-weight: 700; background: var(--background-action-low-blue-france); }

/* Écritures */
.gf-entry { background: var(--background-default-grey); border: 1px solid var(--border-default-grey); border-radius: var(--gf-radius); margin-bottom: .75rem; padding: .5rem .75rem; }
.gf-entry--focus { box-shadow: 0 0 0 3px var(--border-active-blue-france); }
.gf-entry--reversed { opacity: .7; }
.gf-entry__head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; font-size: .875rem; margin-bottom: .25rem; }
.gf-entry__lines td { font-size: .8125rem; }
.gf-entry__total td { font-weight: 700; border-bottom: 0; }

/* ---------- Connexion ---------- */
.gf-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(160deg, var(--background-action-low-blue-france), var(--background-alt-grey)); }
.gf-login__card { width: 100%; max-width: 26rem; background: var(--background-default-grey); border-radius: 12px; padding: 2rem; box-shadow: 0 8px 32px rgba(0, 0, 18, .12); }
.gf-login__brand { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.gf-password { font-family: ui-monospace, monospace; font-size: 1.5rem; font-weight: 700; padding: .75rem; text-align: center; background: var(--background-contrast-grey); border-radius: var(--gf-radius); user-select: all; }

/* ---------- Modales, toasts ---------- */
.gf-modal .fr-modal__body { max-height: calc(100vh - 2rem); }
.gf-modal .fr-modal__content { margin-bottom: 1rem; }
.gf-form-error:not(:empty) { margin-bottom: 1rem; }
.gf-toasts { position: fixed; z-index: 3000; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; max-width: min(28rem, calc(100vw - 2rem)); }
@media (max-width: 767px) { .gf-toasts { bottom: calc(var(--gf-bottom-h) + 1rem + env(safe-area-inset-bottom)); left: 1rem; right: 1rem; } }
.gf-toast { background-color: var(--background-default-grey); box-shadow: 0 6px 18px rgba(0, 0, 18, .16); transition: opacity .3s, transform .3s; }
.gf-toast--out { opacity: 0; transform: translateY(.5rem); }
.gf-toast p { margin: 0; }

@media print { .gf-header, .gf-bottombar, .gf-actions, .gf-filters, .gf-tabs { display: none !important; } body { background: #fff; } }

/* Colonnes alignées d'une écriture à l'autre */
.gf-entry__lines { table-layout: fixed; }
.gf-entry__lines td:nth-child(1) { width: 7.5rem; }
.gf-entry__lines td:nth-child(3), .gf-entry__lines td:nth-child(4) { width: 8.5rem; }
.gf-entry__lines td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Champs dans les sections repliables */
.gf-details .fr-select, .gf-details .fr-input { box-sizing: border-box; max-width: 100%; }
@media (max-width: 575px) {
  .gf-tiles { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .gf-tile { grid-template-columns: 1fr; padding: .75rem; }
  .gf-tile__icon { grid-row: auto; width: 2rem; height: 2rem; margin-bottom: .25rem; }
  .gf-tile__n { font-size: 1.5rem; }
}

/* Aide contextuelle et guide */
.gf-help { background: var(--background-contrast-info); border-left: 4px solid var(--border-plain-info); border-radius: 4px; padding: .5rem 1rem; margin-bottom: 1.25rem; font-size: .875rem; }
.gf-help > summary { cursor: pointer; display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text-default-info); list-style: none; }
.gf-help > summary::-webkit-details-marker { display: none; }
.gf-help > summary::after { content: '▾'; margin-left: auto; }
.gf-help:not([open]) > summary::after { content: '▸'; }
.gf-help__body { padding: .5rem 0 .25rem; }
.gf-help__body p, .gf-help__body li { font-size: .875rem; margin-bottom: .375rem; }
.gf-help__body ul { margin: 0 0 .5rem; }
.gf-guide__toc { columns: 2; margin: 0; }
@media (max-width: 575px) { .gf-guide__toc { columns: 1; } }
.gf-glossary dt { font-weight: 700; margin-top: .75rem; }
.gf-glossary dd { margin: .125rem 0 0; color: var(--text-mention-grey); }
.gf-row-actions { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.gf-btn--danger-text { color: var(--text-default-error) !important; }
.gf-row-actions--start { justify-content: flex-start; margin-top: .5rem; }
/* Lots de dépôt */
.gf-batchbar { padding: .75rem 1rem; margin-bottom: .75rem; border-left: 4px solid var(--border-plain-blue-france); background: var(--background-contrast-blue-france); border-radius: var(--gf-radius); }
.gf-batchbar p { margin-bottom: .25rem; }
.gf-result { margin-top: .25rem; padding-top: .25rem; border-top: 1px dashed var(--border-default-grey); }
.gf-result:first-child { border-top: 0; }
.gf-dup__pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; margin-bottom: .5rem; }
.gf-dup__arrow { color: var(--text-mention-grey); margin-top: 1.25rem; }
@media (max-width: 575px) { .gf-dup__pair { grid-template-columns: 1fr; } .gf-dup__arrow { display: none; } }
.gf-row--muted td { opacity: .65; }
