body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    margin: 0; 
    background-color: #f4f7f6; 
    overflow: hidden; 
}

#arbre-svg { 
    width: 100vw; 
    height: 100vh; 
    cursor: grab; 
}

#arbre-svg:active { 
    cursor: grabbing; 
}

/* Lignes de liaisons parentales et couples */
.lien-pere { fill: none; stroke: #3498db; stroke-width: 1.5px; opacity: 0.7; }
.lien-mere { fill: none; stroke: #e74c3c; stroke-width: 1.5px; opacity: 0.7; }
.lien-Maries { fill: none; stroke: #2ecc71; stroke-width: 4px; }
.lien-Divorces { fill: none; stroke: #95a5a6; stroke-width: 3px; stroke-dasharray: 5,5; }

/* Éléments des cartes membres */
.noeud { cursor: pointer; }

.rect-membre { 
    fill: white; 
    stroke-width: 2px; 
    rx: 6px; 
    ry: 6px; 
    transition: fill 0.2s; 
}

.noeud:hover .rect-membre { 
    fill: #f8f9fa; 
}

/* Bordures colorées des cartes selon le genre */
.rect-membre.M { stroke: #2b6cb0; }
.rect-membre.F { stroke: #b83280; }

/* Ajustements textes de la carte */
.t-nom { font-weight: 600; font-size: 11px; fill: #1a202c; }
.t-date { font-size: 9px; fill: #718096; }

/* Le bouton flèche en haut à gauche */
.btn-focus-cadre rect {
    fill: #ffffff;
    stroke: #cbd5e0;
    stroke-width: 1px;
    transition: all 0.2s ease;
}

.btn-focus-cadre text {
    font-size: 10px;
    font-weight: bold;
    fill: #718096;
    transition: all 0.2s ease;
}

/* Effet d'aspiration / glissement vers le haut gauche au survol */
.btn-focus-cadre:hover rect {
    fill: #2d3748 !important;
    stroke: #1a202c !important;
    transform: translate(-1px, -1px); /* Légère animation de glissement */
}

.btn-focus-cadre:hover text {
    fill: #ffffff !important;
    transform: translate(-1px, -1px);
}

/* Styles de la fenêtre modale */
.modale-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); z-index: 100;
    display: flex; justify-content: center; align-items: center;
    visibility: hidden; opacity: 0; transition: all 0.3s ease;
}

.modale-overlay.active { 
    visibility: visible; 
    opacity: 1; 
}

.modale-fenetre {
    background: white; padding: 25px; border-radius: 8px;
    width: 340px; max-height: 90vh; overflow-y: auto; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative; animation: pop 0.3s ease;
}

@keyframes pop { 
    from { transform: scale(0.8); } 
    to { transform: scale(1); } 
}

.modale-titre { 
    margin: 0 0 15px 0; 
    font-size: 18px; 
    color: #2c3e50; 
    border-bottom: 2px solid #f4f7f6; 
    padding-bottom: 8px; 
}

.form-group { 
    margin-bottom: 12px; 
}

.form-group label { 
    display: block; 
    font-size: 12px; 
    margin-bottom: 4px; 
    color: #7f8c8d; 
    font-weight: bold; 
}

.form-group input, .form-group select { 
    width: 100%; 
    padding: 8px; 
    border: 1px solid #bdc3c7; 
    border-radius: 4px; 
    box-sizing: border-box; 
}

/* Boutons d'actions de la modale */
.boutons-actions { 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    margin-top: 20px; 
}

.btn { 
    padding: 8px 15px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: bold; 
}

.btn-annuler { 
    background: #e2e8f0; 
    color: #4a5568; 
}

.btn-sauver { 
    background: #2ecc71; 
    color: white; 
}