/* Module Trésorerie — aligné sur #module-content (fond blanc) */

.tresorerie-module {
  max-width: 1200px;
  position: relative;
  padding: 0.15rem 0.25rem 1rem;
  color: var(--carbone);
}

/* ── Popup authentification (fond sombre) ─────────────────────────────── */
.tres-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tres-auth-modal[hidden] {
  display: none !important;
}

.tres-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 16, 0.72);
  backdrop-filter: blur(4px);
}

.tres-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92vh, 640px);
  overflow-y: auto;
}

.tres-auth-dialog-inner {
  background: var(--carbone);
  border: 1px solid var(--carbone-70);
  border-radius: 14px;
  padding: 1.5rem 1.35rem 1.25rem;
  box-shadow: var(--shadow-lg);
  color: var(--color-text-inverse, #fff);
}

.tres-gate-header {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  align-items: flex-start;
}

.tres-gate-icon { font-size: 1.85rem; line-height: 1; flex-shrink: 0; }

.tres-gate-title {
  margin: 0 0 0.3rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}

.tres-gate-subtitle,
.tres-gate-hint,
.tres-otp-hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--carbone-30);
  line-height: 1.45;
}

.tres-gate-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tres-gate-tab {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--carbone-70);
  background: transparent;
  color: inherit;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.tres-gate-tab.is-active {
  background: var(--cgt-red);
  border-color: var(--cgt-red);
  color: #fff;
}

.tres-gate-panel label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  color: var(--carbone-30);
}

.tres-gate-panel input[type="password"],
.tres-gate-panel input[type="text"]:not(.tres-otp-cell) {
  width: 100%;
  margin-bottom: 0.75rem;
}

.tres-gate-panel .admin-submit { width: 100%; }

/* ── Cases OTP 6 chiffres ─────────────────────────────────────────────── */
.tres-otp-label {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
}

.tres-otp-hint {
  text-align: center;
  margin-bottom: 1rem;
}

.tres-otp-boxes {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 auto 0.5rem;
  max-width: 320px;
}

.tres-otp-cell {
  width: 2.65rem;
  height: 3rem;
  padding: 0;
  border: 2px solid var(--carbone-70);
  border-radius: 10px;
  background: #fff;
  color: var(--carbone);
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1;
  caret-color: var(--cgt-red);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tres-otp-cell:focus {
  outline: none;
  border-color: var(--cgt-red);
  box-shadow: 0 0 0 3px rgba(226, 7, 20, 0.25);
}

.tres-otp-boxes.is-verifying .tres-otp-cell {
  opacity: 0.65;
  pointer-events: none;
}

.tres-otp-boxes.is-error .tres-otp-cell {
  border-color: var(--cgt-red);
  animation: tres-otp-shake 0.35s ease;
}

@keyframes tres-otp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.tres-gate--setup .tres-auth-dialog-inner { text-align: center; }
.tres-gate--setup .tres-gate-header { justify-content: center; }
.tres-gate--setup .tres-gate-header > div { text-align: center; }

.tres-gate-alt-link {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.35rem 0;
  border: none;
  background: none;
  color: var(--carbone-30);
  font-size: 0.84rem;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.tres-gate-alt-link:hover,
.tres-gate-alt-link:focus-visible {
  color: #fff;
  outline: none;
}

.tres-passkey-setup input[type="text"] {
  width: 100%;
  margin-bottom: 0.75rem;
}

.tres-gate-panel.is-hidden { display: none; }

.tres-totp-qr { text-align: center; margin-top: 0.75rem; }
.tres-totp-qr img { border-radius: 8px; background: #fff; padding: 4px; margin-bottom: 0.5rem; }

.tres-gate-feedback {
  margin-top: 0.85rem;
  min-height: 1.2em;
  text-align: center;
  font-size: 0.88rem;
}

.tres-main[hidden] { display: none !important; }

/* ── Contenu principal (fond blanc) ───────────────────────────────────── */
.tres-header-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tres-page-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--carbone);
}

.tres-session-info {
  margin: 0;
  font-size: 0.84rem;
  color: var(--carbone-70);
}

.tres-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.tres-header-actions .admin-submit {
  width: auto;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

/* Boutons secondaires sur fond blanc */
.tresorerie-module .admin-submit.secondary {
  background: #fff;
  color: var(--carbone);
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.tresorerie-module .admin-submit.secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  filter: none;
}

/* ── Filtres ──────────────────────────────────────────────────────────── */
.tres-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
  margin-bottom: 1.15rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

.tres-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 120px;
  min-width: 100px;
}

.tres-filter-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--carbone);
}

.tres-filter-field select,
.tres-filter-field input[type="search"],
.tres-filter-field input[type="text"] {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: var(--carbone);
  font-size: 0.88rem;
}

.tres-filter-field select:focus,
.tres-filter-field input:focus {
  outline: none;
  border-color: var(--cgt-red);
  box-shadow: 0 0 0 2px rgba(226, 7, 20, 0.12);
}

.tres-filter-search { flex: 2 1 180px; }

.tres-filter-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tres-filter-actions .admin-submit {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}

/* ── Bandeau totaux ───────────────────────────────────────────────────── */
.tres-totaux {
  background: var(--carbone-10);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--carbone);
}

.tres-status {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--carbone-70);
}

/* ── Liste / tableau ────────────────────────────────────────────────────── */
.tres-list {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.tres-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tres-list th,
.tres-list td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tres-list th {
  font-size: 0.78rem;
  color: var(--carbone-70);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.03);
}

.tres-list td {
  color: var(--carbone);
}

.tres-list tbody tr:last-child td {
  border-bottom: none;
}

.tres-list tr[data-id] {
  cursor: pointer;
  transition: background 0.12s ease;
}

.tres-list tr[data-id]:hover td {
  background: rgba(0, 0, 0, 0.03);
}

.tres-empty {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--carbone-70);
  font-size: 0.92rem;
}

/* ── Badges statut ──────────────────────────────────────────────────────── */
.tres-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tres-badge--brouillon { background: var(--carbone-30); color: var(--carbone); }
.tres-badge--soumise   { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; }
.tres-badge--validee   { background: rgba(22, 163, 74, 0.14); color: #15803d; }
.tres-badge--rejetee   { background: rgba(226, 7, 20, 0.12); color: var(--cgt-red); }
.tres-badge--payee     { background: rgba(13, 148, 136, 0.14); color: #0f766e; }

.tres-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

/* ── Modale note de frais (fond blanc, comme Q-CSE) ───────────────────── */
#tres-modal .doc-modal-content {
  width: min(94vw, 640px);
  height: auto;
  max-height: 92vh;
  background: #fff;
  color: var(--carbone);
  overflow: auto;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

#tres-modal .doc-modal-body {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
  padding: 1.35rem 2.75rem 1.35rem 1.35rem;
}

#tres-modal .doc-modal-close {
  color: var(--carbone);
  background: rgba(0, 0, 0, 0.06);
}

#tres-modal .doc-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

#tres-modal h3 {
  margin: 0 0 1.1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--carbone);
  padding-right: 1.5rem;
}

#tres-modal h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--carbone);
}

#tres-modal hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 1.15rem 0;
}

#tres-modal .tres-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Grille formulaire note de frais */
.tres-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.tres-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.tres-form-field--full {
  grid-column: 1 / -1;
}

.tres-form-field--libelle {
  grid-column: 1 / -1;
}

.tres-form--gestion .tres-form-field--libelle {
  grid-column: auto;
}

.tres-form:not(.tres-form--gestion) .tres-form-field--date {
  grid-column: 1;
}

.tres-form:not(.tres-form--gestion) .tres-form-field--date {
  grid-column: 1;
}

.tres-form:not(.tres-form--has-quantite) .tres-form-field--montant {
  grid-column: 1 / -1;
}

.tres-form--has-quantite .tres-form-field--quantite {
  grid-column: 1;
}

.tres-form--has-quantite .tres-form-field--montant {
  grid-column: 2;
}

.tres-plafond-preview {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 140, 230, 0.08);
  border: 1px solid rgba(0, 140, 230, 0.2);
  font-size: 0.88rem;
  color: var(--carbone);
  line-height: 1.45;
}

.tres-plafond-preview--warn {
  background: rgba(226, 7, 20, 0.06);
  border-color: rgba(226, 7, 20, 0.22);
}

.tres-amount-note {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--carbone-70);
}

.tres-plafonds-panel {
  margin-bottom: 1.15rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

.tres-plafonds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.tres-plafonds-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--carbone);
}

.tres-plafonds-body {
  margin-top: 0.85rem;
}

.tres-plafonds-body.is-hidden {
  display: none;
}

.tres-plafonds-intro {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--carbone-70);
  line-height: 1.45;
}

.tres-plafonds-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.tres-plafonds-card {
  flex: 1 1 180px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.tres-plafonds-card-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--carbone-70);
  margin-bottom: 0.25rem;
}

.tres-plafonds-card-value {
  font-size: 1.15rem;
  color: var(--carbone);
}

.tres-plafonds-card-unit,
.tres-plafonds-card-since {
  display: block;
  font-size: 0.78rem;
  color: var(--carbone-70);
  margin-top: 0.15rem;
}

.tres-plafonds-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.tres-plafonds-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tres-plafonds-form-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--carbone);
}

.tres-plafonds-form-row input,
.tres-plafonds-form-row select {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: var(--carbone);
}

.tres-plafonds-form .admin-submit {
  width: auto;
  justify-self: start;
}

.tres-plafonds-history-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--carbone);
}

.tres-plafonds-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.tres-plafonds-history th,
.tres-plafonds-history td {
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tres-plafonds-history th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--carbone-70);
}

.tres-form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--carbone);
}

.tres-form-field input,
.tres-form-field select,
.tres-form-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: var(--carbone);
  font-size: 0.9rem;
}

.tres-form-field input::placeholder,
.tres-form-field textarea::placeholder {
  color: var(--carbone-70);
  opacity: 1;
}

.tres-form-field input:focus,
.tres-form-field select:focus,
.tres-form-field textarea:focus {
  outline: none;
  border-color: var(--cgt-red);
  box-shadow: 0 0 0 2px rgba(226, 7, 20, 0.12);
}

.tres-form-field textarea {
  min-height: 72px;
  resize: vertical;
  font-family: inherit;
}

#tres-modal .admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#tres-modal .admin-form-row {
  gap: 0.35rem;
}

#tres-modal .admin-form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--carbone);
}

#tres-modal .admin-form-row input,
#tres-modal .admin-form-row select,
#tres-modal .admin-form-row textarea {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: var(--carbone);
  font-size: 0.9rem;
}

#tres-modal .admin-form-row input::placeholder,
#tres-modal .admin-form-row textarea::placeholder {
  color: var(--carbone-70);
  opacity: 1;
}

#tres-modal .admin-form-row input:focus,
#tres-modal .admin-form-row select:focus,
#tres-modal .admin-form-row textarea:focus {
  outline: none;
  border-color: var(--cgt-red);
  box-shadow: 0 0 0 2px rgba(226, 7, 20, 0.12);
}

#tres-modal .admin-form-row textarea {
  min-height: 72px;
  resize: vertical;
}

#tres-modal .admin-submit.secondary {
  background: #fff;
  color: var(--carbone);
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

#tres-modal .admin-submit.secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  filter: none;
}

.tres-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tres-form-actions .admin-submit {
  width: auto;
  flex: 0 1 auto;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

#tres-modal #tres-form-feedback {
  color: var(--carbone-70);
  min-height: 1.2rem;
}

/* ── Zone glisser-déposer justificatifs ─────────────────────────────────── */
.tres-pieces-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tres-pieces-dropzone:hover,
.tres-pieces-dropzone:focus-visible {
  border-color: var(--bleu-rle);
  background: rgba(0, 140, 230, 0.06);
  outline: none;
}

.tres-pieces-dropzone.is-dragover {
  border-color: var(--cgt-red);
  background: rgba(226, 7, 20, 0.05);
  box-shadow: 0 0 0 3px rgba(226, 7, 20, 0.1);
}

.tres-pieces-dropzone.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.tres-pieces-dropzone-icon {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.tres-pieces-dropzone-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--carbone);
}

.tres-pieces-dropzone-hint {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--carbone-70);
}

.tres-pieces-dropzone-action {
  margin: 0;
  font-size: 0.82rem;
  color: var(--carbone-70);
}

.tres-pieces-dropzone-action span {
  color: var(--bleu-rle);
  font-weight: 600;
  text-decoration: underline;
}

.tres-pieces-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.tres-pieces-camera-btn {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}

.tres-pieces-camera-btn.is-disabled,
.tres-pieces-camera-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.tres-pieces-list {
  margin-top: 0.65rem;
  padding: 0;
  background: transparent;
  border: none;
  min-height: 0;
}

.tres-pieces-list:not(:empty) {
  padding: 0.5rem 0.65rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.tres-pieces-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--carbone-70);
  font-style: italic;
}

.tres-piece-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--carbone);
}

.tres-piece-item a {
  color: var(--bleu-rle);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tres-piece-item--pending .tres-piece-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.tres-piece-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 140, 230, 0.12);
  color: var(--bleu-rle);
  white-space: nowrap;
}

.tres-piece-remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--carbone-70);
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
}

.tres-piece-remove:hover {
  color: var(--cgt-red);
  background: rgba(226, 7, 20, 0.08);
}

.tres-piece-item + .tres-piece-item {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#tres-pieces-add {
  margin-top: 0.35rem;
}

/* ── Actions trésorier ─────────────────────────────────────────────────── */
.tres-gestion-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tres-gestion-actions .admin-submit {
  width: auto;
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
}

.tres-reject-wrap {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tres-reject-wrap label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--carbone);
}

.tres-reject-wrap textarea {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: var(--carbone);
  font-family: inherit;
  resize: vertical;
  min-height: 64px;
}

.tres-historique ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.tres-historique li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--carbone);
}

.tres-historique li:last-child {
  border-bottom: none;
}

@media (max-width: 720px) {
  .tres-filters {
    padding: 0.75rem;
  }

  .tres-filter-actions {
    width: 100%;
  }

  .tres-filter-actions .admin-submit {
    flex: 1 1 auto;
  }

  .tres-form-grid {
    grid-template-columns: 1fr;
  }

  .tres-form-field--full,
  .tres-form-field--libelle,
  .tres-form-field--montant,
  .tres-form-field--quantite,
  .tres-form:not(.tres-form--gestion) .tres-form-field--date {
    grid-column: 1;
  }

  .tres-form-actions {
    justify-content: stretch;
  }

  .tres-form-actions .admin-submit {
    flex: 1 1 calc(50% - 0.25rem);
  }

  #tres-modal .doc-modal-body {
    padding: 1.15rem 2.25rem 1.15rem 1.15rem;
  }
}

@media (max-width: 600px) {
  .tres-otp-cell {
    width: 2.35rem;
    height: 2.75rem;
    font-size: 1.25rem;
  }

  .tres-otp-boxes { gap: 0.3rem; }

  .tres-header-actions {
    width: 100%;
  }

  .tres-header-actions .admin-submit {
    flex: 1 1 auto;
  }

  .tres-list {
    overflow-x: auto;
  }

  .tres-list table {
    min-width: 520px;
  }
}

/* Hub Note de frais — onglets saisie */
.tres-saisie-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--gris-clair, #ddd);
}
.tres-saisie-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--gris-fonce, #555);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tres-saisie-tab.is-active {
  color: var(--cgt-red, #c00);
  border-bottom-color: var(--cgt-red, #c00);
}

/* Dossiers remboursements */
.tres-remb-dossiers { display: flex; flex-direction: column; gap: 0.75rem; }
.tres-remb-dossier {
  border: 1px solid var(--gris-clair, #ddd);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
}
.tres-remb-dossier summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0;
}
.tres-remb-dossier .tres-remb-dossier-items table tbody tr[data-id] {
  cursor: pointer;
}
.tres-remb-dossier .tres-remb-dossier-items table tbody tr[data-id]:hover td {
  background: #fff8f0;
}
.tres-remb-table { width: 100%; margin: 0.35rem 0 0.5rem; }
.tres-remb-table th,
.tres-remb-table td { padding: 0.45rem 0.6rem; vertical-align: middle; }
.tres-remb-actions-cell { white-space: nowrap; width: 1%; }
.tres-remb-actions-cell .tres-remb-pdf-link { margin-right: 0.35rem; }
.tres-remb-details-row td {
  padding: 0 0.6rem 0.75rem;
  background: #fffdf8;
  border-top: none;
}
.tres-remb-virement-details {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}
.tres-remb-virement-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #555;
  padding: 0.35rem 0;
}
.tres-remb-pdf-link {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  text-decoration: none;
}
.tres-remb-item,
.tres-gest-remb-card-inner {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}
.tres-empty { color: var(--gris-fonce, #666); font-style: italic; }

/* Gestion trésorier */
.tres-gest-elus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.tres-gest-elu-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--gris-clair, #ddd);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tres-gest-elu-card:hover {
  border-color: var(--cgt-red, #c00);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.tres-gest-elu-name { font-weight: 700; margin-bottom: 0.35rem; }
.tres-gest-elu-meta { font-size: 0.9rem; color: var(--gris-fonce, #555); }
.tres-gest-pending {
  padding: 1rem;
  border: 1px solid #f0c674;
  background: #fffbeb;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.tres-gest-validate-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e8dcc0;
}
.tres-gest-validate-row {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tres-gest-preuve-parse {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #555;
}
.tres-gest-preuve-details {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #e8dcc0;
  border-radius: 8px;
  background: #fffdf8;
}
.tres-preuve-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.tres-preuve-details-table th {
  text-align: left;
  font-weight: 600;
  color: #555;
  padding: 0.35rem 0.75rem 0.35rem 0;
  vertical-align: top;
  white-space: nowrap;
  width: 38%;
}
.tres-preuve-details-table td {
  padding: 0.35rem 0;
  word-break: break-word;
}
.tres-gest-remb-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.tres-remb-notes { margin: 0.5rem 0 0; padding-left: 1.25rem; font-size: 0.9rem; }

/* Module gestion trésorerie — espacements */
.tresorerie-gestion-module .tres-main {
  padding: 0.25rem 0 1.5rem;
}

.tresorerie-gestion-module .tres-header-bar {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
}

.tres-gest-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tres-gest-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tres-gest-nav-tab {
  padding: 0.55rem 1.1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--carbone-70, #555);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  border-radius: 6px 6px 0 0;
}

.tres-gest-nav-tab:hover {
  color: var(--carbone, #222);
  background: rgba(0, 0, 0, 0.03);
}

.tres-gest-nav-tab.is-active {
  color: var(--cgt-red, #c00);
  border-bottom-color: var(--cgt-red, #c00);
}

.tres-gest-view {
  padding-top: 0.25rem;
}

.tres-gest-elus-view {
  padding-top: 0.5rem;
}

.tres-gest-elus-grid {
  margin-top: 0.75rem;
}

.tres-gest-elu-view {
  padding-top: 0.5rem;
}

.tres-gest-section {
  margin: 2rem 0 0;
  padding-top: 0.25rem;
}

.tres-gest-section h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.tres-gest-elu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tres-gest-pending {
  margin-bottom: 2rem;
}

.tres-plafonds-panel--standalone {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
}

.tres-plafonds-panel--standalone .tres-plafonds-title {
  margin: 0 0 1rem;
}

.tres-plafonds-panel--standalone .tres-plafonds-intro {
  margin-bottom: 1.25rem;
}

.tresorerie-gestion-module .tres-status {
  margin: 0.5rem 0 1rem;
}

.tresorerie-gestion-module .admin-submit.secondary {
  background: #fff;
  color: var(--carbone);
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

.tres-gest-intro {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--carbone-70, #555);
}

.tres-gest-elu-summary {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--carbone-70, #555);
}

.tres-gest-remb-hint {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.04);
  color: var(--carbone, #222);
}

.tres-gest-remb-hint--warn {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  color: #7a5c00;
}

.tres-gest-remb-hint--ok {
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.tres-gest-remb-hint--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.tres-gest-note-actions {
  white-space: nowrap;
}

.tres-gest-note-btn {
  width: auto !important;
  padding: 0.3rem 0.65rem !important;
  font-size: 0.8rem !important;
  margin: 0.15rem 0.2rem 0.15rem 0;
}

.admin-submit.is-disabled,
.admin-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}
