/* Legacy shell declarations. Tokens are defined once in the canonical block below. */
*{box-sizing:border-box}body{margin:0;background:var(--app-bg);color:var(--app-text);font-family:var(--app-font)}.app-shell{min-height:100vh;display:flex}.app-sidebar{position:fixed;inset:0 auto 0 0;width:var(--app-sidebar-width);padding:24px 14px;background:linear-gradient(180deg,var(--app-sidebar),var(--app-sidebar-deep));color:#fff;display:flex;flex-direction:column}.app-brand,.app-context,.app-account,.app-search,.app-navigation-item{display:flex;align-items:center;gap:10px}.app-brand{padding:0 10px 28px;font-weight:700;font-size:20px}.app-brand svg{width:28px;height:28px;color:#75d2b9}.app-navigation{list-style:none;margin:0;padding:0}.app-navigation-item{padding:11px 12px;border-radius:9px;color:#d7edeb;font-size:14px}.app-navigation-item.is-active{background:rgb(111 209 182 / 24%);color:#fff;font-weight:650}.app-navigation-item svg,.app-topbar svg{width:18px;height:18px}.app-sidebar-footer{margin-top:auto;padding-top:20px;border-top:1px solid rgb(255 255 255 / 13%)}.app-main{width:calc(100% - var(--app-sidebar-width));margin-left:var(--app-sidebar-width)}.app-topbar{min-height:72px;padding:12px 32px;display:flex;gap:18px;align-items:center;background:var(--app-surface);border-bottom:1px solid var(--app-border)}.app-context,.app-account{color:var(--app-muted);font-size:14px;white-space:nowrap}.app-search{margin-left:auto;min-width:280px;padding:10px 12px;border:1px solid var(--app-border);border-radius:9px;color:var(--app-muted)}.app-search input{width:100%;border:0;outline:0;background:transparent}.app-icon-button{border:0;background:transparent;padding:8px}.app-content{padding:32px}.app-menu-toggle{display:none}@media (max-width:1299px){.app-shell{display:block}.app-sidebar{z-index:10;transform:translateX(-100%);transition:transform .2s ease}.app-main{width:100%;margin-left:0}.app-menu-toggle{display:grid;place-items:center;position:fixed;z-index:20;top:17px;left:16px;width:38px;height:38px;border:1px solid var(--app-border);border-radius:9px;background:var(--app-surface)}.app-menu-toggle svg{width:20px;height:20px}.app-navigation-open .app-sidebar{transform:translateX(0)}.app-topbar{padding-left:68px;gap:12px}.app-search{min-width:0}.app-content{padding:24px 16px}}

/* Tokens graphiques canoniques : toute nouvelle règle commune les réutilise. */
:root {
    --app-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --app-sidebar-width: 264px;
    --app-sidebar: #0b4c4a;
    --app-sidebar-deep: #063d3c;
    --app-accent: #087f72;
    --app-accent-hover: #076e63;
    --app-accent-strong: var(--app-accent-hover);
    --app-accent-soft: #dff3ed;
    --app-primary: var(--app-accent);
    --app-primary-soft: var(--app-accent-soft);
    --app-text: #193432;
    --app-text-secondary-strong: #2a3634;
    --app-text-secondary: #6b7d7b;
    --app-muted: #6b7d7b;
    --app-border: #dce7e5;
    --app-bg: #f6f8f8;
    --app-surface: #ffffff;
    --app-card-background: var(--app-surface);
    --app-surface-subtle: #f2f8f6;
    --app-surface-muted: var(--app-surface-subtle);
    --app-info: #3a7bd5;
    --app-shadow: 0 1px 2px rgb(21 50 47 / 6%);
    --app-state-available: #68B99A;
    --app-state-attributed: #71A3D3;
    --app-state-occupied: #5D828E;
    --app-state-review: #D9A85F;
    --app-state-unavailable: #BD6969;
    --app-success: var(--app-state-available);
    --app-warning: var(--app-state-review);
    --app-warning-hover: #bb8534;
    --app-danger: var(--app-state-unavailable);
    --app-danger-hover: #a94f4f;
    --app-control-height: 40px;
    --app-control-height-compact: 36px;
    --app-control-radius: 9px;
    --app-field-gap: 6px;
    --app-field-radius: 10px;
    --app-field-padding-inline: 11px;
    --app-control-border: #e2ebea;
    --app-control-border-hover: #a6c7c0;
    --app-control-border-focus: #71afa4;
    --app-control-focus-ring: rgb(26 154 138 / 16%);
    --app-control-disabled-border: #d8e2e0;
    --app-control-disabled-text: #7a8b88;
    --app-control-disabled-surface: #f3f6f5;
    --app-control-error-border: #a94f40;
    --app-control-error-ring: rgb(169 79 64 / 14%);
    --app-control-error-text: #7a372d;
    --app-control-error-surface: #fff4f1;
    --app-card-radius: 12px;
    --app-radius: var(--app-card-radius);
    --app-button-padding-inline: 14px;
    --app-space-1: 4px;
    --app-space-2: 8px;
    --app-space-3: 12px;
    --app-space-4: 16px;
    --app-space-5: 20px;
    --app-space-6: 24px;
}

.document-list{display:grid;gap:.5rem;margin:0;padding:0;list-style:none}.document-list li{display:flex;align-items:center;gap:.7rem;padding:.7rem 0;border-bottom:1px solid var(--app-border,#dbe5e3)}.document-list li>svg{width:1.2rem;height:1.2rem;fill:var(--app-accent,#167d70);color:var(--app-accent)}.document-list li>div:not(.document-actions){min-width:0;flex:1;display:grid;gap:.15rem}.document-list small{color:var(--app-muted,#657672)}.document-download{width:30px;height:30px;border:1px solid var(--app-border,#dbe5e3);border-radius:50%;display:grid;place-items:center;flex:none}.document-download svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.document-pending{font-size:.82rem;color:var(--app-muted,#657672)}.document-upload-modal[hidden]{display:none}.document-upload-modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:24px}.document-upload-overlay{position:absolute;inset:0;background:rgba(22,34,31,.42)}.document-upload-drawer{position:relative;width:min(620px,calc(100% - 32px));max-height:calc(100vh - 48px);overflow:auto;border-radius:16px;background:var(--app-surface,#fff);box-shadow:0 24px 64px rgba(0,0,0,.2)}.document-upload-drawer>header,.document-upload-drawer>footer{padding:20px 24px;border-bottom:1px solid var(--app-border,#dbe5e3);display:flex;justify-content:space-between;gap:16px;align-items:center}.document-upload-drawer>footer{border-top:1px solid var(--app-border,#dbe5e3);border-bottom:0}.document-upload-body{padding:20px 24px;display:grid;gap:16px}.document-file-drop{display:grid;gap:.5rem;padding:16px;border:1px dashed var(--app-accent,#167d70);border-radius:10px;background:#edf7f4}.document-file-drop.is-dragging{background:var(--app-primary-soft,#dff1eb)}.document-file-control{display:flex;gap:.75rem;align-items:center;min-width:0}.document-file-control .app-button{pointer-events:none}.document-file-control>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-file-input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}.document-file-help{margin:0;color:var(--app-muted,#657672);font-size:.85rem}@media(max-width:640px){.document-upload-modal{padding:12px}.document-upload-drawer>header,.document-upload-drawer>footer,.document-upload-body{padding-left:16px;padding-right:16px}.document-upload-drawer>footer{align-items:stretch;flex-direction:column-reverse}.document-upload-drawer>footer .app-button{width:100%}.document-file-control{align-items:flex-start;flex-direction:column}}

* {
    box-sizing: border-box;
}

body {
    line-height: 1.45;
}

button,
input,
select {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
}

:where(a:link, a:visited) {
    color: var(--app-accent);
}

:where(a:hover, a:focus-visible) {
    color: var(--app-accent);
    text-decoration: underline;
}

:where(a:active) {
    color: var(--app-text-secondary-strong);
}

:focus-visible {
    outline: 3px solid #1a9a8a;
    outline-offset: 3px;
}

.app-skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    transform: translateY(-160%);
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: var(--app-shadow);
}

.app-skip-link:focus {
    transform: translateY(0);
}

.app-sidebar {
    z-index: 30;
    padding: 24px 14px 18px;
    box-shadow: inset -1px 0 rgb(255 255 255 / 7%);
    overflow-y: auto;
}

.app-brand {
    padding-bottom: 6px;
    letter-spacing: -0.02em;
}

.app-brand-commune {
    margin: 10px 10px 22px;
    color: rgb(225 244 240 / 75%);
    font-size: 12px;
    line-height: 1.35;
}

.app-navigation {
    display: grid;
    gap: 3px;
}

.app-navigation-item {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: #d6e8e5;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.app-navigation-item svg {
    flex: 0 0 auto;
}

.app-navigation-item.is-active {
    background: rgb(133 220 195 / 24%);
    box-shadow: inset 3px 0 #8ce0c5;
}

.app-navigation-item.is-disabled {
    color: rgb(214 232 229 / 88%);
    cursor: not-allowed;
}

.app-navigation-item.is-disabled svg {
    opacity: 0.72;
}

.app-topbar {
    position: relative;
    z-index: 10;
    min-height: 78px;
    padding: 12px 32px;
    gap: 16px;
    box-shadow: var(--app-shadow);
}

.app-cemetery-context,
.app-cemetery-form,
.app-no-cemetery-context,
.app-account,
.app-notifications,
.app-logout-form {
    display: flex;
    align-items: center;
}

.app-cemetery-form {
    gap: 8px;
}

.app-cemetery-label,
.app-no-cemetery-context > svg {
    display: inline-flex;
    color: var(--app-accent);
}

.app-cemetery-label svg,
.app-no-cemetery-context svg {
    width: 19px;
    height: 19px;
}

.app-cemetery-submit,
.app-logout-button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    color: var(--app-text);
    cursor: pointer;
}

.app-cemetery-submit:hover,
.app-logout-button:hover {
    border-color: #a6c7c0;
    background: #f2f8f6;
}

.app-no-cemetery-context {
    gap: 8px;
    margin: 0;
    color: var(--app-muted);
    font-size: 14px;
}

.app-search {
    min-width: 250px;
    max-width: 430px;
    margin-left: auto;
    color: #91a09e;
    background: #fbfcfc;
}

.app-search input:disabled {
    cursor: not-allowed;
    color: #91a09e;
}

/* Recherche rapide : elle réutilise les cartes et l’aperçu de la page Recherche. */
.app-quick-search { position:relative; flex:1 1 520px; min-width:320px; max-width:760px; margin-inline:auto; }
.app-quick-search .app-search { width:100%; min-width:0; max-width:none; margin:0; }
.app-quick-search .app-search:focus-within { border-color:var(--app-accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--app-accent) 16%,transparent); }
.app-quick-search .app-search input { color:var(--app-text); font:inherit; }
.app-quick-search .app-search input::placeholder { color:var(--app-muted); }
.app-quick-search-clear { display:grid; width:26px; height:26px; flex:0 0 auto; place-items:center; border:0; border-radius:50%; color:var(--app-muted); background:transparent; font:inherit; font-size:21px; line-height:1; cursor:pointer; }
.app-quick-search-clear:hover,.app-quick-search-clear:focus-visible { color:var(--app-text); background:#eaf2f0; outline:0; }
.app-quick-search-all-button { display:grid; width:32px; height:32px; flex:0 0 auto; place-items:center; border:1px solid transparent; border-radius:8px; color:#fff; background:var(--app-accent); cursor:pointer; }
.app-quick-search-all-button:hover { color:#fff; background:var(--app-accent-hover); }
.app-quick-search-all-button:focus-visible { outline:3px solid color-mix(in srgb,var(--app-accent) 28%,transparent); outline-offset:1px; }
.app-quick-search-panel { position:fixed; z-index:80; top:88px; left:calc(var(--app-sidebar-width) + ((100vw - var(--app-sidebar-width)) / 2)); width:min(85vw,calc((100vw - var(--app-sidebar-width)) * .85)); max-height:calc(100vh - 102px); overflow:auto; padding:20px; border:1px solid var(--app-border); border-radius:16px; background:var(--app-surface); box-shadow:0 20px 44px rgb(22 54 49 / .20); transform:translateX(-50%); overscroll-behavior:contain; }
.app-quick-search-panel[hidden] { display:none; }
.app-quick-search-panel [hidden] { display:none !important; }
.app-quick-search-status { min-height:20px; margin:0; color:var(--app-muted); font-size:13px; line-height:1.45; }
.app-quick-search-error { margin:0; font-size:13px; }
.app-quick-search-results { display:grid; gap:20px; }
.app-quick-search-group { display:grid; gap:12px; }
.app-quick-search-group--suggestions { padding-top:20px; border-top:1px solid var(--app-border); }
.app-quick-search-group__header h2,.app-quick-search-group__header p { margin:0; }
.app-quick-search-group__header h2 { color:var(--app-text); font-size:18px; }
.app-quick-search-group__header p { margin-top:4px; color:var(--app-muted); font-size:13px; line-height:1.4; }
.app-quick-search-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:12px; }
.app-quick-search-list .search-result-card.is-active { border-color:var(--app-accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--app-accent) 13%,transparent); outline:0; }

.app-notifications {
    position: relative;
}

.app-icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    color: var(--app-muted);
    background: var(--app-surface);
}

.app-icon-button:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.app-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 1px 5px;
    border: 2px solid var(--app-surface);
    border-radius: 999px;
    color: #fff;
    background: var(--app-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}

.app-account {
    gap: 9px;
    min-width: 0;
}

.app-account-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #0d615a;
    background: var(--app-accent-soft);
}

.app-account-avatar svg {
    width: 21px;
    height: 21px;
}

.app-account-details {
    display: grid;
    min-width: 0;
    color: var(--app-muted);
    font-size: 12px;
}

.app-account-details strong {
    overflow: hidden;
    color: var(--app-text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-details > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-content {
    max-width: 1540px;
    margin: 0 auto;
    padding: 36px 10px 48px;
}

.app-content > main {
    max-width: 920px;
    padding: 28px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

/* Shared shell for full-width business lists; record details use app-detail-* instead. */
.app-content > .app-list-page { width:100%; min-width:0; max-width:none; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.app-list-page { display:grid; width:100%; min-width:0; gap:20px; }
.app-list-header { display:flex; align-items:end; justify-content:space-between; gap:18px; }
.app-list-header h1 { margin:0; }.app-list-header > div:first-child > span { color:var(--app-muted); }
.app-list-header__actions { display:flex; align-items:center; gap:10px; }
.app-list-hero,
.app-detail-header.app-detail-hero {
    position:relative;
    overflow:hidden;
    padding:26px 32px;
    border-radius:18px;
    color:#f8fffd;
    background:radial-gradient(circle at 88% 36%,rgb(143 230 206 / 25%) 0 2px,transparent 3px),radial-gradient(circle at 92% 42%,rgb(143 230 206 / 18%) 0 2px,transparent 3px),linear-gradient(118deg,#064b48 0%,#08796f 57%,#139786 100%);
    box-shadow:0 18px 42px rgb(7 76 70 / 16%);
}
.app-list-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,34%); grid-template-rows:auto; gap:20px 28px; }
.app-detail-header.app-detail-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,34%); grid-template-rows:auto auto; align-items:start; justify-content:normal; gap:20px 28px; }
.app-list-hero--without-aside,.app-detail-header.app-detail-hero--without-aside { grid-template-columns:minmax(0,1fr); }
.app-list-hero::after,.app-detail-header.app-detail-hero::after { position:absolute; top:-118px; right:8%; width:260px; height:260px; border:1px solid rgb(255 255 255 / 18%); border-radius:50%; box-shadow:0 0 0 26px rgb(255 255 255 / 5%),0 0 0 56px rgb(255 255 255 / 4%); content:""; }
.app-list-hero__top { display:contents; }
.app-list-hero__copy,.app-list-hero__aside,.app-list-hero__tabs { position:relative; z-index:1; }
.app-list-hero__copy { grid-column:1; grid-row:1; min-width:0; }
.app-content .app-list-hero h1 { margin:0; color:#fff; font-size:clamp(32px,3vw,42px); letter-spacing:-.05em; }
.app-content .app-list-hero__description { max-width:650px; margin:7px 0 0; color:#d5f0ea; font-size:15px; }
.app-list-hero__copy .app-detail-breadcrumb { margin:0 0 8px; color:#bde8dd; }
.app-list-hero__copy .app-detail-breadcrumb a,.app-list-hero__copy .app-detail-breadcrumb strong { color:inherit; }
.app-list-hero__copy .app-detail-breadcrumb a:hover { color:#fff; }
.app-list-hero__aside { grid-column:2; grid-row:1; display:flex; min-width:0; flex-direction:column; align-items:flex-end; gap:12px; }
.app-list-hero__scope { display:grid; grid-template-columns:24px minmax(0,1fr); min-width:min(330px,34%); align-items:center; gap:12px; padding:13px 15px; border:1px solid rgb(255 255 255 / 26%); border-radius:13px; background:rgb(2 49 46 / 25%); backdrop-filter:blur(8px); }
.app-list-hero__scope svg { display:block; width:20px; height:20px; max-width:100%; max-height:100%; color:#b2efe0; }
.app-list-hero__scope div { display:grid; min-width:0; gap:2px; }
.app-list-hero__scope span { color:#bde8dd; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.app-list-hero__scope strong { overflow:hidden; color:#fff; font-size:15px; text-overflow:ellipsis; white-space:nowrap; }
.app-list-hero__actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; margin-top:auto; }
.app-list-hero > .app-list-hero__actions { position:relative; z-index:1; grid-column:2; grid-row:2; }
.app-list-hero .app-button--hero-primary { border-color:rgb(255 255 255 / 76%); color:#064b48; background:#fff; box-shadow:0 1px 2px rgb(2 49 46 / 18%); }
.app-list-hero .app-button--hero-primary svg,.app-list-hero .app-button--hero-primary .app-button__icon { color:#087f72; }
.app-list-hero .app-button--hero-primary:hover { border-color:#d9f0e9; color:#064b48; background:#e9f8f3; }
.app-list-hero .app-button--hero-secondary { border-color:rgb(255 255 255 / 48%); color:#fff; background:rgb(2 49 46 / 18%); }
.app-list-hero .app-button--hero-secondary svg,.app-list-hero .app-button--hero-secondary .app-button__icon { color:currentColor; }
.app-list-hero .app-button.app-button--hero-secondary:hover:not(:disabled) { border-color:rgb(255 255 255 / 68%); color:#fff; background:rgb(255 255 255 / 16%); }
.app-list-hero .app-button--hero-primary:focus-visible,.app-list-hero .app-button--hero-secondary:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.app-list-hero .app-segmented-control { padding:3px; border-color:rgb(255 255 255 / 32%); background:rgb(2 49 46 / 26%); }
.app-list-hero .app-segmented-control a { color:#fff; }
.app-list-hero .app-segmented-control a:hover { color:#fff; background:rgb(255 255 255 / 14%); }
.app-list-hero .app-segmented-control a:focus-visible { outline-color:#fff; }
.app-list-hero .app-segmented-control a.is-active { color:#064b48; background:#fff; box-shadow:0 1px 3px rgb(2 49 46 / 20%); }
.app-list-hero--with-tabs { grid-template-rows:auto auto; }
.app-list-hero--with-tabs .app-list-hero__aside { grid-row:1 / span 2; }
.app-list-hero__tabs { grid-column:1; grid-row:2; align-self:end; }
.app-detail-hero > * { position:relative; z-index:1; }
.app-detail-hero .app-detail-header__heading { grid-column:1; grid-row:1; gap:10px; }
.app-detail-hero .app-detail-hero__aside { display:flex; grid-column:2; grid-row:1; min-width:0; flex-direction:column; align-items:flex-end; }
.app-detail-hero .app-list-hero__scope { min-width:0; }
.app-detail-hero .app-detail-breadcrumb { margin:0; color:#bde8dd; }
.app-detail-hero .app-detail-breadcrumb a,.app-detail-hero .app-detail-breadcrumb strong { color:inherit; }
.app-detail-hero .app-detail-breadcrumb a:hover { color:#fff; }
.app-content .app-detail-hero h1 { margin:0; color:#fff; font-size:clamp(32px,3vw,42px); letter-spacing:-.05em; }
.app-detail-hero__internal-reference { color:#fff; font-size:.65em; font-weight:500; letter-spacing:normal; white-space:nowrap; }
.app-content .app-detail-hero__description { max-width:650px; margin:7px 0 0; color:#d5f0ea; font-size:15px; }
.app-detail-hero .app-detail-subtitle { margin:0; color:#bde8dd; }
.app-detail-hero__actions { display:flex; grid-column:1 / -1; grid-row:2; min-width:0; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.app-detail-hero__actions > form { margin:0; }
.app-detail-hero__actions > form > .app-button { width:100%; }
.app-detail-hero .app-button:not(.app-button--primary):not(.app-button--danger):not(:disabled) { border-color:rgb(255 255 255 / 48%); color:#fff; background:rgb(2 49 46 / 18%); }
.app-detail-hero .app-button:not(.app-button--primary):not(.app-button--danger):not(:disabled) svg,.app-detail-hero .app-button:not(.app-button--primary):not(.app-button--danger):not(:disabled) .app-button__icon { color:currentColor; }
.app-detail-hero .app-button:not(.app-button--primary):not(.app-button--danger):not(:disabled):hover { border-color:rgb(255 255 255 / 68%); color:#fff; background:rgb(255 255 255 / 16%); }
.app-detail-hero .app-button--primary { border-color:rgb(255 255 255 / 76%); color:#064b48; background:#fff; box-shadow:0 1px 2px rgb(2 49 46 / 18%); }
.app-detail-hero .app-button--primary svg,.app-detail-hero .app-button--primary .app-button__icon { color:#087f72; }
.app-detail-hero .app-button--primary:hover:not(:disabled) { border-color:#d9f0e9; color:#064b48; background:#e9f8f3; }
.app-detail-hero .app-button--danger { border-color:#f2b4b4; color:#fff; background:#a64646; }
.app-detail-hero .app-button--danger:hover:not(:disabled) { border-color:#ffd0d0; color:#fff; background:#8e3838; }
.app-detail-hero .app-button:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.app-list-kpis { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:16px; }
.app-list-kpi { display:grid; grid-template-columns:40px minmax(0,1fr); align-items:center; min-height:94px; gap:13px; padding:16px; border:1px solid var(--app-border); border-radius:11px; background:var(--app-card-background); }
.app-list-kpi__icon { display:grid; width:38px; height:38px; place-items:center; border-radius:10px; background:var(--app-accent-soft); color:var(--app-accent); }.app-list-kpi__icon svg { width:18px;height:18px; }.app-list-kpi > div { display:grid;gap:4px; }.app-list-kpi strong { color:var(--app-text);font-size:25px;line-height:1; }.app-list-kpi span { color:var(--app-text);font-size:14px;font-weight:700; }.app-list-kpi--review .app-list-kpi__icon { color:var(--app-state-review);background:#fff8e7; }
.defunts-kpi-summary { display:grid; gap:0; }
.defunts-page .app-list-kpis { grid-template-columns:repeat(5,minmax(0,1fr)); }
.defunts-kpi-help { margin-top:16px; }
.app-list-toolbar { display:grid; width:100%; align-items:center; gap:12px; }.app-list-table { width:100%; overflow:auto; border:1px solid var(--app-border); border-radius:12px; background:#fff; }.app-list-table table { width:100%; border-collapse:collapse; }.app-list-table th,.app-list-table td { padding:13px; border-bottom:1px solid var(--app-border); text-align:left; font-size:13px; white-space:nowrap; }.app-list-table tbody tr:last-child td { border-bottom:0; }
.app-list-table th a { color:var(--app-text); text-decoration:none; }

/* Aide de lecture réservée aux sept listes métier principales. */
:is(.emplacements-page .emplacements-table-wrap, .concessions-page .concessions-table-wrap, .defunts-page .app-list-table, .persons-page .app-list-table, .interventions-page .app-list-table, .constats-page .app-list-table) tbody tr:not(.is-archived):not(.is-selected):not(.is-active):not(.has-alert):focus-within,
.documents-page .documents-results__list > li:not(.is-retired):focus-within {
    background: #f2f8f6;
}

@media (hover: hover) and (pointer: fine) {
    :is(.emplacements-page .emplacements-table-wrap, .concessions-page .concessions-table-wrap, .defunts-page .app-list-table, .persons-page .app-list-table, .interventions-page .app-list-table, .constats-page .app-list-table) tbody tr:not(.is-archived):not(.is-selected):not(.is-active):not(.has-alert):hover,
    .documents-page .documents-results__list > li:not(.is-retired):hover {
        background: #f2f8f6;
    }
}
.app-section-number { display:grid; width:25px; height:25px; flex:0 0 25px; place-items:center; border-radius:50%; background:var(--app-accent); color:#fff; font-size:13px; font-weight:750; }
@media(max-width:1299px){.app-list-kpis,.defunts-page .app-list-kpis{grid-template-columns:repeat(2,minmax(150px,1fr));}}@media(max-width:700px){.app-list-header{align-items:flex-start;flex-direction:column}.app-list-header__actions{width:100%}.app-list-header__actions .app-button{width:100%}.app-list-hero{grid-template-columns:1fr;grid-template-rows:auto;gap:18px;padding:22px 20px}.app-list-hero__top{display:flex;align-items:stretch;flex-direction:column;gap:18px}.app-list-hero__copy,.app-list-hero__aside,.app-list-hero__tabs,.app-list-hero>.app-list-hero__actions{grid-column:auto;grid-row:auto}.app-list-hero__aside{width:100%;min-width:0;align-items:stretch}.app-list-hero__scope{width:100%;min-width:0}.app-list-hero__actions{justify-content:stretch;width:100%;margin-top:0}.app-list-hero__actions .app-button{width:100%}.app-list-kpis,.defunts-page .app-list-kpis{grid-template-columns:1fr;}}

.app-content h1 {
    margin: 0 0 8px;
    letter-spacing: -0.03em;
}

.app-content p {
    color: var(--app-muted);
}

.app-menu-overlay {
    display: none;
}

.app-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-cemetery-enhanced .app-cemetery-submit {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1299px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        transform: none;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .app-menu-toggle {
        display: none;
    }

    .app-topbar {
        flex-wrap: wrap;
        padding: 14px 18px;
    }

    .app-search {
        display: none;
    }

    .app-content {
        padding: 24px 18px 36px;
    }

    .app-layout-enhanced .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, calc(100vw - 48px));
        min-height: 100vh;
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .app-layout-enhanced .app-menu-toggle {
        display: grid;
        place-items: center;
    }

    .app-layout-enhanced .app-menu-overlay {
        position: fixed;
        z-index: 20;
        inset: 0;
        border: 0;
        background: rgb(11 35 33 / 42%);
    }

    .app-layout-enhanced.app-navigation-open .app-sidebar {
        transform: translateX(0);
    }

    .app-layout-enhanced.app-navigation-open .app-menu-overlay {
        display: block;
    }

    .app-layout-enhanced.app-navigation-open {
        overflow: hidden;
    }

    .app-layout-enhanced .app-topbar {
        padding-left: 68px;
    }

    .app-account-details > span {
        display: none;
    }

    .app-logout-button {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 680px) {
    .app-topbar {
        gap: 10px;
    }

    .app-cemetery-context {
        flex: 1 1 100%;
        order: 1;
    }

    .app-cemetery-form {
        width: 100%;
    }

    .app-cemetery-form select {
        min-width: 0;
        width: 100%;
        max-width: none;
    }

    .app-account {
        margin-left: auto;
    }

    .app-account-details {
        display: none;
    }

    .app-content > main {
        padding: 22px;
    }
}

/* Marque ServiCime : proportions intrinsèques conservées sur tous les formats. */
.app-brand-logo {
    display: block;
    width: 100%;
    max-width: 196px;
    height: auto;
    object-fit: contain;
}

/* Actions secondaires ancrées au bas de la navigation. */
.app-sidebar-bottom {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgb(255 255 255 / 13%);
}

.app-sidebar-bottom > .app-navigation-item {
    margin-bottom: 10px;
}

.app-support {
    padding: 14px 12px;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 10px;
    background: rgb(0 0 0 / 9%);
}

.app-support h2 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
}

.app-support-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    color: rgb(214 232 229 / 88%);
    font-size: 13px;
    cursor: not-allowed;
}

.app-support-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.78;
}

.app-sidebar-legal-links {
    display: grid;
    gap: 6px;
    margin: 10px 12px 0;
}

.app-sidebar-privacy-link {
    display: block;
    color: rgb(214 232 229 / 74%);
    font-size: 12px;
    line-height: 1.4;
    text-decoration: none;
}

.app-sidebar-privacy-link:hover,
.app-sidebar-privacy-link.is-active {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.app-sidebar-privacy-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
    border-radius: 3px;
}

.app-sidebar-version {
    margin: 8px 12px 0;
    color: rgb(214 232 229 / 58%);
    font-size: 11px;
    line-height: 1.3;
}

/* Menu compact du compte, sans créer d'espace de profil fictif. */
.app-account-menu {
    position: relative;
    flex: 0 0 auto;
}

/* L'Admin global n'a pas de contexte communal au centre du header : le compte reste ancré à droite. */
.app-topbar--admin .app-account-menu {
    margin-left: auto;
}

button.app-account {
    padding: 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

button.app-account:hover {
    background: #f2f8f6;
}

.app-account-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
    box-shadow: 0 8px 24px rgb(21 50 47 / 14%);
}

.app-account-popover .app-logout-form {
    display: block;
}

.app-account-popover .app-logout-button {
    width: 100%;
    text-align: left;
}

@media (max-width: 1299px) {
    .app-sidebar-bottom {
        margin-top: 22px;
    }
}

/* Socle de formulaire : contrôles natifs enrichis, sans changer leur sémantique. */
.app-field {
    display: grid;
    gap: var(--app-field-gap);
    min-width: 0;
}

.app-field[hidden] {
    display: none;
}

.app-field-label {
    color: #254d48;
    font-size: 14px;
    font-weight: 650;
}

.app-input,
.app-textarea,
.app-select-control select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--app-control-border);
    border-radius: var(--app-field-radius);
    color: var(--app-text);
    background: var(--app-surface);
    box-shadow: 0 1px 1px rgb(21 50 47 / 3%);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
}

.app-input,
.app-select-control select {
    height: var(--app-control-height);
}

.app-input {
    padding: 0 var(--app-field-padding-inline);
}

.app-textarea {
    min-height: 100px;
    padding: 10px var(--app-field-padding-inline);
    line-height: 1.4;
    resize: vertical;
}

/* Le select demeure le contrôle interactif ; le chevron n'est qu'un repère visuel. */
.app-select-control {
    position: relative;
    display: block;
    min-width: 0;
}

.app-select-control select {
    max-width: none;
    padding: 0 36px 0 var(--app-field-padding-inline);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    line-height: 1;
}

.app-input:hover:not(:disabled),
.app-textarea:hover:not(:disabled),
.app-select-control select:hover:not(:disabled) {
    border-color: var(--app-control-border-hover);
    background: var(--app-surface-subtle);
}

.app-input:focus,
.app-input:focus-visible,
.app-textarea:focus,
.app-textarea:focus-visible,
.app-select-control select:focus,
.app-select-control select:focus-visible {
    outline: 0;
    border-color: var(--app-control-border-focus);
    box-shadow: 0 0 0 3px var(--app-control-focus-ring);
}

.app-input:disabled,
.app-textarea:disabled,
.app-select-control select:disabled {
    border-color: var(--app-control-disabled-border);
    color: var(--app-control-disabled-text);
    background: var(--app-control-disabled-surface);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}

.app-input--readonly,
.app-input[readonly],
.app-textarea[readonly] {
    border-color: var(--app-control-disabled-border);
    color: var(--app-control-disabled-text);
    background: var(--app-control-disabled-surface);
    box-shadow: none;
    cursor: default;
}

.app-input.is-invalid,
.app-textarea.is-invalid,
.app-select-control.is-invalid select,
.app-select-control select.is-invalid {
    border-color: var(--app-control-error-border);
    box-shadow: 0 0 0 3px var(--app-control-error-ring);
}

.app-input::placeholder,
.app-textarea::placeholder {
    color: var(--app-muted);
    opacity: 1;
}

.app-field-help,
.app-field-error {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.app-field-help {
    color: var(--app-muted);
}

.app-field-error {
    padding: 9px 11px;
    border-left: 3px solid var(--app-control-error-border);
    color: var(--app-control-error-text);
    background: var(--app-control-error-surface);
}

.app-select-chevron {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 16px;
    height: 16px;
    pointer-events: none;
    color: var(--app-muted);
    transform: translateY(-50%);
}

.app-cemetery-context {
    flex: 0 0 auto;
}

.app-cemetery-select-control {
    width: 248px;
}

.app-cemetery-label {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    pointer-events: none;
    transform: translateY(-50%);
}

.app-cemetery-label svg {
    width: 17px;
    height: 17px;
}

.app-cemetery-select-control select {
    padding: 0 36px 0 38px;
}

.app-search {
    flex: 1 1 520px;
    min-width: 320px;
    max-width: 760px;
    margin-inline: auto;
}

.app-search input {
    min-width: 0;
}

@media (max-width: 680px) {
    .app-cemetery-select-control {
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (max-width: 1299px) {
    .app-quick-search { display:block; flex:1 1 100%; order:3; min-width:0; max-width:none; margin:0; }
    .app-quick-search .app-search { display:flex; }
    .app-quick-search .app-quick-search-panel { position:absolute; top:calc(100% + 8px); left:0; width:100%; max-height:calc(100vh - 152px); transform:none; }
}

/* Accueil : présentation des données déjà qualifiées par DashboardData. */
.app-content > .dashboard {
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard {
    display: grid;
    gap: 24px;
}

.dashboard-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    min-height: 84px;
}

.dashboard-eyebrow {
    margin: 0 0 5px;
    color: var(--app-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard h1,
.dashboard h2,
.dashboard h3,
.dashboard p {
    margin-top: 0;
}

.dashboard h1 {
    margin-bottom: 5px;
    font-size: clamp(28px, 3vw, 34px);
}

.dashboard h2 {
    margin-bottom: 0;
    font-size: 19px;
    letter-spacing: -0.015em;
}

.dashboard-context,
.dashboard-section-note,
.dashboard-card-note,
.dashboard-empty-inline,
.dashboard-saturation > p {
    margin-bottom: 0;
    color: var(--app-muted);
    font-size: 14px;
}

.dashboard-section,
.dashboard-card,
.dashboard-empty {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.dashboard-section,
.dashboard-empty {
    padding: 24px;
}

.dashboard-section-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-section-heading .dashboard-section-note {
    max-width: 310px;
    text-align: right;
}

.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-metric {
    display: grid;
    min-height: 112px;
    align-content: space-between;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: #fbfcfc;
}

.dashboard-metric span {
    color: var(--app-muted);
    font-size: 13px;
}

.dashboard-metric strong {
    color: var(--app-text);
    font-size: 30px;
    line-height: 1;
}

.dashboard-metric--primary {
    border-color: #c9e6df;
    background: #f1faf7;
}

.dashboard-metric--review {
    border-color: #eadbb8;
    background: #fffaf0;
}

.dashboard-metric--physical {
    border-color: #d8e2e1;
    background: #f7f9f9;
}

.dashboard-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.dashboard-two-columns--wide > .dashboard-card {
    min-height: 220px;
}

.dashboard-summary-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.dashboard-summary-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--app-border);
}

.dashboard-summary-list > div:last-child {
    border-bottom: 0;
}

.dashboard-summary-list dt {
    color: var(--app-muted);
    font-size: 14px;
}

.dashboard-summary-list dt span {
    font-size: 12px;
}

.dashboard-summary-list dd {
    margin: 0;
    color: var(--app-text);
    font-size: 21px;
    font-weight: 700;
}

.dashboard-card-note {
    margin-top: 16px;
}

.dashboard-count {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #075b57;
    background: var(--app-accent-soft);
    font-size: 14px;
    font-weight: 700;
}

.dashboard-feed,
.dashboard-date-list,
.dashboard-activity-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-feed li,
.dashboard-date-list li,
.dashboard-activity-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--app-border);
}

.dashboard-feed li:first-child,
.dashboard-date-list li:first-child,
.dashboard-activity-list li:first-child {
    padding-top: 0;
}

.dashboard-feed li:last-child,
.dashboard-date-list li:last-child,
.dashboard-activity-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-feed strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.dashboard-feed p,
.dashboard-activity-list p {
    margin-bottom: 0;
    color: var(--app-muted);
    font-size: 13px;
}

.dashboard-level {
    align-self: start;
    padding: 3px 6px;
    border-radius: 5px;
    color: #725513;
    background: #fff4d9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dashboard-level--important {
    color: #914537;
    background: #fbe9e5;
}

.dashboard-level--information {
    color: #386a63;
    background: #e4f3ef;
}

.dashboard-feed .dashboard-attention-item {
    display: block;
}

.dashboard-attention-item__content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    color: inherit;
    text-decoration: none;
}

a.dashboard-attention-item__content:hover strong {
    color: var(--app-accent-strong);
}

a.dashboard-attention-item__content:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 3px;
    border-radius: 5px;
}

.dashboard-attention-item__details {
    min-width: 0;
}

.dashboard-attention-item__target {
    display: block;
    margin-top: 3px;
    color: var(--app-text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-feed p.dashboard-attention-item__reason {
    color: var(--app-text-secondary);
}

.dashboard-deadline-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-deadline-list a {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    background: var(--app-surface-subtle);
    text-decoration: none;
}

.dashboard-deadline-list a:hover {
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
}

.dashboard-deadline-list a:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 3px;
}

.dashboard-deadline-date {
    display: grid;
    justify-items: center;
    padding: 4px 2px;
    border: 1px solid var(--app-border);
    border-radius: 7px;
    background: var(--app-surface);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.dashboard-deadline-date strong {
    color: var(--app-accent-strong);
    font-size: 20px;
}

.dashboard-deadline-date span,
.dashboard-deadline-date small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dashboard-deadline-date small {
    color: var(--app-muted);
    font-weight: 600;
}

.dashboard-deadline-reference {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dashboard-deadline-delay {
    padding: 4px 7px;
    border-radius: 999px;
    color: #725513;
    background: #fff4d9;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.dashboard-date-list li {
    align-items: baseline;
    justify-content: space-between;
}

.dashboard-date-list time,
.dashboard-activity-list time {
    flex: 0 0 auto;
    color: var(--app-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.dashboard-date-list span {
    overflow: hidden;
    color: var(--app-text);
    font-size: 14px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-saturation {
    background: var(--app-card-background);
}

.dashboard-activity-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
}

.dashboard-activity-list li > span {
    padding: 3px 6px;
    border-radius: 5px;
    color: #386a63;
    background: #e4f3ef;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dashboard-cemetery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}

.dashboard-cemetery-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-subtle);
}

.dashboard-cemetery-card h3 {
    margin: 0;
    color: var(--app-text);
    font-size: 16px;
}

.dashboard-cemetery-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 8px;
    margin: 0;
}

.dashboard-cemetery-metric {
    min-width: 0;
    padding: 9px;
    border-radius: 10px;
    background: var(--app-surface);
}

.dashboard-cemetery-metric dt {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-cemetery-metric dd {
    margin: 8px 0 0;
    color: var(--app-text);
    font-size: clamp(24px, 2vw, 30px);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: .95;
}

.dashboard-cemetery-metric .dashboard-legend-dot {
    display: inline-block;
    flex: 0 0 9px;
}

.dashboard-cemetery-metric--total .dashboard-legend-dot {
    background: #3f7181;
}

.dashboard-cemetery-distribution {
    display: flex;
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--app-border);
}

.dashboard-cemetery-distribution__segment {
    min-width: 0;
    flex-basis: 0;
}

.dashboard-cemetery-distribution__segment--available { background: #75cdb5; }
.dashboard-cemetery-distribution__segment--attributed { background: #75adbf; }
.dashboard-cemetery-distribution__segment--occupied { background: #567888; }
.dashboard-cemetery-distribution__segment--review { background: #e8c66e; }

.dashboard-cemetery-footer {
    position: relative;
}

.dashboard-cemetery-card .dashboard-distribution-help {
    width: 100%;
    margin-top: 0;
}

.dashboard-cemetery-footer--with-plan .dashboard-distribution-help summary {
    padding-right: 176px;
}

.dashboard-cemetery-plan-form {
    margin: 0;
}

.dashboard-cemetery-footer--with-plan .dashboard-cemetery-plan-form {
    position: absolute;
    top: 12px;
    right: 0;
}

.dashboard-cemetery-plan-link {
    padding: 0;
    border: 0;
    color: var(--app-accent);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dashboard-cemetery-plan-link:hover {
    color: var(--app-accent-hover);
}

.dashboard-cemetery-plan-link:focus-visible {
    outline: 3px solid rgb(13 112 101 / 28%);
    outline-offset: 3px;
    border-radius: 3px;
}

@media (max-width: 480px) {
    .dashboard-cemetery-footer--with-plan .dashboard-distribution-help summary {
        padding-right: 0;
    }

    .dashboard-cemetery-footer--with-plan .dashboard-cemetery-plan-form {
        position: static;
        margin-top: 8px;
    }
}

.dashboard-empty {
    max-width: 680px;
}

.dashboard-empty h2 {
    margin-bottom: 8px;
}

.dashboard-empty p {
    margin-bottom: 0;
    color: var(--app-muted);
}

@media (max-width: 1180px) {
    .dashboard-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard {
        gap: 18px;
    }

    .dashboard-header,
    .dashboard-section-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-section,
    .dashboard-empty {
        padding: 19px;
    }

    .dashboard-section-heading .dashboard-section-note {
        max-width: none;
        text-align: left;
    }

    .dashboard-two-columns {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric {
        min-height: 98px;
        padding: 14px;
    }

    .dashboard-metric strong {
        font-size: 26px;
    }

    .dashboard-activity-list li {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .dashboard-activity-list time {
        justify-self: start;
    }
}

/* Accueil V1 : composition éditoriale à partir des seules données DashboardData. */
.dashboard--visual {
    gap: 22px;
}

.dashboard-header--visual {
    min-height: 62px;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-kpi,
.dashboard-plan-card,
.dashboard-actions-card,
.dashboard-distribution-card,
.dashboard-details-card,
.dashboard-list-card,
.dashboard-activity-card,
.dashboard-cemeteries-card,
.dashboard-saturation-card {
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.dashboard-kpi {
    display: flex;
    min-height: 146px;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
}

.dashboard-kpi-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: #087f72;
    background: #e2f4ee;
}

.dashboard-kpi-icon svg,
.dashboard-card-heading > svg {
    width: 22px;
    height: 22px;
}

.dashboard-kpi--concessions .dashboard-kpi-icon {
    color: #3f7181;
    background: #e7f2f5;
}

.dashboard-kpi--deceased .dashboard-kpi-icon {
    color: #6b5a8c;
    background: #f1edfa;
}

.dashboard-kpi--attention .dashboard-kpi-icon {
    color: #9a6b1d;
    background: #fff3d9;
}

.dashboard-kpi p {
    margin: 0 0 7px;
    color: var(--app-muted);
    font-size: 14px;
    font-weight: 600;
}

.dashboard-kpi strong {
    display: block;
    margin-bottom: 8px;
    color: var(--app-text);
    font-size: clamp(28px, 2.8vw, 38px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.dashboard-kpi div > span {
    display: block;
    color: var(--app-muted);
    font-size: 12px;
    line-height: 1.35;
}

.dashboard-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.dashboard-plan-card,
.dashboard-actions-card,
.dashboard-distribution-card,
.dashboard-details-card,
.dashboard-list-card,
.dashboard-activity-card,
.dashboard-cemeteries-card,
.dashboard-saturation-card {
    padding: 22px;
}

.dashboard-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-card-heading > svg {
    flex: 0 0 auto;
    color: var(--app-accent);
}

.dashboard-plan-name {
    max-width: 42%;
    overflow: hidden;
    padding: 5px 8px;
    border: 1px solid #cce6df;
    border-radius: 999px;
    color: #177a6e;
    background: #f0faf7;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-plan-preview {
    display: grid;
    place-items: center;
    height: 316px;
    overflow: hidden;
    border: 1px solid #d5e4e0;
    border-radius: 12px;
    background-color: #edf5f2;
    background-image: linear-gradient(rgb(88 133 124 / 11%) 1px, transparent 1px), linear-gradient(90deg, rgb(88 133 124 / 11%) 1px, transparent 1px);
    background-size: 26px 26px;
}

.dashboard-plan-preview-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.dashboard-plan-preview-link:focus-visible {
    outline: 3px solid var(--app-accent);
    outline-offset: 3px;
    border-radius: 14px;
}

.dashboard-plan-preview-world {
    width: 100%;
    height: 100%;
    display: block;
}

.dashboard-plan-shape {
    fill: var(--app-state-available);
    stroke: rgb(20 76 69 / 45%);
    stroke-width: .004;
}

.dashboard-plan-shape--attributed {
    fill: var(--app-state-attributed);
}

.dashboard-plan-shape--occupied {
    fill: var(--app-state-occupied);
}

.dashboard-plan-shape--requiresReview {
    fill: var(--app-state-review);
}

.dashboard-plan-shape--unknown {
    fill: #b8c8c5;
}

.dashboard-plan-shape-pattern {
    fill: url(#dashboard-plan-unavailable-pattern);
    pointer-events: none;
}

.dashboard-plan-caption,
.dashboard-disabled-note {
    margin: 12px 0 0;
    color: var(--app-muted);
    font-size: 12px;
}

.dashboard-plan-empty {
    display: grid;
    min-height: 316px;
    place-items: center;
    padding: 24px;
    border: 1px dashed #bad4cd;
    border-radius: 12px;
    color: var(--app-muted);
    background: #f7fbfa;
    text-align: center;
}

.dashboard-plan-empty svg {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
    color: #82afa5;
}

.dashboard-plan-empty p {
    max-width: 300px;
    margin: 0;
    color: var(--app-muted);
    font-size: 14px;
}

.dashboard-quick-actions {
    display: grid;
    gap: 8px;
}

.dashboard-quick-action {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: #536c69;
    background: #fbfcfc;
    cursor: not-allowed;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-quick-action--enabled {
    cursor: pointer;
    text-decoration: none;
}

.dashboard-quick-action--enabled:focus-visible {
    outline: 3px solid var(--app-accent);
    outline-offset: 3px;
}

.dashboard-quick-action svg {
    width: 18px;
    height: 18px;
    color: var(--app-accent);
}

.dashboard-insights-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) repeat(2, minmax(230px, 0.75fr));
    gap: 18px;
}

.dashboard-distribution-content {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 182px;
}

.dashboard-donut {
    position: relative;
    width: 156px;
    height: 156px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        #75cdb5 0 var(--available-end),
        #75adbf var(--available-end) var(--attributed-end),
        #567888 var(--attributed-end) var(--occupied-end),
        #e8c66e var(--occupied-end) 100%
    );
}

.dashboard-donut::after {
    position: absolute;
    inset: 27px;
    border-radius: 50%;
    background: var(--app-surface);
    content: '';
}

.dashboard-legend {
    display: grid;
    width: 100%;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: var(--app-muted);
    font-size: 13px;
}

.dashboard-legend strong {
    color: var(--app-text);
    font-size: 14px;
}

.dashboard-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #75cdb5;
}

.dashboard-legend-dot--attributed { background: #75adbf; }
.dashboard-legend-dot--occupied { background: #567888; }
.dashboard-legend-dot--review { background: #e8c66e; }
.dashboard-legend-dot--concession-active { background: var(--app-state-available); }
.dashboard-legend-dot--concession-near-deadline,
.dashboard-legend-dot--concession-review { background: var(--app-state-review); }
.dashboard-legend-dot--concession-expired { background: var(--app-state-unavailable); }

.dashboard-distribution-help {
    margin-top: 16px;
    border-top: 1px solid var(--app-border);
}

.dashboard-distribution-help summary {
    padding: 12px 0 2px;
    color: var(--app-accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-distribution-help summary:focus-visible {
    outline: 3px solid rgb(13 112 101 / 28%);
    outline-offset: 3px;
    border-radius: 3px;
}

.dashboard-distribution-help dl {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
}

.dashboard-distribution-help dl > div {
    display: grid;
    gap: 2px;
}

.dashboard-distribution-help dt {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--app-text);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-distribution-help .dashboard-legend-dot {
    display: inline-block;
    flex: 0 0 9px;
}

.dashboard-distribution-help dd {
    margin: 0;
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-details-card .dashboard-card-heading {
    margin-bottom: 4px;
}

.dashboard-summary-list--compact > div {
    padding: 13px 0;
}

.dashboard-summary-list--compact dd {
    font-size: 24px;
}

.dashboard-summary-list--concessions > div {
    align-items: center;
}

.dashboard-summary-list--concessions dt {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-summary-list--concessions .dashboard-legend-dot {
    display: inline-block;
    flex: 0 0 9px;
}

.dashboard-deceased-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0;
}

.dashboard-deceased-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.dashboard-deceased-metric--presences {
    background: var(--app-accent-soft);
}

.dashboard-deceased-metric--burials {
    background: var(--app-surface-subtle);
}

.dashboard-deceased-metric dt {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--app-text);
    font-size: 14px;
    font-weight: 700;
}

.dashboard-deceased-metric__icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--app-accent);
    background: var(--app-surface);
}

.dashboard-deceased-metric--burials .dashboard-deceased-metric__icon {
    color: var(--app-text-secondary);
}

.dashboard-deceased-metric__icon svg {
    width: 18px;
    height: 18px;
}

.dashboard-deceased-metric dd {
    margin: 0;
    color: var(--app-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.dashboard-lower-grid,
.dashboard-follow-up-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-follow-up-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.dashboard-timeline-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-timeline-list li {
    display: grid;
    grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
    align-items: start;
    column-gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: 13px;
}

.dashboard-timeline-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-timeline-list time {
    display: grid;
    gap: 2px;
    padding-right: 16px;
    border-right: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.dashboard-timeline-list time span {
    color: var(--app-muted);
    font-size: 11px;
}

.dashboard-timeline-list li > span { min-width: 0; }
.dashboard-timeline-list li > span small { display: block; margin-top: 3px; color: var(--app-muted); font-size: 11px; }
.dashboard-card-link { display: inline-flex; margin-top: 14px; color: var(--app-accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.dashboard-card-link--centered { display: flex; justify-content: center; }
.dashboard-card-link:hover, .dashboard-card-link:focus-visible { color: var(--app-accent-strong); text-decoration: none; }
.dashboard-card-link:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; border-radius: 3px; }

.dashboard-count--expired {
    color: var(--app-state-unavailable);
    background: #fff2f1;
}

.dashboard-expired-concession-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-expired-concession-list a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #edcfcb;
    border-radius: 10px;
    color: var(--app-text);
    background: #fff8f7;
    text-decoration: none;
}

.dashboard-expired-concession-list a:hover {
    border-color: var(--app-state-unavailable);
    background: #fff2f1;
}

.dashboard-expired-concession-list a:focus-visible {
    outline: 2px solid var(--app-state-unavailable);
    outline-offset: 3px;
}

.dashboard-expired-concession__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: var(--app-state-unavailable);
    background: #fff2f1;
}

.dashboard-expired-concession__icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-expired-concession__details {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.dashboard-expired-concession__details strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.dashboard-expired-concession__details > span {
    color: var(--app-muted);
    font-size: 12px;
}

.dashboard-expired-concession__delay {
    padding: 4px 7px;
    border-radius: 999px;
    color: #914537;
    background: #fbe9e5;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.dashboard-expired-empty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-subtle);
}

.dashboard-expired-empty > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--app-muted);
}

.dashboard-expired-empty strong,
.dashboard-expired-empty p {
    display: block;
    margin: 0;
}

.dashboard-expired-empty p {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 13px;
}

.dashboard-reminder-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-reminder-list a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    background: var(--app-surface-subtle);
    text-decoration: none;
}

.dashboard-reminder-list a:hover {
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
}

.dashboard-reminder-list a:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 3px;
}

.dashboard-reminder__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: var(--app-accent);
    background: var(--app-accent-soft);
}

.dashboard-reminder__icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-reminder__details {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.dashboard-reminder__details strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.dashboard-reminder__details time {
    color: var(--app-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.dashboard-reminder__timing {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.dashboard-reminder__timing--overdue {
    color: #914537;
    background: #fbe9e5;
}

.dashboard-reminder__timing--today {
    color: #725513;
    background: #fff4d9;
}

.dashboard-reminder__timing--upcoming {
    color: #386a63;
    background: #e4f3ef;
}

.dashboard-reminders-empty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-subtle);
}

.dashboard-reminders-empty > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--app-muted);
}

.dashboard-reminders-empty strong,
.dashboard-reminders-empty p {
    display: block;
    margin: 0;
}

.dashboard-reminders-empty p {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 13px;
}

.dashboard-activity-card {
    display: grid;
}

.dashboard-activity-list {
    gap: 9px;
}

.dashboard-activity-list li {
    display: block;
    padding: 0;
    border: 0;
}

.dashboard-activity-list li:first-child,
.dashboard-activity-list li:last-child {
    padding: 0;
}

.dashboard-activity-list a,
.dashboard-activity-list li > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #d6e8e3;
    border-radius: 10px;
    color: var(--app-text);
    background: #f5faf8;
}

.dashboard-activity-list a {
    text-decoration: none;
}

.dashboard-activity-list a:hover {
    border-color: var(--app-accent);
    background: var(--app-accent-soft);
}

.dashboard-activity-list a:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 3px;
}

.dashboard-activity__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: var(--app-accent);
    background: var(--app-accent-soft);
}

.dashboard-activity__icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-activity__details {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.dashboard-activity__details strong,
.dashboard-activity__reference,
.dashboard-activity__cemetery {
    overflow-wrap: anywhere;
}

.dashboard-activity__details strong {
    font-size: 14px;
}

.dashboard-activity__reference,
.dashboard-activity__cemetery,
.dashboard-activity-list time {
    color: var(--app-muted);
    font-size: 12px;
}

.dashboard-activity__cemetery {
    color: #386a63;
}

.dashboard-activity-list time {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dashboard-cemeteries-card .dashboard-card-heading,
.dashboard-saturation-card .dashboard-card-heading {
    margin-bottom: 16px;
}

.dashboard-saturation-card {
    background: var(--app-card-background);
}

.dashboard-saturation-card > p {
    margin: 0;
    color: var(--app-muted);
    font-size: 14px;
}

.dashboard-saturation-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
}

.dashboard-saturation-metrics > div {
    padding: 10px;
    border-radius: 10px;
    background: var(--app-surface-subtle);
}

.dashboard-saturation-metrics dt,
.dashboard-saturation-metrics span {
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 650;
}

.dashboard-saturation-metrics dd {
    margin: 7px 0 3px;
    color: var(--app-text);
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    letter-spacing: -.04em;
    line-height: 1;
}

.dashboard-saturation-note,
.dashboard-saturation-demo {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.4;
}

.dashboard-saturation-note { color: var(--app-muted); }
.dashboard-saturation-demo { color: #9a6b1d; }

.dashboard-land-reserve-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--app-border);
}

.dashboard-land-reserve-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-land-reserve-form input {
    width: 100%;
    min-height: var(--app-control-height);
    padding: 0 10px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    background: var(--app-surface);
    color: var(--app-text);
    font: inherit;
}

.dashboard-land-reserve-form input:focus-visible {
    outline: 3px solid rgb(13 112 101 / 28%);
    outline-offset: 2px;
}

@media (max-width: 1299px) {
    .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-showcase-grid,
    .dashboard-insights-grid,
    .dashboard-lower-grid,
    .dashboard-follow-up-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-plan-card {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .dashboard-kpis,
    .dashboard-showcase-grid,
    .dashboard-insights-grid,
    .dashboard-lower-grid,
    .dashboard-follow-up-grid,
    .dashboard-cemetery-grid,
    .dashboard-saturation-metrics,
    .dashboard-land-reserve-form {
        grid-template-columns: 1fr;
    }

    .dashboard-plan-card {
        grid-column: auto;
    }

    .dashboard-kpi,
    .dashboard-plan-card,
    .dashboard-actions-card,
    .dashboard-distribution-card,
    .dashboard-details-card,
    .dashboard-list-card,
    .dashboard-activity-card,
    .dashboard-cemeteries-card,
    .dashboard-saturation-card {
        padding: 18px;
        border-radius: 14px;
    }

    .dashboard-plan-preview {
        height: 245px;
    }

    .dashboard-plan-empty {
        min-height: 245px;
    }

    .dashboard-deadline-list a {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .dashboard-deadline-delay {
        grid-column: 2;
        justify-self: start;
    }

    .dashboard-expired-concession-list a {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .dashboard-expired-concession__delay {
        grid-column: 2;
        justify-self: start;
    }

    .dashboard-reminder-list a {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .dashboard-reminder__timing {
        grid-column: 2;
        justify-self: start;
    }

    .dashboard-activity-list a,
    .dashboard-activity-list li > div {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .dashboard-activity-list time {
        grid-column: 2;
        justify-self: start;
        text-align: left;
    }

    .dashboard-distribution-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .dashboard-donut {
        width: 142px;
        height: 142px;
    }

    .dashboard-timeline-list li {
        grid-template-columns: 82px minmax(0, 1fr);
    }
}
.app-button{display:inline-flex;align-items:center;justify-content:center;gap:var(--app-space-2);min-height:var(--app-control-height);padding:0 var(--app-button-padding-inline);border:1px solid var(--app-border);border-radius:var(--app-control-radius);background:var(--app-surface);color:var(--app-text);font:inherit;font-weight:700;cursor:pointer}.app-button--primary{border-color:var(--app-accent);background:var(--app-accent);color:#fff}.app-button--warning{border-color:var(--app-warning);background:var(--app-warning);color:#fff}.app-button--danger{border-color:var(--app-danger);background:var(--app-danger);color:#fff}.app-button--compact{min-height:var(--app-control-height-compact)}.app-button--full{width:100%}.app-button:hover:not(:disabled){border-color:#0b7167;background:var(--app-surface-subtle)}.app-button--primary:hover:not(:disabled){border-color:var(--app-accent-hover);background:var(--app-accent-hover)}.app-button--warning:hover:not(:disabled){border-color:var(--app-warning-hover);background:var(--app-warning-hover)}.app-button--danger:hover:not(:disabled){border-color:var(--app-danger-hover);background:var(--app-danger-hover)}.app-button:focus-visible{outline:3px solid rgb(13 112 101 / 28%);outline-offset:2px}.app-button:disabled{opacity:.6;cursor:not-allowed}.app-checkbox{display:inline-flex;align-items:center;gap:9px;font-weight:650;cursor:pointer}.app-checkbox input{position:absolute;opacity:0}.app-checkbox span{display:grid;place-items:center;width:19px;height:19px;border:1px solid #9dbcb6;border-radius:5px;background:#fff}.app-checkbox input:checked+span{border-color:var(--app-accent);background:var(--app-accent)}.app-checkbox input:checked+span::after{width:8px;height:4px;border-bottom:2px solid #fff;border-left:2px solid #fff;content:'';transform:rotate(-45deg) translateY(-1px)}.app-checkbox input:focus-visible+span{outline:3px solid rgb(13 112 101 / 28%);outline-offset:2px}.app-checkbox input:disabled+span{opacity:.6;cursor:not-allowed}.app-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.app-pagination-controls,.app-pagination-pages{display:flex;align-items:center;gap:7px}.app-pagination-controls label{display:inline-flex;align-items:center;gap:6px}.app-pagination a,.app-pagination-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border:1px solid var(--app-border);border-radius:7px;background:#fff;color:var(--app-text);font:inherit;line-height:1;text-decoration:none}.app-pagination .is-current{border-color:var(--app-accent);background:var(--app-accent);color:#fff}.app-status-dot{display:inline-block;width:14px;height:14px;flex:0 0 14px;border-radius:50%;background:var(--app-state-available)}.app-status-dot--attributed{background:var(--app-state-attributed)}.app-status-dot--occupied{background:var(--app-state-occupied)}.app-status-dot--review{background:var(--app-state-review)}.app-status-dot--unavailable{background:var(--app-state-unavailable)}

.app-info-callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid #c9ddef;
    border-radius: 10px;
    background: #eff7ff;
    color: #294d6a;
    font-size: 13px;
    line-height: 1.45;
}

.app-info-callout[hidden] {
    display: none;
}

.app-info-callout__icon {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    border-radius: 50%;
    background: #3a7bd5;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
}

.app-sort{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.app-sort-arrows{display:inline-flex;flex-direction:column;gap:0;line-height:.7}.app-sort-arrows a{display:inline-flex;width:14px;height:10px;align-items:center;justify-content:center;color:var(--app-muted);font-size:8px;text-decoration:none}.app-sort-arrows a:hover,.app-sort-arrows a:focus-visible,.app-sort-arrows a.is-active{color:var(--app-accent)}.app-sort-arrows a:focus-visible{outline:2px solid var(--app-accent);outline-offset:1px;border-radius:2px}

.app-info-callout__content {
    min-width: 0;
}

@media (max-width: 480px) {
    .app-info-callout {
        gap: 9px;
        padding: 11px;
    }
}

.app-cemetery-choice {
    padding: 28px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.app-cemetery-choice h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.app-cemetery-choice > p {
    margin: 0;
    color: var(--app-muted);
}

.app-cemetery-choice__list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 20px 0 0;
    list-style: none;
}

.app-cemetery-choice__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
}

.app-cemetery-choice__details strong,
.app-cemetery-choice__details span {
    display: block;
}

/* Shared shell for business records. Individual modules only own their data-specific blocks. */
.app-content > .app-detail {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-detail {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 26px;
}

.app-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 0 2px;
}

.app-detail-header__heading { display: grid; gap: 10px; min-width: 0; }
.app-detail-breadcrumb { display: flex; gap: 8px; color: var(--app-muted); font-size: 13px; }
.app-detail-breadcrumb a { color: var(--app-accent); font-weight: 700; text-decoration: none; }
.app-detail-title { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.app-detail-title h1 { margin: 0; color: var(--app-text); font-size: 32px; letter-spacing: -.025em; }
.app-detail-subtitle { margin: 0; color: var(--app-muted); }
.app-detail-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.app-detail-tabs {
    display: flex;
    min-height: 48px;
    gap: 0;
    overflow: auto;
    padding: 0 3px;
    border-bottom: 1px solid var(--app-border);
    background: rgb(255 255 255 / 55%);
}

.app-detail-tabs button,
.app-detail-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    flex: 0 0 auto;
    padding: 0 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--app-text-secondary-strong);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.app-detail-tabs .is-active { border-color: var(--app-accent); background: #eff8f5; color: var(--app-accent); }
.app-detail-tabs a,
.app-detail-tabs button:not(:disabled) { cursor: pointer; }
.app-detail-tabs button:disabled { cursor: default; }

.document-list .document-actions,.emplacement-detail-activity-list .document-actions,.document-actions { display:flex; flex:0 0 auto; flex-flow:row nowrap; align-items:center; gap:8px; }
.document-retire { display:grid; width:30px; height:30px; place-items:center; border:1px solid var(--app-state-unavailable); border-radius:50%; background:#fff5f5; color:var(--app-state-unavailable); cursor:pointer; }
.document-retire:hover,.document-retire:focus-visible { border-color:var(--app-state-unavailable); background:#fbe7e7; }
.document-retire:focus-visible { outline:2px solid rgb(189 105 105 / 42%); outline-offset:2px; }
.document-retire svg,.emplacement-detail-activity-list .document-retire svg { width:16px; height:16px; fill:none; stroke:var(--app-state-unavailable); color:var(--app-state-unavailable); stroke-linecap:round; stroke-linejoin:round; stroke-width:2; }

.app-alert-callout { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid #e5b2b2; border-radius: 10px; background: #fff5f5; color: #8e3838; }
.app-alert-callout > span { flex: 0 0 auto; font-size: 17px; line-height: 1.2; }
.app-alert-callout > div { color: var(--app-text); }
.app-alert-callout strong { color: #a34040; }

.app-detail-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.app-detail-kpi {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    min-height: 108px;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(21 50 47 / 4%);
}
.app-detail-kpi__icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: #edf7f4; color: var(--app-accent); }
.app-detail-kpi__icon svg { width: 19px; height: 19px; }
.app-detail-kpi strong { display: block; color: var(--app-text); font-size: 19px; line-height: 1.25; }
.app-detail-kpi small { display: block; margin-top: 6px; color: var(--app-muted); font-size: 13px; }

.app-detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.02fr) minmax(220px, .78fr); align-items: start; gap: 18px; }
.app-detail-column { display: flex; min-width: 0; flex-direction: column; gap: 18px; }
.app-detail-card { display: grid; min-width: 0; gap: 18px; padding: 22px; border: 1px solid var(--app-border); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgb(21 50 47 / 4%); }
.app-detail-card__header { display: flex; align-items: center; justify-content: space-between; min-height: 24px; gap: 10px; }
.app-detail-card__title { display: flex; align-items: center; gap: 9px; color: var(--app-accent); }
.app-detail-card__title svg { width: 19px; height: 19px; }
.app-detail-card h2 { margin: 0; color: var(--app-text); font-size: 17px; }
.privacy-page { width: min(100%, 860px); margin: 0 auto; gap: 0; }
.privacy-page__header { padding-bottom: 20px; }
.privacy-page h1 { margin: 0; color: var(--app-text); font-size: clamp(28px, 4vw, 38px); line-height: 1.16; letter-spacing: -.035em; }
.privacy-page__header p { max-width: 650px; margin: 10px 0 0; color: var(--app-muted); line-height: 1.6; }
.privacy-page__section { padding: 20px 0; border-top: 1px solid var(--app-border); }
.privacy-page__section h2 { font-size: 18px; }
.privacy-page__section h3 { margin: 18px 0 0; color: var(--app-text); font-size: 15px; }
.privacy-page__section p { margin: 8px 0 0; color: var(--app-text-secondary); line-height: 1.6; }
.privacy-page__section p:first-of-type { margin-top: 10px; }
.privacy-page__section ul { display: grid; gap: 7px; margin: 10px 0 0; padding-left: 20px; color: var(--app-text-secondary); line-height: 1.55; }
.app-detail-facts { display: grid; gap: 0; margin: 0; }
.app-detail-facts > div { display: grid; grid-template-columns: minmax(120px, .85fr) minmax(0, 1.15fr); gap: 20px; padding: 12px 0; border-bottom: 1px solid #edf1f0; }
.app-detail-facts > div:last-child { border-bottom: 0; }
.app-detail-facts dt { color: var(--app-muted); font-size: 13px; }
.app-detail-facts dd { margin: 0; color: var(--app-text); font-size: 13px; font-weight: 700; }
.app-detail-empty { display: grid; min-height: 94px; place-items: center; padding: 16px; border: 1px solid #d8e2df; border-radius: 9px; background: var(--app-card-background); color: var(--app-muted); text-align: center; }
.app-detail-empty p { margin: 0; font-size: 13px; }
.app-detail-activity { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.app-detail-activity li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf1f0; }
.app-detail-activity li:last-child { border-bottom: 0; }
.app-detail-activity li > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #edf7f4; color: var(--app-accent); font-weight: 800; }
.app-detail-activity strong { display: block; font-size: 13px; }
.app-detail-activity time { color: var(--app-muted); font-size: 12px; white-space: nowrap; }
.app-history-timeline { display: grid; gap: 14px; }
.app-history-timeline__items { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.app-history-timeline__item { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid #edf1f0; }
.app-history-timeline__item:last-child { border-bottom: 0; }
.app-history-timeline__item > time { color: var(--app-muted); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.app-history-timeline__body { min-width: 0; }
.app-history-timeline__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.app-history-timeline__heading strong { font-size: 14px; }
.app-history-timeline__category { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 999px; background: #eef4f3; color: var(--app-muted); font-size: 11px; font-weight: 700; line-height: 1; }
.app-history-timeline__category--physical { background: #eaf5f1; color: var(--app-accent); }
.app-history-timeline__category--change { background: #edf4fb; color: #286796; }
.app-history-timeline__category--relation { background: #f4effa; color: #765797; }
.app-history-timeline__category--lifecycle { background: #f4f1ed; color: #775f49; }
.app-history-timeline__author, .app-history-timeline__summary, .app-history-timeline__business-date { margin: 5px 0 0; color: var(--app-muted); font-size: 13px; line-height: 1.45; }
.app-history-timeline__author { font-size: 12px; }
.app-history-timeline__changes { display: grid; gap: 6px; margin: 11px 0 0; padding: 10px 12px; border-left: 3px solid #d8e8e2; background: #f8fbfa; }
.app-history-timeline__changes > div { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr); gap: 10px; }
.app-history-timeline__changes dt { color: var(--app-muted); font-size: 12px; }
.app-history-timeline__changes dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-size: 12px; }
.app-history-timeline__changes dd > span:first-child { color: var(--app-muted); text-decoration: line-through; }
.app-history-timeline__more { justify-self: start; }
.app-history-timeline__error { margin: 0 0 12px; color: var(--app-state-unavailable); font-size: 13px; }
.app-detail-card--attention { border-color: color-mix(in srgb, var(--app-state-unavailable) 28%, #fff); background: color-mix(in srgb, var(--app-state-unavailable) 8%, #fff); }
.app-detail-card--attention .app-detail-card__title { color: color-mix(in srgb, var(--app-state-unavailable) 82%, var(--app-text)); }
.app-detail-attention-icon { display: inline-grid; width: 20px; height: 20px; place-items: center; color: var(--app-state-unavailable); font-size: 20px; line-height: 1; }

@media (max-width: 1299px) {
    .app-detail-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Action de fin de recherche rapide : même bouton primaire que le reste de l’application. */
a.app-quick-search-all.app-button--primary {
    display: flex;
    width: fit-content;
    min-height: 46px;
    margin: 18px auto 0;
    padding: 0 22px;
    border-color: var(--app-accent);
    border-radius: 9px;
    background: var(--app-accent);
    color: #fff;
    font-weight: 750;
}

a.app-quick-search-all.app-button--primary:hover {
    border-color: #076e63;
    background: #076e63;
    color: #fff;
    text-decoration: none;
}

a.app-quick-search-all.app-button--primary:focus-visible {
    outline: 3px solid rgb(13 112 101 / 28%);
    outline-offset: 3px;
}

@media (max-width: 680px) {
    a.app-quick-search-all.app-button--primary { width: 100%; }
}

@media (max-width: 700px) {
    .app-detail-header { align-items: flex-start; flex-direction: column; }
    .app-detail-actions { justify-content: flex-start; }
    .app-detail-header.app-detail-hero { grid-template-columns:1fr; grid-template-rows:auto; gap:18px; padding:22px 20px; }
    .app-detail-hero .app-detail-header__heading,.app-detail-hero .app-detail-hero__aside,.app-detail-hero .app-detail-hero__actions { grid-column:auto; grid-row:auto; }
    .app-detail-hero .app-detail-hero__aside { align-items:stretch; }
    .app-detail-hero__actions { width:100%; justify-content:stretch; }
    .app-detail-hero__actions > .app-button,.app-detail-hero__actions > form { flex:1 1 100%; }
    .app-content .app-detail-hero h1 { font-size:clamp(28px,8vw,34px); }
    .app-detail-title h1 { font-size: 25px; }
    .app-detail-kpis, .app-detail-grid { grid-template-columns: 1fr; }
    .app-detail-facts > div { grid-template-columns: 1fr; gap: 4px; }
    .app-detail-activity li { grid-template-columns: 30px minmax(0, 1fr); }
    .app-detail-activity time { grid-column: 2; }
    .app-history-timeline__item { grid-template-columns: 1fr; gap: 5px; }
    .app-history-timeline__changes > div { grid-template-columns: 1fr; gap: 3px; }
}

.app-button,
a.app-button,
.app-button:hover,
.app-button:focus-visible {
    text-decoration: none;
}

.app-button__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: currentColor;
}

/* Inline SVG actions use the compact control size; named button icons retain
   their explicit reusable variant above. */
.app-button > svg:not(.app-button__icon) {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.app-button {
    white-space: nowrap;
}

.app-button__icon--back {
    transform: rotate(90deg);
}

.app-button__icon--add {
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.app-state-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    color: #fff;
    background: var(--app-state-available);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.app-state-pill--attributed { background: var(--app-state-attributed); }
.app-state-pill--occupied { background: var(--app-state-occupied); }
.app-state-pill--review { background: var(--app-state-review); }
.app-state-pill--unavailable { background: var(--app-state-unavailable); }
.app-state-pill--archived { background: var(--app-muted); }
.app-state-pill--presence-present { background: var(--app-state-available); }
.app-state-pill--presence-review { background: var(--app-state-review); }
.app-state-pill--presence-exited { background: var(--app-state-unavailable); }
.app-state-pill--presence-none { background: var(--app-muted); }
.concessions-declared-deadline { display: block; margin-top: 3px; color: var(--app-text-secondary-strong); font-size: 12px; line-height: 1.35; }

.app-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid #cfe0dc;
    border-radius: 999px;
    background: #f4f9f8;
    color: var(--app-text-secondary-strong);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

/* Named choices express a data scope; unlike a switch, neither choice is an action. */
.app-segmented-control {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 3px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: #eef4f3;
}

.app-segmented-control a {
    min-width: 88px;
    padding: 8px 13px;
    border-radius: 7px;
    color: var(--app-text-secondary-strong);
    font-size: 13px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.app-segmented-control a:hover { color: var(--app-accent); }
.app-segmented-control a:focus-visible { outline: 3px solid rgb(13 112 101 / 28%); outline-offset: 2px; }
.app-segmented-control a.is-active { background: var(--app-surface); box-shadow: 0 1px 3px rgb(21 50 47 / 14%); color: var(--app-accent); }

@media (max-width: 480px) {
    .app-segmented-control { width: 100%; }
    .app-segmented-control a { flex: 1; }
}

.app-entity-avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    background: #edf3f2;
}

.app-entity-avatar--initials {
    color: var(--app-accent);
    font-size: 13px;
    font-weight: 750;
}

.app-entity-avatar--muted {
    color: var(--app-muted);
}

.app-entity-avatar svg {
    width: 18px;
    height: 18px;
}

.app-cemetery-choice__details span {
    margin-top: 2px;
    color: var(--app-muted);
    font-size: 13px;
}

@media (max-width: 700px) {
    .app-cemetery-choice {
        padding: 20px;
    }

    .app-cemetery-choice__item,
    .app-cemetery-choice__item form,
    .app-cemetery-choice__item button {
        width: 100%;
    }

    .app-cemetery-choice__item {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Surfaces de présentation neutres : les variantes d'état conservent leur fond sémantique. */
.app-content > main,
.app-list-kpi,
.dashboard-metric:not(.dashboard-metric--primary):not(.dashboard-metric--review):not(.dashboard-metric--physical),
.dashboard-section,
.dashboard-card,
.dashboard-empty,
.dashboard-cemetery-card,
.dashboard-kpi,
.dashboard-plan-card,
.dashboard-actions-card,
.dashboard-distribution-card,
.dashboard-details-card,
.dashboard-list-card,
.dashboard-activity-card,
.dashboard-cemeteries-card,
.dashboard-saturation-card,
.app-cemetery-choice,
.app-detail-kpi,
.app-detail-card:not(.app-detail-card--attention),
.app-detail-empty {
    background: var(--app-card-background);
}
