/* =========================================================
   tree.css — Nouveau thème "Généalogie"
   - Background moderne (sans images)
   - Lisible avec ton vieux style de contenu
   - Responsive + mise en forme "arbre"
   ========================================================= */

/* ---------- Base ---------- */
:root{
  --bg-0:#0b0f14;
  --bg-1:#0f1a24;
  --card: rgba(255,255,255,.06);
  --card-2: rgba(255,255,255,.09);
  --stroke: rgba(255,255,255,.16);
  --stroke2: rgba(255,255,255,.10);

  --text:#e8eef6;
  --muted: rgba(232,238,246,.78);

  --link:#ffd6a5;
  --link2:#ffe7c8;

  --accent:#7ee787;   /* vert doux */
  --accent2:#60a5fa;  /* bleu doux */
  --danger:#ff6b6b;
}

*{ box-sizing:border-box; }

html, body{
  height:100%;
}

/* 1) Fond global fixe, sur toute la page (ne dépend plus de la hauteur) */
body {
  background: none !important;
  min-height: 100vh;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Mets ici TON background (ex: dégradé sombre) */
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(80,170,120,.16), transparent 60%),
    radial-gradient(900px 600px at 80% 30%, rgba(120,90,200,.14), transparent 55%),
    linear-gradient(180deg, #070a0f 0%, #0b101a 60%, #070a0f 100%);
}

/* 2) La carte ne “laisse plus voir” le footer dessous */
.card{
  background: rgba(10, 12, 16, 0.94); /* monte à 0.98 si tu veux quasi opaque */
}

/* 3) Le footer reste dans la même ambiance visuelle */
footer{
  background: transparent; /* ou rgba(10,12,16,0.35) si tu veux un bandeau */
  margin-top: 24px;
}

/* 4) Un peu d’air pour éviter l’impression de collage */
#main{
  padding-bottom: 24px;
}


/* ---------- Typo ---------- */
h1{
  margin: 10px 0 14px;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.12;
  letter-spacing: .2px;
  text-align: center;
  text-wrap: balance;
  font-family: "Cambria", "Georgia", serif;

  color: #f3f6ff;                 /* lisible sur fond foncé */
  text-shadow: 0 2px 14px rgba(0,0,0,.55);  /* léger relief */

  background: linear-gradient(180deg, #ffffff 0%, #cfd8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2{
  margin: 14px 0 8px;
  font-size: clamp(18px, 3vw, 26px);
  font-family: "Cambria", "Georgia", serif;
}

p, li{
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  margin: 10px 0;
}

/* Remplace l'ancien <font> sans casser le rendu */
font{
  font-family: inherit !important;
  color: inherit !important;
  font-size: inherit !important;
}

/* ---------- Liens ---------- */
a{
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.35);
}
a:hover{
  color: var(--link2);
  border-bottom-color: rgba(255,255,255,.75);
}

/* ---------- Blocs "card" généalogie ---------- */
.card{
  background: var(--card);
  border: 1px solid var(--stroke2);
  border-radius: 18px;
  padding: 14px;
  box-shadow:
    0 10px 30px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.06);
}

/* ---------- Arbre ---------- */
.tree{
  list-style:none;
  margin:0;
  padding:0;
}

.tree li{
  position:relative;
  padding: 10px 0 10px 20px;
}

/* Ligne verticale */
.tree li::before{
  content:"";
  position:absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.18);
}

/* Point */
.tree li::after{
  content:"";
  position:absolute;
  left: 4px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  outline: 2px solid rgba(0,0,0,.18);
}

/* La première entrée coupe la ligne au-dessus */
.tree > li:first-child::before{ top: 18px; }

/* Sous-liste */
.sublist{
  list-style:none;
  margin: 8px 0 0;
  padding: 0 0 0 14px;
}

/* Ligne horizontale discrète au niveau du point */
.sublist > li{
  padding-left: 20px;
}
.sublist > li::before{
  left: 8px;
}
.sublist > li::after{
  left: 4px;
}

/* ---------- Petits labels / badges ---------- */
.label{
  color: rgba(232,238,246,.65);
  font-size: .95em;
}

.row{
  display:flex;
  flex-wrap:wrap;
  gap: 8px 10px;
  align-items: baseline;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 2px 10px;
  border: 1px solid var(--stroke2);
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  color: rgba(232,238,246,.80);
  font-size: .92em;
  white-space: nowrap;
}

.badge.died .x{
  color: var(--danger);
}

.focus{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(126,231,135,.30);
  background: rgba(126,231,135,.10);
}

.focus .star{
  color: var(--accent);
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,.30);
  background: rgba(96,165,250,.12);
  color: rgba(232,244,255,.92);
  font-size: .92em;
  white-space: nowrap;
}

/* ---------- Compat classes que tu utilises ailleurs ---------- */
.ctr{ font-family: "Arial Black", Arial, sans-serif; color: var(--text); }

.ombre{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #fff; }
.ombreRed{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #ff6b6b; }
.ombreBlue{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #8bd3ff; }
.ombreBrown{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #ffcc99; }
.ombreGreen{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #7ee787; }
.ombrePink{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #ff7bd1; }
.ombreOrange{ text-shadow: 1px 1px 1px rgba(0,0,0,.8); color: #ffd6a5; }

.underline{ border-bottom: 2px solid rgba(255,107,107,.85); padding-bottom: 1px; }

.home{
  display:inline-block;
  font-family: "Cambria", "Georgia", serif;
  font-size: clamp(18px, 3vw, 26px);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(0,0,0,.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* ---------- Tables (au cas où tu en ajoutes plus tard) ---------- */
table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(0,0,0,.18);
}
td, th{
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px;
  color: var(--text);
  font-size: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px){
  #main{ padding: 16px 12px 34px; }
  .tree li{ padding-left: 18px; }
  .tree li::before{ left: 7px; }
  .tree li::after{ left: 3px; }
  .badge, .chip, .focus{ font-size: .88em; }
}
