#main-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

#family-tree {
    width: 100%;
    height: 100%;
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.alphabet-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.letter {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    border: 1px solid #000;
    cursor: pointer;
    user-select: none;
}


.letter:hover {
    background-color: #ddd;
}

.active-family {
  background-color: #137C8B;
  color: white;
  border-radius: 6px;
}


.person-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.person {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
}

.pagination {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

#prev,
#next {
    margin: 0 10px;
    padding: 5px 10px;
    cursor: pointer;
}

.btn-21 {

    font-weight: 400;
    line-height: 1.5;
    color: #137C8B;
    background-color: transparent;
    border: 1px #137C8B solid;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    border-radius: .25rem;
}


.btn-21 :hover {
    background-color: #137C8B;
    background: #137C8B;
    color: black;
}

/* ========== Améliorations globales pour écrans ≥ 1400px (ex: 16 pouces et plus) ========== */

@media screen and (min-width: 1400px) {

    .snippet-body {
        width: 200vh;
    }

    .person-list-container {
        height: 60vh;
    }
}


/** Style Arbre de famille **/

.view_menu {
    display: flex;
    /* margin-top: 1rem; */
    gap: 1rem;
}

#menu_first, #menu_second {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background-color: #f2f2f2;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

#menu_first:hover, #menu_second:hover {
    background-color: #e0e0e0;
}

.active-tab {
    background-color: #137C8B !important;
    color: white;
}


/**  DTree **/

.linage {
	    fill: none;
	    stroke: #000;
}
.marriage {
    fill: none;
    stroke: black;
}
/*.marriageNode {
        background-color: black;
        border-radius: 50%;
}
.male {
    background-color: lightblue;
        border-style: solid;
        border-width: 1px;
        box-sizing: border-box;
}
.female {
        background-color: pink;
        border-style: solid;
        border-width: 1px;
        box-sizing: border-box;
}
.person {
    background-color: lightblue;
        border-style: solid;
        border-width: 1px;
        box-sizing: border-box;
}*/
.emphasis{
        font-style: italic;
}
p {
    padding:0;
    margin:0;
}
svg {
    border-style: solid;
    border-width: 1px;
}

/***********/
foreignObject, foreignObject div {
    cursor: pointer !important;
    /*overflow: visible;*/
}
foreignObject.marriageNode {
        /*background-color: black;*/
        border-radius: 50%;
        border: 1px solid;
}
div.marriageNode {
    /*background-color: black;*/
    /*margin-left: -10px;
    margin-top: -10px;*/
    border-radius: 50%;
    /*width: 20px;
    height: 20px;*/
    background-image: url('../resources/minus.svg'); /* par défaut, le "+" */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    background-color: white;
}

/* Quand le nœud est “ouvert”, on affiche un “−” */
div.marriageNode.collapsed {
    background-image: url('../resources/plus.svg');
}

/* .person {
    background-color: lightblue;
        border-style: solid;
        border-width: 1px;
        box-sizing: border-box;
} */
.person-node {
    display: flex;
    background-color: #f0f4f8;      /* fond neutre moderne */
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px;
    box-sizing: border-box;
    font-family: sans-serif;
    text-align: center;
    cursor: pointer;    
}
div.person-node {
    border: none;
}

.main-person {
    border: 10px solid #137C8B !important; /* bordure plus épaisse et colorée pour la personne principale */
    background-color: #e6f7fa !important; /* fond légèrement différent pour la personne principale */
}

.person-gender {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 2px;
    align-self: end;
}

.person-name {
    font-weight: 600;
    margin: 0;
    padding: 0;
}

foreignObject.toggle-button {
border-radius: 50%;
border: 1px solid;
}
div.toggle-button {
    border-radius: 50%;
    background-image: url('../resources/minus.svg'); /* par défaut, le "+" */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    background-color: white;
    cursor: pointer;
}
div.toggle-button.toggled {
    background-image: url('../resources/plus.svg');
}


@media screen  and (min-width: 500px) {

    .main {
        display: flex;
        height: calc(100vh - 110px);
        flex-direction: column;
        width: calc(100vw - 110px);
    }
    
}