/* CC-TREES-FRONT-01 : gestion d'arbres (modale « Mes arbres » + onboarding).
   Pièce amovible — même langage que le shell (pilules blanches, accent fresh). */

/* ——— Modale gestionnaire ——— */
#popin:has(.trees-box),
#popin:has(.ob-popin-box) {
  align-items: flex-start;
  padding-top: max(10vh, 40px);
}
.trees-box { width: min(560px, 92vw); padding: 18px 20px !important; }
.tr-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.tr-head > svg { color: var(--colo-fresh, #7141D9); flex-shrink: 0; }
.tr-head h2 { flex: 1; margin: 0; font-size: var(--text-20, 20px); font-weight: 800; color: var(--text-fg); letter-spacing: -0.01em; }
.tr-new {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--cta-sheen), var(--colo-fresh); color: var(--surface); border: 0; /* #579 */
  border-radius: var(--radius-full); padding: 7px 13px; transition: filter .12s;
}
.tr-new svg { color: var(--text-inverse); stroke: var(--surface); flex-shrink: 0; }
.tr-new:hover { filter: brightness(1.08); }
.tr-notice {
  margin: 0 0 10px; padding: 9px 12px; border-radius: var(--radius-10); font-size: var(--text-sm); line-height: 1.45;
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 10%, white);
  border: 1px dashed color-mix(in srgb, var(--colo-fresh, #7141D9) 45%, transparent);
  color: var(--text-fg);
}
.tr-list { display: flex; flex-direction: column; gap: 8px; max-height: min(58vh, 520px); overflow-y: auto; padding-right: 2px; }
.tr-vide { font-size: var(--text-sm-plus); color: var(--text-muted); padding: 14px 4px; }
.tr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-12); background: var(--surface);
}
.tr-row.tr-row-active {
  border-color: color-mix(in srgb, var(--colo-fresh, #7141D9) 35%, var(--border));
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 6%, white);
}
.tr-row.tr-locked { opacity: .62; background: var(--surface-subtle-11); }
.tr-infos { min-width: 0; }
.tr-name {
  font-size: var(--text-base); font-weight: 700; color: var(--text-fg);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.tr-meta { font-size: var(--text-sm); color: var(--text-muted); margin-top: 3px; }
.tr-badge {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--radius-full);
}
.tr-actif { background: color-mix(in srgb, var(--colo-fresh, #7141D9) 14%, white); color: var(--colo-fresh, #7141D9); }
.tr-airtable {
  background: color-mix(in srgb, #18BFFF 14%, white); color: #0a7ea4;
  text-transform: none; letter-spacing: 0; font-weight: 600;
}
.tr-verrou { background: var(--border-account-sep); color: var(--text-muted); }
.tr-partage { background: var(--surface-success-soft, #e8f8ef); color: var(--color-success, #1a7f4c); } /* CC-INVITATION-FRONT-02 (#551) : Atlas rejoint par invitation */
.tr-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.tr-actif-label {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600;
  color: var(--colo-fresh, #7141D9); padding: 0 4px;
}
.tr-btn {
  font-family: var(--font); font-size: var(--text-sm-alt); font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-fg); text-decoration: none;
  border-radius: var(--radius-full); padding: 5px 11px; transition: border-color .12s, color .12s, background .12s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tr-btn:hover { border-color: var(--colo-fresh, #7141D9); color: var(--colo-fresh, #7141D9); }
.tr-btn-primary {
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 10%, white);
  border-color: color-mix(in srgb, var(--colo-fresh, #7141D9) 40%, var(--border));
  color: var(--colo-fresh, #7141D9);
}
.tr-btn-primary:hover {
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 16%, white);
}
.tr-danger { color: var(--color-error); }
.tr-danger:hover { border-color: var(--color-error); color: var(--color-error); }
.tr-premium { background: var(--colo-premium, var(--colo-fresh)); border-color: var(--colo-premium, var(--colo-fresh)); color: var(--surface); } /* CC-PREMIUM-BRAND-01 */
.tr-more { position: relative; }
.tr-more-toggle { width: 34px; height: 30px; padding: 0; color: var(--text-muted); }
.tr-more-toggle[aria-expanded="true"] {
  border-color: var(--colo-fresh, #7141D9); color: var(--colo-fresh, #7141D9);
}
.tr-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70;
  min-width: 188px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: var(--radius-12);
  box-shadow: 0 10px 28px rgba(20, 24, 38, 0.14);
}
.tr-more-menu[hidden] { display: none !important; }
.tr-more-menu .tr-btn {
  width: 100%; justify-content: flex-start;
  border: 0; border-radius: var(--radius-8); padding: 8px 10px;
  background: transparent;
}
.tr-more-menu .tr-btn:hover { background: color-mix(in srgb, var(--colo-fresh, #7141D9) 8%, white); }
.tr-more-menu .tr-danger:hover { background: color-mix(in srgb, var(--color-error) 8%, white); }
.tr-inline { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
/* ⚠️ #2423 — `display: flex` CI-DESSUS BAT `[hidden]`. Mesuré au navigateur (qa-2423, moule ET base réelle) : la
   zone inline de CHAQUE rangée d'Atlas (renommage, suppression), vide et cachée au repos comme après « Annuler »,
   restait peinte — une bande de 868 × 8 px (son padding-top) sous chaque ligne. */
.tr-inline[hidden] { display: none; }
.tr-inline input {
  flex: 1; min-width: 160px; font-family: var(--font); font-size: var(--text-sm-plus);
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-8); outline: none;
}
.tr-inline input:focus { border-color: var(--colo-fresh, #7141D9); }
.tr-del-warn { flex-basis: 100%; font-size: var(--text-sm); color: var(--text-muted); line-height: 1.45; }
.tr-del-warn b { color: var(--color-error); }
.tr-del-ok:disabled { opacity: .45; cursor: default; }
.tr-feedback { min-height: 16px; margin-top: 8px; font-size: var(--text-sm); color: var(--text-muted); }
.tr-feedback.tr-feedback-panel {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-12);
  border: 1px solid var(--border); background: var(--surface-subtle-11, #f7f8fb);
  color: var(--text-fg); line-height: 1.45;
}

/* #906 — modale AT centrée ; barre d’actions toujours visible */
/* #1504 — même gabarit que les popins du produit (verre, ombre, coins, titre). */
.tr-at-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tr-at-layer[hidden] { display: none !important; }
.tr-at-scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 38, 0.42);
}
.tr-at-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 94vw);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-14);
  background: var(--popin-glass, rgba(255, 255, 255, 0.72));
  backdrop-filter: var(--popin-blur, blur(20px));
  -webkit-backdrop-filter: var(--popin-blur, blur(20px));
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  box-shadow: var(--shadow-popin, 0 20px 60px rgba(20, 30, 50, 0.22));
  color: var(--text-fg);
  line-height: 1.45;
  overflow: hidden;
}
.tr-at-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 8px;
}
.tr-at-dialog > .tr-at-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 18px 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: transparent;
}
.tr-at-title {
  font-weight: 800;
  font-size: var(--text-20, 20px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.tr-at-counts {
  display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: var(--text-sm-alt); color: var(--text-muted);
  margin-bottom: 8px;
}
.tr-at-counts b { color: var(--text-fg); font-variant-numeric: tabular-nums; }
.tr-at-hint { margin: 0 0 10px; font-size: var(--text-sm); color: var(--text-muted); }
.tr-at-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--text-fg);
  background: rgba(255, 196, 80, 0.12);
  border: 1px solid rgba(255, 196, 80, 0.35);
  border-radius: var(--radius-8, 8px);
}
.tr-at-rule, .tr-at-fam {
  margin: 0 0 10px; font-size: var(--text-sm); color: var(--text-fg); line-height: 1.4;
}
.tr-at-fam { color: var(--text-muted); }
.tr-at-absent {
  margin: 0 0 10px; font-size: var(--text-sm); color: var(--text-fg); line-height: 1.4;
}
.tr-at-absent p { margin: 0 0 8px; }
.tr-at-delete-absent-lab {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-weight: 500;
}
.tr-at-delete-absent-lab input { margin-top: 3px; flex-shrink: 0; }
.tr-at-source {
  margin: 0 0 10px; font-size: var(--text-sm); color: var(--text-muted); word-break: break-all;
}
.tr-at-source code {
  font-size: 0.92em; color: var(--text-fg);
}
.tr-at-places-detail { margin: 0 0 10px; font-size: var(--text-sm); }
.tr-at-places-detail summary { cursor: pointer; font-weight: 600; color: var(--text-fg); }
.tr-at-place-list {
  margin: 8px 0 0; padding-left: 1.2rem; max-height: 220px; overflow-y: auto;
}
.tr-at-place-item { margin: 0 0 8px; }
.tr-at-place-q { color: var(--text-fg); }
.tr-at-place-cands { margin: 4px 0 0; padding-left: 0; list-style: none; color: var(--text-muted); }
.tr-at-place-cands label { display: flex; align-items: flex-start; gap: 6px; cursor: pointer; }
.tr-at-place-cands input { margin-top: 3px; flex-shrink: 0; }
.tr-at-place-none { margin: 4px 0 0; color: var(--text-muted); font-style: italic; }
.tr-at-warns { margin: 0 0 10px; font-size: var(--text-sm); }
.tr-at-warns summary { cursor: pointer; font-weight: 600; color: var(--text-fg); }
.tr-at-warns ul {
  margin: 6px 0 0; padding-left: 1.1rem; max-height: 120px; overflow-y: auto;
  color: var(--text-muted);
}
.tr-at-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tr-at-connect-head {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--text-20, 20px); font-weight: 800; letter-spacing: -0.01em;
  color: var(--text-fg);
  margin: 0 0 12px;
}
.tr-at-connect-head svg { flex-shrink: 0; }
.tr-at-field { margin-bottom: 8px; }
.tr-at-field em { font-style: normal; font-weight: 500; color: var(--text-muted); }
.tr-at-field input {
  font-family: var(--font); font-size: var(--text-sm-plus);
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-8);
  outline: none; background: var(--surface); color: var(--text-fg);
}
.tr-at-field input:focus { border-color: var(--colo-fresh, #7141D9); }
.tr-at-map {
  display: grid;
  gap: 6px;
  max-height: min(42vh, 320px);
  overflow: auto;
  margin: 0 0 12px;
  padding: 4px 2px 4px 0;
}
.tr-at-map-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 38%) 1fr;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: var(--text-sm);
}
.tr-at-map-label { color: var(--text-fg); font-weight: 500; }
.tr-at-map-select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border-radius: var(--radius-8, 8px);
  border: 1px solid var(--border-subtle, #d8dde6);
  background: var(--surface-1, #fff);
  color: var(--text-fg);
  font: inherit;
}
.ob-hub-carte[data-hub="airtable"] svg { color: unset; } /* #2211 : le logo garde ses couleurs */

/* ——— Onboarding : UN écran ——— */
#onboarding {
  position: fixed; inset: 0; z-index: 60; display: none;
  --ob-card-top: 300px;
  align-items: flex-start; justify-content: center;
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 10%, white);
  overflow-y: auto;
  padding: 16px 0;
}
/* Fond sombre graphe (#dark-toggle / vo-dark) : l'écran d'accueil suit */
body.vo-dark #onboarding {
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 14%, #1a1d29);
}
.ob-card {
  width: min(520px, 92vw); text-align: center; background: var(--surface);
  border-radius: var(--radius-22); padding: 40px 36px;
  box-shadow: var(--shadow-onboarding);
  margin: calc(var(--ob-card-top) - 16px) auto 32px; /* hôte : padding-top 16 px */
  flex: none;
}
@media (max-height: 520px) {
  .ob-card { padding: 24px 22px; }
  .ob-welcome { margin-bottom: 14px; }
  .ob-welcome h1 { font-size: clamp(22px, 5vw, 26px); }
}
.ob-mark {
  width: 52px; height: 52px; border-radius: var(--radius-14); margin: 0 auto 16px;
  overflow: hidden;
}
.ob-mark img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
/* CC-SATOSHI-01 (#531) : Satoshi sur le TITRE de l'écran d'onboarding
   plein écran (#onboarding — le seuil) UNIQUEMENT. La modale « Nouvel
   Atlas » de l'app réutilise ces classes mais vit HORS #onboarding :
   l'outil garde sa police système. Le @font-face ne coûte rien tant
   qu'aucun glyphe ne l'utilise (chargement paresseux). */
@font-face {
  font-family: 'Satoshi';
  src: url('/public/assets/fonts/Satoshi-Bold.woff2?v=6f979e75') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* CC-FONTS-SWAP-01 (#570) : Instrument Serif (OFL, #566) pour le TITRE onboarding */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/public/assets/fonts/InstrumentSerif-Regular.woff2?v=60c06664') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.ob-welcome { margin-bottom: 22px; text-align: center; }
.ob-welcome h1,
.ob-card .ob-welcome h1,
#onboarding .ob-welcome h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.8vw, 30px);
  font-weight: 400; /* #1017 : = .login-heading (bat .ob-card h1 weight 800) */
  color: var(--text-fg);
  font-family: var(--font-title);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
#onboarding .ob-welcome h1 {
  font-size: clamp(26px, 4.2vw, 32px);
}
.ob-welcome p { margin: 0; font-size: var(--text-base); line-height: 1.55; color: var(--text-muted); font-family: var(--font); }
.ob-heading { margin: 0 0 14px; font-size: var(--text-17); font-weight: 800; color: var(--text-fg); text-align: left; }
.ob-card h1 { margin: 0 0 8px; font-size: var(--text-19); font-weight: 800; color: var(--text-fg); font-family: var(--font); }
.ob-card p { margin: 0 0 20px; font-size: var(--text-base); line-height: 1.55; color: var(--text-muted); font-family: var(--font); }
.ob-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.ob-step:not([hidden]) { display: flex; flex-direction: column; gap: 12px; }
.ob-step[hidden] { display: none !important; }
.ob-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); color: var(--text-muted); }
.ob-field span { font-weight: 600; color: var(--text-fg); }
.ob-req { font-style: normal; color: var(--colo-fresh, #7141D9); }
.ob-hint { margin: 0; font-size: var(--text-sm); color: var(--text-muted); font-style: italic; }
/* CU-ONBOARDING-V3-01 : identité — labels à gauche, champs même largeur */
.ob-identity-grid {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
}
.ob-field-row {
  display: contents;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.ob-field-row span {
  font-weight: 600;
  color: var(--text-fg);
  text-align: left;
  line-height: 1.3;
}
.ob-field-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ob-form input[type="text"] {
  font-family: var(--font); font-size: var(--text-md); text-align: left;
  padding: 11px 14px; border-radius: var(--radius-12); outline: none;
}
/* #833 : champ nom d'Atlas RÉDUIT — il était surdimensionné (56px / 17px /
   15-18). Ramené au gabarit des autres champs pour un rendu propre.
   REVERT #833 = min-height:56px; padding:15px 18px; font-size:var(--text-17,17px). */
#onboarding .ob-step-1 input[name="name"] {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 11px 14px;
  font-size: var(--text-md);
}
.ob-consent-wrap { margin-top: 4px; }
.ob-consent-row {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-sm); line-height: 1.45; color: var(--text-fg);
}
.ob-consent-toggle {
  position: relative; display: inline-flex; flex: none; cursor: pointer;
}
.ob-consent-toggle input {
  position: absolute; opacity: 0; width: 0; height: 0; margin: 0;
}
.ob-consent-switch {
  display: block; width: 44px; height: 26px; border-radius: var(--radius-full, 999px); /* #806 */
  background: var(--border, #e7e9ef);
  transition: background .18s ease;
  position: relative;
}
.ob-consent-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--surface);
  transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(20, 30, 50, .22);
}
.ob-consent-toggle input:checked + .ob-consent-switch { background: #22c55e; }
.ob-consent-toggle input:checked + .ob-consent-switch::after { transform: translateX(18px); }
.ob-consent-toggle input:focus-visible + .ob-consent-switch {
  outline: 2px solid var(--colo-fresh, #7141D9); outline-offset: 2px;
}
.ob-consent-label {
  text-decoration: underline; text-underline-offset: 2px;
  color: var(--colo-fresh, #7141D9); cursor: pointer; flex: 1;
  display: flex; align-items: center; min-height: 26px;
}
.ob-consent-label:hover { opacity: .85; }
.ob-legal-warn {
  font-size: var(--text-sm); color: var(--color-error); line-height: 1.4;
  padding: 8px 10px; border-radius: var(--radius-8);
  background: color-mix(in srgb, var(--color-error) 8%, white);
}
.ob-form input {
  font-family: var(--font); font-size: var(--text-md);
  padding: 11px 14px; border-radius: var(--radius-12); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.ob-form input:hover:not(:focus) { border-color: var(--field-border-hover); }
.ob-form input:focus { border-color: var(--colo-fresh, #7141D9); }
.ob-form button.ob-next,
.ob-form button.ob-submit,
.ob-form button[type="submit"] {
  font-family: var(--font); font-size: var(--text-md); font-weight: 700; cursor: pointer;
  border: 0;
  padding: 12px 20px; transition: filter .12s; /* #806 : le ob-submit (#481) rejoint le token ; chrome #1154 */
  appearance: none; -webkit-appearance: none;
}
.ob-form button.ob-next:hover,
.ob-form button.ob-submit:hover,
.ob-form button[type="submit"]:hover { filter: brightness(1.08); }
.ob-form button.ob-next:disabled,
.ob-form button.ob-submit:disabled,
.ob-form button[type="submit"]:disabled { opacity: .6; cursor: default; }
#onboarding .ob-form button.ob-submit,
#onboarding .ob-form button[type="submit"] {
  position: relative; overflow: visible;
}
#onboarding .ob-form button.ob-submit.cta-fx.is-hover {
  animation: none;
  transform: none;
  filter: brightness(1.08);
}
.ob-step-actions {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 2px;
}
#onboarding .ob-step-actions {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 18px; margin-top: 2px;
}
#onboarding .ob-step-2 { position: relative; padding-top: 34px; }
.ob-form button.ob-back {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-muted); border: 0; padding: 6px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.ob-form button.ob-back:hover { color: var(--text-fg); }
.ob-form button.ob-back .ob-back-ico {
  display: inline-flex; align-items: center; justify-content: center; line-height: 0;
}
#onboarding .ob-form button.ob-back {
  align-self: flex-start;
  order: -1;
}
#onboarding .ob-step-2 .ob-back { position: absolute; top: 0; left: 0; }
#onboarding .ob-form button.ob-submit { width: 100%; }
.ob-err { min-height: 16px; margin-top: 8px; font-size: var(--text-sm); color: var(--color-error); font-family: var(--font); }
/* #769 : hub Nouvel Atlas — Départ vierge / GEDCOM / Airtable */
.ob-hub-lead {
  margin: 0 0 14px; font-size: var(--text-sm-plus); color: var(--text-muted); line-height: 1.45;
}
.ob-hub-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
/* #2211 : `.ob-hub-btn` (la pilule) est retirée — plus aucun rendu ne la pose et aucune garde ne
   la nomme (vérifié : test-924 lit `[data-hub]`, qui reste). Les quatre choix sont des cartes,
   plus bas dans cette feuille. Laisser une règle morte, c'est laisser une copie qui dérivera. */

/* CC-IMPORT-GEDCOM-FRONT-01 : import GEDCOM secondaire (legacy) */
.ob-import {
  margin-top: 10px; font-family: var(--font); font-size: var(--text-base); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-12); padding: 9px 14px; transition: border-color .12s, color .12s;
}
.ob-import:hover { border-color: var(--colo-fresh, #7141D9); color: var(--colo-fresh, #7141D9); }
.ob-import svg { color: var(--colo-fresh, #7141D9); }

/* Modale « Nouvel arbre » (popin) + popin texte légal */
.ob-popin-box { width: min(520px, 92vw) !important; padding: 22px 24px !important; max-height: min(90vh, 720px); overflow-y: auto; }
.ob-popin-inner { display: flex; flex-direction: column; gap: 8px; }
.ob-cancel {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-muted); border: 0; padding: 6px 0; align-self: center;
}
.ob-cancel:hover { color: var(--text-fg); }
/* ⚡ #2579 (Damien, 03/10 : « La croix doit être à droite. ») — la croix de « Nouvel Atlas » est celle du produit (`.ui-x`, close-button.js) POSÉE DANS LE COIN HAUT-DROIT, comme les autres fenêtres ;
   elle était centrée en haut par le `align-self: center` de l'ancien bouton « Annuler » texte. Zone cliquable de 44 px, focus visible (celui de `.ui-x`). */
.ob-popin-box { position: relative; }
.ob-popin-inner > .ob-cancel.ui-x {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; padding: 0; align-self: auto; /* dans le coin, DANS la fenêtre : la boîte défile (overflow) et rognerait une croix qui déborde */
  color: var(--text-muted-admin);
}
.ob-popin-inner > .ob-cancel.ui-x:hover { color: var(--text-fg); }
.ob-popin-inner > .tr-head { padding-right: 48px; }
/* CC-ONBOARDING-FRONT-07 : la popin légale vit dans un OVERLAY dédié —
   au-dessus du châssis #popin (z 50) et de l'onboarding plein écran, le
   formulaire reste intact derrière. Carte BLANCHE (décision Damien). */
#ob-legal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 38, 0.45); padding: 16px;
}
.ob-legal-box {
  width: min(520px, 92vw); padding: 0; display: flex; flex-direction: column;
  max-height: min(85vh, 640px);
  background: var(--surface, #fff); border-radius: var(--radius-14, 14px);
  box-shadow: 0 18px 60px rgba(10, 14, 28, 0.35);
}
.ob-legal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none;
}
.ob-legal-head h2 { margin: 0; font-size: var(--text-16); font-weight: 700; }
/* #971 : apparence via .ui-x — position seule. */
.ob-legal-x { flex: none; }
.ob-legal-body {
  flex: 1; overflow-y: auto; padding: 18px 20px 22px;
  font-size: var(--text-base); line-height: 1.55; color: var(--text-fg);
}
/* CC-CONF-LEGAL-PAGES-01 (#815) : renvoi du popin vers les 4 vraies pages légales. */
.ob-legal-links {
  margin: 0; padding: 10px 20px 14px;
  border-top: 1px solid color-mix(in srgb, var(--text-fg) 10%, transparent);
  font-size: var(--text-sm, 12px); color: var(--text-muted);
}
.ob-legal-links a { color: var(--colo-fresh, #7141D9); }

/* CC-ONBOARDING-V4-01 (#553) : import GEDCOM sans la capacité — grisé,
   cadenas de marque, clic → grille des plans (pattern #538) */
.tr-import-locked { opacity: 0.55; }

/* CC-ONBOARDING-V4-01 (#553) : la VITRINE en fond de l'onboarding — la
   même famille visuelle que la page d'entrée (violet pâle #f4f2fd du
   gabarit email, frames sans fond #460). La carte passe par-dessus. */
/* #865 : la vitrine d'onboarding porte le MÊME diaporama fixe que /login
   (login-slides.css, périmètre arbitré par Damien). Le très gros plan du graphe
   (--ob-vitrine-scale / --ob-vitrine-origin, #484) et le fondu croisé
   (.dv-layer) sont partis avec le module de l'ex-vitrine animée (#865) : il
   n'y a plus de SVG à cadrer, ce sont des images de fond que le BO choisit. */
#onboarding {
  background: var(--colo-pale, #f4f2fd);
}
#onboarding .ob-vitrine {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
#onboarding .ob-card { position: relative; z-index: 1; }
/* sombre : l'écran garde son fond sombre existant, sans diaporama */
body.vo-dark #onboarding .ob-vitrine { display: none; }

@media (max-width: 700px), (max-height: 760px) {
  #onboarding { --ob-card-top: 96px; }
}

/* #1919 — « Suppression le <date> » sur la rangée d'un Atlas programmé : discret, la date et le geste (annuler pour le
   créateur, récupérer ses données pour un membre). */
.tr-suppression {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0; padding: 6px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 9%, var(--surface, #fff));
  color: var(--text-fg, #1d2330); font-size: var(--text-sm, 13px);
}
.tr-suppression svg { flex: none; width: 14px; height: 14px; stroke: var(--colo-fresh, #7141D9); }
.tr-suppression span { flex: 1 1 auto; min-width: 0; }

/* ══════════ #2211 (verdict Damien, 28/09) — LES CHOIX DEVIENNENT DES CARTES ══════════
   « Pas assez pro comme popin. Mettre les bons icons, Départ vierge à la fin avec un meilleur
   icon. » Les quatre pilules deviennent quatre cartes : logo, titre, une ligne.

   ⚠️ LES MESURES SONT CELLES DE LA CARTE DE SERVICE DU PRODUIT (`cx-sync-tete`, #1675) —
   grille 40px + 1fr, gouttière 0.85rem, titre 1.02rem/650, ligne 0.86rem en encre douce. Le
   gabarit de CHOIX n'existait pas (cherché avant de dessiner, comme le ticket le demande) : celui
   des réglages vient avec un interrupteur, un champ de lien et une rangée d'actions dont une
   popin de choix n'a que faire. On en reprend les PROPORTIONS pour que les deux se lisent comme
   des sœurs ; on ne recopie pas sa mécanique, et c'est dit.
   ⚠️ ET LE CONTOUR LIT LE THÈME (`var(--border)`), comme les autres surfaces de cette popin. Une
   encre en dur ici serait le défaut du #1837, deux fois dans la même journée. */
.ob-hub-actions {
  /* ⚠️ `margin: 0` EXPLICITE. La règle d'origine du hub, PLUS HAUT dans cette même feuille, pose
     `margin-bottom: 8px` : ne rien dire ici, c'est la laisser gagner. Mesuré — 30 px sous la
     dernière carte pour 22 de padding, et les 8 venaient de là. La gouttière du conteneur sépare
     déjà les blocs ; sur un verre dépoli, ces pixels de rab font « pas fini ». */
  display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0;
}
.ob-hub-carte {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0.85rem; align-items: center;
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font); color: var(--text-fg);
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-md, 12px); padding: 12px 14px;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.ob-hub-carte:hover {
  border-color: var(--colo-fresh, #7141D9);
  background: color-mix(in srgb, var(--colo-fresh, #7141D9) 5%, var(--surface));
  transform: translateY(-1px);
}
.ob-hub-carte[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.ob-hub-media { width: 40px; height: 40px; display: grid; place-items: center; }
.ob-hub-media img, .ob-hub-media svg { width: 40px; height: 40px; display: block; }
/* Le seul des quatre qui n'est pas une marque garde une ICÔNE, à la teinte du produit. */
.ob-hub-carte[data-hub="blank"] .ob-hub-media svg { width: 28px; height: 28px; color: var(--colo-fresh, #7141D9); }
.ob-hub-copy { min-width: 0; display: grid; gap: 0.15rem; }
.ob-hub-titre { font-size: 1.02rem; font-weight: 650; line-height: 1.2; }
.ob-hub-ligne { font-size: 0.86rem; line-height: 1.35; color: var(--text-muted, #5b6170); }

/* ══ #2211 — UN EMPLACEMENT D'ERREUR VIDE NE RÉSERVE PLUS SA HAUTEUR ══
   Mesuré : 58 px sous la dernière carte pour 22 px de padding — 36 px de vide. `.ob-err` garde
   `min-height: 16px` (pour que l'apparition d'un message ne fasse pas sauter la popin), plus sa
   marge et la gouttière du flex. Sur un verre dépoli, ce bas vide se lit « pas fini » — le mot
   exact de Damien sur cette popin.
   ⚠️ `display: none` ET NON `min-height: 0` : la gouttière du conteneur flex s'applique à un
   élément de hauteur nulle, et il serait resté 8 px. Un élément retiré du flux n'en consomme pas.
   ⚠️ ET SEULEMENT VIDE, ET SEULEMENT ICI : dès qu'un message est posé, `:empty` ne matche plus et
   la réserve revient. Les autres popins qui partagent `.ob-err` ne bougent pas. */
.ob-popin-inner .ob-err:empty { display: none; }

/* #2567 — chiffres de labels ; aucune règle sur les phrases. */
.tr-at-counts b { font-family: var(--chrono-font-nombres); }
.tr-meta { font-family: var(--chrono-font-chiffres); }

/* #2579 : surface explicite pour un contraste stable dans les deux thèmes. */
.ob-popin-inner .ob-err:not(:empty) { color: var(--color-error); background: var(--surface-error); padding: 8px 12px; border-radius: var(--radius-sm); line-height: 1.5; }
