.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ---------- Application ---------- */
/* Charte de l'interface : jetons (couleurs, rayons, ombres) et réglages Bootstrap.
   Rien ici ne touche au dessin des schémas, façades et plans (SVG), ni à l'impression. */
:root {
    --rg-ink: #0f172a;          /* barre du haut, titres */
    --rg-ink-2: #1e293b;
    --rg-text: #1f2937;
    --rg-muted: #64748b;
    --rg-faint: #94a3b8;
    --rg-bg: #eef1f5;           /* fond de l'application */
    --rg-surface: #ffffff;      /* panneaux, cartes */
    --rg-subtle: #f8fafc;       /* groupes de champs */
    --rg-hover: #f1f5f9;
    --rg-border: #e2e8f0;
    --rg-border-strong: #cbd5e1;
    --rg-accent: #f5a524;       /* ambre « électrique » : marque, sélection, action principale */
    --rg-accent-soft: #fff7e6;
    --rg-accent-ink: #92400e;
    --rg-primary: #2563eb;
    --rg-primary-soft: #eff6ff;
    --rg-radius: .5rem;
    --rg-radius-lg: .75rem;
    --rg-shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --rg-shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --rg-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .28);
    --rg-barre: 56px;

    --bs-body-font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--rg-text);
    --bs-emphasis-color: var(--rg-ink);
    --bs-secondary-color: var(--rg-muted);
    --bs-border-color: var(--rg-border);
    --bs-border-radius: var(--rg-radius);
    --bs-border-radius-sm: .375rem;
    --bs-border-radius-lg: var(--rg-radius-lg);
    --bs-primary: #2563eb; --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: #2563eb; --bs-link-color-rgb: 37, 99, 235;
    --bs-link-hover-color: #1d4ed8; --bs-link-hover-color-rgb: 29, 78, 216;
    --bs-focus-ring-color: rgba(37, 99, 235, .22);
}
html, body { height: 100%; }
@media screen { body { background: var(--rg-bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; } }
::selection { background: rgba(245, 165, 36, .3); }

/* les dessins SVG gardent la taille de texte de base qu'ils avaient (16 px), quelle que soit la taille de l'interface */
.app-body svg, .modal svg { font-size: 1rem; }
/* « lbl » sert aussi aux textes du schéma : les libellés de boutons suivent le bouton */
span.lbl { font-size: inherit; font-weight: inherit; }

/* boutons */
.btn { --bs-btn-font-weight: 500; --bs-btn-border-radius: .45rem; --bs-btn-focus-box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); letter-spacing: .005em; }
.btn-sm { --bs-btn-border-radius: .4rem; --bs-btn-padding-x: .6rem; }
.btn i.bi { line-height: 1; }
.btn-primary { --bs-btn-bg: #2563eb; --bs-btn-border-color: #2563eb; --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1e40af; --bs-btn-active-border-color: #1e40af; --bs-btn-disabled-bg: #2563eb; --bs-btn-disabled-border-color: #2563eb; }
.btn-outline-primary { --bs-btn-color: #2563eb; --bs-btn-border-color: #bfd3fb; --bs-btn-hover-bg: var(--rg-primary-soft); --bs-btn-hover-color: #1d4ed8;
    --bs-btn-hover-border-color: #93b4f8; --bs-btn-active-bg: #2563eb; --bs-btn-active-border-color: #2563eb; --bs-btn-active-color: #fff; background: #fff; }
.btn-outline-secondary { --bs-btn-color: #334155; --bs-btn-border-color: var(--rg-border-strong); --bs-btn-hover-bg: var(--rg-hover); --bs-btn-hover-color: var(--rg-ink);
    --bs-btn-hover-border-color: #94a3b8; --bs-btn-active-bg: #e2e8f0; --bs-btn-active-color: var(--rg-ink); --bs-btn-active-border-color: #94a3b8;
    --bs-btn-disabled-color: #64748b; --bs-btn-disabled-border-color: var(--rg-border-strong); background-color: #fff; }
.btn-outline-secondary.active, .btn-outline-secondary:active { background-color: #e2e8f0; }
.btn-warning { --bs-btn-bg: var(--rg-accent); --bs-btn-border-color: var(--rg-accent); --bs-btn-color: #1f1300; --bs-btn-hover-bg: #e8950f;
    --bs-btn-hover-border-color: #e8950f; --bs-btn-hover-color: #1f1300; --bs-btn-active-bg: #d4860a; --bs-btn-active-border-color: #d4860a; }
.btn-outline-danger { background: #fff; }
.btn-link { --bs-btn-font-weight: 500; text-decoration: none; }

/* champs */
.form-control, .form-select { border-color: #d5dce5; color: var(--rg-text); }
.form-control:hover:not(:focus):not(:disabled), .form-select:hover:not(:focus):not(:disabled) { border-color: #b8c3d1; }
.form-control:focus, .form-select:focus { border-color: #7aa2f7; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-control::placeholder { color: var(--rg-faint); }
.form-control-sm, .form-select-sm { border-radius: .4rem; font-size: .8125rem; min-height: 30px; }
.form-control:disabled, .form-control[readonly] { background-color: var(--rg-hover); }
.form-label { font-size: .72rem; font-weight: 500; color: var(--rg-muted); margin-bottom: .15rem; letter-spacing: .01em; }
.form-text { color: var(--rg-muted); }
.form-check-input { border-color: #b8c3d1; }
.form-check-input:checked { background-color: #2563eb; border-color: #2563eb; }
.form-check-input:focus { box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); border-color: #7aa2f7; }
.form-switch .form-check-input { cursor: pointer; }

/* pastilles, cartes, alertes, menus, fenêtres */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 999px; padding: .38em .7em; }
.card { --bs-card-border-color: var(--rg-border); --bs-card-border-radius: var(--rg-radius-lg); --bs-card-inner-border-radius: calc(var(--rg-radius-lg) - 1px);
    --bs-card-cap-bg: var(--rg-surface); box-shadow: var(--rg-shadow-xs); }
.card-header { border-bottom-color: var(--rg-border); color: var(--rg-ink); }
.alert { border-radius: var(--rg-radius); border-width: 1px; }
.dropdown-menu { --bs-dropdown-border-color: var(--rg-border); --bs-dropdown-border-radius: var(--rg-radius); --bs-dropdown-link-hover-bg: var(--rg-hover);
    --bs-dropdown-link-active-bg: #2563eb; --bs-dropdown-font-size: .8125rem; box-shadow: 0 10px 30px -6px rgba(15, 23, 42, .2); padding: .35rem; }
.dropdown-item { border-radius: .35rem; padding: .35rem .6rem; }
.modal-backdrop.show { opacity: .45; background: #0b1220; }
.modal-content { border: 0; border-radius: var(--rg-radius-lg); box-shadow: var(--rg-shadow-lg); overflow: hidden; }
.modal-header { background: var(--rg-subtle); border-bottom-color: var(--rg-border); padding: .75rem 1.1rem; }
.modal-title { font-size: 1rem; font-weight: 650; color: var(--rg-ink); display: flex; align-items: center; gap: .5rem; }
.modal-title > .bi { color: var(--rg-accent); }
.modal-body { font-size: .875rem; }
.modal-footer { background: var(--rg-subtle); border-top-color: var(--rg-border); }
.list-group { --bs-list-group-border-color: var(--rg-border); --bs-list-group-action-hover-bg: var(--rg-hover); }
.table { --bs-table-border-color: var(--rg-border); }
.nav-tabs { --bs-nav-tabs-border-color: var(--rg-border); --bs-nav-tabs-link-active-border-color: var(--rg-border) var(--rg-border) #fff; }
.nav-link { color: #475569; }

/* ---- barre du haut ---- */
.barre-haut { background: linear-gradient(180deg, #111a2e 0%, var(--rg-ink) 100%); min-height: var(--rg-barre); padding: 0 .9rem; gap: .75rem;
    flex-wrap: nowrap; border-bottom: 1px solid #000; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .04); }
.barre-haut .marque { display: flex; align-items: center; gap: .6rem; margin: 0; padding: 0; color: #fff; }
.marque-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1f1300; font-size: 1.05rem; box-shadow: 0 2px 6px rgba(245, 158, 11, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.marque-texte { display: inline-flex; flex-direction: column; line-height: 1.1; }
.marque-texte b { font-size: .92rem; font-weight: 650; letter-spacing: -.005em; }
.marque-texte small { font-size: .66rem; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.barre-haut .projet-btn { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; margin-left: .35rem; color: #e2e8f0; padding: .32rem .7rem;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; }
.barre-haut .projet-btn:hover { background: rgba(255, 255, 255, .11); border-color: rgba(245, 165, 36, .6); color: #fff; }
.barre-haut .projet-btn > .bi-house-gear { color: var(--rg-accent); }
.barre-haut .projet-sur { color: #94a3b8; font-weight: 500; }
.barre-haut .projet-btn b { display: inline-block; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff; }
.barre-haut .projet-edit { color: #64748b; font-size: .8rem; }
.barre-haut .projet-btn:hover .projet-edit { color: var(--rg-accent); }
.barre-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; flex-wrap: nowrap; }
.barre-groupe { display: flex; align-items: center; gap: .15rem; }
.barre-groupe + .etat-sauvegarde, .etat-sauvegarde + .barre-groupe { padding-left: .6rem; border-left: 1px solid rgba(255, 255, 255, .1); }
.barre-haut .btn-outline-light { --bs-btn-color: #cbd5e1; --bs-btn-border-color: transparent; --bs-btn-hover-bg: rgba(255, 255, 255, .09); --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: rgba(255, 255, 255, .15); --bs-btn-active-border-color: transparent; --bs-btn-active-color: #fff; }
.barre-haut .btn-export { box-shadow: 0 2px 8px rgba(245, 158, 11, .3); font-weight: 600; }
.barre-haut .btn { white-space: nowrap; --bs-btn-font-size: .8125rem; }
.etat-sauvegarde { font-size: .75rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; padding-left: .6rem; padding-right: .6rem; }
.etat-sauvegarde.ok { color: #86efac; }
.etat-sauvegarde.ok .lbl { color: #94a3b8; }
.etat-sauvegarde.ko { color: #fca5a5; font-weight: 600; }
@media (max-width: 1500px) {
    .barre-groupe .lbl, .etat-sauvegarde .lbl { display: none; }
    .barre-groupe .btn-export .lbl { display: inline; }
}
@media (max-width: 1100px) {
    .barre-haut .marque-texte, .barre-haut .projet-sur { display: none; }
    .barre-haut .projet-btn b { max-width: 14ch; }
}
@media (max-width: 640px) {
    .barre-haut { flex-wrap: wrap; padding: .45rem .75rem; row-gap: .4rem; }
    .barre-actions { margin-left: 0; width: 100%; justify-content: space-between; }
    .barre-groupe .btn-export .lbl { display: none; }
}

/* ---- trois colonnes : bibliothèque | dessin | propriétés ---- */
.app-body { height: calc(100vh - var(--rg-barre)); }
@media screen { .app-body { padding: 0; } }
.app-body > .row { display: grid; grid-template-columns: 272px minmax(0, 1fr) 380px; margin: 0; }
.app-body > .row > * { width: auto; max-width: none; flex: none; min-width: 0; }
@media (max-width: 1399.98px) { .app-body > .row { grid-template-columns: 248px minmax(0, 1fr) 340px; } }
@media (max-width: 1199.98px) { .app-body > .row { grid-template-columns: 216px minmax(0, 1fr) 300px; } }
@media (max-width: 991.98px) {
    /* tablette : bibliothèque à gauche, propriétés sous le dessin, la page défile */
    .app-body { height: auto; }
    .app-body > .row { grid-template-columns: 188px minmax(0, 1fr); }
    .app-body > .row > aside:first-child { grid-row: span 2; }
    .app-body > .row > .panel { height: auto; }
    .app-body > .row > .panel:last-child { border-left: 0; border-top: 1px solid var(--rg-border); }
    .canvas-wrap { height: auto; }
}
@media (max-width: 767.98px) {
    .app-body > .row { grid-template-columns: minmax(0, 1fr); }
    .app-body > .row > aside:first-child { grid-row: auto; order: 2; border-right: 0; border-top: 1px solid var(--rg-border); }
    .app-body > .row > .canvas-wrap { order: 1; }
    .app-body > .row > .panel:last-child { order: 3; }
    .canvas-nav { height: 70vh; }
}

/* ---- panneaux latéraux ---- */
.panel { background: var(--rg-surface); border-right: 1px solid var(--rg-border); padding: .9rem .9rem 1.25rem; overflow-y: auto; height: 100%;
    font-size: .8125rem; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.panel:last-child { border-right: 0; border-left: 1px solid var(--rg-border); }
.panel-title { display: flex; align-items: baseline; flex-wrap: nowrap; gap: .45rem; font-size: .9rem; font-weight: 650; color: var(--rg-ink); letter-spacing: -.005em;
    padding-bottom: .55rem; margin-bottom: .7rem; border-bottom: 1px solid var(--rg-border); }
.panel-title::before { content: ""; width: 3px; height: .95em; align-self: center; border-radius: 2px; background: var(--rg-accent); flex: none; }
.panel-title.mt-3 { margin-top: 1.4rem !important; }
.panel .small, .panel small { font-size: .78rem; }
.panel hr { border-color: var(--rg-border); opacity: 1; }
.panel fieldset.border { background: var(--rg-subtle); border-color: var(--rg-border) !important; border-radius: var(--rg-radius) !important; padding: .55rem .7rem .7rem !important; margin-bottom: .75rem !important; }
.panel fieldset.border-warning { background: var(--rg-accent-soft); border-color: #fcd9a0 !important; }
/* panneau de droite (inspecteur) : onglets Élément / Installation, en-tête de l'élément, sections repliables */
.inspecteur { padding-top: 0; }
.insp-onglets { position: sticky; top: 0; z-index: 3; display: flex; gap: .25rem; background: var(--rg-surface); margin: 0 -.9rem .8rem; padding: .55rem .9rem 0; border-bottom: 1px solid var(--rg-border); }
.insp-onglets button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 0; background: none; padding: .45rem .5rem .55rem;
    font-size: .8125rem; font-weight: 500; color: var(--rg-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s, border-color .12s; }
.insp-onglets button:hover { color: var(--rg-ink); }
.insp-onglets button.active { color: var(--rg-ink); font-weight: 600; border-bottom-color: var(--rg-accent); }
.insp-onglets .badge { font-size: .62rem; padding: .25em .5em; }
.insp-tete { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.insp-symbole { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--rg-accent-soft); border: 1px solid #fcd9a0; }
.insp-titre { flex: 1; min-width: 0; }
.insp-titre small { display: block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--rg-muted); margin-bottom: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-libelle { font-weight: 600; font-size: .875rem !important; color: var(--rg-ink); border-color: transparent; background: transparent; padding-left: .35rem; margin-left: -.35rem; }
.insp-libelle:hover { border-color: var(--rg-border) !important; }
.insp-libelle:focus { background: #fff; }
.insp-actions { display: flex; align-items: center; gap: .3rem; padding-bottom: .7rem; margin-bottom: .7rem; border-bottom: 1px solid var(--rg-border); }
.insp-vide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 2.5rem 1rem; color: var(--rg-muted); }
.insp-vide .bi { font-size: 1.6rem; color: var(--rg-faint); }
.insp-vide b { color: var(--rg-text); }
.section { border: 1px solid var(--rg-border); border-radius: var(--rg-radius); margin-bottom: .55rem; background: var(--rg-surface); }
.section > summary { list-style: none; white-space: nowrap; display: flex; align-items: center; gap: .4rem; padding: .5rem .7rem; cursor: pointer; user-select: none;
    font-size: .75rem; font-weight: 650; color: var(--rg-ink); border-radius: var(--rg-radius); }
.section > summary::-webkit-details-marker { display: none; }
.section > summary::before { content: "\F282"; font-family: bootstrap-icons; font-size: .62rem; color: var(--rg-faint); transform: rotate(-90deg); transition: transform .15s; }
.section[open] > summary::before { transform: none; }
.section[open] > summary { border-bottom: 1px solid var(--rg-border); border-radius: var(--rg-radius) var(--rg-radius) 0 0; background: var(--rg-subtle); }
.section > summary:hover { background: var(--rg-hover); }
.section > summary .sous { font-weight: 500; color: var(--rg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.section-corps { padding: .6rem .7rem .7rem; }
.section .small.text-muted, .section .form-text { font-size: .72rem; line-height: 1.35; }
.section.cable-focus { border-color: var(--rg-accent) !important; box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }
ul.section-corps { margin: 0; }
.panel fieldset > legend, .modal fieldset > legend { font-size: .72rem; font-weight: 650; color: #334155; letter-spacing: .01em; padding: 0 .35rem; margin-left: -.2rem; line-height: 1.6; }
.panel .row.g-1 { --bs-gutter-x: .5rem; --bs-gutter-y: .4rem; }
.panel .btn-group-sm > .btn, .panel .btn-sm { font-size: .78rem; }
.fs-7 { font-size: .75rem; float: none; width: auto; padding: 0 .25rem; margin-bottom: 0; }

/* bibliothèque d'éléments : cible d'ajout, recherche, catégories repliables, tuiles compactes (icône + nom) */
.bib-tete { position: sticky; top: -.9rem; z-index: 3; background: var(--rg-surface); margin: -.9rem -.9rem .6rem; padding: .8rem .9rem .6rem; border-bottom: 1px solid var(--rg-border); }
.bib-cible { display: flex; align-items: baseline; gap: .35rem; white-space: nowrap; font-size: .75rem; color: var(--rg-muted); margin-bottom: .45rem; min-width: 0; }
.bib-cible b { color: var(--rg-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bib-recherche { position: relative; }
.bib-recherche .bi { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--rg-faint); font-size: .8rem; pointer-events: none; }
.bib-recherche input { padding-left: 1.8rem; background: var(--rg-subtle); }
.bib-recherche input:focus { background: #fff; }
.bib-groupe { margin-bottom: .2rem; }
.bib-groupe > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .35rem; user-select: none; }
.bib-groupe > summary::-webkit-details-marker { display: none; }
.bib-groupe > summary::before { content: "\F282"; font-family: bootstrap-icons; font-size: .6rem; color: var(--rg-faint); transition: transform .15s; transform: rotate(-90deg); }
.bib-groupe[open] > summary::before { transform: none; }
.bib-groupe > summary:hover { color: var(--rg-text); }
.bib-nb { font-weight: 500; color: #cbd5e1; letter-spacing: 0; }
.bib-lien { font-size: .7rem; text-transform: none; letter-spacing: 0; }
.palette-group { font-size: .66rem; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--rg-faint); margin: .7rem 0 .35rem; }
.palette-sous-groupe { font-size: .68rem; font-weight: 600; color: var(--rg-muted); margin: .4rem 0 .25rem; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.palette-item { display: flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: var(--rg-radius); min-height: 42px;
    background: transparent; padding: 3px 5px 3px 3px; font-size: .7rem; font-weight: 500; line-height: 1.15; text-align: left; color: #334155;
    cursor: grab; touch-action: none; transition: border-color .12s, box-shadow .12s, background-color .12s; }
.palette-item svg { width: 32px; height: 32px; flex: none; background: var(--rg-subtle); border: 1px solid var(--rg-border); border-radius: 6px; padding: 1px; transition: background-color .12s, border-color .12s; }
.palette-item:hover:not(:disabled):not(.palette-off) { border-color: var(--rg-border); background: var(--rg-surface); box-shadow: var(--rg-shadow-sm); color: var(--rg-ink); }
.palette-item:hover:not(:disabled):not(.palette-off) svg { background: var(--rg-accent-soft); border-color: #fcd9a0; }
.palette-item:active:not(:disabled):not(.palette-off) { box-shadow: none; background: var(--rg-hover); }
.palette-item > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.palette-item:disabled, .palette-item.palette-off { opacity: .42; filter: grayscale(1); }
@media (max-width: 1199.98px) and (min-width: 768px) { .palette { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .palette { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .bib-tete { position: static; } }

/* ---- zone de dessin ---- */
.canvas-wrap { padding: .75rem .9rem; height: 100%; overflow: auto; font-size: .875rem; }
.barre-vue { background: var(--rg-surface); border: 1px solid var(--rg-border); border-radius: var(--rg-radius-lg); padding: .3rem; box-shadow: var(--rg-shadow-xs);
    margin-bottom: .75rem !important; }
/* barre de vue collée en haut de la zone de dessin ; la bande de fond autour d'elle masque ce qui défile dessous */
@media screen {
    .barre-vue { position: sticky; top: 0; z-index: 5; box-shadow: 0 0 0 .75rem var(--rg-bg), var(--rg-shadow-xs); }
    .facade-outils { top: 3.6rem; }
}
@media screen and (min-width: 992px) { .barre-vue { top: -.75rem; } .facade-outils { top: 2.85rem; } }
.barre-vue .onglets { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.barre-vue .onglet { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .7rem; border-radius: .45rem; font-size: .8125rem; font-weight: 500;
    color: #475569; text-decoration: none; white-space: nowrap; position: relative; transition: background-color .12s, color .12s; }
.barre-vue .onglet:hover { background: var(--rg-hover); color: var(--rg-ink); }
.barre-vue .onglet.active { background: var(--rg-primary-soft); color: #1d4ed8; font-weight: 600; }
.barre-vue .onglet.active::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: -.3rem; height: 2px; border-radius: 2px; background: var(--rg-primary); }
.barre-vue-droite { display: flex; align-items: center; gap: .4rem; margin-left: auto; flex: none; padding-right: .1rem; }
.etat-conformite { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--rg-border); background: #fff; border-radius: 999px; padding: .22rem .65rem;
    font-size: .78rem; font-weight: 600; cursor: pointer; transition: background-color .12s, border-color .12s; }
.etat-conformite:hover { background: var(--rg-hover); border-color: var(--rg-border-strong); }
.etat-conformite .ec-err { color: #dc2626; } .etat-conformite .ec-warn { color: #b45309; } .etat-conformite .ec-ok { color: #15803d; }
.etat-conformite.a-erreurs { border-color: #fecaca; background: #fef2f2; }
.menu-affichage { width: 300px; padding: .5rem .75rem .75rem; font-size: .8125rem; }
.menu-affichage .dropdown-header { padding: .5rem 0 .3rem; font-size: .66rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--rg-faint); }
.menu-affichage .form-check { margin-bottom: .35rem; }
.menu-boutons { display: flex; gap: .3rem; }
.menu-boutons .btn { flex: 1; }
.barre-vue .zoom .btn { padding-left: .5rem; padding-right: .5rem; }
.barre-vue .zoom .zoom-val:disabled { opacity: 1; min-width: 3.6rem; color: #475569; background: var(--rg-subtle); font-variant-numeric: tabular-nums; }
.canvas { background: var(--rg-surface); border: 1px solid var(--rg-border); border-radius: var(--rg-radius-lg); overflow: auto; box-shadow: var(--rg-shadow-sm); }
.canvas-wrap > .card, .canvas-wrap .facades > .card { border-radius: var(--rg-radius-lg); }
.canvas-wrap .card-header { background: var(--rg-surface); padding-top: .55rem !important; padding-bottom: .55rem !important; }
.canvas-wrap .card-header b, .canvas-wrap .card-header > h5, .canvas-wrap .card-header > h6 { font-weight: 650; color: var(--rg-ink); }
.canvas-wrap .card-header .btn-sm, .canvas-wrap .card-header .form-select-sm, .canvas-wrap .input-group-sm > .form-control, .canvas-wrap .input-group-sm > .input-group-text { --bs-btn-font-size: .78rem; font-size: .78rem; }
.canvas-wrap .btn:not(.btn-sm):not(.btn-lg) { --bs-btn-font-size: .8125rem; --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .7rem; }
.canvas-wrap .form-control:not(.form-control-sm), .canvas-wrap .form-select:not(.form-select-sm), .canvas-wrap .input-group-text { font-size: .8125rem; padding-top: .3rem; padding-bottom: .3rem; }
.alert-info { --bs-alert-bg: var(--rg-primary-soft); --bs-alert-border-color: #c7d7fb; --bs-alert-color: #1e3a8a; }
.alert-warning { --bs-alert-bg: var(--rg-accent-soft); --bs-alert-border-color: #fcd9a0; --bs-alert-color: #7c3e06; }
.liaisons thead th { font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--rg-muted); border-bottom-color: var(--rg-border-strong); background: var(--rg-subtle); }
.liaisons td:nth-child(5) { white-space: nowrap; }
.liaisons tbody tr { cursor: pointer; }
.canvas-nav { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.facades-plan { background: var(--rg-hover); border-radius: var(--rg-radius); }
.facades-plan .plan-carte { border-radius: 6px; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .05); }
.facades-plan .plan-sel { outline: 2px solid var(--rg-accent); outline-offset: 1px; }
.issues li { border-bottom-color: var(--rg-border); }
.clickable:hover { background: var(--rg-hover); }
.pl-item:hover { background: var(--rg-hover); }
.pl-item-sel { background: var(--rg-accent-soft); }

/* écran de chargement */
.loading-progress circle:last-child { stroke: var(--rg-accent); }
.loading-progress circle { stroke: #e2e8f0; }
.loading-progress-text { color: var(--rg-muted); font-weight: 600; }

@media print {
    .app-body > .row { display: block; }
    .canvas-wrap { font-size: 1rem; }  /* l'impression garde la taille de texte d'origine */
    :root { --bs-body-color: #212529; --bs-emphasis-color: #000; --bs-secondary-color: rgba(33, 37, 41, .75); --bs-border-color: #dee2e6; }
    .card { --bs-card-border-color: var(--bs-border-color-translucent); --bs-card-border-radius: .375rem; }
    .table { --bs-table-border-color: #dee2e6; }
    .form-label { font-size: .75rem; font-weight: 400; color: #555; }
    .canvas { box-shadow: none; border-radius: 0; }
    .card { box-shadow: none; }
}
.fs-7 { font-size: .75rem; float: none; width: auto; padding: 0 .25rem; margin-bottom: 0; }
/* fils sur les façades */
/* liaison automatique depuis l'appareil amont : sans couleur de phase (pointillé gris-bleu) */
.fa-fil { fill: none; stroke: #546e7a; stroke-width: 1.4; stroke-dasharray: 5 3; stroke-linejoin: round; opacity: .8; }
.fa-fil-sortie { fill: none; stroke: #3d4348; stroke-width: 4.2; stroke-linecap: round; }
.fa-sortie-gaine { fill: none; stroke: #15181b; stroke-width: 5.6; stroke-linecap: round; }
.fa-sortie-reflet { fill: none; stroke: rgba(255,255,255,.32); stroke-width: 1; stroke-linecap: round; }
.fa-fil-txt { font-size: 7px; fill: #1565c0; }
.fa-fil-peigne { stroke: #b0651f; stroke-width: 2.2; stroke-dasharray: none; opacity: 1; }
/* connexions tirées à la main, couleur du conducteur (IEC) */
.fa-cx-fil { fill: none; stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; }
.fa-cx-gaine { fill: none; stroke: rgba(0,0,0,.55); stroke-width: 3.9; stroke-linejoin: round; stroke-linecap: round; }
.fa-cx-reflet { fill: none; stroke: rgba(255,255,255,.38); stroke-width: .8; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
/* prise technique modulaire */
.ap-prise { fill: #f4f4f2; stroke: #8a8f94; stroke-width: 1; }
.ap-prise-fond { fill: #e2e4e6; stroke: #b0b5ba; stroke-width: .6; }
.ap-alveole { fill: #2b2f33; }
.ap-broche { fill: #b8bcc0; stroke: #6d7277; stroke-width: .5; }
/* points de passage : zone de clic large le long des fils, fil choisi, poignées */
.fa-fil-hit { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; cursor: pointer; }
.fa-fil-choisi { filter: drop-shadow(0 0 2px #1e88e5) drop-shadow(0 0 2px #1e88e5); }
.fa-passage { fill: #fff; stroke: #1e88e5; stroke-width: 2; cursor: move; }
.fa-passage:hover { fill: #bbdefb; }
.fa-c-L1 { stroke: #7b4a2a; } .fa-c-L2 { stroke: #1f1f1f; } .fa-c-L3 { stroke: #8f8f8f; } .fa-c-N { stroke: #1e63b5; } .fa-c-PE { stroke: #2e7d32; }
.fa-c-PE2 { fill: none; stroke: #f2d024; stroke-width: 2.8; stroke-dasharray: 6 6; }
.fa-borne { fill: rgba(21, 101, 192, .18); stroke: #1565c0; stroke-width: 1.2; cursor: crosshair; }
.fa-borne:hover { fill: rgba(21, 101, 192, .45); }
.fa-borne-discret { fill: rgba(21, 101, 192, .08); stroke-opacity: 0; transition: stroke-opacity .15s; }
svg.facade:hover .fa-borne-discret { stroke-opacity: .5; }
.fa-borne-cible { fill: #f9a825; stroke: #e65100; stroke-opacity: 1; }
.fa-fil-tire { stroke: #e65100; stroke-width: 2.5; stroke-dasharray: 5 3; }
.fa-borne-debut { fill: #f9a825; stroke: #e65100; }
.fa-borne-txt { font-size: 7px; font-weight: bold; text-anchor: middle; }
.fa-pastille-c { display: inline-block; width: 18px; height: 6px; border-radius: 3px; }
.fa-bg-L1 { background: #7b4a2a; } .fa-bg-L2 { background: #1f1f1f; } .fa-bg-L3 { background: #8f8f8f; } .fa-bg-N { background: #1e63b5; }
.fa-bg-PE { background: repeating-linear-gradient(90deg, #2e7d32 0 6px, #f2d024 6px 12px); }
/* barre de vue : libellés des onglets masqués quand la place manque (l'onglet actif garde le sien), infobulle sur chaque onglet */
.canvas-wrap { container-type: inline-size; }
@container (max-width: 820px) {
    .barre-vue .onglet:not(.active) .lbl, .barre-vue-droite .lbl { display: none; }
}
@container (max-width: 520px) {
    .barre-vue { flex-wrap: wrap; }
    .barre-vue .onglet .lbl { display: none; }
}
/* schéma : zone de hauteur fixe, barres de défilement toujours visibles, glisser pour se déplacer */
.canvas-nav { height: calc(100vh - 140px); cursor: grab; }
.canvas-nav.panning { cursor: grabbing; user-select: none; }
.canvas-nav.panning svg { pointer-events: none; }
/* déplacement d'un élément par glisser-déposer */
.canvas-nav.deplacement { cursor: move; }
.node.drop-ok .hit { fill: #c8e6c9; stroke: #2e7d32; stroke-width: 2; }
.node.drop-ko .hit { fill: #ffcdd2; stroke: #c62828; stroke-width: 1.5; }
.node.a-deplacer .hit { fill: #e3f2fd; stroke: #1565c0; stroke-width: 2; stroke-dasharray: 4 2; }
.fantome { position: fixed; z-index: 2000; pointer-events: none; background: #1565c0; color: #fff; font-size: .75rem;
           padding: 2px 8px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.schema { display: block; font-family: Arial, Helvetica, sans-serif; }
.schema-fit { max-width: 100%; height: auto; margin: 0 auto; }
.sym-abr { text-anchor: end; font-weight: bold; }
.sym { stroke: #000; stroke-width: 1.6; fill: none; }
.sym.fill { fill: #000; }
.sym.thin { stroke-width: .8; }
.sym.thick { stroke-width: 3.2; }
.sym.dash { stroke-dasharray: 3 2; stroke-width: 1; }
.sym-t { font-size: 11px; font-weight: bold; text-anchor: middle; fill: #000; }
.sym-s { font-size: 9px; text-anchor: middle; fill: #000; }
.wire { stroke: #000; stroke-width: 1.4; fill: none; }
.wire-bad { stroke: #d32f2f; stroke-width: 2.2; }
.wire-td { stroke-width: 2.4; }
.wire-hit { stroke: transparent; stroke-width: 12; fill: none; cursor: pointer; }
.wire-tick { stroke: #000; stroke-width: 1.1; }
.cable-nb { text-anchor: end; }
.link:hover .wire { stroke: #1565c0; }
.link-sel .wire { stroke: #f9a825; stroke-width: 3; }
.cable-bad { fill: #d32f2f; font-weight: bold; }
.link { cursor: pointer; }
.frame-rect { fill: #fafbfc; stroke: #607d8b; stroke-width: 1.2; stroke-dasharray: 8 4; stroke-linejoin: round; }
.frame-sel .frame-rect { stroke: #f9a825; stroke-width: 2; }
.frame-lbl { font-size: 12px; font-weight: bold; fill: #455a64; cursor: pointer; }
.cable-focus { border-color: #f9a825 !important; box-shadow: 0 0 0 2px #fff3cd; }
.liaisons td, .liaisons th { padding: 2px 4px; font-size: .8rem; }
.liaisons select, .liaisons input { min-width: 64px; }
.cable { font-size: 9px; fill: #1565c0; }
.lbl { font-size: 11px; font-weight: bold; fill: #000; }
.spec { font-size: 9.5px; fill: #333; }
.spec.loc { fill: #00796b; font-style: italic; }
.repere { font-size: 12px; font-weight: bold; fill: #c62828; text-anchor: end; }
.node { cursor: pointer; }
.node .hit { fill: transparent; stroke: none; }
.node:hover .hit { fill: #fff8e1; }
.node.selected .hit { fill: #fff3cd; stroke: #ffc107; stroke-width: 1.5; }
.b-err { fill: #d32f2f; } .b-warn { fill: #f9a825; }
/* pastilles de conformité du schéma : pire gravité des règles de l'élément ou de sa liaison */
.pastille { cursor: pointer; }
.pastille circle { stroke: #fff; stroke-width: 1; }
.p-Ok { fill: #2e7d32; } .p-Info { fill: #1e88e5; } .p-Warning { fill: #f9a825; } .p-Error { fill: #d32f2f; }
/* lettre du circuit sur la façade, à cheval sur le haut de l'étiquette */
.fa-rep { fill: #c62828; stroke: #fff; stroke-width: 1; }
.fa-rep-txt { font-size: 9px; font-weight: bold; fill: #fff; text-anchor: middle; }
.b-txt { fill: #fff; font-size: 11px; font-weight: bold; text-anchor: middle; }
.issues li { padding: 3px 0; border-bottom: 1px dashed #eee; }
.issues .ref { display: block; color: #999; font-size: .68rem; }
.clickable { cursor: pointer; } .clickable:hover { background: #f8f9fa; }
.sev-Error { color: #c62828; } .sev-Warning { color: #b26a00; } .sev-Info { color: #1565c0; } .sev-Ok { color: #2e7d32; }
/* Façade des boîtiers (rails DIN) */
.facade { display: block; max-width: 100%; height: auto; font-family: Arial, Helvetica, sans-serif; }
.fa-boite { fill: #f3f4f2; stroke: #8d969c; stroke-width: 2; }
.fa-titre { font-size: 12px; font-weight: bold; fill: #37474f; }
.fa-num { font-size: 10px; fill: #78909c; }
.fa-rail { fill: #c4cbd0; stroke: #7d868d; stroke-width: .6; }
.fa-rail-trou { fill: #5f676d; stroke: #3d4449; stroke-width: .5; }
.fa-case { fill: transparent; stroke: rgba(84, 110, 122, .28); stroke-width: .5; stroke-dasharray: 2 2; }
.fa-cible { fill: #e8f5e9; cursor: pointer; }
.fa-cible:hover { fill: #a5d6a7; }
.fa-fantome-ok { fill: rgba(46, 125, 50, .25); stroke: #2e7d32; stroke-width: 2; stroke-dasharray: 5 3; }
.fa-fantome-ko { fill: rgba(198, 40, 40, .2); stroke: #c62828; stroke-width: 2; stroke-dasharray: 5 3; }
.facades [data-emp] { touch-action: none; }
.facades svg [data-emp] { cursor: grab; }
.fa-app { cursor: pointer; }
/* appareils modulaires : boîtier blanc, bornes à vis, manette grise (différentiel : manette bleue + bouton test) */
.fa-corps { fill: #fbfbf8; stroke: #5f6368; stroke-width: 1.1; }
.fa-bornes { fill: #e4e5e2; stroke: none; }
.fa-vis { fill: #c9ccce; stroke: #7b7f83; stroke-width: .8; }
.fa-fente { stroke: #55595c; stroke-width: 1; }
.fa-logement { fill: #3c4043; }
.fa-manette { fill: #a7adb2; stroke: #6b7175; stroke-width: .6; }
.fa-liaison { fill: #6b7175; }
.fa-pole { stroke: #d6d8d5; stroke-width: .8; }
.fa-diff .fa-manette { fill: #4f7bb0; stroke: #2f5b8f; }
.fa-diff .fa-liaison { fill: #2f5b8f; }
.fa-test { fill: #f2c94c; stroke: #8a6d1e; stroke-width: .7; }
/* illustrations d'appareils (AppareilSvg) */
.ap-trou { fill: #1d2023; }
.ap-puits { fill: #8b9196; stroke: rgba(0,0,0,.25); stroke-width: .5; }
.ap-fente-fine { stroke: #4a4f53; stroke-width: .45; }
.ap-nez-ombre { fill: rgba(0,0,0,.11); }
.ap-flanc { fill: rgba(0,0,0,.07); } .ap-flanc-d { fill: rgba(0,0,0,.12); }
.ap-arete { stroke: rgba(255,255,255,.95); stroke-width: .9; }
.ap-logement-bord { fill: #cfd2d0; stroke: rgba(0,0,0,.18); stroke-width: .5; }
.ap-manette-pied { fill: rgba(0,0,0,.35); }
.ap-strie { stroke: rgba(0,0,0,.28); stroke-width: .7; }
.ap-strie-noir, .ap-strie-gfonce { stroke: rgba(255,255,255,.14); }
.ap-io { font-size: 5px; font-weight: bold; text-anchor: middle; }
.ap-io-o { fill: #8a9095; }
.ap-io-i { fill: #3b4045; } .ap-io-noir, .ap-io-gfonce, .ap-io-bleu { fill: #f2f4f5; }
.ap-fenetre { fill: #2a2d30; }
.ap-ecran-chiffres { font-size: 8.5px; font-family: "Courier New", monospace; font-weight: bold; fill: #1f3417; text-anchor: end; letter-spacing: -.3px; }
.ap-led { fill: #e53935; stroke: #7f1d1d; stroke-width: .5; }
.ap-led-txt { font-size: 4.5px; fill: #6b7175; }
.ap-test-bague { fill: #c9cdcf; stroke: rgba(0,0,0,.3); stroke-width: .5; }
.ap-pdc { fill: none; stroke: #333; stroke-width: .5; }
.ap-pdc-txt { font-size: 4.2px; font-weight: bold; fill: #222; text-anchor: end; }
.fa-ombre { fill: rgba(25, 32, 38, .2); }
.fa-ombre-2 { fill: rgba(25, 32, 38, .12); }
.fa-ombre-3 { fill: rgba(25, 32, 38, .07); }
.fa-barre-cuivre { fill: #d88a42; opacity: .85; }
.fa-etiq-reflet { fill: rgba(255,255,255,.85); }
.ap-vis { stroke: #6b7175; stroke-width: .5; }
.ap-fente { stroke: #3b3f42; stroke-width: 1.1; }
.ap-face { stroke: #b9bdbf; stroke-width: .6; }
.ap-joint { stroke: #d2d5d2; stroke-width: .8; }
.ap-logement { fill: #2a2d30; }
.ap-manette { stroke: rgba(0,0,0,.35); stroke-width: .5; }
.ap-reflet { fill: rgba(255,255,255,.45); }
.ap-barre { fill: #6b7175; } .ap-barre-bleu { fill: #24548f; } .ap-barre-noir { fill: #000; } .ap-barre-gfonce { fill: #33373a; }
.ap-ecran-cadre { fill: #3a3f44; }
.ap-ecran { fill: #b9d7a8; }
.ap-ecran-txt { font-size: 6px; font-weight: bold; fill: #24401a; text-anchor: end; }
.ap-touche { fill: #5f6368; stroke: #2a2d30; stroke-width: .5; }
.ap-pastille { fill: rgba(255,255,255,.92); stroke: #607d8b; stroke-width: .6; }
.ap-pastille-txt { font-size: 7.5px; font-weight: bold; fill: #111; text-anchor: middle; }
.ap-voyant { fill: #e0352f; stroke: none; }
.ap-bande { fill: #3fa34d; }
.ap-test { fill: #f2c94c; stroke: #8a6d1e; stroke-width: .6; }
.ap-test-abb { fill: #a7a9ab; stroke: #555; } .ap-test-schneider { fill: #f5f5f5; stroke: #777; }
.ap-test-txt { font-size: 6px; font-weight: bold; text-anchor: middle; fill: #222; }
.ap-plaque { fill: #ffffff; stroke: #c3c8cb; stroke-width: .5; }
.ap-marque { font-size: 5.6px; font-style: italic; font-weight: bold; fill: #4a4f53; text-anchor: start; letter-spacing: .2px; }
.ap-val { font-size: 8.5px; font-weight: bold; fill: #111; text-anchor: middle; }
.ap-sous { font-size: 5.5px; fill: #444; text-anchor: middle; }
.fa-n { font-size: 8px; font-weight: bold; fill: #1565c0; }
.fa-n-libre { fill: rgba(120, 120, 120, .28); stroke: #9e9e9e; stroke-width: .6; stroke-dasharray: 3 2; }
.fa-n-barre { stroke: #c62828; stroke-width: 1.6; }
.fa-n-txt { font-size: 7px; font-weight: bold; fill: #c62828; text-anchor: middle; }
.fa-test-txt { font-size: 7px; font-weight: bold; text-anchor: middle; fill: #333; }
.fa-gen .fa-corps { stroke-width: 1.6; }
.fa-marque { font-size: 6.5px; font-style: italic; font-weight: bold; fill: #6b7175; text-anchor: middle; }
.fa-voyant { fill: #d32f2f; stroke: #7f1d1d; stroke-width: .5; }
.fa-bande { fill: #3fa34d; }
/* ABB : boîtier gris clair, manettes noires, bouton test gris */
.fa-m-abb .fa-corps { fill: #ecedeb; }
.fa-m-abb .fa-manette, .fa-m-abb.fa-diff .fa-manette { fill: #2b2b2b; stroke: #000; }
.fa-m-abb .fa-liaison, .fa-m-abb.fa-diff .fa-liaison { fill: #000; }
.fa-m-abb .fa-test { fill: #9e9e9e; stroke: #555; }
/* Schneider : boîtier blanc, manettes gris foncé, bouton test blanc */
.fa-m-schneider .fa-corps { fill: #ffffff; }
.fa-m-schneider .fa-manette, .fa-m-schneider.fa-diff .fa-manette { fill: #5b5f63; stroke: #33373a; }
.fa-m-schneider .fa-liaison, .fa-m-schneider.fa-diff .fa-liaison { fill: #33373a; }
.fa-m-schneider .fa-test { fill: #f5f5f5; stroke: #777; }
.fa-pp .fa-corps { fill: #f3e5f5; }
.fa-libre .fa-corps { fill: #fffde7; stroke-dasharray: 4 2; }
/* borniers de dérivation (code couleur IEC) */
.fa-bornier { stroke: #222; stroke-width: .8; }
.fa-born .fa-corps { fill: none; stroke: none; }
.fa-born.fa-sel .fa-corps { stroke: #f9a825; }
.fa-b-marron { fill: #7b4a2a; } .fa-b-noir { fill: #262626; } .fa-b-gris { fill: #9e9e9e; }
.fa-b-bleu { fill: #1e63b5; } .fa-b-vert-jaune { fill: #2e7d32; } .fa-b-jaune { fill: #f2d024; }
.fa-b-plaque { fill: #ffffff; stroke: #555; stroke-width: .5; }
.fa-b-txt { font-size: 8px; font-weight: bold; fill: #000; text-anchor: middle; }
.fa-sel .fa-corps, .fa-sel .fa-etiq { stroke: #f9a825; stroke-width: 2.6; }
.fa-sans-diff .fa-corps { stroke: #d32f2f !important; stroke-width: 3 !important; stroke-dasharray: 6 3; }
.fa-sans-diff .fa-etiq { fill: #ffebee; stroke: #d32f2f; }
.fa-reserve { opacity: .5; }
.fa-reserve .fa-corps { stroke-dasharray: 5 3; fill: #e9ecef !important; }
.fa-conflit .fa-corps { stroke: #d32f2f; stroke-width: 2.6; fill: #ffebee; }
.fa-val { font-size: 9px; font-weight: bold; fill: #111; text-anchor: middle; }
.fa-sous { font-size: 7px; fill: #444; text-anchor: middle; }
.fa-lbl { font-size: 7.5px; fill: #333; text-anchor: middle; }
/* zone d'étiquettes et peigne */
.fa-zone { fill: #cfd5d9; stroke: #9aa4ab; stroke-width: .6; }
.fa-etiq { fill: #ffffff; stroke: #8a959c; stroke-width: .8; }
.fa-etiq-txt { font-size: 10px; font-weight: bold; fill: #1a1a1a; text-anchor: middle; }
/* une carte par boîtier, façade sur toute la largeur disponible (la page défile en hauteur) */
.facade-boitier { display: flex; flex-direction: column; }
.facade-boitier .card-body { display: flex; flex-direction: column; }
.facade-pleine { width: 100%; height: auto; }
/* miniatures des façades, à droite des liaisons entre boîtiers (dessous sur écran étroit), posées librement */
.miniatures { flex: 1 1 320px; min-width: 260px; }
.facades-plan { position: relative; overflow: auto; background: #f1f3f5; border-radius: 6px; }
.facades-plan .plan-carte { position: absolute; cursor: grab; user-select: none; touch-action: none; background: #fff; border-radius: 4px; padding: 2px 4px 4px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.facades-plan .plan-carte * { pointer-events: none; }
.facades-plan .plan-nom { font-size: .75rem; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.facades-plan .plan-carte svg { display: block; }
.facades-plan .plan-sel { outline: 3px solid #f6a821; }
.facades-plan .plan-cible { outline: 3px dashed #2e7d32; background: #e8f5e9; }
.facades-plan .plan-carte.plan-deplace { cursor: grabbing; z-index: 10; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.facade-reglages { flex: none; max-height: 40vh; overflow-y: auto; }
.fa-barre { fill: #7a8288; stroke: #454b50; stroke-width: .6; }
.fa-dent { fill: #d08a3c; stroke: #7a4614; stroke-width: .5; }
.fa-phase { font-size: 7.5px; font-weight: bold; text-anchor: middle; fill: #555; }
.fa-L1 { fill: #6d4c41; } .fa-L2 { fill: #212121; } .fa-L3 { fill: #757575; } .fa-N { fill: #1565c0; }
/* synoptique des liaisons entre boîtiers */
.fa-arrivee { font-size: 9px; fill: #455a64; font-style: italic; }
.syn-boite { cursor: pointer; }
.syn-rect { fill: #fafbfc; stroke: #607d8b; stroke-width: 1.4; stroke-dasharray: 8 4; }
.syn-compteur .syn-rect { fill: #eceff1; stroke-dasharray: none; }
.syn-sel .syn-rect { stroke: #f9a825; stroke-width: 2.4; }
.syn-nom { font-size: 12px; font-weight: bold; fill: #263238; }
.syn-info { font-size: 9.5px; fill: #455a64; }
.syn-lien { cursor: pointer; }
.syn-fil { stroke: #000; stroke-width: 2.4; fill: none; }
.syn-fleche { fill: #000; }
.syn-hit { stroke: transparent; stroke-width: 14; fill: none; }
.syn-lien:hover .syn-fil { stroke: #1565c0; }
.syn-sel .syn-fil { stroke: #f9a825; stroke-width: 3.2; }
.syn-bad .syn-fil { stroke: #d32f2f; } .syn-bad .syn-fleche { fill: #d32f2f; }
.syn-dep { font-size: 9.5px; font-weight: bold; fill: #c62828; }
.syn-cable { font-size: 9.5px; fill: #1565c0; }
.facade-outils { position: sticky; top: 0; z-index: 2; }
.print-header, .print-only { display: none; }

@media print {
    @page { size: A3 landscape; margin: 10mm; }
    body { background: #fff; }
    .no-print, .navbar { display: none !important; }
    .app-body { height: auto; }
    .canvas-wrap { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; overflow: visible; height: auto; padding: 0; }
    .canvas { border: 0; overflow: visible; }
    .canvas-nav { height: auto; }
    .schema { width: 100% !important; height: auto !important; max-height: 250mm; }
    .print-header, .print-only { display: block; }
    .print-only { page-break-before: always; }
    .facades { page-break-before: always; }
    .facade-card { border: 0; page-break-inside: avoid; }
    .facade { width: 100% !important; max-height: 250mm; }
    .facade-boitier { height: auto; display: block; }
    .facade-pleine { height: auto; }
    .fa-case { stroke: none; }
}

/* « ? » des messages de conformité */
details.aide { display: inline; }
details.aide > summary { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border-radius: 50%;
    background: #e9ecef; color: #495057; font-size: .7rem; font-weight: bold; cursor: pointer; list-style: none; vertical-align: text-top; }
details.aide > summary::-webkit-details-marker { display: none; }
details.aide[open] > summary { background: #0d6efd; color: #fff; }
details.aide .aide-texte { display: block; margin: .25rem 0 .4rem; padding: .4rem .5rem; border-left: 3px solid #0d6efd; background: #f8f9fa; color: #212529; font-size: .8rem; line-height: 1.35; }
details.aide .equil-defil { overflow-x: auto; }
details.aide table.equil { font-size: .7rem; background: #fff; }
details.aide table.equil td:first-child { min-width: 9rem; }
details.aide table.equil td, details.aide table.equil th { padding: .1rem .3rem; }

/* ---- Plans des niveaux ---- */
.plans .canvas-nav { height: calc(100vh - 220px); }
.plan-svg { display: block; }
.pl-sym { cursor: move; touch-action: none; user-select: none; }
.pl-rep { fill: currentColor; font-size: 9px; font-weight: 700; font-family: Arial, Helvetica, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 2.5px; }
.pl-haut { font-weight: 400; font-size: 8px; }
.pl-symbole .sym { stroke: currentColor; stroke-width: 2.8; }
.pl-symbole .sym.fill { fill: currentColor; }
.pl-symbole .sym.thin { stroke-width: 1.6; }
.pl-symbole .sym.thick { stroke-width: 5; }
.pl-symbole .sym.dash { stroke-width: 1.6; }
.pl-symbole .sym-t, .pl-symbole .sym-s { fill: currentColor; }
.pl-nr .pl-symbole .sym { stroke-dasharray: 6 1.5; }
.pl-nr .pl-rep { font-style: italic; }
.pl-hit { fill: transparent; stroke: none; }
.pl-liaison-cmd { fill: none; stroke-linecap: round; opacity: .8; pointer-events: none; }
.pl-nuit { fill: #050a1a; opacity: .68; pointer-events: none; }
.pl-lueur { pointer-events: none; mix-blend-mode: screen; }
.pl-fond-sim { fill: rgba(255, 255, 255, .82); }
.pl-cmd-on { fill: rgba(255, 213, 79, .55); stroke: #ffb300; stroke-width: 2; }
.pl-halo { fill: rgba(255, 193, 7, .35); stroke: #ffc107; stroke-width: 1.5; }
.pl-mini { overflow: visible; flex: 0 0 auto; }
.pl-liste.pl-retirer { outline: 3px dashed #dc3545; outline-offset: -3px; background: #fff5f5; }
.pl-item { user-select: none; display: flex; align-items: center; gap: .4rem; padding: 2px 4px; border-radius: 4px; font-size: .78rem; cursor: grab; touch-action: none; }
.pl-item:hover { background: #f1f3f5; }
.pl-item-sel { background: #fff3cd; }
.pl-item-nr { border-left: 3px dashed #e8590c; }
.pl-pastille { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; vertical-align: middle; }
.print-plan-titre { display: none; }
@media print {
    .plans { display: none !important; }
    body.impression-plan .canvas-wrap > :not(.plans) { display: none !important; }
    body.impression-plan .plans { display: block !important; }
    body.impression-plan .print-plan-titre { display: block; }
    body.impression-plan .plans .canvas-nav { height: auto; border: 0; overflow: visible; }
    body.impression-plan .plan-svg { width: 100% !important; height: auto !important; max-height: 255mm; }
}
.sym.bg { fill: #fff; }
.sym-xs { font-size: 6px; }
/* copies cachées pour le dossier de contrôle (mises en page, mais hors écran) */
.dossier-cache { position: absolute; left: -99999px; top: 0; width: 1200px; }
.dossier-cache .plan-svg { width: 1200px; }
@media print { .dossier-cache { display: none !important; } }
/* choix des pages d'un PDF à l'import */
.pl-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.pl-page { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .35rem; border: 1px solid #dee2e6; border-radius: 6px; cursor: pointer; font-size: .8rem; }
.pl-page canvas { max-width: 180px; max-height: 180px; border: 1px solid #ced4da; background: #fff; }
.pl-page input { position: absolute; top: .5rem; left: .5rem; }
.pl-page:has(input:not(:checked)) canvas { opacity: .35; }
/* poignée de rotation du symbole sélectionné sur le plan */
.pl-poignee { cursor: grab; }
.pl-poignee line { stroke: #0d6efd; stroke-width: 1; stroke-dasharray: 2 1.5; }
.pl-poignee circle { fill: #fff; stroke: #0d6efd; stroke-width: 1.6; }
.pl-poignee:hover circle { fill: #0d6efd; }
/* replier / déplier un nœud du schéma */
.replier { cursor: pointer; }
.replier rect { fill: #fff; stroke: #6c757d; stroke-width: 1; }
.replier line { stroke: #212529; stroke-width: 1.4; }
.replier:hover rect { fill: #e7f1ff; stroke: #0d6efd; }
.deplier-groupe { cursor: pointer; }
.deplier-groupe rect { fill: #fff; stroke: #0d6efd; stroke-width: 1; }
.deplier-groupe rect.dg-plein { fill: #0d6efd; stroke: none; }
.deplier-groupe:hover > rect:first-of-type { fill: #e7f1ff; }
.resume-repli { cursor: pointer; }
.resume-repli .spec { fill: #0d6efd; }
/* schéma : l'élément est posé sur un plan (aide à l'écran, non imprimée) */
.sur-plan { cursor: pointer; }
.sur-plan path { fill: #5b7fa6; }
.sur-plan .sur-plan-trou { fill: #fff; }
.sur-plan .sur-plan-hit { fill: transparent; }
.sur-plan:hover path { fill: #0d6efd; }
.sur-plan-masque path { fill: #c4ccd5; }

/* boucle de terre sur les plans : vert et jaune (conducteur de terre) */
.pl-boucle { stroke: #2e7d32; stroke-width: 3; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.pl-boucle-jaune { stroke: #f9c80e; stroke-width: 3; fill: none; stroke-dasharray: 6 6; stroke-linejoin: round; }
.pl-boucle-hit { stroke: transparent; stroke-width: 14; fill: none; cursor: pointer; }
.pl-sel .pl-boucle { stroke-width: 5; }
.pl-trace { stroke: #2e7d32; stroke-width: 3; fill: none; stroke-dasharray: 4 3; pointer-events: none; }
.plan-trace-actif #plan-svg { cursor: crosshair; }
.partie-ancienne { font-size: 9px; font-style: italic; fill: #8d6e63; }

/* contrôle circuit par circuit : l'élément d'un écart, montré sur le schéma */
@keyframes ecart-clignote { 0%, 100% { stroke-opacity: 1; fill-opacity: 1; } 50% { stroke-opacity: .2; fill-opacity: .3; } }
.node.ecart-montre .hit { fill: #ffe3e3; stroke: #dc3545; stroke-width: 2.5; animation: ecart-clignote .6s ease-in-out 4; }
.circuits-conf td, .circuits-conf th { padding: 2px 4px; }
.circuits-conf .sev-Error { color: #dc3545; } .circuits-conf .sev-Warning { color: #e8590c; } .circuits-conf .sev-Ok { color: #2f9e44; }

/* ---------- Simulation de charge ---------- */
.sim-fil { fill: none; stroke-width: 3.2; stroke-linecap: round; opacity: .85; pointer-events: none; }
.sim-fil.sim-bleu { stroke: #1e88e5; }
.sim-fil.sim-vert { stroke: #2e7d32; }
.sim-fil.sim-orange { stroke: #f57c00; }
.sim-fil.sim-rouge { stroke: #d32f2f; stroke-width: 4.5; }
.sim-fil.sim-zero { stroke: #9e9e9e; stroke-width: 1.6; opacity: .5; }
.sim-fil.sim-off { stroke: #bdbdbd; stroke-width: 1.6; stroke-dasharray: 3 3; }
.sim-flux { fill: none; stroke: #fff59d; stroke-width: 1.6; stroke-dasharray: 2 9; stroke-linecap: round; pointer-events: none;
    animation: sim-flux 1s linear infinite; }
.sim-flux.inv { animation-direction: reverse; stroke: #ccff90; }
@keyframes sim-flux { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
.sim-txt { font-size: 9.5px; font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.sim-txt.sim-bleu { fill: #1565c0; } .sim-txt.sim-vert { fill: #2e7d32; } .sim-txt.sim-orange { fill: #e65100; }
.sim-txt.sim-rouge { fill: #c62828; } .sim-txt.sim-zero, .sim-txt.sim-off { fill: #9e9e9e; font-weight: 400; }
.sim-halo { fill: transparent; stroke: #e0e0e0; stroke-width: 1.5; stroke-dasharray: 3 3; }
.sim-halo.on { fill: #fff59d; stroke: #fbc02d; stroke-dasharray: none; filter: drop-shadow(0 0 4px #fdd835); }
.sim-halo.prod { fill: #dcedc8; stroke: #43a047; stroke-dasharray: none; filter: drop-shadow(0 0 4px #66bb6a); }
.node.sim-cliquable { cursor: pointer; }
.node.sim-hors > :not(.sim-declenche) { opacity: .35; }
.sim-declenche rect { fill: #d32f2f; }
.sim-declenche text { fill: #fff; font-size: 8.5px; font-weight: 700; text-anchor: middle; }
.sim-defaut rect { fill: #6a1b9a; }
.sim-point { font-size: 9px; font-weight: 600; fill: #b26a00; }
.sim-point.prod { fill: #2e7d32; }

.sim-panneau { font-size: .85rem; }
.sim-etat { border-radius: .5rem; padding: .5rem .7rem; margin-bottom: .5rem; }
.sim-etat.ok { background: #e8f5e9; color: #1b5e20; }
.sim-etat.limite { background: #fff3e0; color: #e65100; }
.sim-etat.ko { background: #ffebee; color: #b71c1c; animation: sim-alerte 1s ease-in-out 2; }
@keyframes sim-alerte { 50% { background: #ef9a9a; } }
.sim-bloc { border: 1px solid var(--rg-border, #dee2e6); border-radius: .5rem; padding: .5rem .6rem; margin-bottom: .5rem; }
.sim-phase { display: flex; align-items: center; gap: .4rem; margin: .25rem 0; }
.sim-ph { width: 1.4rem; font-weight: 600; }
.sim-barre { flex: 1; height: .55rem; background: #eceff1; border-radius: .3rem; overflow: hidden; }
.sim-barre > div { height: 100%; transition: width .3s; }
.sim-barre .bleu { background: #1e88e5; } .sim-barre .vert { background: #43a047; } .sim-barre .orange { background: #fb8c00; } .sim-barre .rouge { background: #e53935; }
.sim-val { min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.sim-evt { padding: .2rem 0; cursor: pointer; border-bottom: 1px dashed #eee; }
.sim-evt.sev-Error { color: #b71c1c; } .sim-evt.sev-Warning { color: #e65100; }
.sim-circuit { display: flex; justify-content: space-between; gap: .4rem; margin-top: .45rem; font-weight: 600; font-size: .8rem; }
.sim-badge { font-weight: 600; font-size: .75rem; white-space: nowrap; }
.sim-badge.sim-bleu { color: #1565c0; } .sim-badge.sim-vert { color: #2e7d32; } .sim-badge.sim-orange { color: #e65100; } .sim-badge.sim-rouge, .sim-badge.sim-off { color: #c62828; }
.sim-badge.sim-zero { color: #9e9e9e; }
.sim-ligne { display: flex; align-items: center; gap: .35rem; padding: .1rem 0 .1rem .4rem; }
.sim-ligne.hors { opacity: .5; }
.sim-w { width: 5.2rem; flex: none; padding: .1rem .3rem; text-align: right; }
.sim-mode { width: auto; flex: none; padding-top: .1rem; padding-bottom: .1rem; }
.sim-pilotage { margin-top: .35rem; }

/* ---- écran de chargement (avant le démarrage de Blazor) ---- */
.ecran-chargement { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    background: radial-gradient(circle at 50% 38%, #1e293b 0, #0f172a 62%); color: #fff; z-index: 2000; }
.ec-logo { width: 96px; height: 96px; margin-bottom: 1rem; filter: drop-shadow(0 10px 28px rgba(245, 158, 11, .45)); animation: ec-pulse 1.8s ease-in-out infinite; }
.ec-titre { font-size: 1.35rem; font-weight: 650; letter-spacing: -.01em; }
.ec-sous-titre { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #94a3b8; }
.ec-barre { width: 220px; height: 4px; margin-top: 1.4rem; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ec-barre span { display: block; height: 100%; width: var(--blazor-load-percentage, 0%); background: var(--rg-accent); transition: width .15s ease-out; }
.ec-texte { font-size: .75rem; color: #94a3b8; font-variant-numeric: tabular-nums; min-height: 1.1em; }
.ec-texte::after { content: var(--blazor-load-percentage-text, "Chargement…"); }
@keyframes ec-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .ec-logo { animation: none; } }

/* ---- encarts publicitaires : collés en bas des barres latérales ---- */
@media (min-width: 992px) {
    .app-body .panel { display: flex; flex-direction: column; }
    .app-body .panel > * { flex-shrink: 0; }
}
.encart-pub { position: sticky; bottom: -1.25rem; z-index: 4; margin: auto -.9rem -1.25rem; padding: .5rem .9rem .7rem;
    background: var(--rg-surface); border-top: 1px solid var(--rg-border); }
.encart-pub-label { display: block; font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rg-faint); margin-bottom: .25rem; }
.encart-pub-zone { display: flex; align-items: center; justify-content: center; gap: .45rem; height: 100px; border: 1px dashed var(--rg-border-strong);
    border-radius: var(--rg-radius); background: var(--rg-subtle); color: var(--rg-faint); font-size: .78rem; overflow: hidden; }
.encart-pub-zone .bi { font-size: 1.1rem; }
@media (max-width: 991.98px) { .encart-pub { position: static; margin-bottom: 0; } }
.barre-haut .lien-site { margin-left: .25rem; }

/* ---- avertissement de première visite ---- */
.avertissement { z-index: 1060; }
.avertissement .modal-content { border: 0; border-radius: var(--rg-radius-lg); box-shadow: var(--rg-shadow-lg); }
.avertissement .modal-body { padding: 1.4rem 1.5rem .6rem; font-size: .9rem; color: var(--rg-text); }
.avertissement .modal-footer { border-top: 0; padding: .5rem 1.5rem 1.2rem; }
.avert-tete { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.avert-tete h5 { font-weight: 650; color: var(--rg-ink); }

/* Google AdSense (js/pub.js) : le bloc remplace « Votre annonce ici » */
.encart-pub-ads:empty { display: none; }
.encart-pub-actif .encart-pub-zone { display: none; }
.encart-pub-ads { min-height: 100px; overflow: hidden; }
