html,
body,
body * {
    -webkit-user-select: none;
    user-select: none;
}

body {
    -webkit-touch-callout: none;
}

[data-allow-user-select],
[data-allow-user-select] * {
    -webkit-user-select: text;
    user-select: text;
}
/* F-020 - Popup globale des notifications internes. */
.system-notification-stack {
    position: fixed;
    right: auto;
    bottom: 1rem;
    left: 1rem;
    z-index: 80;
    display: flex;
    width: min(30rem, calc(100vw - 2rem));
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.notification-menu-indicator {
    position: relative;
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: 0.4rem;
    color: #e1000f;
    vertical-align: middle;
    transform-origin: 50% 10%;
    animation: notification-bell-ring 1.8s ease-in-out infinite;
}

.notification-menu-indicator::after {
    position: absolute;
    top: -0.05rem;
    right: -0.08rem;
    width: 0.38rem;
    height: 0.38rem;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #e1000f;
    content: '';
}

.notification-menu-indicator svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

@keyframes notification-bell-ring {
    0%, 72%, 100% { transform: rotate(0deg); }
    78% { transform: rotate(13deg); }
    84% { transform: rotate(-11deg); }
    90% { transform: rotate(7deg); }
    96% { transform: rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .notification-menu-indicator {
        animation: none;
    }
}

/* Composants de structure partagés par toutes les pages. */
.orgchart-main {
    padding-bottom: 2rem;
}

.orgchart-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0;
    color: #6a6a6a;
    font-size: 0.9rem;
    list-style: none;
}

.orgchart-breadcrumb li + li::before {
    margin-right: 0.35rem;
    color: #929292;
    content: ">";
}

.orgchart-breadcrumb a {
    color: inherit;
}

.orgchart-panel {
    min-width: 0;
    border: 1px solid var(--home-line);
    border-radius: 12px;
    padding: 1.4rem;
    background: var(--home-panel-background);
    box-shadow: var(--home-shadow-small);
}

.orgchart-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.orgchart-heading h1,
.orgchart-heading p {
    margin: 0;
}

.orgchart-heading h1 {
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 500;
    line-height: 1.2;
}

.orgchart-heading h1 + p {
    max-width: 48rem;
    margin-top: 0.35rem;
    color: var(--home-muted);
}

.home-footer {
    position: fixed;
    right: 24px;
    bottom: 18px;
    z-index: 17;
    display: flex;
    width: auto;
    max-width: calc(100vw - 48px);
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 12px;
    color: #6a6a6a;
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: right;
}

.home-footer a {
    color: inherit;
    text-decoration: none;
}

.home-footer a:hover {
    color: #000091;
}

@media (max-width: 620px) {
    .orgchart-panel {
        padding: 1rem;
    }

    .orgchart-heading {
        display: grid;
    }

    .home-footer {
        position: static;
        width: min(100% - 1rem, 1180px);
        max-width: none;
        justify-content: center;
        margin: 1.5rem auto 0.75rem;
        text-align: center;
    }
}

@media (max-width: 390px) {
    .orgchart-panel {
        padding: 0.8rem;
    }
}

.system-notification {
    display: grid;
    width: 100%;
    grid-template-columns: 0.35rem minmax(0, 1fr) 2rem;
    align-items: stretch;
    gap: 0.75rem;
    border: 1px solid #000091;
    border-radius: 12px;
    padding: 1rem;
    color: #3a3a3a;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(8, 27, 79, 0.18);
    pointer-events: auto;
}

.system-notification-marker {
    border-radius: 999px;
    background: #000091;
}

.system-notification-link {
    min-width: 0;
    color: #3a3a3a;
    text-decoration: none;
}

.system-notification-link strong,
.system-notification-link span {
    display: block;
}

.system-notification-link strong {
    margin-bottom: 0.2rem;
    color: #161616;
}

.system-notification-link:hover strong,
.system-notification-link:focus-visible strong {
    color: #000091;
}

.system-notification-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 4px;
    color: #3a3a3a;
    background: transparent;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    cursor: pointer;
}

.system-notification-close:hover {
    color: #000091;
    background: #ececfe;
}

.system-notification.is-hiding {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.system-notification[hidden] {
    display: none;
}

@media (max-width: 620px) {
    .system-notification-stack {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .system-notification.is-hiding {
        transition: none;
    }
}
