.local-content-tools {
    position: relative;
    z-index: 100;
    margin: 8px auto;
    padding: 10px 16px;
    max-width: 1200px;
    border: 1px solid var(--surface-border, #cbd5e1);
    border-radius: 10px;
    background: var(--surface, #fff);
    color: var(--text-strong, #172033);
    font:
        14px/1.5 system-ui,
        sans-serif;
}
.local-content-tools summary {
    cursor: pointer;
    font-weight: 650;
    min-height: 24px;
}
.local-content-tools p {
    margin: 8px 0;
}
.local-content-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.local-content-actions button {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #64748b;
    border-radius: 7px;
    background: var(--surface, #fff);
    color: var(--text-strong, #172033);
    font: inherit;
    cursor: pointer;
}
.local-content-actions button:focus-visible,
.local-content-tools summary:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}
.local-content-actions button:disabled {
    opacity: 0.6;
    cursor: wait;
}
.local-content-dialog {
    box-sizing: border-box;
    margin: auto;
    max-width: 540px;
    width: calc(100% - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border: 1px solid #64748b;
    border-radius: 14px;
    background: var(--surface, #fff);
    color: var(--text-strong, #172033);
    font:
        16px/1.5 system-ui,
        sans-serif;
}
.local-content-dialog::backdrop {
    background: #0f172acc;
}
.local-content-dialog h2 {
    font-size: 1.3rem;
    margin: 0 0 12px;
}
.local-content-activation[open] {
    display: flex;
    flex-direction: column;
}
.local-content-activation .local-content-dialog-body {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}
.local-content-activation p + p {
    margin-top: 12px;
}
.local-content-activation .local-content-actions {
    flex-shrink: 0;
    margin-top: 16px;
}
.local-content-import-review {
    box-sizing: border-box;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    overscroll-behavior: contain;
}
.local-content-import-review p {
    margin: 12px 0;
    overflow-wrap: anywhere;
}
.local-content-import-review [role='status']:empty {
    display: none;
}
.local-content-import-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
}
.local-content-import-check input {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin: 1px 0;
    accent-color: #6d28d9;
}
.local-content-import-check input:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
}
.local-content-import-review .local-content-import-replace {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}
.local-content-import-step {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #c4b5fd;
    border-left: 4px solid #8b5cf6;
    border-radius: 10px;
}
.local-content-import-step h3 {
    margin: 8px 0;
    font-size: 1.1rem;
    line-height: 1.4;
}
.local-content-import-step .local-content-import-progress {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
}
.local-content-import-step p:last-child {
    margin-bottom: 0;
}
.local-content-import-review .local-content-actions [hidden] {
    display: none;
}
@media (max-width: 480px) {
    .local-content-dialog {
        padding: 16px;
    }
    .local-content-import-review {
        width: calc(100% - 24px);
        padding: 18px;
    }
    .local-content-import-review .local-content-actions button {
        width: 100%;
    }
}
.local-content-reminder {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    width: calc(100% - 32px);
    max-width: 1200px;
    box-sizing: border-box;
    margin: 8px auto;
    padding: 4px 12px;
    border: 1px solid #99d9d0;
    border-radius: 8px;
    background: #f0fdfa;
    color: #134e4a;
    font:
        13px/1.5 system-ui,
        sans-serif;
}
.local-content-reminder p {
    flex: 1 1 260px;
    margin: 0;
    color: inherit;
    font: inherit;
}
.local-content-reminder button {
    min-height: 44px;
    padding: 4px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.local-content-reminder button:hover {
    background: #ccfbf1;
}
.local-content-reminder button:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}
[data-theme='dark'] .local-content-reminder {
    background: #134e4a;
    border-color: #2a716b;
    color: #ccfbf1;
}
[data-theme='dark'] .local-content-reminder button:hover {
    background: #115e59;
}
.local-content-optional {
    width: 100%;
    text-align: left;
}
.local-content-description {
    flex: 1 1 320px;
    min-width: 0;
}
.local-content-optional .local-content-description p {
    color: inherit;
    font: inherit;
    margin: 4px 0;
}
body.rm-projecting .local-content-optional,
.tb-page.geometry-tableau > .local-content-optional,
.tb-page:fullscreen > .local-content-optional,
.pgj-page.fullscreen-mode .local-content-optional,
.pgj-page:fullscreen .local-content-optional {
    display: none !important;
}
@media print {
    .local-content-tools,
    .local-content-dialog,
    .local-content-reminder {
        display: none !important;
    }
}
.local-content-field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; font-weight: 650; }
.local-content-field input, .local-content-field select { box-sizing: border-box; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #94a3b8; border-radius: 8px; font: inherit; background: var(--surface, #fff); color: var(--text-strong, #172033); }
.local-content-field input:focus-visible, .local-content-field select:focus-visible { outline: 3px solid #7c3aed; outline-offset: 2px; }
@media screen {
    [data-theme='dark'] .local-content-dialog select {
        color-scheme: dark;
    }
}
.local-content-recovery-code { padding: 12px; border-radius: 8px; background: #f0fdfa; color: #134e4a; font-family: monospace; overflow-wrap: anywhere; user-select: all; }
.local-content-backup-status {
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Les valeurs privées restent dans la préparation et reviennent après projection. */
@media screen {
    html:is(.oplc-projection-mode, .oplc-vault-projection, .oplc-private-projection) [data-projection-private] {
        display: none !important;
        visibility: hidden !important;
    }
    /* Conserver la géométrie des signatures pendant la projection. */
    html:is(.oplc-projection-mode, .oplc-vault-projection, .oplc-private-projection) .mot-letter-signature[data-projection-private],
    html:is(.oplc-projection-mode, .oplc-vault-projection, .oplc-private-projection) .certificate .cert-signature .label[data-projection-private] {
        display: block !important;
    }
}
