.famille-manager { max-width:1400px; margin:2rem auto; padding:2rem; }
.famille-header { text-align:center; margin-bottom:2rem; padding-bottom:1.5rem; border-bottom:2px solid #e9ecef; }
.famille-header h1 { font-size:2rem; color:#1a1a1a; margin-bottom:.5rem; font-family:'Aboreto',serif; font-weight:400; }
.famille-header p { font-size:1rem; color:#6c757d; }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:1rem; margin-bottom:2rem; }
.stat-box { background:#fff; padding:1.25rem; border-radius:10px; border-left:4px solid #007bff; box-shadow:0 2px 8px rgba(0,0,0,.06); transition:transform .3s; }
.stat-box:hover { transform:translateY(-2px); }
.stat-box.gen1 { border-left-color:#fbbf24; }
.stat-box.gen2 { border-left-color:#3b82f6; }
.stat-box.gen3 { border-left-color:#22c55e; }
.stat-box.gen4 { border-left-color:#ec4899; }
.stat-label { display:block; font-size:.82rem; color:#6c757d; text-transform:uppercase; letter-spacing:.5px; font-weight:600; margin-bottom:.35rem; }
.stat-value { display:block; font-size:2rem; font-weight:700; color:#1a1a1a; }
.legend { display:flex; gap:1.5rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.legend-item { display:flex; align-items:center; gap:.5rem; font-size:.82rem; color:#555; }
.legend-dot { width:18px; height:18px; border-radius:6px; flex-shrink:0; }
.leg-root { background:linear-gradient(135deg,#667eea,#764ba2); }
.leg-member { background:#007bff; }
.leg-protect { border:2px solid #ffc107; background:#fff; }
.tree-section { background:#fff; border-radius:14px; padding:2rem; box-shadow:0 4px 16px rgba(0,0,0,.08); margin-bottom:2.5rem; }
.tree-section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.5rem; padding-bottom:1rem; border-bottom:2px solid #e9ecef; }
.tree-section-header h2 { font-family:'Aboreto',serif; font-weight:400; font-size:1.3rem; color:#333; }
.tree-controls { display:flex; gap:.75rem; }
.btn-control { padding:.6rem 1.2rem; background:#007bff; color:#fff; border:none; border-radius:8px; cursor:pointer; font-size:.9rem; font-weight:600; transition:all .3s; }
.btn-control:hover { background:#0056b3; transform:translateY(-1px); }
.btn-control.secondary { background:#6c757d; }
.btn-control.secondary:hover { background:#5a6268; }
#tree-wrapper { overflow-x:auto; padding:1rem .5rem 2rem; -webkit-overflow-scrolling:touch; }
#tree-content { position:relative; }
#tree-svg { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; overflow:visible; z-index:0; }
.tree-layout { display:flex; flex-direction:column; align-items:center; min-width:980px; position:relative; z-index:1; }
.tree-level-label { font-size:.7rem; letter-spacing:1.5px; text-transform:uppercase; color:#94a3b8; margin:.5rem 0 .4rem; font-family:'Aboreto',serif; }
.tree-spacer { height:60px; flex-shrink:0; }
.tree-row { display:flex; justify-content:center; align-items:flex-start; gap:40px; }
.tree-branch { display:flex; flex-direction:column; align-items:center; }
.couple-node { display:inline-flex; align-items:flex-start; gap:6px; background:rgba(255,255,255,.85); border-radius:14px; padding:8px 12px 12px; box-shadow:0 4px 16px rgba(0,0,0,.1); }
.union-heart { font-size:1.2rem; color:#d4af37; align-self:center; flex-shrink:0; }
.tree-card { display:flex; flex-direction:column; align-items:center; text-align:center; width:140px; padding:10px 8px 12px; border-radius:12px; border:2px solid #e9ecef; box-shadow:0 2px 8px rgba(0,0,0,.09); transition:transform .2s,box-shadow .2s,border-color .2s; background:#fff; }
.tree-card:hover { transform:translateY(-3px); box-shadow:0 6px 18px rgba(0,123,255,.18); border-color:#007bff; }
.tree-card.root { background:linear-gradient(135deg,#ede9fe,#ddd6fe); border-color:#a78bfa; }
.tree-card.root:hover { border-color:#7c3aed; }
.card-avatar { width:60px; height:60px; border-radius:50%; object-fit:cover; margin-bottom:8px; border:3px solid rgba(255,255,255,.7); box-shadow:0 2px 8px rgba(0,0,0,.12); }
.badge-root { display:inline-block; background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; font-size:.62rem; padding:2px 6px; border-radius:8px; margin-bottom:4px; font-weight:600; }
.card-name { font-family:'Aboreto',serif; font-size:.72rem; font-weight:600; color:#1e293b; line-height:1.3; word-break:break-word; margin-bottom:2px; }
.card-meta { font-size:.65rem; color:#64748b; }
.deceased-chip { display:inline-block; background:#374151; color:#f9fafb; font-size:.6rem; padding:2px 5px; border-radius:6px; margin-top:3px; }
.card-admin-btns { display:flex; gap:3px; margin-top:6px; }
.card-admin-btns button { border:none; border-radius:5px; padding:3px 7px; font-size:.7rem; cursor:pointer; transition:all .2s; }
.btn-edit-sm { background:#e0f2fe; color:#0369a1; }
.btn-delete-sm { background:#fee2e2; color:#b91c1c; }
.btn-edit-sm:hover { background:#bae6fd; }
.btn-delete-sm:hover { background:#fecaca; }
.btn-avatar-sm { background:#f3f4f6; color:#374151; }
.btn-avatar-sm:hover { background:#e5e7eb; }
.section-title { display:flex; justify-content:space-between; align-items:center; margin:2.5rem 0 1.5rem; padding-bottom:.75rem; border-bottom:2px solid #e9ecef; }
.section-title h2 { font-family:'Aboreto',serif; font-weight:400; font-size:1.2rem; color:#333; }
.btn-add { display:inline-flex; align-items:center; gap:.5rem; padding:.65rem 1.4rem; background:linear-gradient(135deg,#007bff,#0056b3); color:#fff; border:none; border-radius:8px; font-size:.9rem; font-weight:600; cursor:pointer; transition:all .3s; box-shadow:0 2px 8px rgba(0,123,255,.2); }
.btn-add:hover { background:linear-gradient(135deg,#0069d9,#004085); transform:translateY(-1px); }
.controls-bar { display:flex; gap:1rem; align-items:center; margin-bottom:1.5rem; flex-wrap:wrap; }
.search-box { position:relative; flex:1; max-width:400px; }
.search-box input { width:100%; padding:.7rem 2.5rem .7rem 1rem; border:2px solid #e0e0e0; border-radius:8px; font-size:.95rem; transition:all .3s; }
.search-box input:focus { outline:none; border-color:#007bff; box-shadow:0 0 0 3px rgba(0,123,255,.1); }
.search-icon { position:absolute; right:.75rem; top:50%; transform:translateY(-50%); color:#999; }
.members-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.5rem; margin-bottom:2rem; }
.member-card { background:#fff; border-radius:16px; padding:0; box-shadow:0 4px 12px rgba(0,0,0,.08); transition:all .3s; display:flex; flex-direction:column; border:2px solid transparent; overflow:hidden; }
.member-card:hover { box-shadow:0 12px 32px rgba(0,123,255,.15); transform:translateY(-5px); border-color:#007bff; }
.member-card.protected { background:linear-gradient(135deg,#fff9e6,#fff); border-color:#ffc107; }
.member-card.protected:hover { border-color:#ff9800; }
.card-photo { width:100%; height:190px; overflow:hidden; }
.card-photo img { width:100%; height:100%; object-fit:cover; }
.card-body { padding:.75rem 1.25rem 0; }
.card-top-badges { display:flex; flex-wrap:wrap; gap:.4rem; min-height:1.4rem; margin-bottom:.6rem; }
.badge { display:inline-flex; align-items:center; gap:.3rem; padding:.3rem .65rem; border-radius:20px; font-size:.72rem; font-weight:600; text-transform:uppercase; }
.badge-principal { background:linear-gradient(135deg,#ffd700,#ffed4e); color:#333; }
.badge-racine { background:linear-gradient(135deg,#ff9800,#f57c00); color:#fff; }
.member-card h3 { font-size:1.1rem; color:#1a1a1a; margin:0 0 .6rem; font-weight:600; }
.member-card p { font-size:.87rem; color:#6c757d; display:flex; align-items:center; gap:.4rem; margin:.25rem 0; }
.pi { color:#007bff; }
.card-actions { display:flex; gap:.6rem; margin-top:.75rem; padding:1rem 1.25rem; border-top:1px solid #f0f0f0; flex-wrap:wrap; }
.card-actions button { flex:1; min-width:70px; padding:.45rem .65rem; border:none; border-radius:7px; cursor:pointer; font-size:.82rem; font-weight:600; transition:all .3s; }
.btn-edit   { background:linear-gradient(135deg,#007bff,#0056b3); color:#fff; }
.btn-edit:hover { background:linear-gradient(135deg,#0056b3,#004085); transform:translateY(-1px); }
.btn-delete { background:linear-gradient(135deg,#dc3545,#c82333); color:#fff; }
.btn-delete:hover { background:linear-gradient(135deg,#c82333,#a71d2a); transform:translateY(-1px); }
.btn-avatar { background:linear-gradient(135deg,#6c757d,#495057); color:#fff; }
.btn-avatar:hover { background:linear-gradient(135deg,#495057,#343a40); transform:translateY(-1px); }
