/* Écrans : en-tête de liste, détail, page en mémoire, connexion, statistiques */
/* ===== En-tête d'une liste ===== */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero .banner { height: 130px; background-color: #071f43; background-size: cover; background-position: center; }
.hero .who { display: flex; gap: 14px; align-items: flex-start; padding: 0 18px 16px; margin-top: -46px; }
.hero .who > div:last-child { padding-top: 54px; min-width: 0; }
.hero h1 { font-size: 1.6rem; }
.avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--action); background: var(--subtle); flex: none; display: grid; place-items: center; font-family: var(--display); font-size: 2rem; font-weight: 800; color: var(--action); }
.avatar.sm { width: 40px; height: 40px; border-width: 2px; box-shadow: 0 0 0 2px var(--action); font-size: 1rem; }

/* ===== Détail d'un souhait ===== */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; border-radius: var(--r-lg); }
.carousel img { flex: none; width: 100%; aspect-ratio: 1; max-height: min(55vh, 520px); object-fit: contain; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); scroll-snap-align: center; }
.notes { white-space: pre-wrap; }
.noimg { height: 170px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--subtle); }
.noimg img { width: 120px; height: 120px; border-radius: var(--r-lg); }

/* ===== Page en mémoire (personne décédée) ===== */
.hero.memorial .banner { background-color: #161e2b; }
.memorial-label { font-family: var(--display); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.memorial-photos { position: relative; margin-top: 14px; border-radius: var(--r-lg); overflow: hidden; background: #0b1626; border: 1px solid var(--line); }
.memorial-photos .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.memorial-photos .track::-webkit-scrollbar { display: none; }
.memorial-photos img { flex: none; width: 100%; height: min(62vh, 560px); object-fit: contain; scroll-snap-align: center; }
.memorial-photos .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(7,31,67,.7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.memorial-photos .nav svg { width: 22px; height: 22px; }
.memorial-photos .prev { left: 10px; }
.memorial-photos .next { right: 10px; }
.memorial-photos .next svg { transform: rotate(180deg); }
.memorial-photos .count { position: absolute; bottom: 10px; right: 12px; background: rgba(7,31,67,.75); color: #fff; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: var(--r-pill); }
.person.memorial img { filter: grayscale(.35); }
.person.memorial .cap span { color: #e2e8f0; letter-spacing: .04em; }
.import-log { white-space: pre-wrap; font-size: .8rem; max-height: 320px; overflow: auto; margin: 10px 0 0; color: var(--muted); }
input[type=file] { font-size: .95rem; color: var(--text); }
.item-title { font-size: 1.75rem; }

/* ===== Connexion ===== */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #071f43; color: #fff; color-scheme: dark; }
.login .box { width: 100%; max-width: 400px; text-align: center; }
.login img.logo { width: 240px; margin: 0 auto 10px; border-radius: 28px; }
.login .muted { color: #b8c6da; font-size: 1.05rem; }
.login input { background: #0b1626 !important; border-color: #1a2d45 !important; color: #fff !important; }
.login .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.login p.small { font-size: 1rem; }
.pin { letter-spacing: .45em; text-align: center; font-size: 1.9rem !important; font-family: var(--display) !important; font-weight: 700; }

table.stats { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.stats th, table.stats td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.stats th { font-family: var(--display); font-weight: 700; color: var(--title); }

/* ===== Bogues : tableau par statut ===== */
.board { display: grid; gap: 18px; margin-top: 8px; }
@media (min-width: 680px) { .board { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.board-col h2 { font-size: 1.1rem; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.board-col .card + .card { margin-top: 8px; }
.feedback-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== Journal d'audit (admin) ===== */
.audit-summary { display: grid; gap: 10px; margin: 14px 0; }
.audit-summary .chips { margin: 0; flex-wrap: wrap; }
.audit-filters { margin-bottom: 16px; }
.audit-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.audit-grid label.f:nth-child(3) { grid-column: 1 / -1; }
.audit-grid label.f { min-width: 0; }
.audit-grid input, .audit-grid select { min-width: 0; width: 100%; max-width: 100%; }
@media (min-width: 620px) { .audit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .audit-grid label.f:nth-child(3) { grid-column: auto; } }
.audit-list { display: grid; gap: 10px; }
.audit-row { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; min-width: 0; }
.audit-row.risk-critical { border-left-color: var(--danger); }
.audit-row.risk-high { border-left-color: var(--warning); }
.audit-row.risk-medium { border-left-color: var(--action); }
.audit-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--display); color: var(--title); }
.audit-line { margin-top: 4px; color: var(--text); overflow-wrap: anywhere; }
.audit-row details { margin-top: 6px; }
.audit-row summary { cursor: pointer; color: var(--link); font-weight: 600; }
.audit-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; font-size: .88rem; }
.audit-dl dt { color: var(--muted); font-weight: 600; }
.audit-dl dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.audit-dl pre { margin: 0; white-space: pre-wrap; font-size: .82rem; }
.audit-row code { font-size: .85em; }
.risk-badge { flex: none; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: var(--r-pill); background: var(--subtle); color: var(--muted); }
.risk-badge.risk-critical, .risk-chip.risk-critical { background: var(--danger-bg); color: var(--danger); }
.risk-badge.risk-high, .risk-chip.risk-high { background: var(--warning-bg); color: var(--warning); }
.risk-badge.risk-medium, .risk-chip.risk-medium { background: var(--secret-bg); color: var(--action); }
.audit-row button.link, .audit-filters button.link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
