.mem-famille { width:100%; max-width:none; min-width:0; color:var(--theme-texte); }
.mem-cadre { background:var(--theme-surface); border:1px solid var(--theme-bordure); border-radius:1rem; }
.mem-bandeau { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem; padding:.9rem 1.15rem; border-radius:1rem 1rem 0 0; background:linear-gradient(115deg,var(--theme-bandeau-debut),var(--theme-bandeau-fin)); }
.mem-bandeau h1 { font-size:clamp(1.25rem,2vw,1.65rem); margin:0; }
.mem-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.mem-actions a { display:inline-flex; align-items:center; gap:.45rem; min-height:42px; padding:.45rem .85rem; border:1px solid var(--theme-bordure); border-radius:.6rem; background:var(--theme-surface); color:var(--theme-principale); text-decoration:none; }
.mem-actions a:hover, .mem-actions a:focus-visible { color:var(--theme-principale-survol); border-color:currentColor; }
.mem-composition { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-areas:"identite identite" "gauche droite"; gap:0; padding:0; text-align:center; }
.mem-identite { grid-area:identite; min-width:0; padding-inline:1rem; }
.mem-gauche { grid-area:gauche; }
.mem-droite { grid-area:droite; }
.mem-fleurs { min-width:0; }
.mem-fleurs img,.mem-identite img { max-width:100%; }
.mem-portrait { display:block; margin:auto; width:auto; max-height:28rem; object-fit:contain; }
@media(min-width:992px) {
    .mem-composition { grid-template-columns:200px minmax(0,1fr) 200px; grid-template-areas:"gauche identite droite"; }
}

/* Album du souvenir : papier ivoire, légendes en caractères romains. */
.mem-famille { --papier:var(--theme-surface); --encre:var(--theme-texte); --filet:var(--theme-bordure); }
.mem-famille .mem-cadre { background:var(--papier); border-color:var(--filet); }
.mem-famille .mem-bandeau { padding:1rem clamp(1rem,2vw,2rem); background:linear-gradient(115deg,var(--theme-bandeau-debut),var(--theme-bandeau-fin)); border-bottom:1px solid var(--filet); }
.mem-legende { padding-left:.85rem; border-left:3px solid var(--theme-principale); }
.mem-legende h1 { font:normal clamp(1.55rem,2.5vw,2.2rem)/1.15 Georgia,serif; color:var(--encre); }
.mem-legende p { margin:.25rem 0 0; font:normal 1rem/1.5 system-ui,sans-serif; color:var(--theme-texte-secondaire); }
.mem-actions a { border-radius:2rem; }
.mem-identite .carte-defunt.card { background:transparent; border:0 !important; box-shadow:none !important; margin-bottom:.75rem !important; }
.mem-identite .carte-defunt .card-header-bandeau { background:transparent; border:0; color:var(--encre); }
.mem-identite .carte-defunt .texte-titre { color:var(--encre); font:normal clamp(1.65rem,3vw,2.65rem)/1.2 Georgia,serif; overflow-wrap:anywhere; }
.mem-identite .carte-defunt .card-body { background:transparent; padding:.45rem .75rem; font:normal 1rem/1.6 system-ui,sans-serif; }
.mem-identite .texte-detail strong { font-weight:500; font-variant-numeric:tabular-nums; }
.mem-identite .texte-citation { margin-inline:auto; max-width:44ch; font:italic 1.18rem/1.55 Georgia,serif; }
.mem-identite .photo-frame,.mem-identite .mem-portrait { background:var(--theme-fond-clair); padding:.4rem; border:1px solid var(--filet); box-shadow:0 4px 12px var(--theme-ombre-44-82-130-8); }
.mem-fleurs { border-top:1px solid var(--filet); padding-top:.75rem; }
@media(min-width:992px) {
    .mem-gauche { border:0; border-right:1px solid var(--filet); }
    .mem-droite { border:0; border-left:1px solid var(--filet); }
}

/* Seule la fiche d'identité, entre les deux massifs, reçoit le double filet. */
.mem-identite .carte-defunt.card {
    margin-top: .85rem;
    padding: clamp(.65rem, 2vw, 1.25rem);
    border: 1px solid var(--theme-bordure) !important;
    outline: 1px solid var(--theme-bordure);
    outline-offset: -5px;
    border-radius: .85rem;
    background: linear-gradient(150deg, var(--theme-surface) 48%, var(--theme-bandeau-debut));
}
/* La première ligne réserve la place des icônes, même sur mobile. */
.mem-identite .carte-defunt .card-header-bandeau > .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    row-gap: .2rem;
}
.mem-identite .carte-defunt .card-header-bandeau .position-absolute {
    position: static !important;
    justify-self: start;
    margin: 0 !important;
    display: flex;
    gap: .35rem;
}
.mem-identite .carte-defunt .texte-titre {
    padding-inline: .25rem !important;
    text-align: center;
}
.mem-identite .texte-cercle-favoris {
    background: var(--theme-surface);
    color: var(--theme-principale);
}
