/* Module A : chips de formulaire, recherche, cartes, fiche membre, tableau de bord. Préfixes : opt-, srch-, pc-, mem-, dash- */

/* Chips cochables (radio / cases) : même rendu que .bc-chip[aria-pressed="true"], sans JavaScript */
.opt-chip { position: relative; cursor: pointer; }
.opt-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt-chip .ic { display: none; }
.opt-chip:has(input:checked) { background: var(--copper-wash); border-color: var(--copper); color: var(--copper-text); }
.opt-chip:has(input:checked) .ic { display: inline-block; }
.opt-chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.prof-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-3); align-content: start; }
.prof-fieldset > legend { padding: 0; margin-bottom: var(--space-1); }
.prof-block { display: block; }
.field-err { color: var(--danger-text); display: flex; gap: 6px; align-items: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Bascule cartes / liste par liens */
.bc-seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-pill); color: var(--ink-muted); font: 500 14px/1 var(--font-sans); text-decoration: none; }
.bc-seg a[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }

/* Cartes de profil */
.pc-name { color: inherit; text-decoration: none; }
.pc-name:hover { text-decoration: underline; }
.pc-fav { display: contents; }
.bc-prow .pc-row-main { min-width: 0; }
.pc-row-actions { justify-content: flex-end; flex-wrap: nowrap; }
@media (max-width: 599px) {
  .bc-prow { grid-template-columns: 72px 1fr; }
  .pc-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Recherche */
.srch-layout { display: grid; gap: var(--space-6); align-items: start; }
.srch-filters > summary { list-style: none; cursor: pointer; }
.srch-filters > summary::-webkit-details-marker { display: none; }
.srch-form { margin-top: var(--space-4); }
.srch-head { align-items: flex-start; }
.srch-invite { align-items: flex-start; }
@media (min-width: 900px) {
  .srch-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .srch-layout--preview { grid-template-columns: minmax(0, 1fr); }
  .srch-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
  .srch-summary { pointer-events: none; }
  .srch-summary::after { content: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .srch-main .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fiche membre */
.mem-grid { display: grid; gap: var(--space-6); align-items: start; }
.mem-hero { border-radius: var(--radius-lg); width: 100%; }
.mem-gallery > .bc-photo { border-radius: var(--radius-lg); }
.mem-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.mem-thumbs .bc-photo { border-radius: var(--radius-md); }
.mem-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.mem-meta span { display: inline-flex; align-items: center; gap: 6px; }
.mem-chips { list-style: none; margin: 0; padding: 0; }
.mem-chips .bc-chip { cursor: default; }
.mem-self { align-items: center; margin-bottom: var(--space-5); flex-wrap: wrap; }
.mem-locked { display: grid; gap: var(--space-5); }
.mem-locked__photo { width: 100%; max-width: 320px; border-radius: var(--radius-lg); }
@media (min-width: 900px) {
  .mem-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-10); }
  .mem-gallery { position: sticky; top: 76px; }
}

/* Tableau de bord */
.dash-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.dash-step { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dash-step:first-child { border-top: 0; }
.dash-step__t { font-weight: 500; }
.dash-step.is-done .dash-step__t { color: var(--ink-muted); }
.dash-tiles { display: grid; gap: var(--space-3); }
.dash-tile { display: flex; align-items: center; gap: var(--space-4); text-decoration: none; color: var(--ink); }
.dash-tile:hover { background: var(--surface-2); }
.dash-tile__icon { margin: 0; width: 48px; height: 48px; flex: none; }
.dash-event { display: flex; align-items: center; gap: var(--space-4); }
.dash-event__t { color: var(--ink); font-weight: 500; text-decoration: none; }
.dash-event__t:hover { text-decoration: underline; }
.dash-ref { align-items: center; }
.dash-events { list-style: none; margin: 0; padding: 0; }
@media (min-width: 700px) {
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mem-thumb { display: block; padding: 0; border: 2px solid transparent; border-radius: var(--radius-md); background: none; cursor: pointer; }
.mem-thumb.is-current { border-color: var(--copper); }
