/* Arbre généalogique Villatte – Frati
   Style inspiré d'une maison de luxe : Playfair Display pour les titres, Inter pour le reste,
   noir, blanc et ivoire, un seul accent doré, angles droits et beaucoup d'air. */

:root {
  --encre: #1a1a1a;
  --encre-douce: #6b6b6b;
  --encre-pale: #9a9a9a;
  --blanc: #ffffff;
  --ivoire: #faf9f6;
  --filet: #e5e5e5;
  --filet-fort: #a3a3a3;
  --trait: #c9c3b6;
  --or: #ffd700;
  --noir: #000000;
  --titre: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --texte: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ombre: 0 22px 48px -18px rgba(0, 0, 0, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
a { color: inherit; }

/* La page de l'arbre occupe tout l'écran, sans défilement. */
body.page-arbre {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--ivoire);
}
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

/* --- Barre du haut --- */

.barre {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  min-height: 72px;
  padding: 0.6rem max(28px, env(safe-area-inset-right)) 0.6rem max(28px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--filet);
}
.marque { display: flex; flex-direction: column; text-decoration: none; color: var(--encre); }
.marque-surtitre {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 10px;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.marque-surtitre::before { content: ""; width: 24px; height: 1px; background: var(--or); }
.marque-nom {
  font-family: var(--titre);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1.3;
}
.barre-infos {
  margin: 0 auto;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.barre-commandes { display: flex; gap: 0.25rem; margin-left: auto; }
.barre-commandes button {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0.5rem 0.7rem;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-douce);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.barre-commandes button:hover { color: var(--encre); border-bottom-color: var(--encre); }
.barre-lien {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--encre);
  border-bottom: 1px solid var(--encre);
}
.barre-lien::before { content: "←"; letter-spacing: 0; }
.barre-lien:hover { color: var(--encre-douce); border-bottom-color: var(--encre-douce); }
.page-fiche .barre { position: sticky; top: 0; }

/* --- Zone de l'arbre --- */

.arbre {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--ivoire);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.arbre:focus-visible { outline-offset: -3px; }
.arbre.glisse { cursor: grabbing; }
.scene { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.liens { position: absolute; left: 0; top: 0; overflow: visible; }
.lien { fill: none; stroke: var(--trait); stroke-width: 1; }
.lien.statut-probable, .lien.statut-hypothese { stroke-dasharray: 5 4; stroke: var(--filet-fort); }
.cartes { position: absolute; left: 0; top: 0; }
.sans-js { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--titre); font-size: 20px; }

/* --- Cartes --- */

.carte {
  position: absolute;
  left: 0;
  top: 0;
  width: 264px;
  padding: 16px 22px 18px;
  background: var(--blanc);
  border: 1px solid var(--filet);
  cursor: pointer;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.carte:hover { box-shadow: var(--ombre); border-color: #d6d6d6; }
.carte.statut-probable, .carte.statut-hypothese { border-style: dashed; border-color: var(--filet-fort); }
.carte.fourragere { border-top: 3px solid var(--or); padding-top: 14px; }
.carte.repere { box-shadow: 0 0 0 3px var(--or), var(--ombre); }
/* Cartes portant le même nom que la carte survolée : fond doré pâle, filet d'or */
.carte { transition: box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.25s ease; }
.carte.meme-nom { background: #fdf4d0; border-color: #e6c84f; }
.carte.meme-nom.survolee { background: #fbeca8; }
/* Toute la carte est un lien vers la fiche ; le bouton plier/déplier passe au-dessus. */
.carte-lien { position: absolute; inset: 0; z-index: 1; }
.carte-lien:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.carte-sosa { font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--encre-pale); white-space: nowrap; }
.etiquettes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.etiquette {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 8px;
  border: 1px solid var(--filet);
  color: var(--encre-douce);
  white-space: nowrap;
}
.etiquette-famille { border-color: var(--encre); color: var(--encre); }
.etiquette-probable, .etiquette-hypothese { border-style: dashed; border-color: var(--encre-douce); color: var(--encre); }
.etiquette-or { background: var(--or); border-color: var(--or); color: var(--noir); }

.carte-nom {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.carte-prenoms {
  margin: 0;
  font-family: var(--titre);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--encre);
}
.carte-filet { display: block; width: 24px; height: 1px; margin: 12px 0 10px; background: var(--or); }
.carte-dates {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.6px;
  font-variant-numeric: tabular-nums;
  color: var(--encre);
}
.carte-lieu { display: flex; gap: 7px; align-items: flex-start; margin: 0 0 4px; font-size: 13px; line-height: 1.45; color: var(--encre-douce); }
.carte-lieu svg { flex: none; width: 11px; height: 11px; margin-top: 4px; stroke: var(--encre-pale); fill: none; stroke-width: 1.4; }
.carte-metier { margin: 0; font-family: var(--titre); font-style: italic; font-size: 14px; line-height: 1.45; color: var(--encre-douce); }
.carte-metier::first-letter { text-transform: uppercase; }
.carte-vivant { margin: 10px 0 0; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre-pale); }

/* Bouton plier / déplier, posé sur le bord droit de la carte */
.bascule {
  position: absolute;
  top: 50%;
  right: -15px;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--blanc);
  border: 1px solid var(--encre);
  color: var(--encre);
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.bascule:hover { background: var(--encre); color: var(--blanc); }
.bascule[aria-expanded="false"] { background: var(--noir); border-color: var(--noir); color: var(--blanc); }
.bascule[aria-expanded="false"]:hover { background: var(--encre); }
.bascule-compte {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-douce);
  white-space: nowrap;
  pointer-events: none;
}
.bascule[aria-expanded="true"] .bascule-compte { display: none; }

/* --- Zoom --- */

.zoom {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ombre);
}
.zoom button {
  width: 44px;
  height: 44px;
  background: var(--blanc);
  border: 1px solid var(--filet);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.zoom button + button { border-top: 0; }
.zoom button:hover { background: var(--noir); color: var(--blanc); }

/* --- Légende --- */

.legende {
  position: fixed;
  left: max(24px, env(safe-area-inset-left));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: 340px;
  padding: 14px 20px;
  background: var(--blanc);
  border: 1px solid var(--filet);
  box-shadow: var(--ombre);
}
.legende-bouton {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
  background: none;
  border: 0;
  font-size: 10px;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: var(--encre-douce);
  cursor: pointer;
}
.legende-bouton::before { content: ""; width: 24px; height: 1px; background: var(--or); }
.legende-bouton::after { content: "−"; margin-left: 0.4rem; font-size: 13px; letter-spacing: 0; }
.legende-bouton[aria-expanded="false"]::after { content: "+"; }
.legende-contenu { margin-top: 12px; }
.legende ul { list-style: none; margin: 0 0 10px; padding: 0; }
.legende li { display: flex; gap: 10px; align-items: flex-start; margin: 7px 0; font-size: 12px; line-height: 1.45; color: var(--encre-douce); }
.legende strong { font-weight: 500; color: var(--encre); }
.echantillon { flex: none; width: 26px; height: 17px; margin-top: 1px; background: var(--blanc); border: 1px solid var(--filet-fort); }
.echantillon.statut-confirme { border-color: var(--filet-fort); }
.echantillon.statut-famille { border-color: var(--encre); }
.echantillon.statut-probable, .echantillon.statut-hypothese { border-style: dashed; }
.echantillon.fourragere { border-top: 3px solid var(--or); }
.echantillon.meme-nom { background: #fdf4d0; border-color: #e6c84f; }
.echantillon-bouton {
  flex: none; width: 17px; height: 17px; margin: 0 4.5px; display: grid; place-items: center;
  background: var(--noir); color: var(--blanc); font-size: 12px; line-height: 1;
}
.echantillon-trait { flex: none; width: 26px; height: 0; margin-top: 9px; border-top: 1px dashed var(--filet-fort); }
.legende-aide, .legende-auteur { margin: 0 0 4px; font-size: 11.5px; line-height: 1.5; color: var(--encre-pale); }
.legende-auteur { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--filet); }

/* --- Fiches --- */

.fiche { max-width: 1120px; margin: 0 auto; padding: 0 28px 104px; }
.surtitre {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 18px;
  font-size: 11.5px;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.surtitre::before { content: ""; flex: none; width: 32px; height: 1px; background: var(--or); }

.fiche-entete { padding: 76px 0 0; }
.fiche-nom { margin: 0 0 6px; font-size: 13px; font-weight: 500; letter-spacing: 4.2px; text-transform: uppercase; color: var(--encre-douce); }
.fiche-prenoms {
  margin: 0;
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.08;
  color: var(--encre);
}
.fiche-dit { margin: 12px 0 0; font-family: var(--titre); font-style: italic; font-size: 22px; color: var(--encre-douce); }
.fiche-vie { margin: 24px 0 0; font-size: 15px; font-weight: 500; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.fiche-etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.fiche-etiquettes .etiquette { font-size: 10.5px; padding: 6px 12px; }
.etiquette-discrete { border-color: var(--filet); color: var(--encre-douce); }
.fiche-statut { margin: 14px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.6; color: var(--encre-douce); }
.fiche-avis {
  max-width: 62ch;
  margin: 28px 0 0;
  padding: 18px 22px;
  background: var(--ivoire);
  border-left: 2px solid var(--or);
  font-size: 15px;
  line-height: 1.65;
  color: var(--encre-douce);
}
.fiche-avis strong { color: var(--encre); font-weight: 500; }

.faits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  margin: 64px 0 0;
  background: var(--filet);
  border: 1px solid var(--filet);
}
.fait { padding: 28px 28px 30px; background: var(--blanc); }
.fait p { margin: 0; }
.fait-titre { margin-bottom: 14px !important; font-size: 10.5px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--encre-pale); }
.fait-principal { font-family: var(--titre); font-size: 25px; line-height: 1.25; color: var(--encre); }
.fait-secondaire { margin-top: 8px !important; font-size: 14px; line-height: 1.55; color: var(--encre-douce); }
.fait-detail { margin-top: 6px !important; font-size: 13px; line-height: 1.55; color: var(--encre-douce); }
.fait-detail a, .notes a { text-decoration-color: var(--or); text-underline-offset: 3px; }
.metier { display: inline-block; font-style: italic; }
.metier::first-letter { text-transform: uppercase; }
.vide { font-style: italic; color: var(--encre-pale); }

.bloc { padding: 88px 0 0; }
.bloc h2 {
  margin: 0 0 36px;
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}
.bloc h3 { margin: 0 0 14px; font-size: 10.5px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--encre-pale); }
.aide { margin: -18px 0 28px; font-size: 13px; color: var(--encre-pale); }

.groupe { margin: 0 0 40px; }
.mini-cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.mini-carte {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 20px 18px;
  background: var(--blanc);
  border: 1px solid var(--filet);
  text-decoration: none;
  color: var(--encre);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.mini-carte:hover { box-shadow: var(--ombre); border-color: #d6d6d6; }
.mini-carte.statut-probable, .mini-carte.statut-hypothese { border-style: dashed; border-color: var(--filet-fort); }
.mini-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 20px; }
.mini-tete .etiquette { margin-left: auto; }
.mini-sosa { font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--encre-pale); white-space: nowrap; }
.mini-precision { font-size: 11px; font-style: italic; color: var(--encre-douce); }
.mini-nom { font-size: 10.5px; font-weight: 500; letter-spacing: 2.6px; text-transform: uppercase; color: var(--encre-douce); }
.mini-prenoms { margin-top: 2px; font-family: var(--titre); font-size: 19px; line-height: 1.25; }
.mini-vie { margin-top: 10px; font-size: 13px; font-weight: 500; letter-spacing: 0.6px; font-variant-numeric: tabular-nums; }
.mini-vivant { margin-top: 8px; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre-pale); }

.notes { max-width: 760px; margin: 0; font-family: var(--titre); font-size: 21px; line-height: 1.7; color: var(--encre); }

.militaire { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 28px; }
.decorations { list-style: none; margin: 0 0 28px; padding: 0; }
.decorations li { position: relative; padding: 12px 0 12px 26px; border-top: 1px solid var(--filet); font-size: 15px; line-height: 1.55; }
.decorations li::before { content: ""; position: absolute; left: 0; top: 19px; width: 9px; height: 9px; background: var(--or); }
.citation { margin: 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--or); font-family: var(--titre); font-style: italic; font-size: 21px; line-height: 1.6; }
.frise { list-style: none; margin: 0; padding: 0; }
.frise li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--filet); font-size: 15px; line-height: 1.5; }
.frise-date { padding-top: 3px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--encre-pale); }

.documents { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 36px 24px; }
.document { margin: 0; }
.document-lien { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivoire); }
.document-lien img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transition: transform 0.7s ease; }
.document-lien:hover img { transform: scale(1.04); }
.document-agrandir {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 12px;
  background: var(--noir);
  color: var(--blanc);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.document figcaption p { margin: 0; }
.document-titre { margin-top: 16px !important; font-family: var(--titre); font-size: 15.5px; font-weight: 500; line-height: 1.4; }
.document-date { margin-top: 6px !important; font-size: 12.5px; color: var(--encre-douce); }
.document-credit { margin-top: 8px !important; font-size: 11.5px; line-height: 1.5; color: var(--encre-pale); }
.document-vide {
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: var(--ivoire);
  border: 1px dashed var(--filet-fort);
}
.document-vide span { font-family: var(--titre); font-style: italic; font-size: 19px; }
.document-vide small { font-size: 12px; line-height: 1.5; color: var(--encre-pale); }

.sources { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--filet); }
.sources li { display: flex; justify-content: space-between; align-items: baseline; gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--filet); }
.source-titre { margin: 0; max-width: 760px; font-family: var(--titre); font-size: 17px; line-height: 1.55; }
.source-lien {
  flex: none;
  padding-bottom: 2px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--encre);
  border-bottom: 1px solid var(--encre);
}
.source-lien:hover { color: var(--encre-douce); border-bottom-color: var(--encre-douce); }

.incertain { text-decoration: underline dotted #c9a800; text-decoration-thickness: 2px; text-underline-offset: 0.2em; cursor: help; }

.pied { padding: 56px 28px 64px; background: var(--ivoire); border-top: 1px solid var(--filet); text-align: center; font-size: 12.5px; line-height: 1.7; color: var(--encre-douce); }
.pied p { margin: 0 0 4px; }
.pied-marque { margin-bottom: 12px !important; font-family: var(--titre); font-size: 20px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--encre); }

/* --- Liens et boutons communs --- */

.barre-page {
  padding: 0.5rem 0.7rem;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--encre-douce);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.barre-page:hover { color: var(--encre); border-bottom-color: var(--encre); }
.barre-commandes .barre-page { margin-right: 0.6rem; color: var(--encre); }
.page-fiche .barre-commandes { align-items: center; gap: 1.2rem; }
.bouton {
  display: inline-block;
  padding: 16px 36px;
  border: 1px solid var(--noir);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.bouton-noir { background: var(--noir); color: var(--blanc); }
.bouton-noir:hover { background: #2b2b2b; }
.bouton-contour { background: transparent; color: var(--noir); }
.bouton-contour:hover { background: var(--noir); color: var(--blanc); }
a.etiquette { text-decoration: none; }
a.etiquette-or:hover { background: var(--noir); border-color: var(--noir); color: var(--or); }
.invitation { display: grid; gap: 28px; max-width: 760px; }
.invitation p { margin: 0; }

/* --- L'ancêtre à la fourragère --- */

.contenu { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.fr-ouverture { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.fr-titre h1 { margin: 0; font-family: var(--titre); font-weight: 400; font-size: clamp(46px, 6.4vw, 86px); line-height: 1.02; }
.fr-titre h1 em { font-style: italic; }
.fr-chapo { margin: 30px 0 0; max-width: 32em; font-size: 18px; line-height: 1.65; color: var(--encre-douce); }
.fr-chapo strong { font-weight: 500; color: var(--encre); }
.boutons { display: flex; flex-wrap: wrap; gap: 14px; margin: 36px 0 0; }
.fr-visuel { position: relative; }
.fr-visuel a { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivoire); border: 1px solid var(--filet); }
.fr-visuel img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 0.8s ease; }
.fr-visuel a:hover img { transform: scale(1.03); }
.fr-encart {
  position: absolute;
  left: -44px;
  bottom: 40px;
  padding: 22px 28px 20px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--ombre);
}
.fr-encart p { margin: 0; }
.fr-encart-nombre { font-size: 42px; font-weight: 300; line-height: 1; letter-spacing: -0.5px; }
.fr-encart-libelle { margin-top: 10px !important; font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--encre-douce); }

.fr-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--filet); border: 1px solid var(--filet); }
.fr-chiffre { padding: 30px 28px; background: var(--blanc); }
.fr-chiffre p { margin: 0; }
.fr-chiffre-valeur { font-size: 40px; font-weight: 300; line-height: 1.05; letter-spacing: -0.5px; }
.fr-chiffre-libelle { margin-top: 12px !important; font-size: 13.5px; line-height: 1.55; color: var(--encre-douce); }

.fr-citation { margin-top: 104px; padding: 112px 0 104px; background: var(--noir); color: var(--blanc); text-align: center; }
.fr-citation .surtitre { justify-content: center; color: rgba(255, 255, 255, 0.6); }
.fr-citation figure { margin: 0; }
.fr-citation blockquote { max-width: 880px; margin: 0 auto; font-family: var(--titre); font-style: italic; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.42; }
.fr-citation blockquote::before { content: "“"; display: block; margin-bottom: 20px; font-style: normal; font-size: 84px; line-height: 0.6; color: var(--or); }
.fr-citation figcaption { margin-top: 30px; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }

.fr-decorations { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.fr-decoration { padding: 32px 28px 34px; background: var(--blanc); border: 1px solid var(--filet); transition: box-shadow 0.35s ease; }
.fr-decoration:hover { box-shadow: var(--ombre); }
.fr-decoration.or { border-top: 3px solid var(--or); padding-top: 30px; }
.fr-icone { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 26px; border: 1px solid var(--filet); }
.fr-decoration.or .fr-icone { border-color: var(--or); }
.fr-icone svg { width: 26px; height: 26px; fill: none; stroke: var(--encre); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }
.bloc .fr-decoration h3 { margin: 0; font-family: var(--titre); font-size: 20px; font-weight: 400; line-height: 1.35; letter-spacing: 0; text-transform: none; color: var(--encre); }
.fr-decoration p { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--encre-douce); }

.fr-bande { margin-top: 104px; padding: 96px 0 72px; background: var(--ivoire); }
.fr-h2 { margin: 0 0 56px; font-family: var(--titre); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; }
.fr-frise { position: relative; list-style: none; margin: 0; padding: 0; }
.fr-frise::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--filet-fort); }
.fr-annee { position: relative; margin: 0 0 32px; text-align: center; }
.fr-annee span { position: relative; display: inline-block; padding: 4px 20px; background: var(--ivoire); font-family: var(--titre); font-size: 30px; }
.fr-ecart { position: relative; margin: 0 0 32px; text-align: center; }
.fr-ecart span {
  position: relative; display: inline-block; padding: 8px 16px; background: var(--ivoire);
  border: 1px dashed var(--filet-fort); font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--encre-douce);
}
.fr-evt { position: relative; width: 50%; padding: 0 52px 40px 0; text-align: right; }
.fr-evt.droite { margin-left: 50%; padding: 0 0 40px 52px; text-align: left; }
.fr-evt::after { content: ""; position: absolute; top: 5px; width: 10px; height: 10px; background: var(--blanc); border: 1px solid var(--encre); transform: rotate(45deg); }
.fr-evt.gauche::after { right: -5.5px; }
.fr-evt.droite::after { left: -5.5px; }
.fr-evt time { display: block; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--encre-pale); }
.fr-evt p { margin: 8px 0 0; font-family: var(--titre); font-size: 20px; line-height: 1.4; }
.fr-evt .fr-age { margin-top: 6px; font-family: var(--texte); font-size: 12px; color: var(--encre-douce); }

.fr-matricule { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.fr-texte { margin: 0; max-width: 30em; font-size: 16px; line-height: 1.7; color: var(--encre-douce); }
.fr-credit { display: flex; gap: 12px; align-items: center; margin: 28px 0 0; font-size: 12px; color: var(--encre-pale); }
.fr-credit::before { content: ""; flex: none; width: 24px; height: 1px; background: var(--or); }
.fr-matricule-image { margin: 0; }
.fr-matricule-image a { position: relative; display: block; border: 1px solid var(--filet); }
.fr-matricule-image img { display: block; width: 100%; height: auto; }
.fr-matricule-image figcaption { margin-top: 12px; font-size: 12px; color: var(--encre-pale); }

/* --- Galerie des documents --- */

.barre-page[aria-current="page"] { color: var(--encre); border-bottom-color: var(--encre); }
.ga-ouverture { padding: 72px 0 8px; }
.ga-ouverture h1 { margin: 0; font-family: var(--titre); font-weight: 400; font-size: clamp(44px, 6vw, 78px); line-height: 1.04; }
.ga-ouverture h1 em { font-style: italic; }
.ga-note { margin: 16px 0 0; font-size: 13px; color: var(--encre-pale); }
.ga-filtres { display: flex; flex-wrap: wrap; gap: 0 32px; margin: 48px 0 0; border-bottom: 1px solid var(--filet); }
.ga-filtres button {
  margin-bottom: -1px;
  padding: 0 0 14px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-douce);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.ga-filtres button:hover { color: var(--encre); }
.ga-filtres button[aria-pressed="true"] { color: var(--encre); border-bottom-color: var(--encre); }
.ga-filtres .compte { margin-left: 8px; color: var(--encre-pale); }
.ga-resultat { min-height: 1.5em; margin: 16px 0 24px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--encre-pale); }
.galerie { list-style: none; margin: 0; padding: 0 0 104px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 56px 28px; }
.ga-carte { display: flex; flex-direction: column; }
.ga-media { position: relative; }
.ga-type {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 10px;
  background: var(--blanc);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  pointer-events: none;
}
.ga-type.or { background: var(--or); }
.ga-carte p { margin: 0; }
.ga-date { margin-top: 18px !important; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--encre-pale); }
.galerie .ga-titre { margin: 6px 0 0; font-family: var(--titre); font-size: 17px; font-weight: 500; line-height: 1.4; }
.ga-personnes { margin-top: 10px !important; font-size: 13px; line-height: 1.6; color: var(--encre-douce); }
.ga-personnes a { color: var(--encre); text-decoration-color: var(--or); text-underline-offset: 3px; }
.ga-credit { margin-top: auto !important; padding-top: 12px; font-size: 11.5px; line-height: 1.5; color: var(--encre-pale); }
.ga-personnes + .ga-credit, .ga-titre + .ga-credit { margin-top: 12px !important; border-top: 1px solid var(--filet); }

/* --- Branches --- */

.etiquette-lien:hover { border-color: var(--encre); color: var(--encre); }
.br-cartes { list-style: none; margin: 48px 0 0; padding: 0 0 104px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.br-carte a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #141414; color: var(--blanc); text-decoration: none; }
.br-carte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: transform 0.9s ease; }
.br-carte a:hover img { transform: scale(1.05); }
.br-voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.88) 100%); }
.br-carte.sans-image .br-voile { background: linear-gradient(160deg, #262626 0%, #0b0b0b 100%); }
.br-texte { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 32px 30px; }
.br-cote { display: flex; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.br-cote::before { content: ""; width: 24px; height: 1px; background: var(--or); }
.br-nom { font-family: var(--titre); font-size: 34px; line-height: 1.1; }
.br-details { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.78); }
.br-explorer { align-self: flex-start; margin-top: 10px; padding-bottom: 3px; border-bottom: 1px solid var(--or); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; }
.br-chiffres { margin-top: 40px; }

.arbre-bloc { margin-top: 8px; }
.arbre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin-bottom: 16px; }
.arbre-outils button {
  padding: 6px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--encre-douce);
  cursor: pointer;
}
.arbre-outils button:hover { color: var(--encre); border-bottom-color: var(--encre); }
.arbre-outils-zoom { display: flex; margin-left: auto; }
.arbre-outils-zoom button { width: 38px; height: 38px; padding: 0; border: 1px solid var(--filet); font-size: 18px; font-weight: 300; letter-spacing: 0; color: var(--encre); }
.arbre-outils-zoom button + button { border-left: 0; }
.arbre-outils-zoom button:hover { background: var(--noir); color: var(--blanc); border-bottom-color: var(--filet); }
.arbre.arbre-integre { flex: none; height: min(72vh, 680px); border: 1px solid var(--filet); }
.arbre-aide { margin: 12px 0 0; }
.arbre-avis {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  max-width: 85%;
  margin: 0;
  padding: 12px 18px;
  transform: translate(-50%, -50%);
  background: rgba(11, 11, 11, 0.85);
  color: var(--blanc);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.arbre-avis.visible { opacity: 1; }

.br-lieux { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--filet); columns: 2; column-gap: 48px; }
.br-lieux li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--filet); break-inside: avoid; }
.br-lieu { font-family: var(--titre); font-size: 17px; }
.br-compte { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--encre-pale); }
.br-pistes { margin: 0; padding: 0; list-style: none; counter-reset: piste; border-top: 1px solid var(--filet); }
.br-pistes li { counter-increment: piste; display: grid; grid-template-columns: 48px 1fr; padding: 18px 0; border-bottom: 1px solid var(--filet); font-family: var(--titre); font-size: 17px; line-height: 1.55; }
.br-pistes li::before { content: counter(piste, decimal-leading-zero); padding-top: 4px; font-family: var(--texte); font-size: 11px; letter-spacing: 1.2px; color: var(--encre-pale); }
.br-autres { padding-bottom: 104px; }
.br-autres ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.br-autres a { display: inline-block; padding: 12px 22px; border: 1px solid var(--noir); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; text-decoration: none; color: var(--noir); }
.br-autres a:hover { background: var(--noir); color: var(--blanc); }
.page-branche .galerie { padding-bottom: 0; }

/* --- Visionneuse d'actes --- */

.visionneuse-ouverte { overflow: hidden; }
.visionneuse {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #0b0b0b;
  color: #f5f3ee;
}
.v-haut { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; padding: 14px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.v-titre { flex: 1 1 280px; margin: 0; font-family: var(--titre); font-size: 18px; line-height: 1.35; }
.v-outils { display: flex; flex-wrap: wrap; gap: 8px; }
.v-outils button {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f5f3ee;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.v-outils button:hover { background: #f5f3ee; color: #0b0b0b; }
.v-outils button[aria-pressed="true"] { background: var(--or); border-color: var(--or); color: var(--noir); }
.v-outils .v-signe { padding: 0; font-size: 19px; font-weight: 300; letter-spacing: 0; }
.v-scene { position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.v-scene.glisse { cursor: grabbing; }
.v-image { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.v-chargement { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); pointer-events: none; }
.v-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  background: rgba(11, 11, 11, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f5f3ee;
  font-size: 18px;
  cursor: pointer;
}
.v-nav:hover { background: #f5f3ee; color: #0b0b0b; }
.v-prec { left: 16px; }
.v-suiv { right: 16px; }
.v-bas { display: flex; align-items: center; gap: 12px; padding: 12px 24px 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; color: rgba(255, 255, 255, 0.78); }
.v-bas::before { content: ""; flex: none; width: 24px; height: 1px; background: var(--or); }
.v-bas p { margin: 0; }
.v-aide { margin-left: auto !important; color: rgba(255, 255, 255, 0.45); }

/* --- Carte des lieux de naissance --- */

.ca-ouverture { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: end; }
.ca-legende { list-style: none; display: grid; gap: 10px; margin: 22px 0 0; padding: 0; font-size: 12.5px; color: var(--encre-douce); }
.ca-legende li { display: flex; align-items: center; gap: 12px; }
.ca-pastille { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--encre); border: 2px solid var(--or); }
.ca-pastille.incertain-lieu { background: var(--blanc); border: 1.5px dashed var(--encre); }
.ca-figure { margin: 0; border: 1px solid var(--filet); background: var(--ivoire); }
.ca-svg { display: block; width: 100%; height: auto; }
.ca-mer { fill: #f1efe9; }
.ca-pays { fill: #fbfaf7; stroke: #cfc9bc; stroke-width: 0.8; stroke-linejoin: round; }
.ca-pays-focus { fill: var(--blanc); stroke: #a39b8a; }
.ca-cadre rect { fill: rgba(255, 215, 0, 0.18); stroke: var(--encre); stroke-width: 1.2; }
.ca-cadre text { font-family: var(--titre); font-style: italic; font-size: 17px; fill: var(--encre); paint-order: stroke; stroke: var(--blanc); stroke-width: 4px; }
.ca-cadre:hover rect, .ca-cadre:focus-visible rect { fill: var(--or); }
.ca-marqueur circle { fill: var(--encre); stroke: var(--or); stroke-width: 2.5; transition: fill 0.2s; }
.ca-marqueur.incertain-lieu circle { fill: var(--blanc); stroke: var(--encre); stroke-width: 1.6; stroke-dasharray: 4 3; }
.ca-marqueur:hover circle, .ca-marqueur:focus-visible circle { fill: var(--or); stroke: var(--encre); }
.ca-nombre { font-family: var(--texte); font-size: 12px; font-weight: 600; fill: var(--blanc); text-anchor: middle; pointer-events: none; }
.ca-marqueur:hover .ca-nombre { fill: var(--noir); }
.ca-nom { font-family: var(--titre); font-size: 17px; fill: var(--encre); paint-order: stroke; stroke: var(--ivoire); stroke-width: 5px; stroke-linejoin: round; }
.ca-echelle path { fill: none; stroke: var(--encre-douce); stroke-width: 1.2; }
.ca-echelle text { font-size: 11px; letter-spacing: 1px; fill: var(--encre-douce); text-anchor: middle; }

.ca-leaflet { position: relative; height: min(68vh, 620px); min-height: 380px; background: #f1efe9; font-family: var(--texte); }
.ca-active { background: #f1efe9; }
.ca-aide { margin: 10px 0 0; font-size: 12.5px; color: var(--encre-pale); }
.ca-activer { position: absolute; z-index: 800; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 18px;
  border: 1px solid var(--encre); background: rgba(255, 255, 255, 0.94); font-size: 11px; letter-spacing: 1.6px;
  text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.ca-activer:hover { background: var(--encre); color: var(--blanc); }
.leaflet-container a.leaflet-popup-close-button { color: var(--encre-douce); }
.leaflet-tooltip.cl-etiquette { padding: 2px 8px; border: 0; border-radius: 0; background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); font-family: var(--titre); font-size: 15px; color: var(--encre); }
.leaflet-tooltip.cl-etiquette::before { display: none; }
.cl-nombre { margin-left: 4px; font-family: var(--texte); font-size: 11px; font-weight: 600; color: var(--encre-douce); }
.cl-marqueur { cursor: pointer; }
.cl-bulle .leaflet-popup-content-wrapper { border-radius: 0; box-shadow: var(--ombre); }
.cl-bulle .leaflet-popup-content { margin: 18px 20px; font-family: var(--texte); font-size: 14px; line-height: 1.45; }
.cb-titre { margin: 0 !important; font-family: var(--titre); font-size: 21px; }
.cb-nombre { margin: 2px 0 10px !important; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre-pale); }
.cb-liste { max-height: 220px; overflow: auto; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.cb-liste li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--filet); }
.cb-liste a { color: var(--encre) !important; text-decoration: none; }
.cb-liste a:hover { text-decoration: underline; text-decoration-color: var(--or); }
.cb-liste span { flex: none; font-size: 12px; color: var(--encre-pale); }
.cb-tout { display: inline-block; margin-top: 12px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre) !important; }

.ca-panneau { padding-top: 96px; scroll-margin-top: 24px; }
.ca-panneau h2 { margin: 0; font-family: var(--titre); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; }
.ca-resume { margin: 10px 0 32px; color: var(--encre-douce); }
.ca-communes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px 48px; }
.ca-commune { scroll-margin-top: 24px; }
.ca-commune:target h3 { background: linear-gradient(transparent 60%, rgba(255, 215, 0, 0.45) 60%); }
.ca-commune h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--encre); font-family: var(--titre); font-weight: 400; font-size: 24px; }
.ca-ou { font-family: var(--texte); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--encre-pale); }
.ca-commune h3 .compte { margin-left: auto; font-family: var(--texte); font-size: 13px; color: var(--encre-douce); }
.ca-personnes { list-style: none; margin: 0; padding: 0; }
.ca-personnes li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--filet); }
.ca-personnes a { font-size: 16px; text-decoration: none; }
.ca-personnes a:hover { text-decoration: underline; text-decoration-color: var(--or); text-underline-offset: 4px; }
.ca-patronyme { font-weight: 500; text-transform: uppercase; letter-spacing: 1px; font-size: 13.5px; }
.ca-personnes .etiquette { grid-column: 2; grid-row: 1; align-self: center; }
.ca-vie, .ca-lieu { grid-column: 1; font-size: 13px; color: var(--encre-douce); }
.ca-lieu { color: var(--encre-pale); }
#a-situer .ca-personnes { max-width: 640px; }
.ca-credit { margin: 72px 0 0; padding-top: 16px; border-top: 1px solid var(--filet); font-size: 12px; color: var(--encre-pale); }

/* --- Portrait, service militaire, légendes de photos --- */

.fiche-entete.avec-portrait { display: grid; grid-template-columns: auto 1fr; column-gap: 40px; align-items: center; }
.fiche-entete.avec-portrait > :not(.fiche-portrait) { grid-column: 2; }
.fiche-portrait { grid-column: 1; grid-row: 1 / span 6; margin: 0; text-align: center; }
.fiche-portrait img { display: block; width: 160px; height: 160px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--filet); box-shadow: 0 0 0 6px var(--blanc), 0 0 0 7px var(--or); }
.fiche-portrait a { display: block; border-radius: 50%; }
.fiche-portrait a:focus-visible { outline: 2px solid var(--or); outline-offset: 10px; }
.fiche-portrait figcaption { margin-top: 18px; font-size: 11px; letter-spacing: 1px; color: var(--encre-pale); }
.fiche-portrait figcaption a { display: inline; color: var(--encre-douce); }
.militaire-avis { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; padding: 14px 18px; background: var(--ivoire);
  border-left: 2px solid var(--or); font-size: 14.5px; line-height: 1.55; color: var(--encre-douce); }
.militaire-details { margin: 0 0 8px; display: grid; gap: 14px; }
.militaire-details div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--filet); }
.militaire-details dt { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--encre-pale); padding-top: 3px; }
.militaire-details dd { margin: 0; font-size: 15.5px; line-height: 1.55; }
.militaire.militaire-seul { grid-template-columns: 1fr; }
.a-verifier { margin: 24px 0 8px; padding: 18px 22px; border: 1px dashed var(--encre-douce); background: var(--blanc); }
.a-verifier-titre { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--encre); }
.a-verifier-titre::before { content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px;
  border-radius: 50%; background: var(--or); font-size: 11px; }
.a-verifier p:last-child { margin: 0; font-size: 15px; line-height: 1.6; color: var(--encre-douce); }
.nationalite-statut { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 13.5px; color: var(--encre-douce); }
.document-legende, .ga-legende { margin-top: 8px !important; font-size: 13px; line-height: 1.55; color: var(--encre-douce); }

/* --- Pages Pistes, Sources, Crédits --- */

.page-texte .ga-ouverture { padding-bottom: 40px; }
.tx-groupe { padding-top: 56px; }
.tx-groupe h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 20px; font-family: var(--titre); font-weight: 400; font-size: 28px; }
.tx-groupe h2 a { text-decoration: none; border-bottom: 1px solid var(--or); }
.tx-groupe h2 .compte { font-family: var(--texte); font-size: 13px; color: var(--encre-pale); }
.tx-sources, .tx-credits { margin-bottom: 40px; }
.source-personnes { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--encre-douce); }
.source-personnes a { color: var(--encre); text-decoration-color: var(--or); text-underline-offset: 3px; }
.source-sans-lien { flex: none; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--encre-pale); }
.tx-sources li:target { background: linear-gradient(90deg, rgba(255, 215, 0, 0.16), transparent 70%); }
.tx-detail { margin: 6px 0 0; max-width: 760px; font-size: 14.5px; line-height: 1.6; color: var(--encre-douce); }
.tx-credits li { display: block; }
.pied-liens { margin-top: 14px !important; }
.pied-liens a { color: var(--encre); text-decoration-color: var(--or); text-underline-offset: 3px; }

/* --- Chronologie des naissances --- */

.tl-ligne { position: relative; margin: 8px 0 24px; padding-top: 12px; }
.tl-points { position: relative; height: var(--hauteur); margin: 0 6px; }
.tl-point { position: absolute; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: var(--encre); border: 2px solid var(--blanc); box-shadow: 0 0 0 1px var(--encre); transition: transform 0.15s, background 0.15s; }
.tl-point.statut-probable, .tl-point.statut-hypothese { background: var(--blanc); box-shadow: 0 0 0 1px var(--encre-douce); border-style: dashed; }
.tl-point:hover, .tl-point:focus-visible, .tl-point[aria-expanded="true"] { background: var(--or); transform: scale(1.5); z-index: 2; outline: none; }
.tl-axe { position: relative; height: 34px; margin-bottom: 26px !important; margin: 0 6px; border-top: 1px solid var(--encre); }
.tl-annee { position: absolute; top: 0; transform: translateX(-50%); padding-top: 10px; font-size: 11px; letter-spacing: 1px; color: var(--encre-pale); }
.tl-annee::before { content: ""; position: absolute; top: 0; left: 50%; height: 6px; border-left: 1px solid var(--encre); }

.tl-liste { list-style: none; margin: 32px 0 40px; padding: 0 0 0 0; position: relative; }
.tl-liste::before { content: ""; position: absolute; top: 0; bottom: 0; left: 150px; border-left: 1px solid var(--filet-fort); }
.tl-decennie { position: relative; padding: 40px 0 10px 182px; }
.tl-decennie span { font-family: var(--titre); font-style: italic; font-size: 30px; color: var(--encre); }
.tl-decennie::before { content: ""; position: absolute; left: 145px; top: 56px; width: 11px; height: 11px; background: var(--or); transform: rotate(45deg); }
.tl-item, .tl-histoire { scroll-margin-top: 140px; }
.tl-item { position: relative; display: grid; grid-template-columns: 150px 1fr; padding: 12px 0; }
.tl-item::before { content: ""; position: absolute; left: 147px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--encre); }
.tl-item:target .tl-corps { background: linear-gradient(90deg, rgba(255, 215, 0, 0.22), transparent 80%); }
.tl-date { padding: 3px 20px 0 0; text-align: right; font-size: 12px; letter-spacing: 1px; color: var(--encre-douce); }
.tl-corps { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 0 12px 12px 32px; border-bottom: 1px solid var(--filet); }
.tl-nom { font-family: var(--titre); font-size: 20px; text-decoration: none; border-bottom: 1px solid transparent; }
.tl-nom:hover, .tl-nom:focus-visible, .tl-nom[aria-expanded="true"] { border-bottom-color: var(--or); outline: none; }
.tl-patronyme { font-family: var(--texte); font-size: 13px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; }
.tl-lieu { font-size: 13.5px; color: var(--encre-douce); }
.tl-infos { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.tl-branche { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--encre-pale); text-decoration: none; }
.tl-branche:hover { color: var(--encre); }

.tl-reperes { position: absolute; left: 0; right: 0; top: 36px; height: 12px; border-top: 1px dashed var(--filet); }
.tl-reperes::before { content: "Histoire"; position: absolute; right: 100%; top: -2px; margin-right: 12px; font-size: 9.5px;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--encre-pale); }
.tl-repere { position: absolute; top: -5px; width: 9px; height: 9px; margin-left: -4.5px; background: var(--or);
  border: 1px solid var(--encre); transform: rotate(45deg); }
.tl-repere.tunisie { background: #c8102e; }
.tl-repere:hover, .tl-repere:focus-visible { transform: rotate(45deg) scale(1.5); z-index: 3; outline: none; }
.tl-bascule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: 0 0 18px; font-size: 13px; color: var(--encre-douce); }
.tl-bascule label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.tl-bascule input { accent-color: var(--encre); }
.tl-legende { display: inline-flex; align-items: center; gap: 8px; }
.tl-repere-exemple { display: inline-block; width: 9px; height: 9px; margin-left: 6px; background: var(--or);
  border: 1px solid var(--encre); transform: rotate(45deg); }
.tl-repere-exemple.tunisie { background: #c8102e; }
.tl-histoire:not(.tl-decennie) { position: relative; display: grid; grid-template-columns: 150px 1fr; padding: 8px 0; }
.tl-histoire:not(.tl-decennie)::before { content: ""; position: absolute; left: 146px; top: 15px; width: 9px; height: 9px;
  background: var(--or); border: 1px solid var(--encre); transform: rotate(45deg); }
.tl-histoire .tl-date { color: var(--encre-pale); font-style: italic; }
.tl-evenement { margin: 0 0 0 32px; padding: 6px 14px 8px; background: var(--ivoire); border-left: 2px solid var(--or);
  font-family: var(--titre); font-style: italic; font-size: 16px; line-height: 1.45; color: var(--encre-douce); }
.tl-pays { margin-right: 10px; font-family: var(--texte); font-style: normal; font-size: 9.5px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--encre-pale); }
.tl-histoire:target .tl-evenement { background: rgba(255, 215, 0, 0.25); }
.page-texte:has(#voir-histoire:not(:checked)) .tl-histoire,
.page-texte:has(#voir-histoire:not(:checked)) .tl-reperes { display: none; }

.bulle-proches { position: fixed; z-index: 1000; width: 300px; max-width: calc(100vw - 24px); padding: 18px 20px 16px;
  background: var(--blanc); border: 1px solid var(--encre); box-shadow: var(--ombre); font-size: 13.5px; line-height: 1.45; }
.bulle-proches[hidden] { display: none; }
.bp-nom { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--or); font-family: var(--titre); font-size: 19px; }
.bp-groupe { margin-bottom: 10px; }
.bp-titre { margin: 0 0 3px; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre-pale); }
.bp-liste { margin: 0; }
.bp-groupe a { color: var(--encre); text-decoration: none; }
.bp-groupe a:hover { text-decoration: underline; text-decoration-color: var(--or); }
.bp-note { font-size: 12px; color: var(--encre-pale); }
.bp-vide { margin: 0; font-style: italic; color: var(--encre-pale); }
.bp-fiche { display: inline-block; margin-top: 4px; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--encre); }

/* --- Téléphone --- */

@media (max-width: 760px) {
  .barre { min-height: 0; padding: 0.7rem 16px 0.4rem; gap: 0.2rem 1rem; }
  .marque-nom { font-size: 18px; }
  .barre-infos { display: none; }
  .barre-commandes { margin-left: -0.6rem; max-width: calc(100% + 0.6rem); flex-wrap: wrap; row-gap: 0; }
  .barre-commandes .barre-page { margin-right: 0; padding: 0.45rem 0.6rem; font-size: 10.5px; }
  .barre-commandes button { font-size: 10.5px; padding: 0.45rem 0.6rem; white-space: nowrap; }
  .legende { left: 12px; right: 76px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; padding: 12px 16px; }
  .zoom { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .fiche { padding: 0 18px 72px; }
  .fiche-entete { padding-top: 44px; }
  .faits { margin-top: 44px; }
  .bloc { padding-top: 64px; }
  .militaire { grid-template-columns: 1fr; gap: 32px; }
  .frise li { grid-template-columns: 1fr; gap: 2px; }
  .sources li { flex-direction: column; gap: 10px; }
  .documents { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 16px; }
  .v-haut { padding: 10px 14px; }
  .v-titre { font-size: 15px; }
  .v-outils button { height: 36px; padding: 0 10px; font-size: 10px; }
  .v-aide { display: none; }
  .v-nav { width: 38px; height: 38px; margin-top: -19px; }
  .v-prec { left: 8px; }
  .v-suiv { right: 8px; }
  .page-fiche .barre-commandes { gap: 0.4rem; }
  .contenu { padding: 0 18px; }
  .fr-ouverture { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; padding-bottom: 56px; }
  .fr-encart { left: 16px; bottom: 16px; padding: 16px 20px; }
  .fr-encart-nombre { font-size: 32px; }
  .fr-citation { margin-top: 72px; padding: 72px 0; }
  .fr-bande { margin-top: 72px; padding: 64px 0 40px; }
  .fr-frise::before { left: 5px; }
  .fr-evt, .fr-evt.droite { width: auto; margin-left: 0; padding: 0 0 32px 32px; text-align: left; }
  .fr-evt.gauche::after, .fr-evt.droite::after { left: 0; right: auto; }
  .fr-annee, .fr-ecart { text-align: left; padding-left: 18px; }
  .fr-matricule { grid-template-columns: 1fr; gap: 32px; }
  .ga-ouverture { padding-top: 44px; }
  .ga-filtres { gap: 0 20px; margin-top: 32px; }
  .ga-filtres button { padding-bottom: 10px; font-size: 11px; }
  .galerie { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 36px 16px; }
  .galerie .ga-titre { font-size: 15px; }
  .br-cartes { grid-template-columns: 1fr; }
  .br-nom { font-size: 30px; }
  .arbre.arbre-integre { height: 64vh; }
  .arbre-outils { gap: 2px 16px; }
  .br-lieux { columns: 1; }
  .br-pistes li { grid-template-columns: 36px 1fr; font-size: 16px; }
  .ca-ouverture { grid-template-columns: 1fr; gap: 32px; }
  .ca-panneau { padding-top: 64px; }
  .ca-communes { grid-template-columns: 1fr; gap: 32px; }
  .fiche-entete.avec-portrait { grid-template-columns: 1fr; }
  .fiche-entete.avec-portrait > :not(.fiche-portrait) { grid-column: 1; }
  .fiche-portrait { grid-row: auto; justify-self: start; margin-bottom: 28px; }
  .fiche-portrait img { width: 120px; height: 120px; }
  .militaire-details div { grid-template-columns: 1fr; gap: 4px; }
  .tx-sources li { flex-direction: column; gap: 10px; }
  .tl-liste::before { left: 6px; }
  .tl-decennie { padding-left: 28px; }
  .tl-decennie::before { left: 1px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 28px; }
  .tl-item::before { left: 3px; top: 16px; }
  .tl-date { text-align: left; padding: 0 0 2px; }
  .tl-corps { padding: 0 0 12px; }
  .tl-infos { margin-left: 0; }
  .tl-point { width: 9px; height: 9px; margin-left: -4.5px; }
  .tl-histoire:not(.tl-decennie) { grid-template-columns: 1fr; padding-left: 28px; }
  .tl-histoire:not(.tl-decennie)::before { left: 1px; top: 4px; }
  .tl-evenement { margin-left: 0; }
  .ca-nom { font-size: 23px; stroke-width: 6px; }
  .ca-cadre text { font-size: 24px; }
  .ca-echelle text { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Choix du fond de carte (Leaflet) */
.ca-leaflet .leaflet-control-layers { border: 1px solid var(--filet-fort); border-radius: 0; box-shadow: none;
  background: rgba(255, 255, 255, 0.94); padding: 8px 12px; font-size: 12.5px; color: var(--encre); }
.ca-leaflet .leaflet-control-layers label { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; }
.ca-leaflet .leaflet-control-layers input { accent-color: var(--encre); margin: 0; }
@media (max-width: 760px) {
  .ca-leaflet .leaflet-control-layers { font-size: 11px; padding: 6px 8px; max-width: 150px; }
}
