/* Bourse aux bénévoles – VBC Fully. Hérite de la police du thème ; couleur principale réglable via --vbcb-accent. */
.vbcb {
  --vbcb-accent: #0b5cad;
  --vbcb-accent-ink: #fff;
  --vbcb-ink: #1d2327;
  --vbcb-muted: #646970;
  --vbcb-line: #dcdcde;
  --vbcb-soft: #f6f7f7;
  --vbcb-ok: #1a7f37;
  --vbcb-ok-bg: #e7f5ec;
  --vbcb-warn: #8a5a00;
  --vbcb-warn-bg: #fff4d6;
  --vbcb-err: #b32d2e;
  --vbcb-err-bg: #fcebea;
  --vbcb-radius: 8px;
  color: var(--vbcb-ink);
  max-width: 1000px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.45;
}
.vbcb *, .vbcb *::before, .vbcb *::after { box-sizing: border-box; }
.vbcb h3 { margin: 0 0 .5em; font-size: 1.15em; }
.vbcb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vbcb-muted { color: var(--vbcb-muted); font-size: .9em; }
.vbcb-hint { margin: .25em 0 1em; }

/* Boutons et champs */
.vbcb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  background: var(--vbcb-accent); color: var(--vbcb-accent-ink);
  border: 1px solid var(--vbcb-accent); border-radius: var(--vbcb-radius);
  padding: .55em 1.1em; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.vbcb-btn:hover { filter: brightness(1.08); color: var(--vbcb-accent-ink); }
.vbcb-btn--ghost { background: transparent; color: var(--vbcb-accent); }
.vbcb-btn--ghost:hover { background: var(--vbcb-soft); color: var(--vbcb-accent); }
.vbcb-btn--small { padding: .35em .7em; font-size: .9em; }
.vbcb-link { background: none; border: 0; padding: 0; color: var(--vbcb-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.vbcb input[type=email], .vbcb input[type=text], .vbcb input[type=search], .vbcb input[type=date], .vbcb input[type=tel],
.vbcb input:not([type]), .vbcb select {
  font: inherit; padding: .5em .65em; border: 1px solid var(--vbcb-line); border-radius: var(--vbcb-radius);
  background: #fff; color: var(--vbcb-ink); min-height: 2.4em; max-width: 100%;
}
.vbcb input:focus-visible, .vbcb select:focus-visible, .vbcb button:focus-visible, .vbcb a:focus-visible {
  outline: 2px solid var(--vbcb-accent); outline-offset: 2px;
}
.vbcb-inline { display: inline; margin: 0; }
.vbcb-form-inline { display: flex; flex-wrap: wrap; gap: .5em; margin: .75em 0; }
.vbcb-form-inline input:not([type=radio]) { flex: 1 1 240px; }
.vbcb-code { letter-spacing: .3em; font-size: 1.3em !important; max-width: 10em; text-align: center; }

/* Messages */
.vbcb-flash { border-radius: var(--vbcb-radius); padding: .75em 1em; margin: 0 0 1em; border-left: 4px solid; }
.vbcb-flash p { margin: .15em 0; }
.vbcb-flash--ok { background: var(--vbcb-ok-bg); border-color: var(--vbcb-ok); }
.vbcb-flash--warn { background: var(--vbcb-warn-bg); border-color: var(--vbcb-warn); }
.vbcb-flash--err { background: var(--vbcb-err-bg); border-color: var(--vbcb-err); }

.vbcb-login { background: var(--vbcb-soft); border-radius: var(--vbcb-radius); padding: 1.25em 1.5em; max-width: none; }

/* En-tête + onglets */
.vbcb-top { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: .5em; }
.vbcb-tabs { display: flex; gap: .25em; border-bottom: 2px solid var(--vbcb-line); margin-bottom: 1em; overflow-x: auto; }
.vbcb-tabs a { padding: .6em 1em; text-decoration: none; color: var(--vbcb-muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.vbcb-tabs a.is-active { color: var(--vbcb-accent); border-bottom-color: var(--vbcb-accent); }

/* Barre de filtres */
.vbcb-toolbar { display: flex; flex-wrap: wrap; gap: .75em 1.25em; align-items: flex-end; margin: 0 0 .75em; }
.vbcb-toolbar label { display: flex; flex-direction: column; gap: .2em; font-size: .9em; font-weight: 600; }
.vbcb-toolbar label.vbcb-check { flex-direction: row; align-items: center; font-weight: 400; gap: .4em; min-height: 2.4em; }

/* Liste des événements */
.vbcb-jour { margin: 0 0 1.5em; }
.vbcb-jour__titre { padding: .4em 0; margin: 0 0 .4em; border-bottom: 1px solid var(--vbcb-line);  }
.vbcb-ev { border: 1px solid var(--vbcb-line); border-radius: var(--vbcb-radius); margin: 0 0 .6em; overflow: hidden; }
.vbcb-ev__head { display: flex; flex-wrap: wrap; gap: .25em 1em; align-items: baseline; background: var(--vbcb-soft); padding: .55em .9em; }
.vbcb-ev__heure { font-weight: 700; font-variant-numeric: tabular-nums; }
.vbcb-ev__titre { font-weight: 600; }
.vbcb-ev__lieu { color: var(--vbcb-muted); font-size: .9em; margin-left: auto; }
.vbcb-poste { border: 1px solid var(--vbcb-line); border-radius: var(--vbcb-radius); margin: 0 0 .6em; }
.vbcb-poste__titre { display: flex; align-items: center; gap: .45em; margin: 0; padding: .55em .9em; background: var(--vbcb-soft); font-size: 1em; border-radius: var(--vbcb-radius) var(--vbcb-radius) 0 0; }
.vbcb-besoin { display: grid; grid-template-columns: 8.5em 1fr auto 9.5em; gap: .5em 1em; align-items: center; padding: .6em .9em; border-top: 1px solid var(--vbcb-line); }
.vbcb-besoin__heure { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.vbcb-besoin__ev { display: flex; flex-direction: column; }
.vbcb-besoin:first-child { border-top: 0; }
.vbcb-besoin.is-sel { background: #eef5fc; }
.vbcb-besoin__qui { font-size: .85em; margin-top: .15em; }
.vbcb-besoin__qui::before { content: "Inscrits : "; color: var(--vbcb-muted); }
.vbcb-besoin__places { display: flex; flex-direction: column; align-items: flex-end; gap: .1em; white-space: nowrap; }
.vbcb-besoin__action { display: flex; flex-direction: column; align-items: flex-end; gap: .15em; text-align: right; }
.vbcb-choix { display: inline-flex; align-items: center; gap: .45em; cursor: pointer; padding: .4em .75em; border: 1px solid var(--vbcb-accent); border-radius: 999px; color: var(--vbcb-accent); font-weight: 600; font-size: .92em; user-select: none; }
.vbcb-choix input { width: 1.1em; height: 1.1em; margin: 0; accent-color: var(--vbcb-accent); }
.vbcb-choix:has(input:checked) { background: var(--vbcb-accent); color: var(--vbcb-accent-ink); }
.vbcb-deja { color: var(--vbcb-ok); font-weight: 600; font-size: .9em; }
.vbcb-deja::before { content: "✓ "; }
.vbcb-sel { font-size: .8em; color: var(--vbcb-muted); }
.vbcb-pill { display: inline-block; min-width: 3em; text-align: center; border-radius: 999px; padding: .1em .6em; font-weight: 700; font-size: .9em; font-variant-numeric: tabular-nums; }
.vbcb-pill.is-libre { background: var(--vbcb-warn-bg); color: var(--vbcb-warn); }
.vbcb-pill.is-plein { background: var(--vbcb-ok-bg); color: var(--vbcb-ok); }
.vbcb-tag { display: inline-block; font-size: .75em; padding: .05em .45em; border-radius: 4px; background: var(--vbcb-soft); border: 1px solid var(--vbcb-line); color: var(--vbcb-muted); margin-left: .25em; vertical-align: middle; }
.vbcb-tag--ext { background: #f3eefc; border-color: #d7c8f3; color: #5b3a9c; }
.vbcb-empty { padding: 1em; background: var(--vbcb-soft); border-radius: var(--vbcb-radius); }

/* Panier + dialogue */
.vbcb-panier { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1em;
  background: var(--vbcb-ink); color: #fff; padding: .7em 1em; border-radius: var(--vbcb-radius); margin-top: 1em; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
.vbcb-panier[hidden] { display: none; }
.vbcb-dialog { border: 0; border-radius: 12px; padding: 1.25em 1.5em; width: min(560px, calc(100vw - 32px)); max-height: 85vh; color: var(--vbcb-ink); }
.vbcb-dialog::backdrop { background: rgba(0,0,0,.45); }
.vbcb-dialog ul { padding-left: 1.1em; margin: .3em 0 .8em; }
.vbcb-dialog li { margin: .2em 0; }
.vbcb-dialog__actions { display: flex; justify-content: flex-end; gap: .5em; margin-top: 1em; }
.vbcb-alerte { background: var(--vbcb-warn-bg); color: var(--vbcb-warn); padding: .5em .75em; border-radius: 6px; font-size: .9em; margin: .5em 0; }

/* Cartes "Mes inscriptions" */
.vbcb-carte { border: 1px solid var(--vbcb-line); border-radius: var(--vbcb-radius); padding: 1em 1.1em; margin: 0 0 1em; }
.vbcb-carte__head { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: .5em; }
.vbcb-carte__head h3 { margin: 0; }
.vbcb-quota { display: flex; align-items: center; gap: .6em; font-size: .9em; }
.vbcb-quota__bar { width: 120px; height: 8px; background: var(--vbcb-soft); border-radius: 99px; overflow: hidden; border: 1px solid var(--vbcb-line); }
.vbcb-quota__bar span { display: block; height: 100%; background: var(--vbcb-ok); }

/* Tableaux */
.vbcb-table-wrap { overflow-x: auto; }
.vbcb-table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 0; }
.vbcb-table th, .vbcb-table td { text-align: left; padding: .55em .6em; border-bottom: 1px solid var(--vbcb-line); vertical-align: top; }
.vbcb-table th { font-size: .85em; color: var(--vbcb-muted); font-weight: 600; background: var(--vbcb-soft); }
.vbcb-table tr.is-incomplet td:first-child { box-shadow: inset 3px 0 0 var(--vbcb-warn); }
.vbcb-td-action { text-align: right; }
.vbcb-td-action .vbcb-muted { display: block; font-size: .8em; }
.vbcb-inscrits { list-style: none; margin: 0; padding: 0; }
.vbcb-inscrits li { display: flex; align-items: center; gap: .3em; flex-wrap: wrap; }
.vbcb-x { background: none; border: 0; color: var(--vbcb-err); font-size: 1.2em; line-height: 1; cursor: pointer; padding: 0 .25em; }
.vbcb-assign { display: flex; gap: .35em; }
.vbcb-assign input { width: 13em; }

.vbcb-stats { display: flex; flex-wrap: wrap; gap: .75em; margin: 0 0 1em; }
.vbcb-stats > div { flex: 1 1 150px; background: var(--vbcb-soft); border-radius: var(--vbcb-radius); padding: .7em .9em; display: flex; flex-direction: column; }
.vbcb-stats strong { font-size: 1.4em; font-variant-numeric: tabular-nums; }
.vbcb-stats span { color: var(--vbcb-muted); font-size: .85em; }

.vbcb-externe { margin: 0 0 1em; }
.vbcb-externe summary { cursor: pointer; color: var(--vbcb-accent); font-weight: 600; }
.vbcb-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6em; align-items: end; margin-top: .6em; }
.vbcb-form-grid label { display: flex; flex-direction: column; gap: .2em; font-size: .9em; font-weight: 600; }

/* Mobile */
@media (max-width: 640px) {
  .vbcb-besoin { grid-template-columns: auto 1fr auto; }
  .vbcb-besoin__places { grid-column: 3; grid-row: 1; }
  .vbcb-besoin__ev { grid-column: 1 / -1; grid-row: 2; }
  .vbcb-besoin__action { grid-column: 1 / -1; align-items: stretch; text-align: left; }
  .vbcb-choix { justify-content: center; }
  .vbcb-ev__lieu { margin-left: 0; width: 100%; }
  .vbcb-table thead { display: none; }
  .vbcb-table, .vbcb-table tbody, .vbcb-table tr, .vbcb-table td { display: block; width: 100%; }
  .vbcb-table tr { border: 1px solid var(--vbcb-line); border-radius: var(--vbcb-radius); margin-bottom: .6em; padding: .3em 0; }
  .vbcb-table td { border: 0; padding: .3em .8em; }
  .vbcb-table td[data-l]::before { content: attr(data-l); display: block; font-size: .75em; color: var(--vbcb-muted); text-transform: uppercase; letter-spacing: .03em; }
  .vbcb-td-action { text-align: left; }
  .vbcb-assign input { flex: 1; width: auto; }
}

.vbcb-intro { background: #eef5fc; border-left: 4px solid var(--vbcb-accent); border-radius: var(--vbcb-radius); padding: .7em 1em; margin: 0 0 1em; }
.vbcb-canal { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: .4em 1.2em; align-items: center; border: 0; padding: 0; margin: 0 0 .2em; }
.vbcb-canal legend { float: left; font-weight: 600; font-size: .9em; padding: 0; margin-right: .4em; }
.vbcb-canal label { display: inline-flex; align-items: center; gap: .35em; cursor: pointer; }
.vbcb-canal input[type=radio] { margin: 0; width: 1.05em; height: 1.05em; accent-color: var(--vbcb-accent); }

/* Filtres en boutons */
.vbcb-filtres { display: flex; flex-direction: column; gap: .5em; margin: 0 0 .75em; }
.vbcb-chips { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; }
.vbcb-chips__label { font-size: .9em; font-weight: 600; margin-right: .25em; min-width: 5.5em; }
.vbcb-chip { font: inherit; font-size: .88em; padding: .35em .85em; border-radius: 999px; border: 1px solid var(--vbcb-line); background: #fff; color: var(--vbcb-ink); cursor: pointer; line-height: 1.2; }
.vbcb-chip:hover { border-color: var(--vbcb-accent); color: var(--vbcb-accent); }
.vbcb-chip[aria-pressed="true"] { background: var(--vbcb-accent); border-color: var(--vbcb-accent); color: var(--vbcb-accent-ink); }
.vbcb-chip[hidden] { display: none; }

/* Infobulle de description */
.vbcb-poste__titre { position: relative; }
.vbcb-info { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; height: 1.25em; border-radius: 50%;
  border: 1px solid var(--vbcb-muted); background: #fff; color: var(--vbcb-muted); font: italic 700 .75em/1 Georgia, serif; cursor: help; padding: 0; }
/* L'infobulle est ancrée au titre du besoin : elle ne dépasse jamais la largeur de la page. */
.vbcb-info::after { content: attr(data-tip); position: absolute; left: .6em; top: calc(100% + 4px); z-index: 20;
  width: max-content; max-width: min(420px, calc(100% - 1.2em)); padding: .55em .75em; border-radius: 6px; background: var(--vbcb-ink); color: #fff;
  font: normal 400 13px/1.4 system-ui, sans-serif; text-align: left; white-space: normal; box-shadow: 0 6px 18px rgba(0,0,0,.18);
  display: none; pointer-events: none; }
.vbcb-info:hover::after, .vbcb-info:focus-visible::after, .vbcb-info.is-open::after { display: block; }
@media (max-width: 640px) { .vbcb-chips__label { width: 100%; } }
.vbcb-table tr.is-complet td { background: #fbfbfb; }
.vbcb-table tr:target td { background: #fff8e1; transition: background 1s; }
.vbcb-test { background: repeating-linear-gradient(-45deg, #fff4d6, #fff4d6 10px, #ffeab0 10px, #ffeab0 20px); color: var(--vbcb-warn); font-weight: 700; text-align: center; padding: .45em; border-radius: var(--vbcb-radius); margin: 0 0 1em; }
.vbcb-ami { display: inline-flex; align-items: center; gap: .35em; font-size: .85em; color: var(--vbcb-muted); cursor: pointer; margin-top: .15em; }
.vbcb-ami input { margin: 0; accent-color: var(--vbcb-accent); }
.vbcb-ami[hidden], .vbcb-ami-nom[hidden] { display: none; }
.vbcb .vbcb-ami-nom { width: 100%; max-width: 15em; font-size: .9em; padding: .35em .5em; min-height: 0; }
.vbcb .vbcb-ami-nom.is-err { border-color: var(--vbcb-err); box-shadow: 0 0 0 2px var(--vbcb-err-bg); }
.vbcb-inscrits li.is-retrait { text-decoration: line-through; color: var(--vbcb-err); }
.vbcb-inscrits li.is-ajout { color: var(--vbcb-ok); font-weight: 600; }
.vbcb-assign-err { display: block; color: var(--vbcb-err); font-size: .8em; margin-top: .2em; }
.vbcb-assign-err[hidden] { display: none; }
.vbcb-btn--inverse { color: #fff; border-color: rgba(255,255,255,.5); }
.vbcb-btn--inverse:hover { background: rgba(255,255,255,.12); color: #fff; }
.vbcb-panier > span:last-child { display: inline-flex; gap: .5em; }
.vbcb-inscrits li.is-retrait .vbcb-x { text-decoration: none; }
/* Vue comité groupée : colonnes alignées d'un besoin à l'autre */
.vbcb-poste .vbcb-table-wrap { border-top: 1px solid var(--vbcb-line); }
.vbcb-poste .vbcb-table--comite { table-layout: fixed; }
.vbcb-table--comite th:nth-child(1) { width: 8.5em; }
.vbcb-table--comite th:nth-child(3) { width: 24%; }
.vbcb-table--comite th:nth-child(4) { width: 6.5em; }
.vbcb-table--comite th:nth-child(5) { width: 16em; }
.vbcb-poste__cibles { font-family: system-ui, sans-serif; font-weight: 400; font-size: .8em; margin-left: auto; }
@media (max-width: 640px) { .vbcb-poste .vbcb-table--comite { table-layout: auto; } .vbcb-poste__cibles { display: none; } }
.vbcb-table--comite th:nth-child(1) { width: 7em; }
.vbcb-table--comite th:nth-child(4) { width: 5.5em; }
.vbcb-table--comite th:nth-child(5) { width: 17em; }
.vbcb-table--comite .vbcb-assign { min-width: 0; }
.vbcb-table--comite .vbcb-assign input { flex: 1 1 auto; width: auto; min-width: 0; }
.vbcb-table--comite td:nth-child(2), .vbcb-table--comite td:nth-child(3) { overflow-wrap: anywhere; }
.vbcb-table--comite .vbcb-ajouter { flex: none; white-space: nowrap; }
