/* AncestroWeb — Styles d’origine, cascade conservée. */

   :root {
    font-family: system-ui,-apple-system,Segoe UI,sans-serif;
    color: #22352c;
    background: #f6f5ef;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 1250px;
}

header {
    background: #193e34;
    color: #fff;
    padding: 20px max(20px,calc((100vw - 1200px)/2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

h1 {
    font: 600 30px Georgia,serif;
    margin: 0;
}

header p {
    margin: 5px 0;
    color: #cbded2;
}

button,input,select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: #2e6953;
    color: #fff;
    border-radius: 10px;
    padding: 11px 16px;
    min-height: 42px;
}

button:hover {
    background: #1c4c3b;
}

.ghost {
    background: #e8eee8;
    color: #244536;
}

.ghost:hover {
    background: #d8e4db;
}

main {
    max-width: 1200px;
    margin: auto;
    padding: 10px 20px 28px;
    min-width: 0;
}

h2 {
    font: 600 28px Georgia,serif;
    margin: 0 0 14px;
}

h3 {
    margin: 0 0 12px;
}

p {
    line-height: 1.5;
}

.panel,.card {
    background: #fff;
    border: 1px solid #e0e5de;
    border-radius: 17px;
    padding: 22px;
    margin: 0 0 18px;
    box-shadow: 0 3px 14px #172b1c0b;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,270px),1fr));
    gap: 16px;
}

/* Liste des généalogies : deux cartes maximum par ligne. */
#cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) {
    #cards { grid-template-columns: minmax(0, 1fr); }
}

.card {
    margin: 0;
}

.card h3 {
    font: 600 24px Georgia,serif;
}

.muted {
    color: #68756d;
}

.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 14px 0;
}

input,select {
    border: 1px solid #cbd6cc;
    border-radius: 9px;
    padding: 11px;
    background: #fff;
    min-width: 0;
    max-width: 100%;
}

input[type=file] {
    width: 100%;
}

label {
    display: block;
    font-weight: 600;
    margin: 13px 0 5px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr));
    gap: 14px;
}

.hidden {
    display: none !important;
}

.people {
    display: grid;
    grid-template-columns: minmax(210px,290px) minmax(0,1fr);
    gap: 18px;
}

.list {
    max-height: 650px;
    overflow: auto;
}

.person-link {
    display: block;
    width: 100%;
    margin: 4px 0;
    text-align: left;
    background: #f1f5f0;
    color: #244737;
}

.person-link:hover {
    background: #dce8dd;
}

.badge {
    display: inline-block;
    background: #e5eee5;
    color: #285a3f;
    padding: 5px 10px;
    border-radius: 99px;
    font-size: 13px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr));
    gap: 12px;
}

.grid>div {
    background: #f7f9f5;
    padding: 12px;
    border-radius: 10px;
}

.relative {
    display: inline-block;
    margin: 4px 6px 4px 0;
}

#notice {
    padding: 12px 15px;
    border-radius: 10px;
    background: #e9f2e9;
    margin-bottom: 18px;
    white-space: pre-wrap;
}

#notice.error {
    background: #ffe9e6;
    color: #8a261d;
}

footer {
    text-align: center;
    padding: 30px;
    color: #6d786e;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #9dbbad;
    border-radius: 9px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.header-links a:hover,.header-links a:focus-visible {
    background: #2e6953;
}

#search {
    width: 100%;
}

@media(max-width:700px) {
    .people {
        grid-template-columns: 1fr;
    }
    
    .list {
        max-height: 230px;
    }
    
    header {
        padding: 18px;
    }
    
    h1 {
        font-size: 25px;
    }
    
    main {
        padding: 8px 16px 16px;
    }
    
    .panel {
        padding: 16px;
    }
}

.pcm-parents {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 4px 0 16px;
    position: relative;
}

.pcm-parent {
    border: 1px solid #d7e3db;
    border-radius: 12px;
    padding: 6px 9px;
    background: #f3f7f2;
    min-width: 0;
}

/* Icônes de sexe : le symbole suit le sexe réel de chaque parent. */
.pcm-parent-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1px;
    font-weight: 700;
    color: #416653;
}
.pcm-sex-icon {
    display: inline-block;
    font-family: "DejaVu Sans", "Segoe UI Symbol", sans-serif;
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
}
.pcm-sex-icon.male { color: #53a8e8; }
.pcm-sex-icon.female { color: #e96b9b; }
.pcm-sex-icon.unknown { color: #71817a; }

.pcm-parent>small {
    display: block;
    font-weight: 700;
    color: #416653;
    margin-bottom: 5px;
}

.pcm-parent-link {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #183e30;
    cursor: pointer;
    white-space: normal;
    padding: 1px 4px;
}

.pcm-parent-link:hover,.pcm-parent-link:focus-visible {
    background: #e3eee6;
    color: #183e30;
    outline: 2px solid #2e6953;
    outline-offset: 1px;
}

.pcm-parent-link small {
    display: block;
    font-size: 12px;
    color: #576c60;
    margin-top: 2px;
}

.pcm-union {
    border: 1px solid #d6e3db;
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0;
    background: #f7faf6;
}

.pcm-union p {
    margin: 6px 0 12px;
}

@media(max-width:520px) {
    .pcm-parents {
        grid-template-columns: 1fr;
    }
}

/* Liste des individus à droite, compacte et défilante comme dans MFT. */
.people {
    grid-template-columns: minmax(0, 1fr) minmax(225px, 260px);
    align-items: start;
    gap: 14px;
}

.people > #profile {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.people > .pcm-people-sidebar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 12px;
    /* La hauteur est synchronisée avec la fiche à gauche. */
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 13px;
}

.pcm-people-sidebar h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.pcm-people-sidebar #addPerson {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 13px;
    margin-bottom: 7px !important;
}

.pcm-people-sidebar #search {
    flex: 0 0 auto;
    padding: 8px;
    font-size: 13px;
    margin-bottom: 7px;
}

.pcm-people-sidebar .list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.pcm-people-sidebar .person-link {
    margin: 0;
    padding: 7px 8px;
    min-height: 34px;
    border-radius: 0;
    border-bottom: 1px solid #dce5dd;
    background: transparent;
    color: #244737;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}


/* Icône du sexe dans la liste : taille identique à celle des caractères. */
.pcm-people-sidebar .person-link .pcm-list-sex {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 6px;
    vertical-align: -0.12em;
    object-fit: contain;
    background: transparent;
}
.pcm-people-sidebar .person-link .pcm-list-sex-unknown {
    display: inline-block;
    width: 1em;
    margin-right: 6px;
    color: #71817a;
    text-align: center;
}

/* Individu ouvert : premier dans la liste et clairement mis en évidence. */
.pcm-people-sidebar .person-link.pcm-selected-person {
    font-weight: 800;
    background: #dce8dd;
    color: #193e34;
}

.pcm-people-sidebar .person-link:hover,
.pcm-people-sidebar .person-link:focus-visible {
    background: #e3eee6;
}

@media (max-width: 700px) {
    .people {
        grid-template-columns: minmax(0, 1fr);
    }

    .people > #profile {
        grid-column: 1;
        grid-row: 2;
    }

    .people > .pcm-people-sidebar {
        grid-column: 1;
        grid-row: 1;
        position: static;
        height: 310px;
        min-height: 0;
    }
}
  
/* Le bouton Import du bandeau reste disponible dans le DOM, mais invisible. */
#showImport { display: none !important; }

/* Barre de l'arbre : titre à gauche, actions à droite. */
.pcm-tree-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.pcm-tree-toolbar #treeTitle {
    flex: 1 1 220px;
    min-width: 0;
    margin: 0;
}

/* Liste de sexe personnalisée : véritables images fournies par l'utilisateur. */
.pcm-native-sex {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.pcm-sex-listbox { position: relative; width: 100%; }
.pcm-sex-listbox summary {
    display: flex;
    align-items: center;
    min-height: 39px;
    gap: 9px;
    padding: 6px 12px;
    border: 1px solid #cbd5ce;
    border-radius: 9px;
    background: white;
    cursor: pointer;
    list-style-position: inside;
}
.pcm-sex-listbox summary img, .pcm-sex-choices img {
    width: 20px;
    height: 23px;
    object-fit: contain;
    vertical-align: middle;
}
.pcm-sex-choices {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    right: 0;
    padding: 5px;
    border: 1px solid #cbd5ce;
    border-radius: 9px;
    background: white;
    box-shadow: 0 5px 14px #0002;
}
.pcm-sex-choices button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 10px;
    text-align: left;
    background: white;
    color: #244737;
    border: 0;
    cursor: pointer;
}
.pcm-sex-choices button:hover, .pcm-sex-choices button:focus { background: #eef5ef; }

/* Icône de sexe sur la fiche, alignée sur la taille du libellé. */
.pcm-fiche-sexe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pcm-fiche-sexe .pcm-list-sex {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    object-fit: contain;
}
.pcm-fiche-sexe .pcm-list-sex-unknown {
    display: inline-flex;
    width: 15px;
    justify-content: center;
}

/* Événements : liste déroulante à droite du titre, sans cadre supplémentaire. */
#profile .pcm-event-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e3e9e4;
    margin-bottom: 10px;
}
#profile .pcm-event-heading h3 {
    border: 0;
    margin: 0;
}
#profile .pcm-event-heading select {
    width: min(250px, 48%);
    min-width: 150px;
    font-size: 13px;
    padding: 7px;
}
#profile .pcm-event-form {
    display: grid;
    grid-template-columns: minmax(125px, 1fr) minmax(190px, 1.7fr) minmax(190px, 1.7fr);
    gap: 10px;
    margin-top: 12px;
}
@media (max-width: 680px) {
    #profile .pcm-event-form { grid-template-columns: 1fr; }
}

#profile .pcm-event-form.hidden {
    display: none;
}
#profile .pcm-event-form label {
    font-size: 13px;
}
#profile .pcm-event-form input {
    width: 100%;
    box-sizing: border-box;
}
#profile .pcm-event-form .toolbar {
    grid-column: 1 / -1;
}

/* En-tête Événements : titre non souligné et sélecteur centré verticalement. */
#profile .pcm-events .pcm-event-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 12px;
    padding-bottom: 7px;
}
#profile .pcm-events .pcm-event-heading h3 {
    display: flex;
    align-items: center;
    align-self: center;
    margin: 0;
    padding: 0;
    border: none;
    text-decoration: none;
    line-height: 1.3;
}
#profile .pcm-events .pcm-event-heading select {
    align-self: center;
    margin: 0;
    box-sizing: border-box;
}

/* Une ligne par événement, avec un petit bouton centré verticalement. */
#profile .pcm-event-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
}
#profile .pcm-event-line p {
    flex: 1;
    min-width: 0;
    margin: 0;
}
#profile .pcm-edit-event {
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
    min-height: 0;
    height: 22px;
    margin: 0;
    padding: 1px 7px;
    font-size: 11px;
    line-height: 18px;
    border-radius: 6px;
}

/* Suppression d’un événement : bouton compact entre localisation et modification. */
#profile .pcm-delete-event {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
    min-height: 0;
    padding: 0;
    border-radius: 6px;
    font-size: 13px;
}

/* Bouton Google Maps pour les événements comportant un lieu. */
#profile .pcm-map-event {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
    min-height: 0;
    padding: 0;
    border-radius: 6px;
    background: #e8eee8;
    color: #244536;
    text-decoration: none;
    font-size: 14px;
}
#profile .pcm-map-event:hover,
#profile .pcm-map-event:focus-visible { background: #d8e4db; }

/* Page généalogie : supprimer la marge vide à gauche sans toucher aux boutons. */
main:has(#tree:not(.hidden)) {
    max-width: none;
    width: auto;
    margin-left: 12px;
    margin-right: 12px;
}
@media (max-width: 760px) {
    main:has(#tree:not(.hidden)) {
        margin-left: 4px;
        margin-right: 4px;
    }
}

/* Navigation latérale : hauteur calée sur la fiche individuelle, sans modifier les boutons. */
#tree .pcm-tree-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
#tree .pcm-main-menu {
    align-self: start;
    margin: 0;
    padding: 12px 9px;
    background: #e3eee4;
    min-height: 0;
    box-sizing: border-box;
}
/* Liens Contact et À propos au bas du panneau Navigation. */
#tree .pcm-main-menu {
    display: flex;
    flex-direction: column;
}
#tree .pcm-menu-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 16px;
}
/* Espacement identique entre les trois commandes du bas. */
#tree .pcm-menu-bottom > button,
#tree .pcm-menu-bottom > a {
    margin-bottom: 0;
}
#tree .pcm-menu-bottom #pcmMenuUsers {
    margin-bottom: 0;
}
#tree .pcm-menu-bottom #pcmMenuUsers.hidden {
    display: none;
}
/* Contact et À propos reprennent exactement le style des boutons Navigation. */
#tree .pcm-menu-bottom a {
    display: block;
    width: 100%;
    margin: 0 0 9px;
    padding: 9px 6px;
    min-height: 42px;
    box-sizing: border-box;
    border: 0;
    border-radius: 10px;
    background: #2e6953;
    color: #fff;
    font: inherit;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
}
#tree .pcm-menu-bottom a:hover,
#tree .pcm-menu-bottom a:focus-visible {
    background: #1c4c3b;
}
#tree .pcm-main-menu h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: #25483b;
}
#tree .pcm-main-menu button {
    display: block;
    width: 100%;
    margin: 0 0 9px;
    padding: 9px 6px;
    text-align: left;
    white-space: normal;
}
/* Un seul espacement géré par gap : annule la marge générale des boutons. */
#tree .pcm-main-menu .pcm-menu-bottom > button,
#tree .pcm-main-menu .pcm-menu-bottom > a {
    margin: 0;
}
#tree .pcm-tree-content { min-width: 0; }
#tree #pcmMenuView { margin-top: 14px; }
#tree .pcm-catalogue-table { width: 100%; border-collapse: collapse; }
#tree .pcm-catalogue-table th,
#tree .pcm-catalogue-table td { padding: 7px 9px; border-bottom: 1px solid #e3ebe4; text-align: left; }
#tree .pcm-catalogue-table th { color: #25483b; }
@media (max-width: 760px) {
    #tree .pcm-tree-layout { grid-template-columns: 1fr; }
    #tree .pcm-main-menu { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; height: auto; }
    #tree .pcm-main-menu h3 { width: 100%; margin-bottom: 2px; }
    #tree .pcm-main-menu button,
    #tree .pcm-menu-bottom a { width: auto; margin: 0; }
    #tree .pcm-menu-bottom { width: 100%; flex-direction: row; margin-top: 0; padding-top: 0; }
}

/* Sur smartphone seulement : Navigation après le contenu de la généalogie. */
@media (max-width: 760px) {
  #tree .pcm-tree-layout { display: flex; flex-direction: column; }
  #tree .pcm-tree-content { order: 1; width: 100%; }
  #tree .pcm-main-menu { order: 2; width: 100%; }
}

/* Sur smartphone : navigation compacte, boutons alignés et largeur homogène. */
@media (max-width: 760px) {
    #tree .pcm-main-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        height: auto !important;
    }
    #tree .pcm-main-menu h3 {
        width: auto;
        margin-bottom: 10px;
    }
    #tree .pcm-main-menu > button,
    #tree .pcm-menu-bottom > button,
    #tree .pcm-menu-bottom > a {
        display: block;
        width: 100%;
        min-height: 42px;
        margin: 0 0 9px;
        text-align: left;
        box-sizing: border-box;
    }
    #tree .pcm-menu-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        margin-top: 12px;
        padding-top: 0;
    }
    #tree .pcm-menu-bottom > button:last-child,
    #tree .pcm-menu-bottom > a:last-child {
        margin-bottom: 0;
    }
}

/* Catalogue des événements : fenêtre modale centrée et liste défilante. */
#pcmCatalogueModal:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 11001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(18, 39, 31, 0.48);
}
#pcmCatalogueModal .pcm-catalogue-dialogue {
    display: flex;
    flex-direction: column;
    width: min(660px, 100%);
    max-height: 85vh;
    padding: 20px;
    background: #fff;
    border: 1px solid #cddbd2;
    border-radius: 13px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}
#pcmCatalogueModal .pcm-catalogue-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
#pcmCatalogueModal .pcm-catalogue-entete h3 { margin: 0; }
#pcmCatalogueModal .pcm-catalogue-corps {
    overflow: auto;
    min-height: 0;
}
#pcmCatalogueModal .pcm-catalogue-table { width: 100%; }

/* Impression : n'imprimer que la fiche individuelle, sans le bandeau ni la navigation. */
@media print {
    @page { size: auto; margin: 12mm; }
    html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
    body > header, body > footer, #notice,
    #setup, #login, #home, #pcmOverlay, #pcmWindow,
    #tree > .pcm-tree-toolbar, #tree .pcm-main-menu,
    #tree .pcm-people-sidebar, #tree #importPanel,
    #tree #repairPanel, #tree #individualPanel,
    #tree #pcmMenuView, #pcmCatalogueModal, #pcmAttenteGraphiques {
        display: none !important;
    }
    main, #tree, #tree .pcm-tree-layout, #tree .pcm-tree-content,
    #tree .people, #tree #profile {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        position: static !important;
        box-shadow: none !important;
    }
    #tree #profile { border: 0 !important; background: #fff !important; }
    #tree #profile .toolbar, #tree #profile button,
    #tree #profile select, #tree #profile form,
    #tree #profile #rootCheckbox,
    #tree #profile label:has(#rootCheckbox) { display: none !important; }
    #tree #profile .pcm-section { break-inside: avoid-page; }
}

/* Commandes de conjoint alignées sur la rubrique Événements. */
#profile .pcm-family-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 12px;
    border-bottom: 1px solid #e3e9e4;
    padding-bottom: 7px;
    margin-bottom: 10px;
}
#profile .pcm-family-heading h3 {
    display: flex;
    align-items: center;
    align-self: center;
    border: 0;
    text-decoration: none;
    padding: 0;
    margin: 0;
    line-height: 1.3;
}
#profile .pcm-family-heading select {
    width: min(250px, 48%);
    min-width: 150px;
    font-size: 13px;
    padding: 7px;
    margin: 0;
    box-sizing: border-box;
    align-self: center;
}
#profile .pcm-union-actions { display:inline-flex; gap:6px; flex-wrap:wrap; margin-left:0; vertical-align:middle; }
#profile .pcm-union-actions button { font-size:12px; padding:4px 8px; }
#profile .pcm-spouse-editor { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:8px 0; }
#profile .pcm-spouse-editor select { width:auto; max-width:100%; }
#profile .pcm-children-label { display:inline-block; margin-left:16px; font-weight:400; vertical-align:middle; }
/* Même trait horizontal sous le titre et la liste que dans Événements. */
#profile .pcm-family .pcm-family-heading {
    border-bottom: 1px solid #e3e9e4;
    padding-bottom: 7px;
    margin: 0 0 10px;
}
#profile .pcm-family .pcm-family-heading h3 {
    border: 0;
    padding: 0;
    margin: 0;
    text-decoration: none;
}

/* Choix de lieux : fenêtre dédiée, sans toucher aux événements existants. */
.pcm-lieu-entry{display:flex;gap:5px;align-items:center}.pcm-lieu-entry input{flex:1;min-width:0}.pcm-lieu-entry .pcm-choose-place{padding:5px 9px;min-height:39px;flex:0 0 auto}
#pcmPlaceModal:not(.hidden){position:fixed;inset:0;z-index:17000;background:#12271f99;display:flex;align-items:center;justify-content:center;padding:15px}
.pcm-place-dialog{width:min(850px,100%);max-height:88vh;overflow:auto;background:#fff;border-radius:14px;padding:20px;box-shadow:0 14px 45px #0003}
.pcm-place-head,.pcm-place-tabs,.pcm-place-search{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.pcm-place-head h3{flex:1;margin:0}.pcm-place-tabs button{flex:1;min-width:130px}.pcm-place-search input{flex:1;min-width:180px}
.pcm-place-results{max-height:50vh;overflow:auto;border:1px solid #dce5dd;border-radius:9px}.pcm-place-results button{display:block;width:100%;text-align:left;background:white;color:#244536;border-radius:0;border-bottom:1px solid #e4ece5;padding:10px;min-height:38px}.pcm-place-results button:hover{background:#eaf3eb}.pcm-place-results h4{padding:9px 10px;margin:0;background:#e8eee8}.pcm-place-hint{font-size:13px;color:#596e60}

/* Ombres douces des encarts — sans changement de dimensions ni de disposition. */
#tree .pcm-main-menu,
#tree .pcm-people-sidebar,
#tree #profile,
#profile .pcm-parent,
#profile .pcm-identity,
#profile .pcm-events,
#profile .pcm-family {
    box-shadow: 0 4px 15px rgba(25, 62, 52, 0.11);
}
#profile .pcm-parent { box-shadow: 0 3px 9px rgba(25, 62, 52, 0.09); }

#tree.pcm-import-only .people { display: none !important; }
#importBtn:disabled { background:#e7ede7 !important; color:#41544a !important; cursor:not-allowed; opacity:.7; }

/* Masquer le nom interne du sélecteur natif : seul « Nom du fichier » affiche le vrai nom. */
#pcmMftPkgFile { font-size: 0 !important; color: transparent !important; }
#pcmMftPkgFile::file-selector-button { font-size: 14px; color: #22352c; cursor: pointer; }
/* Fiche d'événement et indicateur de documents. */
#pcmEventModal:not(.hidden){position:fixed;inset:0;z-index:16000;display:flex;align-items:center;justify-content:center;background:#12271f99;padding:16px}
#pcmEventModal .pcm-event-dialog{background:white;width:min(760px,96vw);max-height:78vh;overflow:auto;border-radius:14px;padding:16px;box-shadow:0 15px 50px #0004}
#pcmEventModal .pcm-event-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#pcmEventModal .pcm-event-dialog-head h3{margin:0}
#pcmEventModal .pcm-event-docs{display:flex;flex-wrap:wrap;gap:12px;padding:10px 0}
#pcmEventModal .pcm-event-docs img{width:130px;height:150px;object-fit:contain;border:1px solid #ddd;border-radius:7px}
#profile .pcm-event-doc-icon{min-height:0;height:22px;width:24px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:#e8eee8;color:#244536;border-radius:6px;font-size:14px}
#profile .pcm-event-line p[data-event-open]{cursor:pointer}
#profile .pcm-event-line p[data-event-open]:hover{text-decoration:underline}

#pcmEventModalCitations{display:grid;gap:8px;margin-bottom:8px}
#pcmEventModalCitations .pcm-event-source-card{padding:9px 12px;border:1px solid #dce7df;border-radius:9px;background:#f7faf6;overflow-wrap:anywhere;font-size:13px}
#pcmEventModalCitations .pcm-event-source-card button{display:block;text-align:left;padding:4px 6px;min-height:30px;margin-bottom:5px;font-weight:700}
/* Description d’événement : pleine largeur et libellé séparé. */
#pcmEventModalFields .pcm-event-form { display:block; }
#pcmEventModalFields .pcm-event-form > label { display:block; margin:0 0 8px; font-weight:600; }
#pcmEventModalFields .pcm-event-form > label input,
#pcmEventModalFields .pcm-event-form > label textarea { display:block; width:100%; box-sizing:border-box; margin-top:7px; font-weight:400; }
#pcmEventModalFields .pcm-event-form textarea { min-height:65px; height:70px; resize:vertical; }
#profile .pcm-event-form .pcm-description-label { grid-column:1 / -1; display:block; }
#profile .pcm-event-form .pcm-description-label textarea { display:block; width:100%; box-sizing:border-box; margin-top:7px; min-height:105px; resize:vertical; }


/* Accueil : un seul cadre administrateur, au bas de la fenêtre.
   Le flux flex suit naturellement le redimensionnement, sans position fixe. */
body:has(#home:not(.hidden)) {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body:has(#home:not(.hidden)) > main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 15px;
}
body:has(#home:not(.hidden)) > footer { display: none; }
#home:not(.hidden) {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    min-height: 0;
}
#home #pcmOtherTrees:not(.hidden) {
    margin-top: auto;
    margin-bottom: 0;
    flex-shrink: 0;
}
#home #cards { margin-bottom: 18px; }
/* Le cadre administrateur ne doit jamais être visible dans une fiche individuelle. */
body:has(#tree:not(.hidden)) #pcmOtherTrees,
body:has(#home.hidden) #pcmOtherTrees,
#tree:not(.hidden) ~ #pcmOtherTrees { display: none !important; }
/* Sécurité d'affichage : jamais de pavé dans la vue arbre. */
#home.hidden #pcmOtherTrees { display: none !important; }

/* Espace administrateur : liste des généalogies des autres comptes. */
#pcmOtherTrees { margin-top: 14px; border: 1px solid #c7ddcf; border-radius: 14px; background: linear-gradient(145deg,#f7fbf7,#eaf4ec); box-shadow: 0 3px 12px rgba(27,70,48,.06); padding: 12px 16px; }
#pcmOtherTrees h3 { margin: 0 0 4px; color:#234b38; }
#pcmOtherTrees .pcm-other-scroll { overflow-x:auto; }
#pcmOtherTrees > p { margin: 3px 0 9px; }
#pcmOtherTrees .pcm-other-table button { padding: 6px 12px; }
#pcmOtherTrees .pcm-other-table { width:100%; border-collapse:collapse; min-width:580px; }
#pcmOtherTrees .pcm-other-table th { text-align:left; color:#285440; background:#e2eee4; padding:7px 12px; }
#pcmOtherTrees .pcm-other-table td { padding:6px 12px; border-bottom:1px solid #d6e6da; }
#pcmOtherTrees .pcm-other-table tbody tr:last-child td { border-bottom:0; }
#pcmOtherTrees .pcm-other-table button { white-space:nowrap; }
.pcm-presence {display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px;vertical-align:middle;background:#9aa5a0;border:1px solid #fff;box-shadow:0 0 0 1px #c5cec8;}
.pcm-presence.online {background:#20b05a;box-shadow:0 0 0 1px #86cba2;}
.pcm-presence-label{font-size:12px;color:#64736a;white-space:nowrap;margin-right:5px}.pcm-presence-label.online{color:#187b41;font-weight:600}
/* Arbre vide : cadres alignés, le bouton Bug ne sort jamais du panneau. */
@media (min-width:761px) {
 #tree #profile, #tree .pcm-people-sidebar { min-height:700px; box-sizing:border-box; }
 #tree .pcm-main-menu { min-height:700px; height:auto; box-sizing:border-box; }
}
#tree .pcm-main-menu { overflow:visible; }
#tree .pcm-main-menu .pcm-menu-bottom { flex-shrink:0; }
/* Consultation d'un arbre tiers : commandes de modification masquées. */
#tree.pcm-admin-readonly #addPerson,
#tree.pcm-admin-readonly #showImport,
#tree.pcm-admin-readonly #pcmMenuExport,
#tree.pcm-admin-readonly #editPerson,
#tree.pcm-admin-readonly #deletePerson,
#tree.pcm-admin-readonly #pcmEventType,
#tree.pcm-admin-readonly #pcmSpouseAction,
#tree.pcm-admin-readonly .pcm-delete-event,
#tree.pcm-admin-readonly .pcm-edit-event,
#tree.pcm-admin-readonly .pcm-remove-spouse,
#tree.pcm-admin-readonly .pcm-change-spouse,
#tree.pcm-admin-readonly .pcm-delete-photo,
#tree.pcm-admin-readonly .pcm-main-photo { display:none!important; }
#tree .pcm-menu-count{display:inline-block;margin-left:5px;padding:2px 8px;border-radius:20px;background:#e5eee5;color:#244536;font-size:12px;font-weight:700;vertical-align:middle}
/* Confidentialité : interrupteur près du titre et carte anonymisée dans les arbres. */
.pcm-private-heading{display:flex;align-items:center;justify-content:flex-start;gap:15px;flex-wrap:wrap;margin:4px 0 8px}
.pcm-private-label{display:inline-flex;align-items:center;gap:9px;margin:0;font-size:13px;color:#244536;cursor:pointer}
.pcm-private-label input{appearance:none;width:37px;height:21px;min-width:37px;padding:0;margin:0;background:#b8c7bc;border:0;border-radius:20px;position:relative;cursor:pointer}
.pcm-private-label input:before{content:'';position:absolute;top:3px;left:3px;width:15px;height:15px;background:white;border-radius:50%;transition:transform .15s}
.pcm-private-label input:checked{background:#2d8dd2}
.pcm-private-label input:checked:before{transform:translateX(16px)}
#pcmGraphModal .pcm-private-card{display:flex!important;align-items:center;justify-content:center;text-align:center;background:#f0f1f0!important;color:#66736b!important;border:1px dashed #aab5ad!important;cursor:default!important}
#pcmGraphModal .pcm-private-card strong{font-size:12px;line-height:1.4;max-height:none}

/* Gestion des sources : fenêtre modale visible et déplaçable. */
#pcmSourcesModal:not(.hidden){position:fixed;inset:0;z-index:14000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(18,39,31,.55)}
#pcmSourcesDialog{position:relative;left:0;top:0;width:min(1100px,96vw);height:min(790px,90vh);display:flex;flex-direction:column;min-height:0;background:#fff;border:1px solid #c7d7ce;border-radius:14px;box-shadow:0 18px 55px #0004;overflow:hidden}
#pcmSourcesHead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;background:#193e34;color:#fff;cursor:move;user-select:none;touch-action:none}
#pcmSourcesHead strong{font-size:18px}#pcmSourcesHead button{background:#ffffff22;min-height:32px;padding:5px 10px}
#pcmSourcesBody{display:grid;grid-template-columns:minmax(220px,29%) minmax(0,1fr);gap:0;flex:1;min-height:0}
#pcmSourcesLeft{padding:14px;border-right:1px solid #dce7df;background:#f4f8f4;display:flex;flex-direction:column;gap:10px;min-height:0}
#pcmSourcesLeft input,#pcmSourcesLeft button{width:100%}#pcmSourcesList{overflow:auto;flex:1;min-height:0}
#pcmSourcesList button{display:block;width:100%;text-align:left;margin:4px 0;background:#e5eee5;color:#244536;overflow-wrap:anywhere}
#pcmSourcesList button.selected{background:#2e6953;color:white}
#pcmSourcesRight{padding:16px 20px;overflow:auto;min-width:0}#pcmSourcesRight h3{margin:10px 0;padding-bottom:7px;border-bottom:1px solid #dce7df;color:#25483b}
.pcm-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px}
#pcmSourcesRight label{font-size:13px}#pcmSourcesRight input,#pcmSourcesRight select,#pcmSourcesRight textarea{display:block;width:100%;margin-top:5px}
#pcmSourcesRight textarea{min-height:70px;resize:vertical}.pcm-source-actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
.pcm-source-note{font-size:13px;color:#68756d}#pcmCitationsList article{padding:10px;border-bottom:1px solid #dce7df;line-height:1.5;font-size:13px}
@media(max-width:700px){#pcmSourcesBody{grid-template-columns:1fr;overflow:auto}#pcmSourcesLeft{max-height:210px;border-right:0;border-bottom:1px solid #dce7df}#pcmSourcesRight{overflow:visible}.pcm-source-grid{grid-template-columns:1fr}}

/* Inventaire des médias de la généalogie */
#pcmMediaModal:not(.hidden){position:fixed;inset:0;z-index:14010;display:flex;align-items:center;justify-content:center;padding:16px;background:#12271f99}
#pcmMediaDialog{width:min(950px,96vw);max-height:88vh;display:flex;flex-direction:column;background:white;border-radius:14px;overflow:hidden;box-shadow:0 18px 55px #0004}
#pcmMediaHead{background:#193e34;color:white;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px}
#pcmMediaHead h3{margin:0;color:white}
#pcmMediaList{padding:16px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.pcm-media-item{border:1px solid #dce5dd;border-radius:10px;padding:7px;overflow-wrap:anywhere;background:#f7faf6}
.pcm-media-item img{width:100%;height:105px;object-fit:contain}
.pcm-media-item small{display:block;color:#52685a;margin-top:6px}

/* Galerie rapide : chargement paginé et aperçu dans une fenêtre déplaçable. */
#pcmMediaHead,#pcmMediaPreviewHead{cursor:move;touch-action:none;user-select:none}
#pcmMediaList{min-height:100px;align-content:start}
#pcmMediaMore{margin:8px 16px 14px;flex-shrink:0}
.pcm-media-thumb{width:100%;min-height:115px;padding:3px;background:#fff;color:#244536;border:1px solid #dce5dd;display:flex;align-items:center;justify-content:center}
.pcm-media-thumb img{width:100%;height:105px;object-fit:contain}
#pcmMediaPreview:not(.hidden){position:fixed;inset:0;z-index:14020;display:flex;align-items:center;justify-content:center;padding:16px;background:#12271f99}
#pcmMediaPreviewDialog{width:min(950px,96vw);max-height:90vh;display:flex;flex-direction:column;background:white;border-radius:14px;overflow:hidden;box-shadow:0 18px 55px #0005}
#pcmMediaPreviewHead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#193e34;color:white}
#pcmMediaPreviewBody{padding:14px;min-height:100px;overflow:auto;text-align:center}
#pcmMediaPreviewBody img{max-width:100%;max-height:70vh;object-fit:contain}

/* Espacement resserré entre tous les boutons de Navigation. */
#tree .pcm-main-menu > button { margin-bottom: 5px; }
#tree .pcm-main-menu .pcm-menu-bottom { gap: 5px; padding-top: 10px; }
#tree .pcm-main-menu .pcm-menu-bottom > button,
#tree .pcm-main-menu .pcm-menu-bottom > a { margin: 0; }
@media (max-width:760px) {
  #tree .pcm-main-menu > button { margin-bottom: 5px; }
  #tree .pcm-main-menu .pcm-menu-bottom { gap: 5px; margin-top: 8px; }
}
/* Boutons inférieurs de Navigation : hauteur légèrement réduite. */
#tree .pcm-main-menu .pcm-menu-bottom > button,
#tree .pcm-main-menu .pcm-menu-bottom > a {
    min-height: 35px;
    padding: 6px 6px;
    line-height: 1.25;
}
/* Ajustement ciblé : boutons de fiche et navigation à 35 px comme les commandes du bas. */
#profile #printPerson, #profile #editPerson, #profile #deletePerson {
    min-height: 35px;
    height: 35px;
    padding: 6px 12px;
    line-height: 1.25;
    font-size: 14px;
}
#tree .pcm-main-menu > button,
#tree #pcmGraphChoices > button {
    min-height: 35px;
    height: 35px;
    padding: 6px;
    line-height: 1.25;
}
/* Harmonisation stricte : boutons de navigation et actions de fiche compacts. */
#tree .pcm-main-menu > button,
#tree .pcm-main-menu .pcm-menu-bottom > button,
#tree .pcm-main-menu .pcm-menu-bottom > a,
#tree #pcmGraphChoices > button {
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 6px !important;
    line-height: 22px !important;
    font-size: 13px;
    box-sizing: border-box;
}
#profile #printPerson, #profile #editPerson, #profile #deletePerson {
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 10px !important;
    line-height: 22px !important;
    font-size: 13px;
    box-sizing: border-box;
}
/* Famille : actions de conjoint à la taille des boutons de fiche, unions resserrées. */
#profile .pcm-union-actions { gap: 5px; }
#profile .pcm-union-actions > button {
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 10px !important;
    line-height: 22px !important;
    font-size: 13px;
    box-sizing: border-box;
}
#profile .pcm-family { padding: 9px 12px; }
#profile .pcm-family .pcm-family-heading { margin-bottom: 5px; padding-bottom: 5px; }
#profile .pcm-family .pcm-union { padding: 2px 2px; }
#profile .pcm-family .pcm-union + .pcm-union { margin-top: 5px; padding-top: 6px; }
#profile .pcm-family .pcm-union p { margin: 2px 0; line-height: 1.3; }
#profile .pcm-family .relative { min-height: 26px; padding: 3px 8px; margin: 1px 4px 1px 0; }
#profile .pcm-family > .pcm-unions { margin: 0; }
/* Compteurs de Navigation : alignement à droite sans déplacer les libellés. */
#tree .pcm-main-menu > button:has(.pcm-menu-count) {
    display: flex;
    align-items: center;
}
#tree .pcm-main-menu > button .pcm-menu-count {
    margin-left: auto;
    flex-shrink: 0;
}

/* Journal des modifications : fenêtre mobile dans les couleurs du site. */
#pcmModificationsModal:not(.hidden){position:fixed;inset:0;z-index:15100;background:#12271f99;display:flex;align-items:center;justify-content:center;padding:16px}
#pcmModificationsDialog{position:relative;width:min(1050px,96vw);height:min(750px,88vh);background:#fff;border-radius:14px;box-shadow:0 18px 55px #0004;display:flex;flex-direction:column;overflow:hidden}
#pcmModificationsHead{background:#193e34;color:white;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;cursor:move;touch-action:none;user-select:none}
#pcmModificationsHead strong{font-size:18px}#pcmModificationsHead button{min-height:32px;padding:5px 10px}
#pcmModificationsToolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:12px 16px;border-bottom:1px solid #dce5dd}
#pcmModificationsToolbar button{padding:7px 12px;min-height:34px}#pcmModificationsCount{margin-left:auto;font-size:13px}
#pcmModificationsList{overflow:auto;flex:1;padding:16px}#pcmModificationsList article{border-bottom:1px solid #e2ebe4;padding:11px 6px}
#pcmModificationsList article strong{color:#244536}#pcmModificationsList article p{margin:5px 0 0 18px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}


/* Cartographie : fenêtre déplaçable, même thème que les autres fenêtres. */
#pcmCartographieModal:not(.hidden){position:fixed;inset:0;z-index:15110;background:#12271f99;display:flex;align-items:center;justify-content:center;padding:16px}
#pcmCartographieDialog{position:relative;width:min(1120px,96vw);height:min(790px,90vh);background:#fff;border-radius:14px;box-shadow:0 18px 55px #0004;display:flex;flex-direction:column;overflow:hidden}
#pcmCartographieHead{background:#193e34;color:#fff;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:move;touch-action:none;user-select:none}
#pcmCartographieHead strong{font-size:18px}#pcmCartographieHead button{min-height:32px;padding:5px 10px}
#pcmCartographieControls{display:flex;gap:20px;flex-wrap:wrap;align-items:center;padding:10px 16px;background:#f5f8f5;border-bottom:1px solid #dce5dd}
#pcmCartographieControls label{display:inline-flex;align-items:center;gap:5px;cursor:pointer;margin:0}#pcmCartographieInfo{display:inline-flex;align-items:center;flex:0 1 auto;font-size:13px;color:#375747;line-height:1.5;align-self:center;margin:0;position:relative;top:0}
#pcmCartographieMap{flex:1;min-height:250px;background:#e9eee9}
#pcmCartographieMap .leaflet-popup-content{max-height:240px;overflow:auto}
/* Lieux existants : commande de suppression distincte, sans sélectionner le lieu. */
#pcmPlaceModal .pcm-place-row{display:flex;align-items:center;border-bottom:1px solid #e4ece5}
#pcmPlaceModal .pcm-place-row>button:first-child{flex:1;min-width:0;border-bottom:0}
#pcmPlaceModal .pcm-place-row>.pcm-place-delete{flex:0 0 24px;display:inline-flex;align-items:center;justify-content:center;align-self:center;width:24px;height:24px;min-height:24px;margin:0 6px;padding:0;background:#e8eee8;color:#244536;border-radius:5px;font-size:12px;line-height:1}
#pcmPlaceModal .pcm-place-row>.pcm-place-delete:hover{background:#d8e4db}
/* Icônes issues du catalogue SQLite et conjoint dans la fiche événement. */
#profile .pcm-type-icon{display:inline-block;min-width:1.15em;text-align:center;vertical-align:baseline}
#pcmEventModal .pcm-event-spouse{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
#pcmEventModal .pcm-event-spouse-link{display:inline-flex;align-items:center;gap:7px;min-height:30px;padding:3px 8px}
#pcmEventModal .pcm-event-spouse-link img{width:28px;height:28px;object-fit:cover;border-radius:50%}
/* Conjoint d'un événement familial : portrait compact et lien accessible. */
#pcmEventModal .pcm-event-spouse {display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 10px}
#pcmEventModal .pcm-event-spouse-link {display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:3px 9px}
#pcmEventModal .pcm-event-spouse-link img {width:30px;height:30px;object-fit:cover;border-radius:50%}

#profile .pcm-type-icon{display:inline-flex;width:19px;justify-content:center;color:#416653;font-size:15px;vertical-align:middle;margin-right:3px}
/* Unions : conjoint et commandes sur la même ligne, boutons à droite. */
#profile .pcm-family .pcm-union { padding: 3px 6px; margin: 3px 0; }
#profile .pcm-family .pcm-union p { margin: 1px 0; }
#profile .pcm-union .pcm-union-actions { float: right; margin-top: -35px; position: relative; }
#profile .pcm-union .pcm-remove-spouse { width: 32px; padding: 4px !important; }
#profile .pcm-union::after { content: ''; display: block; clear: both; }
/* Cartographie : épingles avec compteur, style proche de MFT. */
#pcmCartographieMap .pcm-map-pin-wrap{background:transparent;border:0;overflow:visible}
#pcmCartographieMap .pcm-map-pin{position:relative;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--pin-color);border:2px solid white;box-shadow:0 3px 7px #0007;color:white;font-weight:700;font-size:12px}
#pcmCartographieMap .pcm-map-pin span{transform:rotate(45deg)}
/* Ombres des photos des fiches individuelles : portrait principal et vignettes. */
#profile img[alt="Photo principale"] {
  box-shadow: 0 10px 24px rgba(0,0,0,.38), 0 3px 8px rgba(0,0,0,.22);
}
#profile img[alt="Photo ou document"] {
  box-shadow: 0 8px 20px rgba(0,0,0,.34), 0 3px 7px rgba(0,0,0,.19);
}

/* Fenêtre d’aide PDF, isolée des autres fenêtres et du graphique. */
#pcmHelpModal:not(.hidden){position:fixed;inset:0;z-index:19000;background:rgba(18,39,31,.60);display:flex;align-items:center;justify-content:center;padding:18px}
#pcmHelpDialog{position:relative;left:0;top:0;width:min(960px,96vw);height:min(830px,92vh);display:flex;flex-direction:column;overflow:hidden;background:#fff;border-radius:14px;box-shadow:0 20px 65px #0006}
#pcmHelpHead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;background:#193e34;color:white;cursor:move;user-select:none;touch-action:none}
#pcmHelpHead button{min-height:32px;padding:5px 12px;background:#ffffff22}
#pcmHelpPDF{width:100%;flex:1;min-height:0;border:0;background:#fff}

#tree.pcm-admin-readonly #pcmMenuUsers,#tree.pcm-admin-readonly #pcmMenuBackup,
#tree.pcm-admin-readonly #pcmMenuModifications,#tree.pcm-admin-readonly #pcmMenuSettings,
#tree.pcm-admin-readonly [data-modal="bug"],#tree.pcm-admin-readonly #pcmMenuExport,
#tree.pcm-admin-readonly #pcmEventType,#tree.pcm-admin-readonly #pcmSpouseAction,
#tree.pcm-admin-readonly #addPerson,#tree.pcm-admin-readonly #showImport {display:none!important;}

/* Blason dans les fenêtres Contact et À propos. */
#pcmInfoBlason:not(.hidden){display:flex;justify-content:center;align-items:center;background:#fff;padding:13px 10px 5px;flex:0 0 auto}
#pcmInfoBlason img{width:88px;height:104px;object-fit:contain}
/* Connexion : fenêtre modale déplaçable au-dessus de la généalogie. */
#pcmLoginOverlay:not(.hidden){position:fixed;inset:0;z-index:21000;background:rgba(18,39,31,.55);display:flex;align-items:center;justify-content:center;padding:16px}
#pcmLoginDialog{position:relative;width:min(470px,96vw);max-height:90vh;overflow:auto;background:white;border-radius:14px;box-shadow:0 18px 55px #0005}
#pcmLoginHead{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#193e34;color:white;padding:12px 15px;cursor:move;touch-action:none;user-select:none}
#pcmLoginHead strong{font-size:18px}#pcmLoginHead button{min-height:32px;padding:5px 10px;background:#e8eee8;color:#244536}
#pcmLoginDialog #login{display:block!important;margin:0;border:0;box-shadow:none;border-radius:0}
#pcmLoginDialog #login>h2{display:none}
/* Accueil visible dès l'arrivée du visiteur, avant l'arbre Kennedy. */
#pcmWelcome.pcm-welcome-hero:not(.hidden){display:block!important;margin:8px 0 24px!important;padding:28px 34px!important;border:2px solid #b8a0cb!important;border-radius:18px!important;background:linear-gradient(125deg,#f1e8f7 0%,#fff 65%)!important;box-shadow:0 8px 24px #25153016!important;color:#28212f!important}
#pcmWelcome.pcm-welcome-hero h2{font-size:clamp(23px,3vw,34px);line-height:1.2;color:#42265a}
#pcmWelcome.pcm-welcome-hero p{font-size:16px;line-height:1.7;max-width:980px}
#pcmWelcomeClose{margin-top:8px;padding:12px 22px!important;background:#543269!important;color:white!important;border-radius:10px!important;font-weight:700}
/* Accueil compact : bandeau discret au-dessus de l’arbre */
#pcmWelcome.pcm-welcome-hero:not(.hidden){margin:6px 0 12px!important;padding:12px 18px!important;border-width:1px!important;border-radius:12px!important;box-shadow:none!important}
#pcmWelcome.pcm-welcome-hero>div:first-child{gap:10px!important}
#pcmWelcome.pcm-welcome-hero>div:first-child img{width:48px!important;height:48px!important}
#pcmWelcome.pcm-welcome-hero h2{font-size:20px!important;margin:0 0 2px!important;line-height:1.25!important}
#pcmWelcome.pcm-welcome-hero p{font-size:13px!important;line-height:1.35!important;margin:5px 0!important;max-width:none!important}
#pcmWelcomeClose{margin-top:5px!important;padding:7px 12px!important;font-size:12px!important;border-radius:7px!important}

.header-links{padding-right:0!important}
.header-links #who .pcm-header-button{gap:10px;min-width:158px;width:auto;padding:0 15px;border-color:#d4c6df;background:#ffffff17;white-space:nowrap}
.pcm-auth-icon{display:inline-grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#e9def1;color:#412454;font-size:20px;font-weight:700;line-height:1}
@media(max-width:550px){#pcmWelcome.pcm-welcome-hero:not(.hidden){padding:18px!important}.header-links{padding-right:0!important}.header-links #who .pcm-header-button{min-width:0;padding:0 10px}}
/* Accueil : boutons des généalogies de hauteur identique.
   La largeur reste adaptée au libellé, y compris pour la poubelle. */
#cards .toolbar > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 20px;
    box-sizing: border-box;
    vertical-align: middle;
}

#cards .toolbar > button[data-delete] {
    width: 42px;
    min-width: 42px;
    padding: 8px;
    font-size: 14px;
}


