/* ═══ L'arbre patrimonial de l'accueil ═══════════════════════════════════
 *
 * Brique nouvelle (23/08/2026) : elle HABILLE la composition fondatrice et
 * porte le registre des générations suivantes, déplié par vitrine-arbre.js.
 *
 * Deux règles héritées des verrous du projet, à ne jamais contredire ici :
 *   · les traits qui portent le sens (filiations) restent sur `--ink-muted`
 *     ou plus contrasté — jamais `--rule-strong`, qui est un filet décoratif ;
 *   · les invariants de la figure fondatrice (graisse de la fourche, fourche
 *     à deux colonnes, pointillés de réserve) vivent dans vitrine.css et ne
 *     sont PAS redéfinis ici.
 *
 * Le décor évoque un registre familial : papier, passe-partout, filet doré
 * — le double trait d'union du couple, repris en filet de titre. Aucun
 * ornement ne doit gêner la lecture des liens. */

/* ── le cartouche de titre ────────────────────────────────────────────── */
.varbre__tete { text-align: center; margin-bottom: var(--s-md); }
.varbre__eyebrow {
  margin: 0 0 var(--s-3xs);
  font-family: var(--font-body); font-size: var(--text-2xs); font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep);
}
.varbre__tete .vh2 { margin: 0; }
/* Le filet du cartouche reprend la barre d'union : un double trait doré.
   C'est le même signe — ce qui relie un couple relie aussi les générations. */
.varbre__filet {
  display: block; width: 72px; height: 0; margin: var(--s-2xs) auto;
  border-top: 3px double var(--gold-deep);
}
.varbre__devise {
  margin: 0 auto; max-width: 34rem;
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-md); line-height: 1.5; color: var(--ink-soft);
}

/* ── les commandes de profondeur ──────────────────────────────────────── */
.varbre__commandes {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--s-2xs); margin-bottom: var(--s-sm); min-height: 2rem;
}
.varbre__prof { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3xs); }
.varbre__prof-mot {
  font-size: var(--text-2xs); font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted); margin-right: var(--s-3xs);
}
.varbre__prof button {
  min-width: 2.3rem; min-height: 2rem; padding: .25rem .6rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r-pill, 999px);
  background: var(--paper-card); color: var(--ink-soft);
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600;
  cursor: pointer;
}
.varbre__prof button:hover { border-color: var(--gold-deep); color: var(--ink); }
.varbre__prof button[aria-pressed="true"] {
  background: var(--forest); border-color: var(--forest); color: var(--paper-raised);
}
.varbre__prof button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
/* Le décompte est une information, pas un ornement : il dit ce qui est lu. */
.varbre__compte {
  width: 100%; text-align: center; margin: 0;
  font-size: var(--text-2xs); color: var(--ink-muted);
}

/* ── le parchemin ─────────────────────────────────────────────────────── */
.varbre__parchemin {
  position: relative; overflow: hidden;
  padding: clamp(1rem, 4vw, 2.5rem);
  background:
    radial-gradient(ellipse at 50% -20%, rgba(178, 145, 85, 0.07), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(105, 77, 60, 0.06), transparent 55%),
    var(--paper-raised);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-md);
  /* Le passe-partout : un second filet en retrait, comme un document encadré. */
  box-shadow: inset 0 0 0 6px var(--paper-raised), inset 0 0 0 7px var(--paper-deep),
    var(--sh-paper);
}
/* La silhouette d'arbre est un décor, rien d'autre : elle passe SOUS la
   figure, presque invisible, et ne porte aucune information généalogique. */
.varbre__fond {
  position: absolute; left: 50%; bottom: -4%; transform: translateX(-50%);
  width: min(560px, 90%); height: auto; opacity: 0.05;
  color: var(--wood); pointer-events: none;
}
.varbre__parchemin > .vfond,
.varbre__registre { position: relative; }

/* La figure fondatrice gagne un peu d'air dans son cadre ; ses règles de
   dessin, elles, ne bougent pas d'un trait. */
.varbre__parchemin .vfond { margin-top: 0; }

/* ── le registre des générations suivantes ────────────────────────────── */
.varbre__registre { margin-top: var(--s-md); }
.varbre__registre[hidden] { display: none; }

/* L'ouverture du registre : un filet, puis les deux volets. */
.varbre__registre::before {
  content: ""; display: block; width: 40%; margin: 0 auto var(--s-md);
  border-top: 1px solid var(--paper-deep);
}
.reg__volets {
  display: grid; grid-template-columns: 1fr; gap: var(--s-md);
  align-items: start; text-align: left;
}
@media (min-width: 900px) {
  .reg__volets { grid-template-columns: 1fr 1fr; column-gap: var(--s-lg); }
}
.reg__branche { min-width: 0; }
.reg__tete {
  margin: 0 0 var(--s-2xs);
  font-family: var(--font-display); font-size: var(--text-md); font-weight: 600;
  color: var(--wood);
}
.reg__tete b { color: var(--ink); }
.reg__tete-lien { color: inherit; text-decoration: none; }
.reg__tete-lien:hover, .reg__tete-lien:focus-visible { color: var(--terra-deep); }

/* ── un foyer du registre ─────────────────────────────────────────────── */
.reg__foyer { margin: 0 0 var(--s-2xs); min-width: 0; }
.reg__union {
  margin: 0 0 .3rem; display: flex; align-items: center; flex-wrap: wrap;
  gap: .3rem; font-size: var(--text-xs); color: var(--ink-soft);
}
/* La barre d'union du registre est celle de la figure : double trait doré. */
.reg__barre { flex: 0 0 auto; width: 18px; height: 0; border-top: 3px double var(--gold-deep); }
.reg__mot { font-size: var(--text-2xs); color: var(--ink-muted); letter-spacing: .06em; }
.reg__conjoint {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  text-decoration: none;
}
a.reg__conjoint:hover, a.reg__conjoint:focus-visible { color: var(--terra-deep); }
.reg__union--reserve .reg__barre { border-top-style: dashed; border-top-width: 2px; }
.reg__reserve-union {
  font-size: var(--text-2xs); font-style: italic; color: var(--wood);
}
.reg__reserve-union abbr { text-decoration: none; border-bottom: 1px dotted var(--wood); }

/* ── les enfants : un rail organique par fratrie ──────────────────────── */
.reg__enfants { list-style: none; margin: 0; padding: 0 0 0 .55rem; position: relative; }
/* Le rail vertical de la fratrie. `--ink-muted` : ce trait porte le sens. */
.reg__enfants::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 1.05rem;
  border-left: 1.5px solid var(--ink-muted); opacity: .85;
}
.reg__enfant { position: relative; padding: .16rem 0 .16rem 1.05rem; min-width: 0; }
/* L'attache de chaque enfant : un coude adouci, comme une branche qui part. */
.reg__enfant::before {
  content: ""; position: absolute; left: -0.55rem; top: 0; width: 1.3rem; height: 1.05rem;
  border-left: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
  border-bottom-left-radius: 10px; opacity: .85;
}
/* Une réserve se voit au trait avant de se lire : le coude passe en pointillé. */
.reg__enfant--reserve::before,
.reg__enfant--conteste::before { border-left-style: dashed; border-bottom-style: dashed; }
.reg__enfant--conteste > .reg__carte { opacity: .82; }

/* ── la carte d'une personne ──────────────────────────────────────────── */
.reg__carte {
  display: inline-flex; align-items: center; gap: .55rem; max-width: 100%;
  padding: .3rem .6rem .3rem .34rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  background: var(--paper-card); box-shadow: var(--sh-paper);
  text-decoration: none; color: var(--ink); min-width: 0;
}
a.reg__carte:hover { border-color: var(--terra); }
a.reg__carte:hover .reg__nom { color: var(--terra-deep); }
a.reg__carte:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Le monogramme : des initiales, jamais un visage inventé. */
.reg__mono {
  flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper-sand); border: 1px solid var(--gold);
  font-family: var(--font-display); font-size: .72rem; font-weight: 600;
  color: var(--wood); letter-spacing: .02em;
}
.reg__id { min-width: 0; display: flex; flex-direction: column; }
.reg__nom {
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm);
  line-height: 1.25; overflow-wrap: anywhere;
}
.reg__meta {
  font-size: var(--text-2xs); color: var(--ink-muted); line-height: 1.3;
  overflow-wrap: anywhere;
}
/* Les pastilles suivent la doctrine du site : le silence signifie que tout
   va bien. Seules les réserves réelles se disent, en mots, sans code. */
.reg__pastille {
  flex: 0 0 auto; align-self: center;
  font-size: var(--text-2xs); font-style: italic; color: var(--st-uncertain);
  border-bottom: 1px dotted currentColor;
}
.reg__pastille--conteste { color: var(--st-disputed); }

/* Un renvoi : la personne descend de deux foyers et n'est dessinée qu'une
   fois. Le registre le dit au lieu de la dupliquer. */
.reg__renvoi { font-size: var(--text-xs); color: var(--ink-muted); }
.reg__renvoi a { color: var(--ink-soft); }

/* Ce que le registre ne peut pas dire (chargement impossible). */
.varbre__indispo {
  margin: 0; text-align: center;
  font-size: var(--text-xs); color: var(--ink-muted); font-style: italic;
}

/* ── mouvement : une apparition douce, et rien du tout si on la refuse ── */
@media (prefers-reduced-motion: no-preference) {
  .varbre__registre:not([hidden]) { animation: reg-ouvre .32s ease-out; }
  @keyframes reg-ouvre {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
  .reg__carte { transition: border-color .15s ease; }
}

/* ── téléphone : mêmes règles, plus serrées — jamais de débordement ───── */
@media (max-width: 520px) {
  .varbre__parchemin { box-shadow: var(--sh-paper); }
  .reg__enfant { padding-left: .85rem; }
  .reg__mono { width: 1.6rem; height: 1.6rem; font-size: .62rem; }
}
