:root {
  --blue: #1f4e78;
  --blue2: #d9eaf7;
  --green: #2e7d32;
  --red: #b00020;
  --gray: #f4f6f8;
  --border: #d0d7de;
  --text: #1f2933;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--gray); color: var(--text); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 28px; background: white; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 64px; height: auto; }
.brand strong { display: block; color: var(--blue); font-size: 20px; }
.brand span { display: block; font-size: 13px; color: #555; }
nav a { margin-left: 18px; color: var(--blue); text-decoration: none; font-weight: 600; }
.container { max-width: 1240px; margin: 28px auto; padding: 0 18px; }
.card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: 0 8px 28px rgba(31,78,120,0.08); }
.wide { max-width: none; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
h1 { color: var(--blue); margin-top: 0; }
dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; }
dt { font-weight: 700; color: #445; }
dd { margin: 0; }
.amount { font-size: 22px; color: var(--green); font-weight: 700; }
.button-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px; }
.btn { display: inline-block; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); background: white; text-decoration: none; color: var(--blue); font-weight: 700; text-align: center; cursor: pointer; }
.btn.primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn.danger { background: var(--red); color: white; border-color: var(--red); }
.btn.secondary { background: var(--blue2); }
.actions { margin-top: 20px; display: flex; gap: 12px; align-items: center; }
form p, .form-row { margin-bottom: 14px; }
label { font-weight: 700; display: block; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }

/* v33.1 — correction alignement des cases à cocher dans le formulaire d’habilitation mandataire.
   Le style global des inputs à 100 % étirait les checkboxes et les faisait apparaître décalées. */
input[type="checkbox"] {
  width: auto;
  min-width: auto;
  padding: 0;
  border-radius: 4px;
}
.checkbox-row-v33 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.checkbox-row-v33 input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}
.checkbox-row-v33 label {
  display: inline;
  margin-bottom: 0;
}
.checkbox-row-v33 .helptext,
.checkbox-row-v33 .errorlist {
  flex-basis: 100%;
}

.mandataire-form-v33 p:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mandataire-form-v33 p:has(input[type="checkbox"]) label {
  display: inline;
  margin-bottom: 0;
}
.mandataire-form-v33 p:has(input[type="checkbox"]) input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}
.mandataire-form-v33 p:has(input[type="checkbox"]) .helptext,
.mandataire-form-v33 p:has(input[type="checkbox"]) .errorlist {
  flex-basis: 100%;
}

.helptext { color: #667; font-size: 12px; display: block; margin-top: 4px; }
.errorlist { color: var(--red); }
.form-card { max-width: 760px; margin: 0 auto; }
.login-card { max-width: 430px; margin: 80px auto; }
.hint { background: #fff8e6; border-left: 4px solid #f0b429; padding: 12px; }
.messages { margin-bottom: 18px; }
.message { padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; background: #e6f4ea; }
.message.error { background: #fde8e8; }
.message.warning { background: #fff8e6; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; }
th { background: var(--blue); color: white; text-align: left; padding: 9px; }
td { border-bottom: 1px solid var(--border); padding: 8px; vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
.title-row { display: flex; justify-content: space-between; align-items: center; }
.inventory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .button-grid { grid-template-columns: 1fr; }
  .inventory-grid { grid-template-columns: 1fr; }
}


.inventory-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.inventory-summary div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}
.inventory-summary span {
  display: block;
  color: #556;
  font-size: 13px;
  margin-bottom: 8px;
}
.inventory-summary strong {
  color: var(--blue);
  font-size: 18px;
}
.inventory-summary strong.ok {
  color: var(--green);
}
.inventory-summary strong.bad {
  color: var(--red);
}
.denomination-row small.line-total {
  display: block;
  margin-top: 6px;
  color: #556;
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 900px) {
  .inventory-summary {
    grid-template-columns: 1fr;
  }
}


.last-operation-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.last-operation-box h2 {
  margin: 0 0 12px 0;
  color: var(--blue);
  font-size: 20px;
}
.last-operation-details {
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  font-size: 14px;
}
.amount-positive {
  color: var(--green);
  font-weight: 700;
}
.amount-negative {
  color: var(--red);
  font-weight: 700;
}
.last-operation-details a {
  color: var(--blue);
  font-weight: 700;
}


.version-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f1fb;
  color: var(--blue);
  border: 1px solid #c7d9ef;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}
.dashboard-grid-v08 {
  grid-template-columns: 1fr 1.15fr 1.15fr;
  align-items: start;
}
.last-operation-card h1 {
  margin-bottom: 10px;
}
.operation-number {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
}
.operation-number a {
  color: var(--blue);
  text-decoration: none;
}
.last-operation-details {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 12px;
  font-size: 14px;
}
.last-operation-details dt {
  color: #334155;
  font-weight: 800;
}
.last-operation-details dd {
  margin: 0;
}
.amount-positive {
  color: var(--green);
  font-weight: 800;
}
.amount-negative {
  color: var(--red);
  font-weight: 800;
}
.last-operation-details a {
  color: var(--blue);
  font-weight: 800;
}
@media (max-width: 1150px) {
  .dashboard-grid-v08 {
    grid-template-columns: 1fr;
  }
}


/* v09 — accueil moins compressé */
.dashboard-grid-v08 {
  width: min(1500px, calc(100vw - 56px));
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: minmax(330px, 0.9fr) minmax(380px, 1.1fr) minmax(380px, 1.1fr);
  gap: 26px;
}

.card.state {
  min-width: 330px;
}

.card.state dl {
  grid-template-columns: 150px minmax(150px, 1fr);
  column-gap: 16px;
}

.card.state dd,
.card.state .amount {
  white-space: nowrap;
}

.card.state .amount {
  font-size: 26px;
  line-height: 1.1;
}

.last-operation-card,
.card.menu {
  min-width: 360px;
}

@media (max-width: 1250px) {
  .dashboard-grid-v08 {
    grid-template-columns: 1fr;
    width: min(920px, calc(100vw - 32px));
  }
}

/* v10 */
.dashboard-grid-v10 {
  width: min(1550px, calc(100vw - 56px));
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: minmax(380px, 1fr) minmax(430px, 1.15fr) minmax(380px, 1fr);
  gap: 28px;
  align-items: start;
}
.amount-eur {
  color: #475569;
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}
.chart-card {
  width: min(1550px, calc(100vw - 56px));
  margin: 28px auto 0 auto;
}
.chart-subtitle { color: #64748b; font-weight: 700; }
.cash-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(70px, 1fr));
  gap: 12px;
  align-items: end;
  overflow-x: auto;
  padding-top: 12px;
}
.cash-chart-item { text-align: center; min-width: 70px; }
.bar-wrap {
  height: 150px;
  display: flex;
  align-items: end;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.cash-bar {
  width: 28px;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, #4f8cc9, var(--blue));
  box-shadow: 0 5px 15px rgba(31,78,120,.18);
}
.cash-bar.negative { background: linear-gradient(180deg, #d96c6c, var(--red)); }
.cash-chart-label { margin-top: 8px; font-weight: 800; color: var(--blue); font-size: 12px; }
.cash-chart-value { font-size: 11px; color: #475569; white-space: nowrap; }
.admin-grid { grid-template-columns: minmax(430px, .9fr) minmax(360px, .7fr); }
@media (max-width: 1250px) {
  .dashboard-grid-v10, .admin-grid { grid-template-columns: 1fr; width: min(920px, calc(100vw - 32px)); }
  .chart-card { width: min(920px, calc(100vw - 32px)); }
}


/* v11 */
.chart-card-compact {
  width: min(860px, calc(100vw - 56px));
  margin: 22px auto 0 auto;
  padding: 18px 22px;
}

.chart-card-compact h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.line-chart-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}

.line-chart {
  display: block;
  width: 100%;
  max-height: 180px;
}

.line-chart .axis {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.cash-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cash-point {
  fill: white;
  stroke: var(--blue);
  stroke-width: 2;
}

.chart-month {
  font-size: 10px;
  fill: #475569;
}

.chart-values {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 4px 12px;
  margin-top: 8px;
  color: #475569;
  font-size: 11px;
}

.admin-single {
  width: min(820px, calc(100vw - 56px));
  margin: 0 auto;
}

.admin-single .form-card {
  max-width: none;
}

@media (max-width: 900px) {
  .chart-values {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

/* Neutralise l’ancien graphique en barres si le CSS subsiste */
.cash-chart, .cash-chart-item, .bar-wrap, .cash-bar {
  all: unset;
}


/* v15 corrections */
.chart-values {
  display: none !important;
}
.chart-card-compact,
.chart-card {
  padding-bottom: 18px;
}
.line-chart {
  max-height: 155px;
}
.cash-point {
  cursor: help;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}
.table-scroll table {
  min-width: 1180px;
  table-layout: auto;
}
.table-wrap.table-scroll {
  overflow-x: auto;
}
.table-scroll th,
.table-scroll td {
  vertical-align: top;
}
.table-scroll td:nth-child(1),
.table-scroll th:nth-child(1),
.table-scroll td:nth-child(2),
.table-scroll th:nth-child(2) {
  white-space: nowrap;
}
.table-scroll td:nth-child(5),
.table-scroll th:nth-child(5) {
  min-width: 190px;
}
.table-scroll td:nth-child(6),
.table-scroll th:nth-child(6) {
  min-width: 115px;
}
.table-scroll td:nth-child(7),
.table-scroll td:nth-child(8),
.table-scroll td:nth-child(9),
.table-scroll th:nth-child(7),
.table-scroll th:nth-child(8),
.table-scroll th:nth-child(9) {
  min-width: 130px;
  text-align: right;
  white-space: nowrap;
}


/* v16 clean */
.chart-values {
  display: none !important;
}
.chart-card {
  position: relative;
}
.chart-tooltip {
  position: absolute;
  z-index: 20;
  background: #1f2933;
  color: white;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  white-space: nowrap;
}
.cash-point {
  cursor: pointer;
  fill: white;
  stroke: var(--blue);
  stroke-width: 2.2;
}
.cash-point:hover {
  fill: var(--blue2);
}
.journal-card {
  width: min(98vw, 1540px);
  margin-left: 50%;
  transform: translateX(-50%);
}
.journal-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.journal-table {
  min-width: 1420px;
  font-size: 13px;
}
.journal-table th,
.journal-table td {
  padding: 7px 8px;
}
.journal-table th:nth-child(1),
.journal-table td:nth-child(1) { width: 95px; white-space: nowrap; }
.journal-table th:nth-child(2),
.journal-table td:nth-child(2) { width: 92px; white-space: nowrap; }
.journal-table th:nth-child(3),
.journal-table td:nth-child(3) { width: 110px; }
.journal-table th:nth-child(4),
.journal-table td:nth-child(4) { width: 160px; }
.journal-table th:nth-child(5),
.journal-table td:nth-child(5) { width: 240px; }
.journal-table th:nth-child(6),
.journal-table td:nth-child(6) { width: 150px; }
.journal-table th:nth-child(7),
.journal-table td:nth-child(7),
.journal-table th:nth-child(8),
.journal-table td:nth-child(8),
.journal-table th:nth-child(9),
.journal-table td:nth-child(9) {
  width: 135px;
  white-space: nowrap;
  text-align: right;
}
.journal-table th:nth-child(10),
.journal-table td:nth-child(10),
.journal-table th:nth-child(11),
.journal-table td:nth-child(11) {
  width: 70px;
  text-align: center;
  white-space: nowrap;
}


/* v17 — graphique propre, boutons PV, inventaires */
.chart-card-compact {
  width: min(980px, calc(100vw - 56px));
  padding: 18px 22px 16px 22px;
}
.chart-card-compact h1 {
  font-size: 22px;
  margin-bottom: 0;
}
.line-chart-wrap {
  margin-top: 6px;
}
.line-chart {
  display: block;
  width: 100%;
  height: 180px;
  max-height: 180px;
}
.line-chart .axis {
  stroke: #d5dde7;
  stroke-width: 1;
}
.cash-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cash-point {
  fill: white;
  stroke: var(--blue);
  stroke-width: 2.2;
}
.cash-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}
.cash-hover:hover .cash-point {
  fill: var(--blue2);
  stroke-width: 2.8;
}
.chart-month {
  font-size: 11px;
  fill: #475569;
  font-weight: 700;
}
.chart-tooltip {
  position: absolute;
  z-index: 100;
  background: #102a43;
  color: white;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.20);
  white-space: nowrap;
}
.chart-tooltip[hidden] {
  display: none !important;
}
.recent-inventories {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.recent-inventories h2 {
  color: var(--blue);
  margin: 0 0 12px 0;
}


/* v18 — graphique réécrit proprement */
.chart-card.cash-chart-card {
  width: min(980px, calc(100vw - 56px));
  padding: 20px 24px 18px 24px;
  position: relative;
  overflow: visible;
}

.cash-chart-card .title-row {
  margin-bottom: 4px;
}

.cash-chart-card h1 {
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

.cash-chart-card .chart-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #243b53;
}

.cash-chart {
  position: relative;
  height: 190px;
  margin-top: 8px;
  padding: 0 18px 34px 18px;
  overflow: visible;
}

.cash-chart-svg {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 8px;
  width: calc(100% - 36px);
  height: 128px;
  overflow: visible;
}

.cash-chart-axis {
  stroke: #d8e0ea;
  stroke-width: 0.55;
}

.cash-chart-line {
  fill: none;
  stroke: #123b5d;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.cash-chart-point {
  position: absolute;
  width: 18px;
  height: 18px;
  margin-left: 9px;
  margin-top: 8px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 5;
}

.cash-chart-point::after {
  content: "";
  display: block;
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #123b5d;
  opacity: 0;
  transition: opacity .12s ease;
}

.cash-chart-point:hover::after,
.cash-chart-point:focus::after {
  opacity: 1;
}

.cash-chart-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #102a43;
  color: #fff;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  z-index: 30;
}

.cash-chart-point:hover .cash-chart-tooltip,
.cash-chart-point:focus .cash-chart-tooltip {
  display: block;
}

.cash-chart-month {
  position: absolute;
  bottom: 5px;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #52606d;
  z-index: 2;
}

/* neutralisation des anciens artefacts SVG */
.line-chart,
.line-chart-wrap,
.chart-values,
.cash-hit,
.cash-hover,
.chart-month,
.chart-tooltip:not(.cash-chart-tooltip) {
  display: none !important;
}


/* v19 — graphique définitif : un seul repère 0..100, tooltip CSS fiable */
.chart-values,
.line-chart,
.line-chart-wrap,
.cash-hit,
.cash-hover,
.chart-month,
.chart-tooltip:not(.cash-chart-tooltip) {
  display: none !important;
}

.chart-card.cash-chart-card {
  width: min(980px, calc(100vw - 56px));
  padding: 20px 24px 18px 24px;
  position: relative;
  overflow: visible;
}

.cash-chart-card .title-row {
  margin-bottom: 8px;
}

.cash-chart-card h1 {
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

.cash-chart-card .chart-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #243b53;
}

.cash-chart {
  position: relative;
  height: 185px;
  margin-top: 4px;
  overflow: visible;
}

.cash-chart-svg {
  position: absolute;
  inset: 0 0 30px 0;
  width: 100%;
  height: 140px;
  overflow: visible;
}

.cash-chart-axis {
  stroke: #d8e0ea;
  stroke-width: 0.65;
}

.cash-chart-line {
  fill: none;
  stroke: #123b5d;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.cash-chart-point {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 8;
}

.cash-chart-point::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #123b5d;
  opacity: 0;
  transition: opacity .12s ease;
}

.cash-chart-point:hover::after,
.cash-chart-point:focus::after {
  opacity: 1;
}

.cash-chart-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #102a43;
  color: #fff;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  z-index: 50;
  pointer-events: none;
}

.cash-chart-point:hover .cash-chart-tooltip,
.cash-chart-point:focus .cash-chart-tooltip {
  display: block;
}

.cash-chart-month {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #52606d;
  z-index: 2;
}


/* v20 — graphique canvas propre : neutralise tous les anciens composants */
.chart-card,
.cash-chart-card,
.cash-chart,
.cash-chart-svg,
.cash-chart-point,
.cash-chart-month,
.cash-chart-tooltip,
.line-chart,
.line-chart-wrap,
.chart-values,
.cash-hit,
.cash-hover,
.chart-month,
.chart-tooltip {
  display: none !important;
}

.trend-card {
  width: min(760px, calc(100vw - 56px));
  margin-left: auto;
  margin-right: auto;
  padding: 18px 22px 16px 22px;
  position: relative;
  overflow: visible;
}

.trend-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
}

.trend-header h1 {
  font-size: 20px;
  line-height: 1.15;
  margin: 0;
}

.trend-header span {
  font-size: 13px;
  font-weight: 700;
  color: #243b53;
  white-space: nowrap;
}

.trend-chart {
  position: relative;
  width: 100%;
  height: 230px;
}

#cashTrendCanvas {
  display: block;
  width: 100%;
  height: 230px;
}

.trend-tooltip {
  position: absolute;
  z-index: 50;
  background: #102a43;
  color: #fff;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  pointer-events: none;
}

.trend-tooltip[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .trend-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}


/* v21 */
.admin-single .card + .card { margin-top: 22px; }
.form-card h2 { color: var(--blue); margin-top: 18px; }

.read-only-box, .danger-zone {
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  background: #f8fafc;
}
.danger-zone {
  border-color: #e5b1b1;
  background: #fff5f5;
}
.btn.disabled, .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}


/* v23 — menu principal regroupé par blocs fonctionnels */
.menu-v23 {
  padding: 22px;
}

.menu-v23 h1 {
  margin-bottom: 16px;
}

.menu-section {
  border: 1px solid #dde6ef;
  border-radius: 14px;
  padding: 13px 14px 14px 14px;
  margin-bottom: 13px;
  background: #fbfdff;
}

.menu-section:last-child {
  margin-bottom: 0;
}

.menu-section h2 {
  margin: 0 0 10px 0;
  font-size: 14px;
  letter-spacing: .01em;
  color: #284b6d;
}

.menu-section-primary {
  background: #f7fbff;
  border-color: #cbdff2;
}

.menu-section-critical {
  background: #fff8f8;
  border-color: #f1c7cf;
}

.menu-section-admin {
  background: #f8fafc;
}

.menu-actions {
  display: grid;
  gap: 10px;
}

.menu-actions.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-v23 .btn {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
}

.menu-link {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 520px) {
  .menu-actions.two-cols {
    grid-template-columns: 1fr;
  }
}

/* v24 — accueil recomposé, inspiration institutionnelle libre de droit */
:root {
  --if-blue: #123b5d;
  --if-blue-soft: #eaf2f8;
  --if-red: #b83b4a;
  --if-ink: #17212b;
  --if-muted: #64748b;
  --if-line: #dbe4ee;
  --if-surface: rgba(255,255,255,.92);
}
body {
  background:
    radial-gradient(circle at 8% 0%, rgba(18,59,93,.12), transparent 30%),
    linear-gradient(180deg, #f6f8fb 0%, #edf2f7 100%);
  color: var(--if-ink);
}
.topbar {
  border-bottom: 1px solid rgba(18,59,93,.16);
  box-shadow: 0 8px 24px rgba(18,59,93,.06);
}
.brand strong { color: var(--if-blue); letter-spacing: -.01em; }
nav a { color: var(--if-blue); }
.home-hero-v24,
.home-grid-v24,
.home-lower-v24,
.conversion-strip-v24 {
  width: min(1540px, calc(100vw - 56px));
  margin-left: auto;
  margin-right: auto;
}
.home-hero-v24 {
  margin-bottom: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(18,59,93,.12);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8fb 62%, #e9f1f7 100%);
  box-shadow: 0 16px 46px rgba(18,59,93,.08);
  position: relative;
  overflow: hidden;
}
.home-hero-v24:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(180deg, var(--if-blue), var(--if-red));
}
.hero-kicker,
.card-label {
  color: var(--if-red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero-main h1 {
  margin: 0;
  color: var(--if-blue);
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: -.035em;
}
.hero-main p {
  margin: 8px 0 0 0;
  color: var(--if-muted);
  font-weight: 650;
}
.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--if-line);
  color: var(--if-blue);
  font-weight: 800;
  white-space: nowrap;
}
.home-grid-v24 {
  display: grid;
  grid-template-columns: 1.18fr .82fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.home-grid-v24 .card,
.home-lower-v24 .card,
.admin-v24 .card {
  background: var(--if-surface);
  border: 1px solid rgba(18,59,93,.12);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(18,59,93,.075);
}
.state-card-v24,
.action-card-v24,
.last-card-v24 { min-height: 310px; }
.main-balance {
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1;
  color: var(--if-blue);
  font-weight: 950;
  letter-spacing: -.05em;
  margin-top: 6px;
}
.eur-balance {
  margin-top: 10px;
  font-size: 20px;
  color: #2f5b7b;
  font-weight: 850;
}
.rate-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--if-blue-soft);
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid #d4e4f0;
}
.state-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.state-mini-grid div {
  padding: 12px;
  border-radius: 14px;
  background: #fbfdff;
  border: 1px solid var(--if-line);
}
.state-mini-grid span,
.nav-blocks-v24 span,
.hero-meta span {
  font-size: 12px;
}
.state-mini-grid span,
.nav-blocks-v24 span {
  display: block;
  color: var(--if-muted);
  font-weight: 750;
  margin-bottom: 5px;
}
.state-mini-grid strong,
.nav-blocks-v24 strong {
  color: var(--if-blue);
  font-size: 15px;
}
.primary-actions-v24 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 10px 0 18px 0;
}
.action-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  border-radius: 18px;
  padding: 18px 20px;
  color: white;
  text-decoration: none;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.02em;
  box-shadow: 0 12px 26px rgba(18,59,93,.16);
}
.action-pill:after { content: "→"; font-size: 26px; }
.action-pill.encaisser { background: linear-gradient(135deg, var(--if-blue), #285f8c); }
.action-pill.payer { background: linear-gradient(135deg, var(--if-red), #8c2737); }
.secondary-actions-v24 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.secondary-actions-v24 a,
.inline-links-v24 a,
.nav-blocks-v24 a,
.nav-disabled {
  text-decoration: none;
  border: 1px solid var(--if-line);
  background: #fff;
  color: var(--if-blue);
  border-radius: 14px;
  padding: 12px;
  font-weight: 850;
}
.secondary-actions-v24 a:hover,
.nav-blocks-v24 a:hover { border-color: #a9c2d7; background: #f8fbfe; }
.operation-number a { color: var(--if-blue); }
.compact-dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 12px;
  margin-top: 10px;
}
.compact-dl dt { color: var(--if-muted); }
.compact-dl dd { min-width: 0; }
.inline-links-v24 {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.home-lower-v24 {
  display: grid;
  grid-template-columns: minmax(420px, .72fr) minmax(620px, 1.28fr);
  gap: 22px;
  margin-top: 22px;
}
.nav-blocks-v24 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nav-blocks-v24 a,
.nav-disabled {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nav-blocks-v24 a.critical {
  border-color: rgba(184,59,74,.28);
  background: #fff7f8;
}
.nav-disabled {
  background: #eef3f7;
  color: #748094;
}
.nav-disabled strong { color: #748094; }
.trend-card-v24 { position: relative; overflow: hidden; }
.trend-card-v24 h1 { margin: 2px 0 0 0; font-size: 28px; }
.trend-header { align-items: center; }
.trend-header > span {
  background: var(--if-blue-soft);
  color: var(--if-blue);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}
.conversion-strip-v24 {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff8e6;
  border: 1px solid #f2d289;
  color: #6b5208;
  font-weight: 750;
}
.rate-panel-v24 {
  margin: 18px 0 22px 0;
  padding: 16px;
  border: 1px solid #d4e4f0;
  border-radius: 16px;
  background: #f7fbff;
}
.rate-panel-v24 h2 { margin-top: 0; color: var(--if-blue); }
.inline-form-v24 { margin-top: 12px; }
.hint-inline { color: var(--if-muted); font-weight: 700; }
.warning-box-v24 {
  padding: 14px;
  border-radius: 14px;
  background: #fff7f8;
  border: 1px solid rgba(184,59,74,.28);
  color: #7a2431;
  margin-bottom: 16px;
}
@media (max-width: 1280px) {
  .home-grid-v24,
  .home-lower-v24 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .home-hero-v24,
  .home-grid-v24,
  .home-lower-v24,
  .conversion-strip-v24 { width: min(100% - 24px, 720px); }
  .hero-main { align-items: flex-start; flex-direction: column; }
  .hero-meta { justify-content: flex-start; }
  .state-mini-grid,
  .secondary-actions-v24,
  .nav-blocks-v24 { grid-template-columns: 1fr; }
  .main-balance { font-size: 36px; }
}


/* v26 — formulaires encaissement / décaissement et choix de natures */
.operation-card-v26 {
  max-width: 900px;
  padding: 30px 34px;
}
.operation-title-row-v26 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}
.form-kicker-v26 {
  margin: 0 0 4px 0;
  color: var(--if-red, #b83b4a);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.operation-card-v26 h1 {
  margin-bottom: 0;
  letter-spacing: -.02em;
}
.ghost-v26 {
  background: #f8fbfe;
}
.operation-hint-v26 {
  border-radius: 14px;
  border-left-width: 5px;
  margin: 16px 0 22px 0;
}
.operation-form-v26 {
  display: grid;
  gap: 18px;
}
.form-grid-v26.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field-v26 label,
.nature-field-v26 > label {
  color: #243b53;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
}
.field-v26 input,
.field-v26 textarea {
  border-radius: 12px;
  border: 1px solid #cfd9e5;
  background: #fff;
  min-height: 46px;
}
.field-v26 input:focus,
.field-v26 textarea:focus {
  outline: none;
  border-color: #7aa4c7;
  box-shadow: 0 0 0 4px rgba(18,59,93,.10);
}
.nature-cards-v26 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nature-card-v26 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease, transform .12s ease;
}
.nature-card-v26:hover {
  background: #f4f8fb;
  border-color: #a9c2d7;
}
.nature-card-v26 input {
  width: 18px;
  height: 18px;
  accent-color: var(--if-blue, #123b5d);
  flex: 0 0 auto;
}
.nature-card-v26:has(input:checked) {
  background: #eaf2f8;
  border-color: var(--if-blue, #123b5d);
  box-shadow: 0 8px 20px rgba(18,59,93,.10);
}
.nature-card-v26 span {
  font-weight: 850;
  color: #183b56;
  line-height: 1.2;
}
.operation-decaissement .nature-card-v26 input {
  accent-color: var(--if-red, #b83b4a);
}
.operation-decaissement .nature-card-v26:has(input:checked) {
  background: #fff7f8;
  border-color: var(--if-red, #b83b4a);
}
.file-field-v26 {
  padding: 14px;
  border: 1px dashed #cbd8e6;
  border-radius: 14px;
  background: #fbfdff;
}
.file-field-v26 input[type=file] {
  border: 0;
  padding: 0;
  min-height: 0;
  background: transparent;
}
.receipt-check-v26 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid #d7e1ec;
  background: #fbfdff;
  cursor: pointer;
}
.receipt-check-v26 input {
  width: 18px;
  height: 18px;
  accent-color: var(--if-blue, #123b5d);
}
.receipt-check-v26 span {
  font-weight: 850;
  color: #243b53;
}
@media (max-width: 760px) {
  .operation-card-v26 {
    max-width: calc(100vw - 24px);
    padding: 22px;
  }
  .operation-title-row-v26,
  .form-grid-v26.two {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .nature-cards-v26 {
    grid-template-columns: 1fr;
  }
}


/* v27 — cockpit guidé et séparation Administration / Paramètres */
:root {
  --if-navy: #002654;
  --if-blue: #005fa0;
  --if-red: #a82040;
  --if-surface: #ffffff;
  --if-bg: #f4f6f8;
  --if-border: #dce3eb;
  --if-muted: #637381;
  --if-text: #142337;
}
body { font-family: Inter, "Source Sans 3", Arial, Helvetica, sans-serif; background: var(--if-bg); color: var(--if-text); }
.container { max-width: 1500px; }
.topbar-v27 { padding: 14px 34px; border-bottom: 1px solid #dbe4ee; box-shadow: 0 8px 28px rgba(0,38,84,.06); }
.brand-v27 img { width: 58px; }
.topbar-v27 nav a { color: var(--if-navy); opacity: .82; font-weight: 800; }
.topbar-v27 nav a:hover { opacity: 1; }
.cockpit-hero-v27 { background: #fff; border-radius: 28px; padding: 30px 36px; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; border: 1px solid #e2e8f0; box-shadow: 0 18px 44px rgba(0,38,84,.08); position: relative; overflow: hidden; }
.cockpit-hero-v27:before { content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; background: var(--if-red); }
.cockpit-hero-v27 h1 { font-size: 42px; line-height: 1.05; margin: 8px 0 8px; color: var(--if-navy); }
.cockpit-hero-v27 p { color: var(--if-muted); font-size: 18px; margin: 0; }
.hero-kicker-v27, .card-label-v27 { color: var(--if-red); text-transform: uppercase; letter-spacing: .08em; font-weight: 900; font-size: 13px; }
.hero-meta-v27 { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hero-meta-v27 span { background: #eaf2f8; color: var(--if-navy); padding: 9px 14px; border-radius: 999px; font-weight: 800; }
.cockpit-grid-v27 { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; margin-top: 24px; }
.cockpit-lower-v27 { display: grid; grid-template-columns: .9fr .85fr 1fr; gap: 24px; margin-top: 24px; align-items: stretch; }
.cockpit-state-v27, .cockpit-actions-v27, .checklist-card-v27, .last-op-card-v27, .controls-card-v27, .cockpit-trend-v27, .settings-card-v27, .about-card-v27 { border-radius: 28px; border: 1px solid #e2e8f0; box-shadow: 0 18px 44px rgba(0,38,84,.08); }
.state-balance-v27 { font-size: clamp(48px, 5vw, 72px); line-height: 1; margin-top: 18px; font-weight: 950; color: var(--if-navy); }
.state-eur-v27 { margin-top: 14px; font-size: 22px; font-weight: 900; color: #142337; }
.rate-note-v27 { margin-top: 20px; padding: 16px 18px; border-radius: 18px; background: #ecf4f8; border: 1px solid #d9e7f0; color: #243b53; }
.state-mini-grid-v27 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.state-mini-grid-v27 div { border: 1px solid #e1e8ef; border-radius: 16px; background: #fbfdff; padding: 12px 14px; }
.state-mini-grid-v27 span { display: block; color: var(--if-muted); font-size: 12px; font-weight: 800; }
.state-mini-grid-v27 strong { display: block; margin-top: 3px; color: var(--if-navy); font-size: 14px; }
.primary-action-grid-v27 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.action-button-v27 { min-height: 98px; border-radius: 20px; padding: 20px 22px; color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 14px 28px rgba(0,38,84,.15); transition: transform .12s ease, box-shadow .12s ease; }
.action-button-v27:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(0,38,84,.20); }
.action-button-v27 strong { font-size: 24px; line-height: 1; }
.action-button-v27 span { margin-top: 9px; opacity: .88; font-weight: 650; }
.action-blue { background: var(--if-navy); }
.action-red { background: var(--if-red); }
.action-mid { background: var(--if-blue); }
.action-dark { background: #2d4054; }
.checklist-card-v27 h2 { margin: 10px 0 20px; color: var(--if-navy); }
.checklist-v27 { padding: 0; margin: 0; list-style: none; display: grid; gap: 15px; }
.checklist-v27 li { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.checklist-v27 li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 900; }
.checklist-v27 li.ok span { background: #148752; }
.checklist-v27 li.warn span { background: #b77d00; }
.soft-callout-v27 { display: block; margin-top: 24px; padding: 13px 16px; border-radius: 16px; background: #fff5dc; border: 1px solid #ecd69f; color: #513b00; text-decoration: none; font-weight: 900; }
.last-op-type-v27 { font-size: 18px; font-weight: 850; margin-bottom: 8px; }
.last-op-amount-v27 { font-size: 27px; font-weight: 950; margin: 0 0 12px; }
.hintline-v27 { color: var(--if-muted); font-weight: 700; }
.last-op-label-v27 { border-top: 1px solid #e4eaf0; padding-top: 14px; color: #334e68; }
.inline-links-v27 { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.inline-links-v27 a { border-radius: 14px; padding: 11px 14px; background: #eef5fa; color: var(--if-navy); text-decoration: none; font-weight: 900; }
.control-grid-v27 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.control-grid-v27 a, .control-grid-v27 .nav-disabled { border: 1px solid #dfe7ef; border-radius: 16px; padding: 14px 16px; background: #fbfdff; text-decoration: none; color: var(--if-navy); }
.control-grid-v27 a.critical { color: var(--if-red); }
.control-grid-v27 a span, .control-grid-v27 .nav-disabled span { display: block; color: var(--if-muted); font-size: 12px; font-weight: 800; }
.control-grid-v27 a strong, .control-grid-v27 .nav-disabled strong { display: block; margin-top: 4px; font-size: 15px; }
.control-grid-v27 .nav-disabled { opacity: .62; background: #eef2f5; }
.cockpit-trend-v27 { margin-top: 24px; }
.settings-layout-v27 { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: start; }
.change-list-v27 { margin: 16px 0 0; padding-left: 22px; }
.change-list-v27 li { margin-bottom: 10px; }
.autocomplete-box-v27 { border: 1px solid #cfd9e5; border-radius: 12px; background: #fff; margin-top: 6px; box-shadow: 0 12px 30px rgba(0,38,84,.15); overflow: hidden; position: relative; z-index: 20; }
.autocomplete-box-v27 button { display: block; width: 100%; background: #fff; border: 0; text-align: left; padding: 10px 12px; cursor: pointer; font-weight: 700; color: #243b53; }
.autocomplete-box-v27 button:hover { background: #eef5fa; }
@media (max-width: 1100px) { .cockpit-grid-v27, .cockpit-lower-v27, .settings-layout-v27 { grid-template-columns: 1fr; } .state-mini-grid-v27, .primary-action-grid-v27, .control-grid-v27 { grid-template-columns: 1fr; } .cockpit-hero-v27 { flex-direction: column; } }


/* v28 — correctifs cockpit, graphique et référentiels */
.cockpit-trend-v28 {
  width: auto;
  max-width: none;
  margin: 24px 0 0 0;
  padding: 22px 26px 18px;
}
.cockpit-trend-v28 .trend-header h1 {
  font-size: 26px;
}
.cockpit-trend-v28 .trend-chart,
.cockpit-trend-v28 #cashTrendCanvas {
  height: 250px;
}
.warning-box-v24 {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff5dc;
  border: 1px solid #ecd69f;
  color: #513b00;
}
.rates-table-v28 {
  margin: 24px 0;
  padding: 18px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid #e1e8ef;
}
.rates-table-v28 h2 { margin-top: 0; }
.active-rate-row-v28 { background: #eef7f2; }
.badge-v28 {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #148752;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
html[lang="ar"] body { direction: rtl; }
html[lang="ar"] .topbar-v27 nav,
html[lang="ar"] .hero-meta-v27,
html[lang="ar"] .trend-header { direction: rtl; }

/* v29 — retour des natures en menu déroulant et blocs repliables sur l'accueil */
.nature-select-block-v29 {
  max-width: 100%;
}
.nature-select-v29 {
  width: 100%;
  min-height: 52px;
  border-radius: 13px;
  border: 1px solid #cfd9e5;
  background: #fff;
  color: #183b56;
  font-weight: 750;
  padding: 12px 14px;
  appearance: auto;
}
.nature-select-v29:focus {
  outline: none;
  border-color: #7aa4c7;
  box-shadow: 0 0 0 4px rgba(18,59,93,.10);
}
.nature-help-v29 {
  margin-top: 7px;
}
.card-toolbar-v29 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.collapse-toggle-v29 {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dce3eb;
  border-radius: 10px;
  background: #f8fbfe;
  color: var(--if-navy, #002654);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.collapse-toggle-v29:hover {
  background: #eaf2f8;
  border-color: #b9cedf;
}
.collapsible-card-v29 {
  position: relative;
  transition: min-height .15s ease, padding .15s ease;
}
.collapsible-card-v29.is-collapsed-v29 {
  min-height: 0 !important;
  padding-bottom: 18px;
}
.collapsible-card-v29.is-collapsed-v29 > *:not(.card-toolbar-v29) {
  display: none !important;
}
.collapsible-card-v29.is-collapsed-v29 .card-toolbar-v29 {
  margin-bottom: 0;
}
.trend-header-v29 {
  margin-top: 6px;
}

/* v30 — accueil compact réel, select plus propre, courbe intra-mois */
.cockpit-grid-v27,
.cockpit-lower-v27 {
  align-items: start;
}
.compact-summary-v30 {
  display: none;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f4f8fb;
  border: 1px solid #dfe7ef;
  color: var(--if-navy, #002654);
}
.compact-summary-v30 strong {
  font-size: 16px;
  font-weight: 950;
}
.compact-summary-v30 span {
  font-size: 13px;
  color: var(--if-muted, #637381);
  font-weight: 800;
}
.actions-compact-v30 {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.actions-compact-v30 a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d7e2ed;
  color: var(--if-navy, #002654);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}
.collapsible-card-v29 {
  align-self: start;
}
.collapsible-card-v29.is-collapsed-v29 {
  min-height: unset !important;
  padding: 18px 20px !important;
}
.collapsible-card-v29.is-collapsed-v29 > *:not(.card-toolbar-v29):not(.compact-summary-v30) {
  display: none !important;
}
.collapsible-card-v29.is-collapsed-v29 .compact-summary-v30 {
  display: flex;
  margin-top: 10px;
}
.collapsible-card-v29.is-collapsed-v29 .card-toolbar-v29 {
  margin-bottom: 0;
}
.nature-select-block-v29 {
  position: relative;
}
.nature-select-v30 {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid #c7d5e3;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #002654 50%), linear-gradient(135deg, #002654 50%, transparent 50%);
  background-position: calc(100% - 22px) 24px, calc(100% - 15px) 24px;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  color: #183b56;
  font-weight: 850;
  padding: 13px 46px 13px 16px;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 8px 20px rgba(0,38,84,.04);
}
.nature-select-v30:hover {
  border-color: #9db8cf;
  background-color: #fbfdff;
}
.nature-select-v30:focus {
  outline: none;
  border-color: #005fa0;
  box-shadow: 0 0 0 4px rgba(0,95,160,.12);
}
.operation-decaissement .nature-select-v30:focus {
  border-color: var(--if-red, #a82040);
  box-shadow: 0 0 0 4px rgba(168,32,64,.10);
}

/* v31 — finition UI, bandeau plus professionnel, dates comptables */
.topbar-v27 {
  min-height: 62px;
  padding: 8px 28px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.brand-v27 {
  gap: 12px;
}
.brand-v27 img {
  width: 44px;
  max-height: 44px;
  object-fit: contain;
}
.brand-v27 strong {
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.brand-v27 span:not(.version-badge) {
  font-size: 12px;
  margin-top: 2px;
}
.version-badge {
  font-size: 10px;
  padding: 1px 7px;
  margin-left: 6px;
}
.topbar-v27 nav a {
  font-size: 13px;
  margin-left: 14px;
}
.container {
  max-width: 1320px;
}
.cockpit-hero-v27 {
  padding: 22px 30px;
  border-radius: 22px;
}
.cockpit-hero-v27:before {
  width: 10px;
}
.cockpit-hero-v27 h1 {
  font-size: clamp(28px, 3vw, 36px);
  margin: 6px 0 6px;
}
.cockpit-hero-v27 p {
  font-size: 15px;
}
.hero-kicker-v27, .card-label-v27 {
  font-size: 12px;
  letter-spacing: .075em;
}
.cockpit-state-v27, .cockpit-actions-v27, .checklist-card-v27, .last-op-card-v27, .controls-card-v27, .cockpit-trend-v27, .settings-card-v27, .about-card-v27 {
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(0,38,84,.07);
}
.state-balance-v27 {
  font-size: clamp(42px, 4vw, 58px);
}
.state-eur-v27 {
  font-size: 18px;
}
.rate-note-v27 {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
}
.primary-action-grid-v27 {
  gap: 12px;
  margin-top: 16px;
}
.action-button-v27 {
  min-height: 74px;
  border-radius: 16px;
  padding: 15px 18px;
  box-shadow: 0 10px 22px rgba(0,38,84,.13);
}
.action-button-v27 strong {
  font-size: 20px;
}
.action-button-v27 span {
  margin-top: 6px;
  font-size: 13px;
}
.cockpit-trend-v28 {
  width: min(980px, 100%);
  max-width: 980px;
  margin: 24px auto 0 auto;
  padding: 18px 22px 14px;
}
.cockpit-trend-v28 .trend-header h1 {
  font-size: 22px;
}
.cockpit-trend-v28 .trend-chart,
.cockpit-trend-v28 #cashTrendCanvas {
  height: 190px;
}
.nature-select-v30 {
  border-radius: 12px;
  min-height: 48px;
  font-size: 15px;
  background-color: #fbfdff;
}
.admin-details-v31, .version-history-v31 {
  border: 1px solid #dfe7ef;
  border-radius: 16px;
  background: #fbfdff;
  padding: 14px 16px;
  margin: 18px 0;
}
.admin-details-v31 > summary, .version-history-v31 > summary {
  cursor: pointer;
  color: var(--if-navy, #002654);
  font-weight: 900;
  list-style-position: outside;
}
.admin-details-v31[open] > summary, .version-history-v31[open] > summary {
  margin-bottom: 14px;
}
.rates-table-v28 {
  padding: 14px 16px;
}
.version-entry-v31 {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 12px;
}
.version-entry-v31 h3 {
  margin: 0 0 8px;
  color: var(--if-navy, #002654);
  font-size: 17px;
}
.journal-table-v31 th, .journal-table-v31 td {
  font-size: 12px;
  white-space: nowrap;
}
.journal-table-v31 td:nth-child(6) {
  white-space: normal;
  min-width: 180px;
}

/* v32 — Paramètres enrichis, À propos repliable et historique honnête */
.settings-page-v32 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 24px;
  align-items: start;
}
.settings-main-v32 h1,
.about-card-v32 h1 {
  font-size: clamp(30px, 3vw, 46px);
  margin: 8px 0 12px;
  color: var(--if-navy, #002654);
}
.settings-form-v32 {
  margin-top: 22px;
}
.settings-section-v32,
.about-card-v32,
.version-history-v32 {
  border: 1px solid #dfe7ef;
  border-radius: 18px;
  background: #fbfdff;
  margin: 14px 0;
  overflow: hidden;
}
.settings-section-v32 > summary,
.about-card-v32 > summary,
.version-history-v32 > summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--if-navy, #002654);
  font-weight: 950;
  list-style-position: outside;
  display: block;
}
.settings-section-v32 > summary span,
.about-card-v32 > summary span {
  display: block;
  font-size: 18px;
}
.settings-section-v32 > summary small,
.about-card-v32 > summary small {
  display: block;
  margin-top: 5px;
  color: var(--if-muted, #637381);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}
.settings-section-v32[open] > summary,
.about-card-v32[open] > summary,
.version-history-v32[open] > summary {
  border-bottom: 1px solid #e4ebf2;
  background: #f8fbfd;
}
.settings-fields-v32 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  padding: 18px;
}
.setting-field-v32 {
  display: grid;
  gap: 7px;
}
.setting-field-v32 label {
  font-size: 14px;
  font-weight: 900;
  color: #243b53;
}
.setting-field-v32 input[type="text"],
.setting-field-v32 select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cfd9e5;
  background: #fff;
  padding: 10px 12px;
  font-size: 15px;
}
.setting-field-v32.is-checkbox {
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 6px 10px;
}
.setting-field-v32.is-checkbox label {
  grid-column: 2;
  grid-row: 1;
}
.setting-field-v32.is-checkbox input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  width: 20px;
  height: 20px;
}
.setting-field-v32.is-checkbox .field-help-v32,
.setting-field-v32.is-checkbox .errorlist {
  grid-column: 2;
}
.field-help-v32 {
  margin: 0;
  color: var(--if-muted, #637381);
  font-size: 12px;
  line-height: 1.35;
}
.settings-actions-v32 {
  margin-top: 20px;
}
.about-card-v32 {
  padding: 0;
}
.about-content-v32 {
  padding: 18px 22px 22px;
}
.about-kv-v32 {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 10px 18px;
  align-items: baseline;
  margin: 18px 0 28px;
}
.about-kv-v32 dt {
  color: var(--if-muted, #637381);
  font-weight: 950;
  line-height: 1.2;
}
.about-kv-v32 dd {
  margin: 0;
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.history-note-v32 {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff5dc;
  border: 1px solid #ecd69f;
  color: #513b00;
  font-size: 13px;
  font-weight: 700;
}
.version-history-v32 {
  padding: 0;
}
.version-history-v32 > summary {
  padding: 14px 16px;
}
.version-history-v32 .version-entry-v31 {
  padding: 12px 0;
}
@media (max-width: 1100px) {
  .settings-page-v32 { grid-template-columns: 1fr; }
  .settings-fields-v32 { grid-template-columns: 1fr; }
  .about-kv-v32 { grid-template-columns: 1fr; gap: 4px 0; }
}

/* v33.2 — déconnexion conforme Django 5 : bouton POST affiché comme un lien de navigation */
.nav-logout-form {
  display: inline;
  margin: 0 0 0 14px;
  padding: 0;
}
.nav-logout-button {
  border: 0;
  background: transparent;
  color: var(--if-navy, #002654);
  opacity: .82;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.nav-logout-button:hover { opacity: 1; }


/* v33.3 — identité visuelle 531 Soft et favicon */
.brand-v27 img.brand-logo-531soft-v333,
.brand img.brand-logo-531soft-v333 {
  width: 138px;
  max-width: 28vw;
  max-height: 44px;
  object-fit: contain;
}
@media (max-width: 760px) {
  .brand-v27 img.brand-logo-531soft-v333,
  .brand img.brand-logo-531soft-v333 {
    width: 112px;
    max-height: 38px;
  }
}

/* v33.5 — identité documentaire et logo d'impression */
.document-logo-preview-v335 {
  margin: 12px 0 16px;
}
.document-logo-preview-frame-v335 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 14px;
  background: #fff;
}
.document-logo-preview-frame-v335 img {
  display: block;
  max-width: min(340px, 92%);
  max-height: 82px;
  object-fit: contain;
}

/* v33.8 - Identité documentaire : bloc signature/cachet */
.document-identity-preview-v338 {
  margin-bottom: 1rem;
}
.document-identity-preview-v338 h3 {
  margin: 0 0 .6rem 0;
  font-size: 1rem;
  color: #143a5a;
}
.document-signature-preview-frame-v338 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  min-height: 110px;
  padding: .75rem;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: #fff;
}
.document-signature-preview-frame-v338 img {
  max-width: 420px;
  max-height: 160px;
  object-fit: contain;
  display: block;
}
.document-signature-empty-v338 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  min-height: 92px;
  padding: .75rem;
  border: 1px dashed #b9c9d8;
  border-radius: 10px;
  background: #f8fbfd;
  color: #557089;
  font-size: .92rem;
}

/* v33.10 — identité documentaire clarifiée */
.document-identity-layout-v3310 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 4px;
}
.document-identity-card-v3310 {
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(0, 38, 84, .04);
}
.document-identity-card-head-v3310 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.document-identity-card-head-v3310 h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--if-navy, #002654);
}
.document-identity-card-head-v3310 p {
  margin: 0;
  color: #4d6175;
  font-size: 13px;
  line-height: 1.35;
}
.document-status-v3310 {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 38, 84, .16);
  border-radius: 999px;
  padding: 5px 9px;
  background: #f6f9fc;
  color: #425a73;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.document-status-v3310.is-custom {
  border-color: rgba(18, 105, 72, .22);
  background: #eefaf5;
  color: #126948;
}
.document-preview-frame-v3310 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
}
.logo-preview-v3310 img {
  display: block;
  max-width: 86%;
  max-height: 110px;
  object-fit: contain;
}
.signature-preview-v3310 img {
  display: block;
  max-width: 92%;
  max-height: 132px;
  object-fit: contain;
}
.signature-empty-v3310 {
  padding: 18px;
  color: #60758a;
  font-size: 13px;
  text-align: center;
  border-style: dashed;
}
.document-current-note-v3310 {
  margin: 9px 0 16px;
  min-height: 34px;
  color: #496076;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-controls-v3310 {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 38, 84, .09);
}
.document-upload-v3310 > label {
  display: block;
  margin-bottom: 7px;
  color: var(--if-navy, #002654);
  font-size: 13px;
  font-weight: 900;
}
.document-upload-v3310 input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd9e6;
  border-radius: 10px;
  background: #fff;
  color: #20364d;
  font-size: 13px;
}
.document-upload-v3310 p {
  margin: 7px 0 0;
  color: #60758a;
  font-size: 12px;
  line-height: 1.35;
}
.document-delete-v3310 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(163, 38, 50, .26);
  border-radius: 999px;
  background: #fff7f8;
  color: #8e1f2d;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.document-delete-v3310 input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin: 0;
  accent-color: #8e1f2d;
}
.document-identity-layout-v3310 + .settings-fields-v32:empty {
  display: none;
}
@media (max-width: 900px) {
  .document-identity-layout-v3310 {
    grid-template-columns: 1fr;
  }
  .document-identity-card-head-v3310 {
    flex-direction: column;
  }
}

/* v33.11 — identité documentaire fiabilisée et lisibilité renforcée */
.document-identity-layout-v3311 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 4px;
}
.document-identity-card-v3311 {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0, 38, 84, .04);
}
.document-identity-card-head-v3311 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.document-identity-card-head-v3311 h3 {
  margin: 0 0 5px;
  font-size: 18px;
  color: var(--if-navy, #002654);
}
.document-identity-card-head-v3311 p {
  margin: 0;
  max-width: 255px;
  color: #4d6175;
  font-size: 13px;
  line-height: 1.35;
}
.document-status-v3311 {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 38, 84, .16);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f6f9fc;
  color: #425a73;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.document-status-v3311.is-custom {
  border-color: rgba(18, 105, 72, .24);
  background: #eefaf5;
  color: #126948;
}
.document-status-v3311.is-default {
  border-color: rgba(0, 38, 84, .13);
  background: #f3f7fb;
  color: #486176;
}
.document-preview-frame-v3311 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 156px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
}
.logo-preview-v3311 img {
  display: block;
  max-width: 82%;
  max-height: 115px;
  object-fit: contain;
}
.signature-preview-v3311 img {
  display: block;
  max-width: 92%;
  max-height: 138px;
  object-fit: contain;
}
.signature-empty-v3311 {
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  text-align: center;
  border-style: dashed;
  color: #5a7188;
}
.signature-empty-v3311 strong {
  color: var(--if-navy, #002654);
  font-size: 14px;
}
.signature-empty-v3311 span {
  max-width: 260px;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-current-note-v3311 {
  margin: 10px 0 0;
  min-height: 42px;
  color: #496076;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-warning-v3311 {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(196, 118, 0, .26);
  border-radius: 10px;
  background: #fff8ed;
  color: #7a4b00;
  font-size: 12px;
  line-height: 1.35;
}
.document-controls-v3311 {
  display: grid;
  gap: 13px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid rgba(0, 38, 84, .09);
}
.document-upload-v3311 > label {
  display: block;
  margin-bottom: 8px;
  color: var(--if-navy, #002654);
  font-size: 13.5px;
  font-weight: 900;
}
.document-upload-v3311 input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd9e6;
  border-radius: 10px;
  background: #fff;
  color: #20364d;
  font-size: 13px;
}
.document-upload-v3311 p {
  margin: 8px 0 0;
  color: #60758a;
  font-size: 12px;
  line-height: 1.35;
}
.document-delete-v3311 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid rgba(163, 38, 50, .28);
  border-radius: 12px;
  background: #fff7f8;
  color: #8e1f2d;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.document-delete-v3311 input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px;
  margin: 0;
  accent-color: #8e1f2d;
}
.document-identity-layout-v3311 + .settings-fields-v32:empty {
  display: none;
}
@media (max-width: 900px) {
  .document-identity-layout-v3311 {
    grid-template-columns: 1fr;
  }
  .document-identity-card-v3311 {
    min-height: unset;
  }
  .document-identity-card-head-v3311 {
    flex-direction: column;
  }
}

/* v33.12 — identité documentaire nettoyée et aperçu immédiat */
.document-identity-layout-v3312 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 18px 0 4px;
}
.document-identity-card-v3312 {
  display: flex;
  flex-direction: column;
  min-height: 505px;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0, 38, 84, .035);
}
.document-identity-card-head-v3312 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.document-identity-card-head-v3312 h3 {
  margin: 0 0 5px;
  font-size: 18px;
  color: var(--if-navy, #002654);
}
.document-identity-card-head-v3312 p {
  margin: 0;
  max-width: 270px;
  color: #4d6175;
  font-size: 13px;
  line-height: 1.35;
}
.document-status-v3312 {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f6f9fc;
  color: #425a73;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.document-status-v3312.is-custom {
  border-color: rgba(18, 105, 72, .24);
  background: #eefaf5;
  color: #126948;
}
.document-status-v3312.is-default {
  border-color: rgba(0, 38, 84, .12);
  background: #f3f7fb;
  color: #486176;
}
.document-preview-frame-v3312 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 156px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
}
.document-preview-frame-v3312 img {
  display: block;
  object-fit: contain;
}
.logo-preview-v3312 img {
  max-width: 82%;
  max-height: 115px;
}
.signature-preview-v3312 img,
#document-signature-preview-frame img {
  max-width: 94%;
  max-height: 142px;
}
.signature-empty-v3312 {
  flex-direction: column;
  gap: 7px;
  padding: 20px;
  text-align: center;
  border-style: dashed;
  color: #5a7188;
}
.signature-empty-v3312 strong {
  color: var(--if-navy, #002654);
  font-size: 14px;
}
.signature-empty-v3312 span {
  max-width: 270px;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-current-note-v3312 {
  margin: 10px 0 0;
  min-height: 38px;
  color: #496076;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-controls-v3312 {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid rgba(0, 38, 84, .09);
}
.document-upload-v3312 > label {
  display: block;
  margin-bottom: 8px;
  color: var(--if-navy, #002654);
  font-size: 13.5px;
  font-weight: 900;
}
.document-upload-v3312 input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd9e6;
  border-radius: 10px;
  background: #fff;
  color: #20364d;
  font-size: 13px;
}
.document-upload-v3312 p,
.document-delete-help-v3312 {
  margin: 8px 0 0;
  color: #60758a;
  font-size: 12px;
  line-height: 1.35;
}
.document-delete-v3312 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(163, 38, 50, .28);
  border-radius: 999px;
  background: #fff7f8;
  color: #8e1f2d;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.document-delete-v3312 input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.document-delete-v3312 span::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 1.5px solid rgba(142, 31, 45, .55);
  border-radius: 4px;
  background: #fff;
}
.document-delete-v3312 input[type="checkbox"]:checked + span::before {
  background: #8e1f2d;
  box-shadow: inset 0 0 0 3px #fff;
}
.document-identity-layout-v3312 + .settings-fields-v32:empty {
  display: none;
}
@media (max-width: 900px) {
  .document-identity-layout-v3312 {
    grid-template-columns: 1fr;
  }
  .document-identity-card-v3312 {
    min-height: unset;
  }
  .document-identity-card-head-v3312 {
    flex-direction: column;
  }
}

/* v33.13 — identité documentaire : états simplifiés et aperçu PDF local */
.document-identity-layout-v3313 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 18px 0 4px;
}
.document-identity-card-v3313 {
  display: flex;
  flex-direction: column;
  min-height: 505px;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0, 38, 84, .035);
}
.document-identity-card-head-v3313 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.document-identity-card-head-v3313 h3 {
  margin: 0 0 5px;
  font-size: 18px;
  color: var(--if-navy, #002654);
}
.document-identity-card-head-v3313 p {
  margin: 0;
  max-width: 270px;
  color: #4d6175;
  font-size: 13px;
  line-height: 1.35;
}
.document-status-v3313 {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f6f9fc;
  color: #425a73;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.document-status-v3313.is-custom {
  border-color: rgba(18, 105, 72, .24);
  background: #eefaf5;
  color: #126948;
}
.document-status-v3313.is-default {
  border-color: rgba(0, 38, 84, .12);
  background: #f3f7fb;
  color: #486176;
}
.document-preview-frame-v3313 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 156px;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #fbfdff;
  overflow: hidden;
}
.document-preview-frame-v3313 img {
  display: block;
  object-fit: contain;
}
.logo-preview-v3313 img {
  max-width: 82%;
  max-height: 115px;
}
.signature-preview-v3313 img,
#document-signature-preview-frame img {
  max-width: 94%;
  max-height: 142px;
}
.signature-empty-v3313 {
  flex-direction: column;
  gap: 7px;
  padding: 20px;
  text-align: center;
  border-style: dashed;
  color: #5a7188;
}
.signature-empty-v3313 strong {
  color: var(--if-navy, #002654);
  font-size: 14px;
}
.signature-empty-v3313 span {
  max-width: 270px;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-local-pdf-preview-v3313 {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.document-pdf-fallback-v3313 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 18px;
  color: #5a7188;
  font-size: 12.5px;
  text-align: center;
}
.document-current-note-v3313 {
  margin: 10px 0 0;
  min-height: 38px;
  color: #496076;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-controls-v3313 {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid rgba(0, 38, 84, .09);
}
.document-upload-v3313 > label {
  display: block;
  margin-bottom: 8px;
  color: var(--if-navy, #002654);
  font-size: 13.5px;
  font-weight: 900;
}
.document-upload-v3313 input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd9e6;
  border-radius: 10px;
  background: #fff;
  color: #20364d;
  font-size: 13px;
}
.document-upload-v3313 p,
.document-delete-help-v3313 {
  margin: 8px 0 0;
  color: #60758a;
  font-size: 12px;
  line-height: 1.35;
}
.document-delete-v3313 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(163, 38, 50, .28);
  border-radius: 999px;
  background: #fff7f8;
  color: #8e1f2d;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.document-delete-v3313 input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.document-delete-v3313 span::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 1.5px solid rgba(142, 31, 45, .55);
  border-radius: 4px;
  background: #fff;
}
.document-delete-v3313 input[type="checkbox"]:checked + span::before {
  background: #8e1f2d;
  box-shadow: inset 0 0 0 3px #fff;
}
.document-identity-layout-v3313 + .settings-fields-v32:empty {
  display: none;
}
@media (max-width: 900px) {
  .document-identity-layout-v3313 {
    grid-template-columns: 1fr;
  }
  .document-identity-card-v3313 {
    min-height: unset;
  }
  .document-identity-card-head-v3313 {
    flex-direction: column;
  }
}


/* v33.14 — aperçu recadré immédiat signature/cachet */
.document-preview-error-v3314 {
  border-color: #f4b6b6;
  color: #8a1f1f;
  background: #fff7f7;
}
.document-preview-error-v3314 strong {
  color: #8a1f1f;
}

/* v33.15 — bandeau supérieur 531 Soft, version discrète et profil utilisateur */
.app-topbar-v3315 {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 78px;
  padding: 0 28px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  background:
    radial-gradient(circle at 7% 0%, rgba(48, 107, 255, .42), transparent 26%),
    linear-gradient(115deg, #061a3d 0%, #073b86 52%, #061a3d 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 20, 55, .16);
  backdrop-filter: none;
}

.app-brand-v3315 {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.app-brand-logo-v3315 {
  display: block;
  width: 142px;
  max-width: 30vw;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-product-v3315 {
  position: relative;
  min-width: 190px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, .36);
}

.app-product-title-v3315 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.app-product-title-v3315 strong {
  color: #fff;
  font-size: 19px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.app-product-v3315 > span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 650;
  white-space: nowrap;
}

.app-version-v3315 {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .02em;
  vertical-align: middle;
}

.app-topbar-actions-v3315 {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.app-nav-v3315 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.app-nav-v3315 a {
  margin-left: 0;
  padding: 8px 9px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-v3315 a:hover,
.app-nav-v3315 a:focus {
  color: #fff;
  background: rgba(255, 255, 255, .10);
  outline: none;
}

.app-user-menu-v3315 {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.app-user-menu-v3315 summary {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  padding: 0;
  color: #fff;
}

.app-user-menu-v3315 summary::-webkit-details-marker {
  display: none;
}

.app-user-avatar-v3315 {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #073b86;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}

.app-user-text-v3315 {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 172px;
}

.app-user-text-v3315 strong {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.app-user-text-v3315 span {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 650;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user-chevron-v3315 {
  color: rgba(255, 255, 255, .78);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-1px);
}

.app-user-dropdown-v3315 {
  position: absolute;
  right: 0;
  top: calc(100% - 9px);
  min-width: 220px;
  padding: 12px;
  border: 1px solid rgba(0, 38, 84, .14);
  border-radius: 14px;
  background: #fff;
  color: var(--if-text, #142337);
  box-shadow: 0 18px 38px rgba(0, 20, 55, .20);
}

.app-user-name-v3315 {
  padding: 3px 4px 10px;
  color: #334e68;
  font-size: 12px;
  font-weight: 850;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 9px;
  overflow-wrap: anywhere;
}

.app-logout-form-v3315 {
  display: block;
  margin: 0;
}

.app-logout-button-v3315 {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f8fb;
  color: var(--if-navy, #002654);
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}

.app-logout-button-v3315:hover,
.app-logout-button-v3315:focus {
  background: #e8f1f8;
  opacity: 1;
  outline: none;
}

@media (max-width: 1150px) {
  .app-topbar-v3315 {
    min-height: auto;
    padding: 12px 18px;
    align-items: center;
    flex-wrap: wrap;
  }
  .app-topbar-actions-v3315 {
    width: 100%;
    min-height: 42px;
    align-items: center;
  }
  .app-nav-v3315 {
    justify-content: flex-start;
    margin-right: auto;
  }
  .app-user-menu-v3315 summary {
    min-height: 42px;
  }
}

@media (max-width: 760px) {
  .app-topbar-v3315 {
    gap: 10px;
    padding: 11px 14px;
  }
  .app-brand-v3315 {
    width: 100%;
    gap: 14px;
  }
  .app-brand-logo-v3315 {
    width: 118px;
    max-width: 45vw;
  }
  .app-product-v3315 {
    min-width: 0;
    padding-left: 14px;
  }
  .app-product-title-v3315 strong {
    font-size: 17px;
  }
  .app-product-v3315 > span {
    white-space: normal;
  }
  .app-topbar-actions-v3315 {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 8px;
  }
  .app-nav-v3315 {
    width: 100%;
    justify-content: flex-start;
  }
  .app-nav-v3315 a {
    padding: 7px 8px;
    background: rgba(255, 255, 255, .08);
  }
  .app-user-text-v3315 {
    min-width: 0;
  }
  .app-user-dropdown-v3315 {
    left: 0;
    right: auto;
  }
}

/* v33.15 correctif — menus principaux restaurés et visibles sous le bandeau bleu */
.app-header-v3315 {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 20, 55, .14);
}

.app-header-v3315 .app-topbar-v3315 {
  position: relative;
  top: auto;
  z-index: auto;
  box-shadow: none;
}

.app-header-v3315 .app-user-menu-v3315 {
  margin-left: auto;
}

.app-main-nav-v3315 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 28px 8px;
  border-bottom: 1px solid #dbe4ee;
  background: rgba(255, 255, 255, .97);
  overflow-x: auto;
  scrollbar-width: thin;
}

.app-main-nav-v3315 a {
  flex: 0 0 auto;
  margin-left: 0;
  padding: 8px 12px;
  border: 1px solid rgba(0, 38, 84, .12);
  border-radius: 999px;
  background: #f6f9fc;
  color: var(--if-navy, #002654);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.app-main-nav-v3315 a:hover,
.app-main-nav-v3315 a:focus {
  border-color: rgba(0, 38, 84, .28);
  background: #eaf2f8;
  color: var(--if-navy, #002654);
  outline: none;
}

@media (max-width: 1150px) {
  .app-header-v3315 .app-topbar-v3315 {
    min-height: 70px;
    flex-wrap: nowrap;
  }
  .app-main-nav-v3315 {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 760px) {
  .app-header-v3315 .app-topbar-v3315 {
    align-items: center;
  }
  .app-header-v3315 .app-brand-v3315 {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }
  .app-header-v3315 .app-user-menu-v3315 {
    flex: 0 0 auto;
  }
  .app-header-v3315 .app-user-text-v3315,
  .app-header-v3315 .app-user-chevron-v3315 {
    display: none;
  }
  .app-main-nav-v3315 {
    min-height: 42px;
    padding: 7px 14px;
    gap: 6px;
  }
  .app-main-nav-v3315 a {
    padding: 8px 10px;
    font-size: 12px;
  }
}


/* v33.16 — menu utilisateur limité à la seule déconnexion, sans affichage de nom nominatif. */
.app-user-dropdown-logout-only-v3316 {
  min-width: 170px;
  padding: 8px;
}

.app-user-dropdown-logout-only-v3316 .app-logout-button-v3315 {
  width: 100%;
  justify-content: center;
}

.password-help-actions-v3316 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.password-help-actions-v3316 a {
  font-weight: 800;
}

.auth-help-v3316 {
  margin-top: 16px;
  font-size: 13px;
  color: #516070;
}

/* v33.18 — Paramètres > Mon compte / sécurité sans bloc de diagnostic SMTP. */
.account-security-v3317 {
  margin-top: 18px;
}

.account-security-grid-v3317 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding-top: 14px;
}

.account-security-card-v3317 {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

.account-security-card-v3317 h3 {
  margin: 0 0 12px 0;
  color: #0b1f4d;
}

.account-kv-v3317 {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
  gap: 8px 14px;
  margin: 0 0 14px 0;
  font-size: 14px;
}

.account-kv-v3317 dt {
  color: #64748b;
  font-weight: 700;
}

.account-kv-v3317 dd {
  margin: 0;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.account-actions-v3317,
.smtp-test-form-v3317 {
  margin-top: 12px;
}

.muted-v3317 {
  color: #94a3b8;
}

.smtp-test-card-v3317 {
  background: #f8fafc;
}

/* v35.6 — demandes de comptes : tableau lisible sur desktop et sans débordement de la colonne Profil. */
.account-requests-card-v356 {
  max-width: 1120px;
}
.account-requests-table-wrap-v356 {
  overflow-x: visible;
}
.account-requests-table-v356 {
  table-layout: fixed;
}
.account-requests-table-v356 th,
.account-requests-table-v356 td {
  padding: 10px 12px;
}
.account-requests-table-v356 th:nth-child(1) { width: 96px; }
.account-requests-table-v356 th:nth-child(2) { width: 270px; }
.account-requests-table-v356 th:nth-child(3) { width: 165px; }
.account-requests-table-v356 th:nth-child(4) { width: 235px; }
.account-requests-table-v356 th:nth-child(5) { width: 95px; }
.account-requests-table-v356 th:nth-child(6) { width: 125px; }
.date-cell-v356 { white-space: nowrap; }
.date-cell-v356 span { color: #566; }
.email-cell-v356 {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.profile-cell-v356 strong {
  display: block;
  margin-bottom: 3px;
}
.subline-v356 {
  display: block;
  color: #556;
  font-size: 12px;
  line-height: 1.25;
  background: #f8fafc;
  border-left: 3px solid var(--border);
  padding: 4px 6px;
}
.status-badge-v356 {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  background: #eef2f7;
  color: #1f2933;
}
.status-approved { background: #e6f4ea; color: #1d6b37; }
.status-rejected,
.status-cancelled { background: #fde8e8; color: #8f001a; }
.status-mandataire_info_pending,
.status-mandataire_info_completed { background: #fff8e6; color: #6a4b00; }
.action-cell-v356 .btn.small,
.btn.small {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
}
.mandataire-end-form-v356 {
  display: grid;
  grid-template-columns: 145px 180px 60px minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff8e6;
}
.mandataire-end-form-v356 label {
  margin-bottom: 0;
  font-size: 12px;
}
.mandataire-end-form-v356 input,
.mandataire-end-form-v356 select {
  min-width: 0;
}
@media (max-width: 900px) {
  .account-requests-table-wrap-v356 { overflow-x: auto; }
  .account-requests-table-v356 { min-width: 920px; }
  .mandataire-end-form-v356 { grid-template-columns: 1fr; }
}

/* v35.7 — parcours mandataire explicite : dossier → acte → dépôt signé → activation. */
.mandataire-workflow-table-v357 th:nth-child(3) { width: 190px; }
.mandataire-workflow-table-v357 th:nth-child(4) { width: 260px; }
.mandataire-detail-v357 .card.workflow-panel-v357 {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.workflow-steps-v357 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.workflow-step-v357 {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
}
.workflow-step-v357 span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  font-weight: 800;
  margin-bottom: 6px;
}
.workflow-step-v357 b,
.workflow-step-v357 small { display: block; }
.workflow-step-v357 small { color: #64748b; }
.workflow-step-v357.current {
  border-color: var(--primary);
  background: #eef6ff;
}
.workflow-step-v357.current span {
  background: var(--primary);
  color: white;
}
.workflow-step-v357.done {
  border-color: #94a3b8;
}
.upload-panel-v357 {
  border-left: 5px solid var(--primary) !important;
}
@media (max-width: 900px) {
  .workflow-steps-v357 { grid-template-columns: 1fr; }
}

/* v35.8 — espace mandataire, journal explicite et fin de mandat lisible. */
.mandataire-dashboard-v358 {
  margin: 18px 0;
  border-left: 5px solid var(--primary);
}
.mandataire-summary-grid-v358 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.mandataire-summary-grid-v358 > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}
.mandataire-summary-grid-v358 span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mandataire-summary-grid-v358 strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}
.mandataire-docs-v358 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.empty-cell-v358 {
  text-align: center;
  padding: 22px !important;
  color: #64748b;
  font-weight: 700;
}
.mandataire-end-panel-v358 {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #f1c4c4;
  border-radius: 14px;
  background: #fff8f8;
}
.mandataire-end-form-v358 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
  max-width: 620px;
}
.mandataire-end-form-v358 label {
  font-weight: 800;
  color: var(--ink);
}
.mandataire-end-form-v358 input,
.mandataire-end-form-v358 select {
  width: 100%;
  max-width: 420px;
}
.mandataire-end-form-v358 .btn.danger {
  width: fit-content;
  max-width: 100%;
  white-space: normal;
}
@media (max-width: 900px) {
  .mandataire-summary-grid-v358 { grid-template-columns: 1fr; }
}

/* v35.10 — signature bénéficiaire au guichet */
.signature-counter-card-v3510 dl {
  margin-bottom: 18px;
}
.signature-counter-form-v3510 {
  display: grid;
  gap: 10px;
}
.signature-counter-form-v3510 label {
  font-weight: 800;
  color: var(--ink);
}
.signature-pad-wrap-v3510 {
  width: 100%;
  max-width: 820px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}
#signature-pad-v3510 {
  width: 100%;
  height: 260px;
  display: block;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: #fff;
  touch-action: none;
}
.signature-actions-v3510 {
  margin-top: 6px;
  align-items: center;
}
.signature-counter-panel-v3510 {
  margin-top: 18px;
}
@media (max-width: 760px) {
  #signature-pad-v3510 {
    height: 220px;
  }
}

/* v35.11 — signature bénéficiaire par QR code au moment de la saisie */
.receipt-options-v3511 {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.85);
}
.counter-signature-check-v3511 {
  margin-top: .55rem;
}
.qr-signature-panel-v3511 {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.80);
}
.qr-signature-grid-v3511 {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1.25rem;
  align-items: start;
}
.qr-code-v3511 {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 12px;
  padding: .5rem;
}
.status-pill-v3511 {
  display: inline-flex;
  align-items: center;
  padding: .45rem .75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
}
.status-pill-v3511.pending {
  background: rgba(245, 158, 11, .16);
  color: #92400e;
}
.status-pill-v3511.signed {
  background: rgba(34, 197, 94, .16);
  color: #166534;
}
.status-pill-v3511.expired {
  background: rgba(239, 68, 68, .16);
  color: #991b1b;
}
.mobile-signature-card-v3511 {
  max-width: 760px;
  margin: 0 auto;
}
.signature-pad-wrap-v3511 {
  width: 100%;
  height: 260px;
  border: 2px dashed rgba(15, 23, 42, .30);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  touch-action: none;
}
#signature-pad-mobile-v3511 {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.signature-actions-v3511 {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .qr-signature-grid-v3511 {
    grid-template-columns: 1fr;
  }
  .signature-pad-wrap-v3511 {
    height: 220px;
  }
}

/* v35.13 — référentiel tiers ELAP */
.stats-grid-v3513 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .9rem;
  margin: 1rem 0 1.25rem;
}
.stat-card-v3513 {
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  padding: .95rem 1rem;
  background: rgba(248, 250, 252, .92);
}
.stat-card-v3513 b {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
}
.stat-card-v3513 span {
  color: #64748b;
  font-size: .9rem;
}
.third-party-import-v3513 input[type="file"] {
  width: 100%;
}
.third-party-table-v3513 td {
  vertical-align: top;
}
.badge-ok-v3513,
.badge-warning-v3513 {
  display: inline-flex;
  align-items: center;
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-ok-v3513 {
  color: #166534;
  background: rgba(34, 197, 94, .14);
}
.badge-warning-v3513 {
  color: #92400e;
  background: rgba(245, 158, 11, .16);
}
.autocomplete-box-v27 button strong {
  display: block;
  font-weight: 700;
}
.autocomplete-email-v3513 {
  display: block;
  margin-top: .15rem;
  color: #64748b;
  font-size: .86rem;
}

/* v35.16 — Référentiel tiers ELAP simplifié */
.stats-grid-v3516 {
  margin: 1.4rem 0;
}
.elap-help-v3516 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 1.2rem;
  align-items: start;
  border: 1px solid #d4dde8;
  border-radius: 16px;
  padding: 1rem;
  background: #f8fafc;
  margin: 1.2rem 0;
}
.elap-help-v3516 h2 {
  margin: 0 0 .5rem;
  color: #1f4f7a;
  font-size: 1.4rem;
}
.elap-help-v3516 figure {
  margin: 0;
}
.elap-help-v3516 img {
  width: 100%;
  height: auto;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: white;
  display: block;
}
.elap-help-v3516 figcaption {
  color: #64748b;
  font-size: .9rem;
  margin-top: .45rem;
}
.third-party-search-v3516 input[type="search"] {
  min-width: min(100%, 420px);
}
.third-party-table-v3516 table {
  table-layout: auto;
}
.info-box-v3516 {
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 1rem;
  background: #f8fafc;
  color: #0f172a;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .elap-help-v3516 {
    grid-template-columns: 1fr;
  }
}


/* v35.17 — accueil compact et paramètres réellement actifs */
.cockpit-hero-v27 {
  padding: 18px 26px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0,38,84,.055);
}
.cockpit-hero-v27:before { width: 7px; }
.cockpit-hero-v27 h1 { font-size: clamp(24px, 2.35vw, 31px); }
.cockpit-hero-v27 p { font-size: 14px; }
.hero-meta-v27 span { padding: 7px 11px; font-size: 12px; }
.cockpit-grid-v27 { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.cockpit-lower-v27 { gap: 18px; margin-top: 18px; }
.cockpit-state-v27, .cockpit-actions-v27, .checklist-card-v27, .last-op-card-v27, .controls-card-v27, .cockpit-trend-v27, .settings-card-v27, .about-card-v27 {
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0,38,84,.055);
}
.cockpit-state-v27.card, .cockpit-actions-v27.card, .checklist-card-v27.card, .last-op-card-v27.card, .controls-card-v27.card { padding: 18px; }
.state-balance-v27 { font-size: clamp(32px, 3.1vw, 44px); margin-top: 12px; letter-spacing: -.02em; }
.state-eur-v27 { font-size: 15px; margin-top: 8px; }
.rate-note-v27 { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 12px; }
.state-mini-grid-v27 { margin-top: 12px; gap: 8px; }
.state-mini-grid-v27 div { padding: 9px 10px; border-radius: 12px; }
.state-mini-grid-v27 strong { font-size: 13px; }
.primary-action-grid-v27 { gap: 10px; margin-top: 12px; }
.action-button-v27 { min-height: 58px; padding: 12px 15px; border-radius: 13px; box-shadow: 0 8px 18px rgba(0,38,84,.10); }
.action-button-v27 strong { font-size: 17px; }
.action-button-v27 span { margin-top: 4px; font-size: 12px; }
.checklist-v27 { gap: 10px; }
.checklist-v27 li span { width: 22px; height: 22px; }
.soft-callout-v27 { margin-top: 14px; padding: 10px 12px; border-radius: 12px; }
.last-op-type-v27 { font-size: 15px; margin: 8px 0 6px; }
.last-op-amount-v27 { font-size: 21px; }
.inline-links-v27 { margin-top: 12px; }
.inline-links-v27 a { padding: 9px 11px; border-radius: 11px; font-size: 13px; }
.control-grid-v27 { gap: 9px; margin-top: 12px; }
.control-grid-v27 a, .control-grid-v27 .nav-disabled { padding: 10px 12px; border-radius: 12px; }
.control-grid-v27 a strong, .control-grid-v27 .nav-disabled strong { font-size: 13px; }
.cockpit-trend-v3517 { width: min(760px, 100%); max-width: 760px; padding: 14px 18px 10px; }
.cockpit-trend-v3517 .trend-header { margin-bottom: 4px; }
.cockpit-trend-v3517 .trend-header h1 { font-size: 18px; }
.cockpit-trend-v3517 .trend-chart, .cockpit-trend-v3517 #cashTrendCanvas { height: 150px; max-height: 150px; }
.cockpit-graph-relocated-v3517 { margin: 18px auto 0; max-width: 760px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 16px; }
.cockpit-graph-relocated-v3517 strong { color: var(--if-navy); }
.cockpit-graph-relocated-v3517 span { color: var(--if-muted); font-weight: 700; }
.cockpit-graph-relocated-v3517 a { margin-left: auto; color: var(--if-navy); font-weight: 900; }
.annual-trend-v3517 { margin-bottom: 18px; }

body.dashboard-density-compact .container { max-width: 1180px; }
body.dashboard-density-compact .cockpit-hero-v27 { padding: 14px 22px; }
body.dashboard-density-compact .cockpit-hero-v27 h1 { font-size: clamp(21px, 2vw, 27px); }
body.dashboard-density-compact .cockpit-grid-v27,
body.dashboard-density-compact .cockpit-lower-v27 { gap: 14px; margin-top: 14px; }
body.dashboard-density-compact .card { padding: 14px; }
body.dashboard-density-compact .state-balance-v27 { font-size: clamp(28px, 2.6vw, 38px); }
body.dashboard-density-compact .state-eur-v27 { font-size: 13px; }
body.dashboard-density-compact .rate-note-v27 { display: none; }
body.dashboard-density-compact .action-button-v27 { min-height: 48px; padding: 10px 13px; }
body.dashboard-density-compact .action-button-v27 strong { font-size: 15px; }
body.dashboard-density-compact .action-button-v27 span { display: none; }
body.dashboard-density-compact .cockpit-trend-v3517 { width: min(620px, 100%); padding: 12px 15px 8px; }
body.dashboard-density-compact .cockpit-trend-v3517 .trend-chart,
body.dashboard-density-compact .cockpit-trend-v3517 #cashTrendCanvas { height: 120px; max-height: 120px; }
body.dashboard-density-compact .state-mini-grid-v27 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

body.user-mode-advanced .hint:not(.always-visible),
body.user-mode-advanced .operation-hint-v26,
body.user-mode-advanced .nature-help-v29,
body.user-mode-advanced .field-help-v32,
body.user-mode-advanced .helptext:not(.always-visible) { display: none !important; }
body.user-mode-standard:not(.ui-show-field-help) .field-help-v32,
body.user-mode-standard:not(.ui-show-field-help) .helptext:not(.always-visible),
body.user-mode-standard:not(.ui-show-field-help) .operation-hint-v26,
body.user-mode-guided:not(.ui-show-field-help) .field-help-v32,
body.user-mode-guided:not(.ui-show-field-help) .helptext:not(.always-visible) { display: none !important; }
body:not(.ui-show-accounting-reminders) .checklist-card-v27,
body:not(.ui-show-accounting-reminders) .rate-note-v27,
body:not(.ui-show-accounting-reminders) .soft-callout-v27 { display: none !important; }
body:not(.ui-show-pedagogical-warnings) .operation-hint-v26,
body:not(.ui-show-pedagogical-warnings) .nature-help-v29 { display: none !important; }
body.user-mode-advanced .card-label-v27 { letter-spacing: .04em; font-size: 11px; }
body.user-mode-advanced .cockpit-hero-v27 p,
body.user-mode-advanced .hero-kicker-v27 { display: none; }
body.user-mode-guided .collapse-toggle-v29 { min-width: 32px; min-height: 32px; }

body.dashboard-density-compact .settings-fields-v32 { gap: 10px; }
body.dashboard-density-compact .setting-field-v32 { padding: 10px 12px; }
body.user-mode-advanced .settings-card-v27 .field-help-v32 { display: none !important; }

@media (max-width: 1100px) {
  .cockpit-grid-v27, .cockpit-lower-v27 { grid-template-columns: 1fr; }
  .cockpit-trend-v3517 { width: 100%; }
  .cockpit-graph-relocated-v3517 a { margin-left: 0; }
}
.operation-balance-strip-v3517 {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  background: #f8fbfe;
  padding: 10px 13px;
}
.operation-balance-strip-v3517 span { color: var(--if-muted); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.operation-balance-strip-v3517 strong { color: var(--if-navy); font-weight: 950; font-size: 18px; }
.operation-balance-strip-v3517 small { color: var(--if-muted); font-weight: 700; }
body.user-mode-advanced .operation-balance-strip-v3517 small { display: none; }
