mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-13 16:22:03 +00:00
272 lines
16 KiB
CSS
272 lines
16 KiB
CSS
/* ============================================================
|
||
Fiche d'une personne (DA terracotta)
|
||
Panneau flottant à gauche sur ordinateur, panneau qui monte par le bas sur téléphone.
|
||
Les variables --pz-* viennent de src/styles/pz.css.
|
||
============================================================ */
|
||
|
||
.person-card {
|
||
position: fixed;
|
||
left: 24px;
|
||
bottom: 24px;
|
||
z-index: 1000;
|
||
width: 384px;
|
||
max-height: calc(100dvh - 48px);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
padding: 22px 20px 20px;
|
||
background: var(--pz-surface);
|
||
border: 1px solid var(--pz-line);
|
||
border-radius: var(--pz-r-l);
|
||
box-shadow: var(--pz-shadow-lg);
|
||
font-family: var(--pz-sans);
|
||
color: var(--pz-ink);
|
||
animation: pc-in 260ms var(--pz-ease) both;
|
||
}
|
||
.person-card--edit-mode { border-color: var(--pz-a300); }
|
||
|
||
@keyframes pc-in {
|
||
from { opacity: 0; transform: translateX(-12px) scale(.985); filter: blur(3px); }
|
||
to { opacity: 1; transform: none; filter: none; }
|
||
}
|
||
|
||
.pc-grab { display: none; }
|
||
.pc-close { position: absolute; top: 12px; right: 12px; }
|
||
.pc-hidden-input { display: none; }
|
||
|
||
/* ── En-tête ── */
|
||
.pc-head { display: flex; gap: 16px; align-items: flex-start; padding-right: 36px; }
|
||
.pc-photo-wrap { display: grid; gap: 8px; justify-items: center; flex: none; }
|
||
.pc-photo {
|
||
width: 84px; height: 84px; border-radius: 24%; overflow: hidden;
|
||
background: var(--pz-a100); box-shadow: 0 0 0 1px rgba(42, 38, 34, .06), var(--pz-shadow);
|
||
display: grid; place-items: center;
|
||
}
|
||
.pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||
.pc-photo-initials { font: 400 30px/1 var(--pz-serif); color: var(--pz-a700); }
|
||
.pc-photo--add {
|
||
border: 1.5px dashed var(--pz-a300); background: var(--pz-a50); box-shadow: none; cursor: pointer;
|
||
align-content: center; gap: 5px; padding: 6px; color: var(--pz-a700);
|
||
font: 500 11.5px/1.15 var(--pz-sans); text-align: center;
|
||
transition: background-color 160ms ease, border-color 160ms ease, transform 140ms var(--pz-ease);
|
||
}
|
||
@media (hover: hover) and (pointer: fine) { .pc-photo--add:hover { background: var(--pz-a100); border-color: var(--pz-a500); } }
|
||
.pc-photo--add:active:not(:disabled) { transform: scale(.97); }
|
||
.pc-photo--add:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 3px; }
|
||
.pc-photo--add:disabled { opacity: .6; cursor: default; }
|
||
.pc-photo-actions { display: grid; gap: 4px; justify-items: center; }
|
||
/* Menu du choix de source du portrait : au-dessus de la fiche (z-index 1000), sous la modale Immich (2200) */
|
||
.pc-source-backdrop { position: fixed; inset: 0; z-index: 1100; }
|
||
.pc-source-menu { position: fixed; z-index: 1150; min-width: 220px; }
|
||
.pc-photo-btn {
|
||
border: 0; background: none; padding: 2px 4px; cursor: pointer;
|
||
font: 500 12px var(--pz-sans); color: var(--pz-a700); text-decoration: underline; text-underline-offset: 2px;
|
||
}
|
||
.pc-photo-btn--danger { color: var(--pz-danger); }
|
||
.pc-photo-btn:disabled { opacity: .5; cursor: default; }
|
||
|
||
.pc-id { display: grid; gap: 6px; min-width: 0; padding-top: 4px; }
|
||
.pc-name { margin: 0; font: 400 28px/1.08 var(--pz-serif); letter-spacing: -.01em; color: var(--pz-ink); text-wrap: balance; }
|
||
.pc-name em { font-style: italic; font-weight: 300; }
|
||
.pc-nick { margin: 0; font: italic 300 17px/1.3 var(--pz-serif); color: var(--pz-muted); }
|
||
.pc-life { margin: 0; font: 400 13.5px/1.4 var(--pz-sans); color: var(--pz-muted); }
|
||
.pc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
||
.pc-chips:empty { display: none; }
|
||
/* Place dans la fratrie (mode édition) : ‹ 2 sur 3 › dans une pastille */
|
||
.pz-tag.pc-order { gap: 0; padding: 1px; }
|
||
.pc-order-label { padding: 0 1px; font-variant-numeric: tabular-nums; }
|
||
.pc-order-btn {
|
||
display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0;
|
||
border: 0; border-radius: 999px; background: transparent; color: var(--pz-ink-2); cursor: pointer;
|
||
transition: transform 140ms var(--pz-ease), background-color 160ms ease, color 160ms ease;
|
||
-webkit-tap-highlight-color: transparent;
|
||
}
|
||
.pc-order-btn:active:not(:disabled) { transform: scale(.92); }
|
||
.pc-order-btn:disabled { opacity: .35; cursor: default; }
|
||
.pc-order-btn:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 1px; }
|
||
@media (hover: hover) and (pointer: fine) {
|
||
.pc-order-btn:hover:not(:disabled) { background: var(--pz-line-soft); color: var(--pz-ink); }
|
||
}
|
||
@media (pointer: coarse) { .pc-order-btn { width: 32px; height: 32px; } }
|
||
.pc-name-edit { display: grid; gap: 6px; }
|
||
|
||
/* ── Champs d'édition ── */
|
||
.pc-input {
|
||
width: 100%; min-height: 38px; padding: 8px 10px; box-sizing: border-box;
|
||
font: 400 14px/1.4 var(--pz-sans); color: var(--pz-ink);
|
||
background: var(--pz-surface); border: 1px solid var(--pz-line); border-radius: var(--pz-r-s);
|
||
transition: border-color 160ms ease, box-shadow 160ms ease;
|
||
}
|
||
.pc-input:focus { outline: none; border-color: var(--pz-a500); box-shadow: 0 0 0 3px var(--pz-a100); }
|
||
.pc-input::placeholder { color: var(--pz-faint); }
|
||
.pc-input--name { font: 400 20px/1.2 var(--pz-serif); min-height: 42px; }
|
||
.pc-input--last { font-style: italic; }
|
||
.pc-note-input { min-height: 88px; resize: vertical; }
|
||
|
||
/* ── Onglets et corps ── */
|
||
.pc-tabs { flex: none; }
|
||
.pc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 2px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--pz-line) transparent; }
|
||
.pc-inline-msg { font: 500 13px/1.45 var(--pz-sans); }
|
||
.pc-inline-msg--loading { padding: 10px 12px; border-radius: var(--pz-r-s); background: var(--pz-bg); color: var(--pz-muted); }
|
||
|
||
/* Souvenirs */
|
||
.pc-souvenirs { display: grid; gap: 12px; }
|
||
.pc-empty { display: grid; gap: 4px; padding: 22px 16px; text-align: center; border: 1px dashed var(--pz-a300); border-radius: var(--pz-r-m); background: var(--pz-a50); }
|
||
|
||
.pc-quote {
|
||
display: block; width: 100%; text-align: left; cursor: pointer;
|
||
margin: 0; padding: 4px 0 4px 16px; border: 0; border-left: 2px solid var(--pz-a300); background: none;
|
||
font: 300 italic 19px/1.4 var(--pz-serif); color: var(--pz-ink);
|
||
}
|
||
.pc-quote small { display: block; margin-top: 6px; font: 400 12px var(--pz-sans); font-style: normal; color: var(--pz-muted); }
|
||
|
||
.pc-voice {
|
||
display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 14px 8px 8px; cursor: pointer;
|
||
border: 0; border-radius: 999px; background: var(--pz-a100); text-align: left;
|
||
transition: background-color 160ms ease, transform 140ms var(--pz-ease);
|
||
}
|
||
.pc-voice:active { transform: scale(.985); }
|
||
@media (hover: hover) and (pointer: fine) { .pc-voice:hover { background: var(--pz-a200); } }
|
||
.pc-voice-play { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--pz-ink); color: var(--pz-bg); }
|
||
.pc-voice-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 24px; min-width: 60px; }
|
||
.pc-voice-wave i { flex: 1; border-radius: 2px; background: var(--pz-a500); opacity: .8; }
|
||
.pc-voice-label { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12.5px var(--pz-sans); color: var(--pz-ink-2); }
|
||
|
||
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
|
||
.pc-tile {
|
||
position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; cursor: pointer;
|
||
border: 0; border-radius: var(--pz-r-s); background: var(--pz-a50);
|
||
transition: transform 160ms var(--pz-ease), box-shadow 160ms ease;
|
||
}
|
||
.pc-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||
.pc-tile:active { transform: scale(.97); }
|
||
@media (hover: hover) and (pointer: fine) { .pc-tile:hover { box-shadow: 0 0 0 2px var(--pz-a300); } }
|
||
.pc-tile-video { width: 100%; height: 100%; display: grid; place-items: center; background: var(--pz-ink); color: var(--pz-bg); }
|
||
.pc-tile-label {
|
||
position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px;
|
||
font: 500 10.5px/1.25 var(--pz-sans); color: #fff; text-align: left;
|
||
background: linear-gradient(to top, rgba(42, 38, 34, .72), rgba(42, 38, 34, 0));
|
||
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||
}
|
||
.pc-tile--add { display: grid; place-items: center; color: var(--pz-a700); background: transparent; border: 1.5px dashed var(--pz-a300); }
|
||
|
||
.pc-list { display: grid; gap: 6px; }
|
||
.pc-list-item {
|
||
display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; cursor: pointer; text-align: left;
|
||
border: 1px solid var(--pz-line); border-radius: var(--pz-r-m); background: var(--pz-surface);
|
||
transition: border-color 160ms ease;
|
||
}
|
||
@media (hover: hover) and (pointer: fine) { .pc-list-item:hover { border-color: var(--pz-a300); } }
|
||
.pc-list-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--pz-a50); color: var(--pz-a700); font-size: 16px; }
|
||
.pc-list-icon img { width: 100%; height: 100%; object-fit: cover; }
|
||
.pc-list-text { display: grid; gap: 2px; min-width: 0; }
|
||
.pc-list-label { font: 500 14px/1.3 var(--pz-sans); color: var(--pz-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.pc-list-type { font: 400 12px var(--pz-sans); color: var(--pz-muted); }
|
||
.person-card-media-thumb { width: 100%; height: 100%; border-radius: 6px; }
|
||
|
||
/* Infos */
|
||
.pc-infos { display: grid; gap: 18px; }
|
||
.pc-section { display: grid; gap: 8px; }
|
||
.pc-rows { display: grid; }
|
||
.pc-row {
|
||
display: flex; justify-content: space-between; align-items: center; gap: 16px;
|
||
min-height: 38px; padding: 6px 0; border-bottom: 1px solid var(--pz-line-soft);
|
||
}
|
||
.pc-row:last-child { border-bottom: 0; }
|
||
.pc-label { flex: none; font: 400 13.5px var(--pz-sans); color: var(--pz-muted); }
|
||
.pc-row .value { font: 400 14px/1.4 var(--pz-sans); color: var(--pz-ink); text-align: right; font-variant-numeric: tabular-nums; }
|
||
.pc-row .pc-input { max-width: 62%; text-align: right; }
|
||
/* Date : une année seule ou une date complète (issue #77), avec une aide si le texte n'en est pas une */
|
||
.pc-row .pz-date { justify-items: end; max-width: 62%; }
|
||
.pc-row .pz-date .pc-input { max-width: 100%; }
|
||
.pc-row .pz-date-hint { text-align: right; }
|
||
.pc-note { margin: 0; font: 400 italic 16px/1.5 var(--pz-serif); color: var(--pz-ink-2); white-space: pre-wrap; }
|
||
|
||
.pc-alive {
|
||
display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; cursor: pointer;
|
||
border: 1px solid var(--pz-line); border-radius: 999px; background: var(--pz-surface);
|
||
font: 500 13px var(--pz-sans); color: var(--pz-ink-2);
|
||
}
|
||
.pc-alive-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pz-faint); }
|
||
.pc-alive.is-alive .pc-alive-dot { background: var(--pz-success); }
|
||
|
||
/* Liens (relations) */
|
||
.pc-rel-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; }
|
||
.pc-rel-avatar {
|
||
width: 34px; height: 34px; flex: none; overflow: hidden; border-radius: 50%;
|
||
display: grid; place-items: center; background: var(--pz-a100); color: var(--pz-a700); font: 400 15px/1 var(--pz-serif);
|
||
}
|
||
.pc-rel-avatar img { width: 100%; height: 100%; object-fit: cover; }
|
||
.pc-rel-name { flex: 1; min-width: 0; font: 400 16px/1.2 var(--pz-serif); color: var(--pz-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.pc-rel-name em { font-style: italic; font-weight: 300; }
|
||
.pc-rel-meta { flex: none; font: 400 12px var(--pz-sans); color: var(--pz-muted); }
|
||
.pc-rel-remove { width: 32px; min-height: 32px; color: var(--pz-muted); }
|
||
.pc-rel-empty { margin: 0; font: 400 13px var(--pz-sans); color: var(--pz-faint); }
|
||
.pc-rel-add {
|
||
display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 34px; padding: 0 12px; cursor: pointer;
|
||
border: 1px dashed var(--pz-a300); border-radius: 999px; background: transparent;
|
||
font: 500 13px var(--pz-sans); color: var(--pz-a700);
|
||
transition: background-color 160ms ease;
|
||
}
|
||
@media (hover: hover) and (pointer: fine) { .pc-rel-add:hover { background: var(--pz-a50); } }
|
||
.pc-rel-add:disabled { opacity: .5; cursor: default; }
|
||
|
||
.pc-search { display: grid; gap: 6px; }
|
||
.pc-search-field { position: relative; display: flex; align-items: center; }
|
||
.pc-search-icon { position: absolute; left: 12px; color: var(--pz-muted); pointer-events: none; }
|
||
.pc-search-input {
|
||
width: 100%; min-height: 40px; padding: 8px 40px 8px 36px; box-sizing: border-box;
|
||
font: 400 14px var(--pz-sans); color: var(--pz-ink); background: var(--pz-surface);
|
||
border: 1px solid var(--pz-a500); border-radius: 999px; box-shadow: 0 0 0 3px var(--pz-a100);
|
||
}
|
||
.pc-search-input:focus { outline: none; }
|
||
.pc-search-close { position: absolute; right: 2px; width: 34px; min-height: 34px; }
|
||
.pc-search-list { list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; border: 1px solid var(--pz-line); border-radius: var(--pz-r-m); background: var(--pz-surface); box-shadow: var(--pz-shadow); }
|
||
.pc-search-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; }
|
||
@media (hover: hover) and (pointer: fine) { .pc-search-item:hover { background: var(--pz-a50); } }
|
||
|
||
/* ── Pied d'édition ── */
|
||
.pc-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--pz-line); }
|
||
.pc-foot .pc-save { margin-left: auto; }
|
||
.pc-save.is-saved { background: var(--pz-success); }
|
||
.pc-delete-confirm { display: grid; gap: 10px; width: 100%; font: 500 14px var(--pz-sans); color: var(--pz-danger); }
|
||
.pc-delete-actions { display: flex; justify-content: flex-end; gap: 8px; }
|
||
|
||
/* ── Téléphone : panneau qui monte par le bas ── */
|
||
@media (max-width: 768px) {
|
||
.person-card {
|
||
left: 0; right: 0; bottom: 0; width: auto;
|
||
max-height: 78dvh; padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
|
||
border-radius: 26px 26px 0 0; border-bottom: 0;
|
||
animation: pc-sheet 400ms var(--pz-ease-drawer) both;
|
||
}
|
||
.pc-grab { display: block; width: 38px; height: 4px; margin: 0 auto 2px; border-radius: 4px; background: var(--pz-line); flex: none; }
|
||
.pc-close { top: 10px; right: 10px; }
|
||
.pc-photo { width: 68px; height: 68px; }
|
||
.pc-name { font-size: 24px; }
|
||
@keyframes pc-sheet { from { transform: translateY(100%); } to { transform: none; } }
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.person-card { animation: pz-fade 200ms ease both; }
|
||
}
|
||
|
||
/* Prénom inconnu (issue Anaïs, 18/10) : libellé en italique, case à cocher sous les champs de nom */
|
||
.pc-name-unknown { font-style: italic; font-weight: 300; }
|
||
.pc-unknown-first { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font: 400 13px var(--pz-sans); color: var(--pz-ink-2); cursor: pointer; }
|
||
.pc-unknown-first input { width: 15px; height: 15px; accent-color: var(--pz-a500); }
|
||
.pc-name-error { margin: 6px 0 0; font: 500 12.5px var(--pz-sans); color: var(--pz-danger); }
|
||
|
||
/* Modification de l'onglet Infos : pastilles des champs vides (DA terracotta, sans nouvelle couleur) */
|
||
.pc-fill-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
|
||
.pc-fill-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--pz-a300); background: var(--pz-a50); color: var(--pz-a700); font: 500 13px var(--pz-sans); cursor: pointer; }
|
||
@media (hover: hover) and (pointer: fine) { .pc-fill-chip:hover { background: var(--pz-a100); border-color: var(--pz-a500); } }
|
||
.pc-fill-chip:focus-visible { outline: 2px solid var(--pz-a500); outline-offset: 2px; }
|
||
|
||
/* Liens : parents adoptifs, réglage de la filiation */
|
||
.pc-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
|
||
.pc-adopt-tag { font: 500 12px var(--pz-sans); color: var(--pz-a700); background: var(--pz-a50); border: 1px solid var(--pz-a300); border-radius: 999px; padding: 1px 9px; }
|
||
.pc-parentage { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--pz-line-soft); }
|
||
.pc-seg { width: 100%; }
|
||
.pc-seg .pz-tab { flex: 1; }
|