/* ============================================================
   Infradesk · couche de composants Carbon (chantier 2.8, lot 2)
   ------------------------------------------------------------
   Chargée EN DERNIER dans les 5 fronts et les pages autonomes.
   Valeurs Carbon portées à la main (pas d'import de @carbon/styles) ;
   tout passe par les jetons --ohm-* du lot 1. Aucun !important :
   le préfixe `:root:root:root` (0,3,0) égale les surcharges
   `:root.theme-light .x` de style.css ; la couche, chargée en dernier, gagne à égalité. Couleurs métier inchangées : ici
   on ne touche qu'à la forme (angles, hauteurs, filets, états).
   Rayons : 0, sauf étiquettes (--ohm-radius-tag) et avatars.
   ============================================================ */

:root {
    --ohm-ctl-h:     40px;   /* hauteur de contrôle par défaut (48 / 40 / 32) */
    --ohm-ctl-h-lg:  48px;
    --ohm-ctl-h-sm:  32px;
    --ohm-row-h:     40px;   /* lignes de tableau (compact : décision du 2026-10-14, Carbon standard = 48) */
    --ohm-focus:     2px solid var(--ohm-accent);
}
:root.theme-light { --ohm-focus: 2px solid var(--ohm-accent-hi); }

/* ── En-tête 48 px ─────────────────────────────────────────── */
:root:root:root header {
    height: 48px;
    padding: 0 12px;
    box-shadow: none;
    border-bottom: 1px solid var(--ohm-border);
}
:root:root:root .brand-text-infradesk { font-size: 20px; font-weight: 600; letter-spacing: 0; }
:root:root:root .brand-text-module    { font-size: 20px; font-weight: 400; vertical-align: 0; }
:root:root:root .header-logo { gap: 0; }
/* Marque « Infradesk.module » : le point orange du logo relie le mot-marque au module. */
:root:root:root .brand-text-dot       { font-size: 20px; font-weight: 600; line-height: 1; color: var(--ohm-accent); user-select: none; }
:root:root:root .header-left,
:root:root:root .header-right { gap: 4px; }
:root:root:root .header-zone-brand { margin-right: 8px; }
:root:root:root .header-sep { height: 24px; opacity: .5; }
/* actions d'en-tête : fantôme pleine hauteur, survol plein */
:root:root:root .header-left > button,
:root:root:root .header-right > button,
:root:root:root .export-main-btn,
:root:root:root .admin-btn,
:root:root:root .inventaire-header-btn,
:root:root:root .intervention-header-btn,
:root:root:root .load-calc-header-btn,
:root:root:root .header-seg > button {
    height: 48px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    background-image: none;
    box-shadow: none;
    color: var(--ohm-fg-medium);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    transition: background-color .11s, color .11s;
}
:root:root:root .header-left > button:hover,
:root:root:root .header-right > button:hover,
:root:root:root .export-main-btn:hover,
:root:root:root .admin-btn:hover,
:root:root:root .inventaire-header-btn:hover,
:root:root:root .intervention-header-btn:hover,
:root:root:root .load-calc-header-btn:hover,
:root:root:root .header-seg > button:hover,
:root:root:root .header-seg > button:focus-visible {
    background: var(--ohm-tint-3);
    background-image: none;
    color: var(--ohm-fg-strong);
    box-shadow: none;
}
/* Rubriques : le libellé passe en Mandarine au survol, comme l'icône. */
:root:root:root .header-seg > button:hover,
:root:root:root .header-seg > button:focus-visible { color: var(--ohm-accent); }
/* Pastille « Administration » posée sur la carte (.admin-fab, hors en-tête) :
   la règle d'en-tête ci-dessus la rendait transparente et sans bord, texte
   nu sur les tuiles. Bouton flottant Carbon : surface pleine, repère accent. */
:root:root:root .admin-btn.admin-fab {
    height: auto;
    padding: 8px 14px;
    border: 1px solid var(--ohm-border);
    border-left: 3px solid var(--ohm-accent);
    background: var(--ohm-surface);
    color: var(--ohm-fg-strong);
    font-weight: 600;
    box-shadow: 0 2px 10px var(--ohm-overlay-hard);
}
:root:root:root .admin-btn.admin-fab:hover,
:root:root:root .admin-btn.admin-fab:focus-visible {
    background: var(--ohm-surface-2);
    color: var(--ohm-fg-strong);
    box-shadow: 0 2px 10px var(--ohm-overlay-hard);
}
:root:root:root .header-seg { border: 0; border-radius: 0; background: transparent; gap: 0; padding: 0; }
/* Rubriques plus serrées (2026-11-07) : les 8 libellés tiennent sans header-compact
   sur un écran 1920 à 125 % ; Import/Export n'a plus que son icône. */
:root:root:root .header-seg > button { padding: 0 8px; }
:root:root:root .header-site-chip { height: 32px; border-radius: 0; }

/* groupe compte (import/export, réglages) : plus de cadre ni de fond */
:root:root:root .header-acct { border: 0; border-radius: 0; background: transparent; padding: 0; gap: 0; }

/* ── Boutons ───────────────────────────────────────────────── */
/* Kit UI : au survol / focus clavier, --btn-fill monte du bas vers le haut
   (dégradé plein dont la hauteur passe de 0 à 100 %). En-tête exclu. */
:root:root:root .btn-primary,
:root:root:root .composantes-save-btn,
:root:root:root .folder-edit-save-btn,
:root:root:root .label-confirm-btn,
:root:root:root .load-calc-run-btn,
:root:root:root .plan2d-gen-btn,
:root:root:root .fiches-upload-btn,
:root:root:root .ohm-confirm-ok,
:root:root:root .label-cancel-btn,
:root:root:root .reset-cancel-btn,
:root:root:root .ohm-confirm-cancel,
:root:root:root .fiches-close-btn,
:root:root:root .btn-danger-solid,
:root:root:root .reset-confirm-btn,
:root:root:root .btn-secondary,
:root:root:root .btn-oauth {
    background-image: linear-gradient(var(--btn-fill, transparent) 0 0);
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: 100% 0%;
    transition: background-size .25s ease-out, border-color .25s, color .25s;
}
:root:root:root :is(.btn-primary, .composantes-save-btn, .folder-edit-save-btn, .label-confirm-btn,
  .load-calc-run-btn, .plan2d-gen-btn, .fiches-upload-btn, .ohm-confirm-ok, .label-cancel-btn,
  .reset-cancel-btn, .ohm-confirm-cancel, .fiches-close-btn, .btn-danger-solid, .reset-confirm-btn, .btn-secondary, .btn-oauth):is(:hover, :focus-visible):not(:disabled) { background-size: 100% 100%; }
/* Pages login / réglages : boutons secondaires et OAuth, voile clair qui monte */
:root:root:root :is(.btn-secondary, .btn-oauth) { --btn-fill: var(--ohm-tint-3); }
@media (prefers-reduced-motion: reduce) {
    :root:root:root :is(.btn-primary, .ohm-confirm-ok, .ohm-confirm-cancel, .label-cancel-btn, .reset-cancel-btn,
      .fiches-close-btn, .btn-danger-solid, .reset-confirm-btn) { transition-duration: .01s; }
}
/* Kit UI, autres boutons des modules (pages qui ont .header-zone-tools : télécom,
   électrique, construction, mines, VRD) : voile clair qui monte au survol par-dessus
   la couleur de survol existante. Exclus : en-tête, onglets et bascules, éléments de
   menu, interrupteurs, désactivés, et les 3 boutons à dégradé (exports, annotation 360°). */
:root:has(.header-zone-tools) button:not(header button, [role="tab"], [role="menuitem"], [aria-pressed],
  .ident-tab, .tab, .ohm-switch, .export-dropdown-item, .ticket-export-item, .potree-launch-menu-item,
  .load-calc-export-btn, .ticket-export-btn, .tour360-annot-btn, :disabled) {
    background-image: linear-gradient(var(--btn-fill, var(--ohm-tint-3)) 0 0);
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: 100% 0%;
    transition: background-size .25s ease-out, background-color .25s, border-color .25s, color .25s;
}
:root:has(.header-zone-tools) button:not(header button, [role="tab"], [role="menuitem"], [aria-pressed],
  .ident-tab, .tab, .ohm-switch, .export-dropdown-item, .ticket-export-item, .potree-launch-menu-item,
  .load-calc-export-btn, .ticket-export-btn, .tour360-annot-btn, :disabled):is(:hover, :focus-visible) {
    background-size: 100% 100%;
}
@media (prefers-reduced-motion: reduce) {
    :root:has(.header-zone-tools) button { transition-duration: .01s; }
}
/* primaire : fond Mandarine, texte noir */
:root:root:root .btn-primary,
:root:root:root .composantes-save-btn,
:root:root:root .folder-edit-save-btn,
:root:root:root .label-confirm-btn,
:root:root:root .load-calc-run-btn,
:root:root:root .plan2d-gen-btn,
:root:root:root .fiches-upload-btn,
:root:root:root .ohm-confirm-ok:not(.is-danger) {
    --btn-fill: var(--ohm-accent-hi);
    background-color: var(--ohm-accent);
    border: 1px solid var(--ohm-accent);
    border-radius: 0;
    color: var(--ohm-on-accent);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
}
:root:root:root .btn-primary:hover,
:root:root:root .composantes-save-btn:hover,
:root:root:root .folder-edit-save-btn:hover,
:root:root:root .label-confirm-btn:hover,
:root:root:root .load-calc-run-btn:hover,
:root:root:root .plan2d-gen-btn:hover,
:root:root:root .fiches-upload-btn:hover,
:root:root:root .ohm-confirm-ok:not(.is-danger):hover {
    border-color: var(--ohm-accent-hi);
    color: var(--ohm-on-accent);
}
/* secondaire / tertiaire : contour, texte courant */
:root:root:root .label-cancel-btn,
:root:root:root .reset-cancel-btn,
:root:root:root .ohm-confirm-cancel,
:root:root:root .fiches-close-btn {
    --btn-fill: var(--ohm-tint-3);
    background-color: transparent;
    border: 1px solid var(--ohm-fg-soft);
    border-radius: 0;
    color: var(--ohm-fg-strong);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
:root:root:root .label-cancel-btn:hover,
:root:root:root .reset-cancel-btn:hover,
:root:root:root .ohm-confirm-cancel:hover,
:root:root:root .fiches-close-btn:hover {
    border-color: var(--ohm-fg-strong);
}
/* danger : fond rouge */
:root:root:root .btn-danger-solid,
:root:root:root .reset-confirm-btn,
:root:root:root .ohm-confirm-ok.is-danger {
    --btn-fill: color-mix(in srgb, var(--ohm-danger) 82%, white);
    background-color: var(--ohm-danger);
    border: 1px solid var(--ohm-danger);
    border-radius: 0;
    color: var(--ohm-surface);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
:root:root:root .btn-danger-solid:hover,
:root:root:root .reset-confirm-btn:hover,
:root:root:root .ohm-confirm-ok.is-danger:hover { border-color: var(--btn-fill); }
/* pied de modale : boutons de 48 px */
:root:root:root .ohm-confirm-actions button,
:root:root:root .reset-modal-actions button,
:root:root:root .ouvrage-modal-actions button,
:root:root:root .label-picker-footer-btns button {
    min-height: var(--ohm-ctl-h-lg);
    padding: 0 16px;
    border-radius: 0;
}
:root:root:root :is(button, [role="button"], a.btn):focus-visible {
    outline: var(--ohm-focus);
    outline-offset: -2px;
}

/* ── Champs : fond plein, filet bas ────────────────────────── */
:root:root:root :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"]), select, textarea),
:root:root:root .fin-input,
:root:root:root .inv-search-input,
:root:root:root .lc-input,
:root:root:root .inv-select,
:root:root:root .comp-obs-input,
:root:root:root .point-name-input,
:root:root:root .lm-rename-input {
    background: var(--ohm-surface-2);
    border: 0;
    border-bottom: 1px solid var(--ohm-fg-faint);
    border-radius: 0;
    color: var(--ohm-fg-strong);
    box-shadow: none;
}
:root:root:root :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"]), select):not([class*="fin-"], [class*="inv-"], [class*="lc-"], [class*="comp-"], [class*="cmdk"], [class*="lm-"]) {
    min-height: var(--ohm-ctl-h);
    padding: 0 12px;
}
:root:root:root :is(input, select, textarea)::placeholder { color: var(--ohm-fg-faint); }
:root:root:root :is(input, select, textarea):hover { background: var(--ohm-tint-3); }
:root:root:root :is(input, select, textarea):focus,
:root:root:root :is(input, select, textarea):focus-visible {
    outline: var(--ohm-focus);
    outline-offset: -2px;
    border-bottom-color: transparent;
}
:root:root:root :is(input, select, textarea):disabled { color: var(--ohm-fg-faint); border-bottom-color: transparent; }
:root:root:root :is(input, select, textarea):user-invalid { outline: 2px solid var(--ohm-danger); outline-offset: -2px; }

/* ── Listes déroulantes natives ────────────────────────────── */
/* La liste des <option> est peinte par le navigateur : sans color-scheme
   ni fond explicite, Chrome/Edge la dessinent en clair alors que le texte
   hérite du clair du thème sombre → seule l'option survolée était lisible. */
:root { color-scheme: dark; }
:root.theme-light { color-scheme: light; }
:root:root:root :is(select option, select optgroup) {
    background-color: var(--ohm-surface);
    color: var(--ohm-fg-strong);
}
:root:root:root select option:disabled { color: var(--ohm-fg-faint); }

/* ── Étiquettes (tags) : 24 px, rayon plein ────────────────── */
:root:root:root .header-badge,
:root:root:root .annotation-sev-badge,
:root:root:root .ticket-sev-badge,
:root:root:root .fiche-badge,
:root:root:root .transfer-badge,
:root:root:root .lc-badge-3d,
:root:root:root .lc-badge-ft,
:root:root:root .inv-fiche-chip,
:root:root:root .inv-transfer-chip,
:root:root:root .annot-edit-cid-badge,
:root:root:root .annot-edit-label-badge,
:root:root:root .annotation-label-badge,
:root:root:root .ticket-label-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: var(--ohm-radius-tag);
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0;
}

/* ── Onglets : filet de 3 px sous l'onglet actif ───────────── */
:root:root:root .ident-tab,
:root:root:root .lc-tab,
:root:root:root .lm-tab {
    height: var(--ohm-ctl-h-lg);
    padding: 0 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--ohm-fg-soft);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    margin-bottom: 0;
}
:root:root:root .ident-tab:hover,
:root:root:root .lc-tab:hover,
:root:root:root .lm-tab:hover { background: var(--ohm-tint-2); color: var(--ohm-fg-strong); }
:root:root:root .ident-tab.active,
:root:root:root .lc-tab.active,
:root:root:root .lc-tab[aria-selected="true"],
:root:root:root .lm-tab.active {
    background: transparent;
    color: var(--ohm-fg-strong);
    font-weight: 600;
    border-bottom-color: var(--ohm-accent);
}
:root.theme-light .ident-tab.active,
:root.theme-light .lc-tab.active,
:root.theme-light .lc-tab[aria-selected="true"],
:root.theme-light .lm-tab.active { border-bottom-color: var(--ohm-accent-hi); color: var(--ohm-fg-strong); }

/* ── Tableaux : en-tête plein, lignes de 48 px ─────────────── */
:root:root:root .inv-table,
:root:root:root .comp-table,
:root:root:root .lc-godomey-table,
:root:root:root .avancement-table,
:root:root:root .parc-table,
:root:root:root .capacite-table,
:root:root:root .conduite-table { border-collapse: collapse; }
:root:root:root .inv-table thead th,
:root:root:root .comp-table thead th,
:root:root:root .lc-godomey-table thead th,
:root:root:root .avancement-table thead th,
:root:root:root .parc-table thead th,
:root:root:root .capacite-table thead th,
:root:root:root .conduite-table thead th {
    background: var(--ohm-surface-2);
    color: var(--ohm-fg-strong);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 1px solid var(--ohm-border);
}
:root:root:root .inv-table tbody td,
:root:root:root .comp-table tbody td,
:root:root:root .lc-godomey-table tbody td,
:root:root:root .avancement-table tbody td,
:root:root:root .parc-table tbody td,
:root:root:root .capacite-table tbody td,
:root:root:root .conduite-table tbody td {
    height: var(--ohm-row-h);
    border-bottom: 1px solid var(--ohm-border-soft);
}
:root:root:root .inv-table tbody tr:hover td,
:root:root:root .comp-table tbody tr:hover td,
:root:root:root .lc-godomey-table tbody tr:hover td,
:root:root:root .avancement-table tbody tr:hover td,
:root:root:root .parc-table tbody tr:hover td,
:root:root:root .capacite-table tbody tr:hover td,
:root:root:root .conduite-table tbody tr:hover td { background: var(--ohm-tint-2); }
/* 4.4 : la cellule Site collante de la carte de chaleur reste opaque au survol (tint-2 est translucide) */
:root:root:root .parc-heat-table tbody tr:hover td:first-child { background: var(--ohm-surface-2); }
:root:root:root .parc-heat-table tbody tr:hover td:first-child { background: color-mix(in srgb, var(--ohm-tint-2), var(--ohm-surface)); }

/* ── Modales : angles droits, filet, sans flou ─────────────── */
:root:root:root .ohm-confirm-overlay,
:root:root:root .reset-modal-overlay,
:root:root:root .ouvrage-modal-overlay,
:root:root:root .fiches-overlay,
:root:root:root .fiche-match-overlay,
:root:root:root .load-calc-overlay,
:root:root:root .label-picker-overlay,
:root:root:root .label-manager-overlay,
:root:root:root .folder-edit-overlay,
:root:root:root .folder-move-overlay,
:root:root:root .annot-edit-overlay,
:root:root:root .site-pick-overlay,
:root:root:root .sites-overlay,
:root:root:root .ticketing-overlay,
:root:root:root .tour360-overlay,
:root:root:root .ohm-cl-overlay,
:root:root:root .ohm-cmdk-overlay,
:root:root:root .ohm-shortcuts-overlay,
:root:root:root .transfer-modal-backdrop,
:root:root:root .inv-photo-modal-backdrop {
    background: var(--ohm-overlay-hard);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
:root:root:root .ohm-confirm-shell,
:root:root:root .reset-modal-box,
:root:root:root .ouvrage-modal,
:root:root:root .fiches-modal,
:root:root:root .fiche-match-modal,
:root:root:root .load-calc-modal,
:root:root:root .transfer-modal,
:root:root:root .tour360-modal,
:root:root:root .tour360-name-dialog,
:root:root:root .inv-photo-modal-shell,
:root:root:root .ohm-shortcuts-box,
:root:root:root .export-dropdown {
    background: var(--ohm-surface);
    border: 1px solid var(--ohm-border);
    border-radius: 0;
    box-shadow: 0 8px 24px var(--ohm-overlay-hard);
}
:root:root:root .ouvrage-modal-head,
:root:root:root .transfer-modal-head,
:root:root:root .tour360-modal-header,
:root:root:root .inv-photo-modal-header { border-bottom: 1px solid var(--ohm-border); }

/* ── Notifications (showNotification) : barre latérale de gravité ── */
.ohm-notif {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    min-width: 280px;
    max-width: 500px;
    padding: 14px 16px 14px 20px;
    background: var(--ohm-surface-2);
    border-left: 3px solid var(--ohm-success);
    color: var(--ohm-fg-strong);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 6px 18px var(--ohm-overlay-hard);
}
.ohm-notif-success { border-left-color: var(--ohm-success); }
.ohm-notif-error   { border-left-color: var(--ohm-danger); }
.ohm-notif-info    { border-left-color: var(--ohm-info); }

/* ── Toast de progression (assets/ohm-progress.js) ─────────────
   Même gabarit que .ohm-notif ; repère gauche info, Mandarine pour un
   envoi critique, rouge en cas d'échec. Largeur de barre en ligne (JS). */
.op-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    min-width: 340px;
    max-width: 620px;
    padding: 14px 22px 14px 20px;
    background: var(--ohm-surface-2);
    border-left: 3px solid var(--ohm-info);
    color: var(--ohm-fg-strong);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 18px var(--ohm-overlay-hard);
    transition: background 0.25s ease, opacity 0.3s;
}
.op-toast-critical {
    min-width: 420px;
    padding: 18px 26px 18px 24px;
    border: 1px solid color-mix(in srgb, var(--ohm-accent) 55%, transparent);
    border-left: 3px solid var(--ohm-accent);
}
.op-toast-error,
.op-toast-critical.op-toast-error { background: var(--ohm-danger-bg); border-color: transparent; border-left-color: var(--ohm-danger); }
.op-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.op-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border: 2px solid color-mix(in srgb, var(--ohm-fg-strong) 35%, transparent);
    border-top-color: var(--ohm-fg-strong);
    border-radius: 50%;
    animation: op-spin 0.9s linear infinite;
}
.op-msg { flex: 1; }
.op-pct { min-width: 40px; text-align: right; font-family: var(--ohm-font-mono); font-size: 12px; opacity: 0.85; }
.op-track {
    position: relative;
    height: 6px;
    overflow: hidden;
    background: color-mix(in srgb, var(--ohm-fg-strong) 18%, transparent);
}
.op-toast-critical .op-track { height: 8px; }
.op-bar { height: 100%; width: 0%; background: var(--ohm-info); transition: width 0.25s ease; }
.op-toast-critical .op-bar { background: var(--ohm-accent); }
.op-toast-error .op-bar { background: var(--ohm-danger); }
/* ── Barres d'envoi des modules : barre rayée du kit UI ───────
   Toast de progression partagé (.op-*), visite 360° (.tour360-progress-*),
   import des visites (.walks-progress), modale ortho mines/construction
   (.mo-bar), ortho électrique (.ohm-upbar). Erreur = rouge plein ;
   durée inconnue = remplissage rayé en boucle (ohm-fill). */
:root:root:root :is(.op-track, .tour360-progress-track, .mine-ortho-modal .mo-bar-wrap, .ohm-upbar) { height: 12px; }
.ohm-upbar { position: relative; overflow: hidden; }
.ohm-upbar > div { height: 100%; transition: width .3s; }
:root:root:root :is(.op-track, .tour360-progress-track, .walks-progress, .mine-ortho-modal .mo-bar-wrap, .ohm-upbar) {
  border-radius: 0;
  background: repeating-linear-gradient(135deg, var(--ohm-surface-2) 0 10px, var(--ohm-border-soft) 0 20px); }
:root:root:root :is(.op-bar, .tour360-progress-bar, .walks-progress > div, .mine-ortho-modal .mo-bar, .ohm-upbar > div) {
  border-radius: 0;
  background: repeating-linear-gradient(135deg, var(--ohm-accent) 0 10px, var(--ohm-accent-hi) 0 20px); }
:root:root:root :is(.op-toast-error .op-bar, .mine-ortho-modal .mo-bar.mo-bar-error) { background: var(--ohm-danger); }
:root:root:root :is(.op-bar.op-bar-indet, .mine-ortho-modal .mo-bar.mo-bar-indeterminate) {
  left: 0; width: 100%; background-size: 0% 100%; background-repeat: no-repeat; animation: ohm-fill 2s infinite; }
@media (prefers-reduced-motion: reduce) {
  :root:root:root :is(.op-bar.op-bar-indet, .mine-ortho-modal .mo-bar.mo-bar-indeterminate) { animation-duration: 3s; }
}

.op-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--ohm-accent) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--ohm-accent) 45%, transparent);
    font-size: 13.5px;
    line-height: 1.4;
}
.op-warning-icon { font-size: 22px; line-height: 1; }
.op-warning-sub { opacity: 0.85; font-weight: 500; }

/* ── Liste latérale : repère de sélection de 3 px ──────────── */
:root:root:root .folder-item,
:root:root:root .site-folder-header { border-left: 3px solid transparent; border-radius: 0; }
:root:root:root .folder-item:hover { background: var(--ohm-tint-2); }
:root:root:root .folder-item.active,
:root:root:root .site-folder-header.active { background: var(--ohm-surface-2); border-left-color: var(--ohm-accent); }
:root.theme-light .folder-item.active,
:root.theme-light .site-folder-header.active { border-left-color: var(--ohm-accent-hi); }
/* Sidebar Sites sur l'aplat Minuit (sombre) : ligne active = Minuit éclairci, pas le gris Carbon. */
:root:not(.theme-light) #folders-panel .folder-item.active,
:root:not(.theme-light) #folders-panel .site-folder-header.active { background: color-mix(in srgb, var(--ohm-chrome-bg) 88%, white); }

/* ══ Kit UI (2026-11-19) — composants opt-in, préfixe .ohm- ══════════
   Aperçu : 06_DOC/kit-ui-infradesk.html. Rien ne s'applique sans la classe.
   Hors en-tête : .header-left/right > button gardent leur propre style. */
:root {
    --ohm-accent-text:  #F7931E;   /* Mandarine en texte (sombre) */
    --ohm-success-text: #42be65;
    --ohm-danger-text:  #ff8389;
    --ohm-danger-solid: #da1e28;   /* Carbon red 60 : blanc 5,2:1 dans les deux thèmes */
}
:root.theme-light {
    --ohm-accent-text:  #8F530C;   /* Mandarine illisible sur sable (2,3:1) */
    --ohm-success-text: #0e6027;
    --ohm-danger-text:  #a2191f;
}

/* Boutons : au survol, --fill monte du bas vers le haut sur --bg */
.ohm-btn { --h: var(--ohm-ctl-h); display: inline-flex; align-items: center; gap: 8px; height: var(--h); padding: 0 16px;
  font: 500 14px/1 var(--ohm-font-sans); border: 1px solid transparent; border-radius: 0; cursor: pointer; white-space: nowrap;
  background-color: var(--bg, transparent); background-image: linear-gradient(var(--fill, transparent) 0 0);
  background-position: bottom; background-repeat: no-repeat; background-size: 100% 0%;
  transition: background-size .25s ease-out, border-color .25s, color .25s; }
.ohm-btn:hover, .ohm-btn:focus-visible { background-size: 100% 100%; }
.ohm-btn:focus-visible { outline: var(--ohm-focus); outline-offset: -4px; }
.ohm-btn svg { width: 16px; height: 16px; flex: none; }
.ohm-btn--sm { --h: var(--ohm-ctl-h-sm); padding: 0 12px; } .ohm-btn--lg { --h: var(--ohm-ctl-h-lg); padding: 0 20px; }
.ohm-btn--primary   { --bg: var(--ohm-accent); --fill: var(--ohm-accent-hi); color: var(--ohm-on-accent); }
.ohm-btn--secondary { --bg: var(--ohm-surface-2); --fill: var(--ohm-border); color: var(--ohm-fg-strong); }
.ohm-btn--tertiary  { --fill: var(--ohm-accent); color: var(--ohm-accent-text); border-color: currentColor; }
.ohm-btn--tertiary:hover, .ohm-btn--tertiary:focus-visible { color: var(--ohm-on-accent); border-color: var(--ohm-accent); }
.ohm-btn--ghost     { --fill: var(--ohm-tint-2); color: var(--ohm-fg-strong); }
.ohm-btn--danger    { --bg: var(--ohm-danger-solid); --fill: #a2191f; color: #fff; }
.ohm-btn--icon { width: var(--h); padding: 0; justify-content: center; }
.ohm-btn:disabled, .ohm-btn[aria-disabled="true"] { --bg: var(--ohm-surface-2); --fill: transparent; color: var(--ohm-fg-faint); border-color: transparent; cursor: not-allowed; }
.ohm-btn--tertiary:disabled, .ohm-btn--ghost:disabled { --bg: transparent; }
.ohm-btn-set { display: inline-flex; } .ohm-btn-set .ohm-btn + .ohm-btn { border-left: 1px solid var(--ohm-bg); }

/* Étiquettes d'état (seul élément arrondi) */
.ohm-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--ohm-radius-tag);
  font: 400 12px/1 var(--ohm-font-sans); background: var(--ohm-surface-2); color: var(--ohm-fg-medium); }
.ohm-tag--accent { background: var(--ohm-accent-dim); color: var(--ohm-accent-text); }
.ohm-tag--ok   { color: var(--ohm-success-text); background: color-mix(in srgb, var(--ohm-success) 16%, transparent); }
.ohm-tag--warn { color: var(--ohm-warning-text, var(--ohm-warning)); background: color-mix(in srgb, var(--ohm-warning) 16%, transparent); }
.ohm-tag--err  { color: var(--ohm-danger-text); background: color-mix(in srgb, var(--ohm-danger) 16%, transparent); }

/* Chargement de page : 3 cubes, le Mandarine avance — <div class="ohm-loader" role="status" aria-label="Chargement"></div> */
/* Aussi les chargements des modules : viewer 3D (#potree-loader) et liste des tickets. */
.ohm-loader,
:root:root:root .potree-loader-spinner,
:root:root:root .ticketing-spinner { --s: 12.5px; --g: 2.5px;
  width: auto; border: 0; border-radius: 0;
  height: calc(1.353*var(--s) + var(--g)); aspect-ratio: 3;
  background:
    linear-gradient(var(--ohm-accent) 0 0) left/33% 100% no-repeat,
    conic-gradient(from -90deg at var(--s) calc(0.353*var(--s)), #fff 135deg, #666 0 270deg, #aaa 0);
  background-blend-mode: multiply;
  --_m:
    linear-gradient(to bottom right, #0000 calc(0.25*var(--s)), #000 0 calc(100% - calc(0.25*var(--s)) - 1.414*var(--g)), #0000 0),
    conic-gradient(from -90deg at right var(--g) bottom var(--g), #000 90deg, #0000 0);
  -webkit-mask: var(--_m); mask: var(--_m);
  background-size: calc(100%/3) 100%;
  -webkit-mask-size: calc(100%/3) 100%; mask-size: calc(100%/3) 100%;
  -webkit-mask-composite: source-in; mask-composite: intersect;
  animation: ohm-cubes steps(3) 1.5s infinite; }
@keyframes ohm-cubes { to { background-position: 150% 0%; } }

/* Cube qui pulse (enregistrement, bouton en cours) : gris -> Mandarine + halo — <span class="ohm-cube" aria-hidden="true"></span> */
@property --ohm-cube-tint { syntax: '<color>'; inherits: false; initial-value: #fff; }
.ohm-cube { --s: 12.5px; --_d: calc(0.353*var(--s)); width: calc(var(--s) + var(--_d)); aspect-ratio: 1; display: grid; flex: none;
  filter: drop-shadow(0 0 0 var(--ohm-accent)); animation: ohm-cube-glow .8s infinite; }
.ohm-cube::before { content: "";
  clip-path: polygon(var(--_d) 0, 100% 0, 100% calc(100% - var(--_d)), calc(100% - var(--_d)) 100%, 0 100%, 0 var(--_d));
  background: linear-gradient(var(--ohm-cube-tint) 0 0),
    conic-gradient(from -90deg at var(--s) var(--_d), #fff 135deg, #666 0 270deg, #aaa 0);
  background-blend-mode: multiply; animation: ohm-cube-tint .8s infinite; }
@keyframes ohm-cube-glow { 50% { filter: drop-shadow(0 0 5px var(--ohm-accent)); } }
@keyframes ohm-cube-tint { 50% { --ohm-cube-tint: var(--ohm-accent); } }
/* Enregistrement en cours dans les modules (boutons, cellules) : cube + texte sur une ligne */
.ohm-saving { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }

/* Retour en ligne (texte + cube / icône) */
.ohm-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ohm-fg-medium); min-height: 32px; }
.ohm-inline .ok { color: var(--ohm-success-text); } .ohm-inline .err { color: var(--ohm-danger-text); }

/* Barre de progression rayée ; % à 2 décimales côté JS (toLocaleString fr-FR) */
.ohm-progress { display: grid; gap: 8px; }
.ohm-progress__head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ohm-progress__head span:last-child { font-variant-numeric: tabular-nums; color: var(--ohm-fg-soft); }
.ohm-progress__track { height: 12px; overflow: hidden; position: relative;
  background: repeating-linear-gradient(135deg, var(--ohm-surface-2) 0 10px, var(--ohm-border-soft) 0 20px); }
.ohm-progress__bar { height: 100%; width: var(--p, 0%); transition: width .3s;
  background: repeating-linear-gradient(135deg, var(--ohm-accent) 0 10px, var(--ohm-accent-hi) 0 20px); }
.ohm-progress--ok .ohm-progress__bar  { background: var(--ohm-success); }
.ohm-progress--err .ohm-progress__bar { background: var(--ohm-danger); }
.ohm-progress__help { font-size: 12px; color: var(--ohm-fg-soft); }
.ohm-progress--err .ohm-progress__help { color: var(--ohm-danger-text); }
.ohm-progress--indeterminate .ohm-progress__bar { width: 100%; background-size: 0% 100%; background-repeat: no-repeat; animation: ohm-fill 2s infinite; }
@keyframes ohm-fill { to { background-size: 100% 100%; } }

/* Barre du chargement du viewer 3D (#potree-loader) : même barre rayée.
   Le fond du panneau reste sombre dans les deux thèmes : piste en voiles clairs.
   JS inchangé : .indeterminate = remplissage en boucle, sinon largeur = style.width. */
:root:root:root .potree-loader-bar { height: 12px; border-radius: 0;
  background: repeating-linear-gradient(135deg, rgb(255 255 255 / .06) 0 10px, rgb(255 255 255 / .12) 0 20px); }
:root:root:root .potree-loader-bar-fill { border-radius: 0;
  background: repeating-linear-gradient(135deg, var(--ohm-accent) 0 10px, var(--ohm-accent-hi) 0 20px); }
:root:root:root .potree-loader-bar-fill.indeterminate { left: 0; width: 100%;
  background-size: 0% 100%; background-repeat: no-repeat; animation: ohm-fill 2s infinite; }

/* Étapes de traitement */
.ohm-steps { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.ohm-steps li { flex: 1 1 120px; border-top: 2px solid var(--ohm-border); padding-top: 8px; font-size: 14px; color: var(--ohm-fg-soft); }
.ohm-steps small { display: block; font-size: 12px; color: var(--ohm-fg-soft); }
.ohm-steps .done    { border-color: var(--ohm-success); color: var(--ohm-fg-strong); }
.ohm-steps .current { border-color: var(--ohm-accent); color: var(--ohm-fg-strong); font-weight: 500; }

/* Squelette de chargement */
.ohm-skel { background: var(--ohm-surface-2); position: relative; overflow: hidden; height: 16px; }
.ohm-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--ohm-tint-2), transparent); animation: ohm-shim 1.2s infinite; }
@keyframes ohm-shim { to { transform: translateX(100%); } }

/* Interrupteur */
.ohm-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.ohm-toggle input { appearance: none; width: 48px; height: 24px; border-radius: 12px; background: var(--ohm-fg-faint); position: relative; cursor: pointer; margin: 0; transition: background .11s; }
.ohm-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .11s; }
.ohm-toggle input:checked { background: var(--ohm-accent); }
.ohm-toggle input:checked::after { transform: translateX(24px); }
.ohm-toggle input:focus-visible { outline: var(--ohm-focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ohm-loader, :root:root:root .potree-loader-spinner, :root:root:root .ticketing-spinner, .ohm-cube, .ohm-cube::before, .ohm-skel::after, .ohm-progress--indeterminate .ohm-progress__bar, :root:root:root .potree-loader-bar-fill.indeterminate { animation-duration: 3s; }
}
