/* Grille CB – questionnaire conseillers (ACEF Montérégie-Est) */
.acef-gcb { --v: #055a1d; --v2: #0b7a2b; --vp: #e8f3ec; --g: #5f6b63; --b: #cfd8d2; --r: #b3261e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.4;
  color: #1d2520; max-width: 1080px; margin: 0 auto; text-align: left; }
.acef-gcb *, .acef-gcb *::before, .acef-gcb *::after { box-sizing: border-box; }
.acef-gcb h2 { font-size: 1.45em; color: var(--v); margin: 0 0 .6em; font-weight: 700; }
.acef-gcb h3 { font-size: 1.1em; color: var(--v); margin: 1.4em 0 .5em; font-weight: 700; }
.acef-gcb .gcb-chargement, .acef-gcb .gcb-error { padding: 1em; background: var(--vp); border-radius: 8px; }
.acef-gcb .gcb-error { background: #fdecea; color: var(--r); }

.acef-gcb .gcb-head { background: var(--v); color: #fff; padding: 14px 18px; border-radius: 10px 10px 0 0; }
.acef-gcb .gcb-title { font-size: 1.25em; font-weight: 700; }
.acef-gcb .gcb-priv { font-size: .85em; opacity: .9; margin-top: 2px; }

.acef-gcb .gcb-totals { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--b); border: 1px solid var(--b); border-top: 0; }
.admin-bar .acef-gcb .gcb-totals { top: 32px; }
.acef-gcb .gcb-tot { background: #fff; padding: 8px 12px; }
.acef-gcb .gcb-tot span { display: block; font-size: .78em; color: var(--g); text-transform: uppercase; letter-spacing: .03em; }
.acef-gcb .gcb-tot strong { font-size: 1.1em; font-variant-numeric: tabular-nums; }
.acef-gcb .gcb-reste.pos strong { color: var(--v); }
.acef-gcb .gcb-reste.neg strong { color: var(--r); }

.acef-gcb .gcb-steps { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.acef-gcb .gcb-steps li { margin: 0; padding: 0; }
.acef-gcb .gcb-steps li::before { content: none; }
.acef-gcb .gcb-steps button { border: 1px solid var(--b); background: #fff; color: #1d2520; border-radius: 999px;
  padding: 6px 12px 6px 6px; font: inherit; font-size: .88em; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.acef-gcb .gcb-steps button span { background: var(--vp); color: var(--v); border-radius: 50%; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9em; }
.acef-gcb .gcb-steps button.on { background: var(--v); color: #fff; border-color: var(--v); }
.acef-gcb .gcb-steps button.on span { background: #fff; }

.acef-gcb .gcb-body { background: #fff; border: 1px solid var(--b); border-radius: 10px; padding: 18px; }
.acef-gcb .gcb-hint { color: var(--g); font-size: .88em; margin: 0 0 10px; }

.acef-gcb input[type=text], .acef-gcb input[type=tel], .acef-gcb input[type=date], .acef-gcb select, .acef-gcb textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 7px 9px; border: 1px solid var(--b); border-radius: 6px;
  background: #fff; color: #1d2520; min-height: 38px; margin: 0; box-shadow: none; }
.acef-gcb input:focus, .acef-gcb select:focus, .acef-gcb textarea:focus { outline: 2px solid var(--v2); outline-offset: 0; border-color: var(--v2); }
.acef-gcb input.money { text-align: right; font-variant-numeric: tabular-nums; }
.acef-gcb input[type=checkbox], .acef-gcb input[type=radio] { width: 20px; height: 20px; accent-color: var(--v); margin: 0; vertical-align: middle; }

.acef-gcb .gcb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; }
.acef-gcb .gcb-f { display: block; margin: 0; }
.acef-gcb .gcb-f.wide { grid-column: 1 / -1; }
.acef-gcb .gcb-f > span { display: block; font-size: .85em; font-weight: 600; margin-bottom: 4px; color: #2c3a31; }
.acef-gcb .gcb-radio { display: flex; gap: 10px; flex-wrap: wrap; }
.acef-gcb .gcb-r { display: flex; align-items: center; gap: 8px; border: 1px solid var(--b); border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.acef-gcb .gcb-r:has(input:checked) { border-color: var(--v); background: var(--vp); font-weight: 600; }

.acef-gcb .gcb-table { border: 1px solid var(--b); border-radius: 8px; overflow: hidden; }
.acef-gcb .gcb-tr { display: grid; grid-template-columns: minmax(180px, 2.2fr) 1fr 1fr 1fr 1fr; gap: 8px; padding: 6px 10px;
  align-items: center; border-top: 1px solid #edf1ee; }
.acef-gcb .gcb-table:not(:has(.gcb-th div:nth-child(5))) .gcb-tr { grid-template-columns: minmax(180px, 2.2fr) 1fr 1fr 1fr; }
.acef-gcb .gcb-legal .gcb-tr { grid-template-columns: minmax(180px, 2fr) 70px 70px 100px 70px 70px; }
.acef-gcb .gcb-legal:not(:has(.gcb-th div:nth-child(5))) .gcb-tr { grid-template-columns: minmax(180px, 2fr) 80px 80px 110px; }
.acef-gcb .gcb-legal .gcb-tr > div:not(.gcb-lab) { text-align: center; }
.acef-gcb .gcb-th { background: var(--vp); font-size: .8em; font-weight: 700; color: var(--v); text-transform: uppercase; border-top: 0; }
.acef-gcb .gcb-tr.filled { background: #f6fbf7; }
.acef-gcb .gcb-lab { display: flex; flex-direction: column; gap: 4px; }
.acef-gcb .gcb-lab select, .acef-gcb .gcb-lab input { font-size: 14px; min-height: 32px; padding: 4px 7px; }
.acef-gcb .gcb-cat { background: #f3f6f4; font-weight: 700; padding: 7px 10px; border-top: 1px solid var(--b); color: var(--v); font-size: .92em; }
.acef-gcb .gcb-month { text-align: right; color: var(--g); font-size: .88em; font-variant-numeric: tabular-nums; }
.acef-gcb .gcb-totrow { background: var(--vp); font-weight: 700; }
.acef-gcb .gcb-totrow > div:last-child { text-align: right; }
.acef-gcb .gcb-info { text-decoration: none; color: var(--v2); font-size: .9em; }

.acef-gcb .gcb-debt { border: 1px solid var(--b); border-radius: 8px; padding: 12px 14px; margin: 0 0 12px; }
.acef-gcb .gcb-debt legend { font-weight: 700; color: var(--v); padding: 0 6px; }
.acef-gcb .gcb-debt .gcb-btn { margin-top: 10px; }
.acef-gcb .gcb-sum { margin-top: 12px; }

.acef-gcb .gcb-btn { background: var(--v); color: #fff; border: 1px solid var(--v); border-radius: 8px; padding: 10px 18px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.acef-gcb .gcb-btn:hover { background: var(--v2); }
.acef-gcb .gcb-btn:disabled { opacity: .6; cursor: wait; }
.acef-gcb .gcb-btn.sec { background: #fff; color: var(--v); }
.acef-gcb .gcb-btn.sec:hover { background: var(--vp); }
.acef-gcb .gcb-btn.small { padding: 6px 12px; font-size: .88em; }
.acef-gcb .gcb-btn.big { font-size: 1.1em; padding: 14px 24px; }
.acef-gcb .gcb-btn.danger { background: #fff; color: var(--r); border-color: #e3b5b1; }
.acef-gcb .gcb-btn.danger:hover { background: #fdecea; }
.acef-gcb .gcb-nav { display: flex; justify-content: space-between; margin: 14px 0; }
.acef-gcb .gcb-foot { text-align: right; border-top: 1px solid var(--b); padding-top: 12px; }

.acef-gcb .gcb-client { font-size: 1.05em; margin-bottom: 12px; }
.acef-gcb table.gcb-bilan { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.acef-gcb .gcb-bilan th, .acef-gcb .gcb-bilan td { padding: 8px 10px; border-bottom: 1px solid #edf1ee; text-align: right; }
.acef-gcb .gcb-bilan th:first-child, .acef-gcb .gcb-bilan td:first-child { text-align: left; }
.acef-gcb .gcb-bilan thead th { background: var(--vp); color: var(--v); font-size: .85em; }
.acef-gcb .gcb-bilan tr.sub td { font-weight: 600; }
.acef-gcb .gcb-bilan tr.grand td { font-weight: 700; font-size: 1.08em; border-top: 2px solid var(--v); }
.acef-gcb .gcb-bilan tr.grand.neg td:not(:first-child) { color: var(--r); }
.acef-gcb .gcb-bilan tr.grand.pos td:not(:first-child) { color: var(--v); }
.acef-gcb .gcb-bilan.small td { font-size: .92em; padding: 5px 10px; }
.acef-gcb .gcb-warn { background: #fff7e0; border: 1px solid #f0d27a; border-radius: 8px; padding: 10px 14px; margin: 14px 0; }
.acef-gcb .gcb-warn ul { margin: 6px 0 0 18px; padding: 0; }
.acef-gcb .gcb-dl { margin-top: 18px; padding: 16px; background: var(--vp); border-radius: 10px; }
.acef-gcb .gcb-dl .gcb-hint { margin-top: 8px; }
.acef-gcb .gcb-msg { font-weight: 600; color: var(--v); margin-top: 6px; }

@media (max-width: 760px) {
  .acef-gcb .gcb-totals { grid-template-columns: repeat(2, 1fr); }
  .acef-gcb .gcb-tr, .acef-gcb .gcb-table:not(:has(.gcb-th div:nth-child(5))) .gcb-tr { grid-template-columns: 1fr 1fr; }
  .acef-gcb .gcb-tr .gcb-lab { grid-column: 1 / -1; font-weight: 600; }
  .acef-gcb .gcb-th { display: none; }
  .acef-gcb .gcb-legal .gcb-tr, .acef-gcb .gcb-legal:not(:has(.gcb-th div:nth-child(5))) .gcb-tr { grid-template-columns: repeat(3, 1fr); }
}

.acef-gcb .gcb-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; border-top: 1px solid var(--b); }
.acef-gcb .gcb-tools .gcb-btn { font-weight: 500; }
.acef-gcb .gcb-tools .gcb-btn.sec.on { background: var(--vp); }
.acef-gcb .gcb-flash { min-height: 1.4em; margin: 2px 0 10px; font-size: .92em; }
.acef-gcb .gcb-send { border: 2px solid var(--v); border-radius: 10px; padding: 14px 18px; margin: 0 0 14px; background: #fff; }
.acef-gcb .gcb-send-head { display: flex; justify-content: space-between; align-items: center; color: var(--v); font-size: 1.05em; margin-bottom: 4px; }
.acef-gcb .gcb-x { background: none; border: 0; font-size: 1.6em; line-height: 1; cursor: pointer; color: var(--g); padding: 0 4px; }
.acef-gcb .gcb-send-steps { margin: 14px 0 8px 20px; padding: 0; }
.acef-gcb .gcb-send-steps li { margin: 0 0 12px; }
.acef-gcb .gcb-send-steps .gcb-btn { margin-top: 6px; }
.acef-gcb .gcb-link { background: none; border: 0; padding: 0; color: var(--v); text-decoration: underline; cursor: pointer; font: inherit; }
.acef-gcb .gcb-dl .gcb-btn + .gcb-btn { margin-left: 8px; }


/* === Correctifs v2.2 : le thème met le texte des boutons en blanc === */
.acef-gcb .gcb-btn { color: #fff !important; }
.acef-gcb .gcb-btn.sec { color: var(--v) !important; }
.acef-gcb .gcb-btn.danger { color: var(--r) !important; }
.acef-gcb .gcb-steps button { color: #1d2520 !important; }
.acef-gcb .gcb-steps button.on { color: #fff !important; }
.acef-gcb .gcb-steps button span { color: var(--v) !important; }
.acef-gcb .gcb-x { color: var(--g) !important; }
.acef-gcb .gcb-file { display: none !important; }
.acef-gcb .gcb-endbox { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--b); }
.acef-gcb .gcb-endbox .gcb-hint { margin: 0 0 4px; }
.acef-gcb .gcb-btn.sec { border: 1px solid var(--v) !important; background: #fff !important; }
.acef-gcb .gcb-btn.sec:hover, .acef-gcb .gcb-btn.sec.on { background: var(--vp) !important; }
.acef-gcb .gcb-btn.danger { border: 1px solid #e3b5b1 !important; background: #fff !important; }
.acef-gcb .gcb-share { margin: 12px 0 16px; padding: 12px 14px; background: var(--vp); border-radius: 8px; }
.acef-gcb .gcb-share .gcb-btn { margin-top: 0; }
.acef-gcb .gcb-share .gcb-hint { margin: 8px 0 0; }
.acef-gcb .gcb-site { margin: 12px 0 16px; padding: 14px; background: var(--vp); border-radius: 8px; }
.acef-gcb .gcb-site .gcb-btn { margin-top: 0; }
.acef-gcb .gcb-site-msg { margin-top: 8px; font-weight: 600; }
.acef-gcb .gcb-site-msg.ok { color: var(--v); }
.acef-gcb .gcb-site-msg.err { color: var(--r); }
.acef-gcb .gcb-autres { margin-top: 8px; }
.acef-gcb .gcb-autres summary { cursor: pointer; color: var(--g); font-size: .9em; margin: 6px 0; }

/* Choix de langue (v2.7) */
.acef-gcb .gcb-head { position: relative; padding-right: 120px; }
.acef-gcb .gcb-lang { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); background: #fff; color: var(--v) !important; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; text-decoration: none !important; line-height: 1.2; }
.acef-gcb .gcb-lang:hover { background: var(--vp); }
@media (max-width: 600px) { .acef-gcb .gcb-head { padding-right: 16px; padding-top: 48px; } .acef-gcb .gcb-lang { top: 12px; transform: none; } }
