/* ===== Organitix — feuille de style principale (thème « Tableau de bord », charte CLIMATIX : orange & bleu) ===== */
/* Polices embarquées (Nunito pour les titres, Figtree pour le texte) : public/vendor/fonts, licence SIL OFL */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(../vendor/fonts/nunito-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(../vendor/fonts/nunito-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(../vendor/fonts/nunito-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(../vendor/fonts/nunito-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url(../vendor/fonts/figtree-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url(../vendor/fonts/figtree-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url(../vendor/fonts/figtree-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url(../vendor/fonts/figtree-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url(../vendor/fonts/figtree-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url(../vendor/fonts/figtree-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url(../vendor/fonts/figtree-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url(../vendor/fonts/figtree-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    /* Couleurs relevées sur le logo CLIMATIX : bleu #0058F8 → #00C8F8, orange #F85808 → #F8A810 */
    --cx-blue: #0a5ce6;
    --cx-blue-dark: #0046c0;
    --cx-blue-deep: #082f6e;
    --cx-blue-light: #1e8bf0;
    --cx-blue-soft: #e7f0ff;
    --cx-cyan: #00c8f8;
    --cx-orange: #f2760f;
    --cx-orange-dark: #d9640a;
    --cx-orange-light: #f8a810;
    --cx-orange-soft: #fff0e4;
    --cx-gradient: linear-gradient(90deg, var(--cx-orange-light), var(--cx-orange) 30%, var(--cx-blue) 70%, var(--cx-blue-light));
    /* Neutres du thème */
    --ox-bg: #f2f5fb;
    --ox-surface: #ffffff;
    --ox-border: #e3e8f1;
    --ox-border-soft: #eef2f8;
    --ox-text: #14213d;
    --ox-muted: #5d6b86;
    --ox-faint: #8f9bb3;
    --ox-green: #1b9150; --ox-green-soft: #e4f6ec;
    --ox-amber: #b25e00; --ox-amber-soft: #fff6e6;
    --ox-red: #d13a24; --ox-red-soft: #fdebe8;
    --ox-radius: 18px; --ox-radius-sm: 12px; --ox-radius-xs: 10px;
    --ox-shadow: 0 2px 8px rgba(20, 33, 61, .05);
    --ox-font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ox-font-head: 'Nunito', 'Figtree', system-ui, sans-serif;
    --ox-rail-width: 72px;
    --ox-topbar-height: 64px;
    --ox-content-bg: var(--ox-bg);
    /* Bootstrap */
    --bs-body-font-family: var(--ox-font-body);
    --bs-body-color: var(--ox-text);
    --bs-body-bg: var(--ox-bg);
    --bs-border-color: var(--ox-border);
    --bs-border-radius: var(--ox-radius-xs);
    --bs-primary: #0a5ce6;
    --bs-primary-rgb: 10, 92, 230;
    --bs-link-color: #0a5ce6;
    --bs-link-color-rgb: 10, 92, 230;
    --bs-link-hover-color: #0046c0;
    --bs-link-hover-color-rgb: 0, 70, 192;
    --bs-secondary-color: var(--ox-muted);
}
html, body { height: 100%; }
body { background: var(--ox-bg); color: var(--ox-text); font-family: var(--ox-font-body); font-size: .95rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--ox-font-head); font-weight: 800; letter-spacing: -.01em; color: var(--ox-text); }
.text-muted { color: var(--ox-muted) !important; }
.text-secondary { color: var(--ox-muted) !important; }
.small, small { font-size: .86em; }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ----- Boutons ----- */
.btn { --bs-btn-border-radius: var(--ox-radius-sm); --bs-btn-font-weight: 700; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: .95rem; --bs-btn-font-size: .92rem; --bs-btn-line-height: 1.45; }
.btn-sm { --bs-btn-border-radius: 10px; --bs-btn-padding-y: .32rem; --bs-btn-padding-x: .7rem; --bs-btn-font-size: .84rem; }
.btn-lg { --bs-btn-border-radius: 14px; }
.btn-primary { --bs-btn-bg: #0a5ce6; --bs-btn-border-color: #0a5ce6; --bs-btn-hover-bg: #0046c0; --bs-btn-hover-border-color: #0046c0; --bs-btn-active-bg: #0046c0; --bs-btn-active-border-color: #0046c0; }
.btn-outline-primary { --bs-btn-color: #0a5ce6; --bs-btn-border-color: #bcd3f7; --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--cx-blue-soft); --bs-btn-hover-color: #0046c0; --bs-btn-hover-border-color: #9dbff2; --bs-btn-active-bg: var(--cx-blue-soft); --bs-btn-active-color: #0046c0; --bs-btn-active-border-color: #9dbff2; }
.btn-soft-primary { --bs-btn-color: #0a5ce6; --bs-btn-bg: var(--cx-blue-soft); --bs-btn-border-color: var(--cx-blue-soft); --bs-btn-hover-bg: #d6e5ff; --bs-btn-hover-border-color: #d6e5ff; --bs-btn-hover-color: #0046c0; --bs-btn-active-bg: #d6e5ff; --bs-btn-active-border-color: #d6e5ff; --bs-btn-active-color: #0046c0; }
.btn-accent { --bs-btn-color: #fff; --bs-btn-bg: var(--cx-orange); --bs-btn-border-color: var(--cx-orange); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--cx-orange-dark); --bs-btn-hover-border-color: var(--cx-orange-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--cx-orange-dark); --bs-btn-active-border-color: var(--cx-orange-dark); --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #f8a810; --bs-btn-disabled-border-color: #f8a810; }
.btn-outline-accent { --bs-btn-color: var(--cx-orange-dark); --bs-btn-border-color: #f9c9a3; --bs-btn-bg: #fff; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--cx-orange); --bs-btn-hover-border-color: var(--cx-orange); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--cx-orange-dark); --bs-btn-active-border-color: var(--cx-orange-dark); }
.btn-outline-secondary, .btn-light, .btn-outline-dark { --bs-btn-color: var(--ox-text); --bs-btn-bg: #fff; --bs-btn-border-color: var(--ox-border); --bs-btn-hover-color: var(--ox-text); --bs-btn-hover-bg: #f6f8fc; --bs-btn-hover-border-color: #cfd8e6; --bs-btn-active-color: var(--ox-text); --bs-btn-active-bg: #eef2f8; --bs-btn-active-border-color: #cfd8e6; }
.btn-outline-danger { --bs-btn-bg: #fff; --bs-btn-border-color: #f3c2ba; }
.btn-outline-success { --bs-btn-bg: #fff; --bs-btn-border-color: #bfe3cc; }
.btn-outline-warning { --bs-btn-bg: #fff; --bs-btn-border-color: #f6dca8; --bs-btn-color: var(--ox-amber); }
.btn-outline-info { --bs-btn-bg: #fff; }
.btn-secondary { --bs-btn-bg: var(--ox-muted); --bs-btn-border-color: var(--ox-muted); }
.btn i { line-height: 1; }
.text-bg-primary { background-color: #0a5ce6 !important; }
.text-accent { color: var(--cx-orange-dark) !important; }
.bg-accent { background-color: var(--cx-orange) !important; }

/* ----- Formulaires ----- */
.form-control, .form-select { border-radius: var(--ox-radius-xs); border-color: var(--ox-border); color: var(--ox-text); min-height: 40px; }
.form-control-sm, .form-select-sm { min-height: 32px; border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: #7fb0f5; box-shadow: 0 0 0 .25rem rgba(10, 92, 230, .15); }
.form-check-input { border-color: #c9d2e3; }
.form-check-input:checked { background-color: #0a5ce6; border-color: #0a5ce6; }
.form-label { font-weight: 600; color: var(--ox-text); margin-bottom: .3rem; }
.form-text { color: var(--ox-muted); }
.input-group-text { border-radius: var(--ox-radius-xs); background: #f6f8fc; border-color: var(--ox-border); color: var(--ox-muted); }
.nav-pills .nav-link { border-radius: 999px; font-weight: 600; color: var(--ox-muted); }
.nav-pills .nav-link.active { background-color: #0a5ce6; }
.nav-tabs { border-bottom-color: var(--ox-border); }
.nav-tabs .nav-link { color: var(--ox-muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--cx-blue); border-color: var(--cx-blue); background: transparent; }
.page-link { color: #0a5ce6; border-color: var(--ox-border); } .active > .page-link, .page-link.active { background-color: #0a5ce6; border-color: #0a5ce6; }
.pagination { --bs-pagination-border-radius: 10px; }
.dropdown-menu { border-radius: 14px; border-color: var(--ox-border); box-shadow: 0 8px 24px rgba(20, 33, 61, .12); padding: .4rem; }
.dropdown-item { border-radius: 8px; font-weight: 500; }
.dropdown-item:active { background: var(--cx-blue); }
.modal-content { border-radius: var(--ox-radius); border: 0; box-shadow: 0 12px 40px rgba(20, 33, 61, .18); }
.modal-header, .modal-footer { border-color: var(--ox-border-soft); }
.alert { border-radius: 14px; border: 0; }
.alert-info { background: var(--cx-blue-soft); color: #0046c0; }
.alert-warning { background: var(--ox-amber-soft); color: var(--ox-amber); }
.alert-success { background: var(--ox-green-soft); color: #14663a; }
.alert-danger { background: var(--ox-red-soft); color: #a52a17; }
.alert-light { background: #fff; border: 1px solid var(--ox-border); color: var(--ox-text); }
.alert-secondary { background: #eef2f8; color: var(--ox-muted); }
.badge { border-radius: 999px; font-weight: 700; padding: .38em .7em; letter-spacing: .01em; }
.badge.text-bg-light { background-color: #eef2f8 !important; color: var(--ox-muted) !important; }
.badge.text-bg-secondary { background-color: #eef2f8 !important; color: var(--ox-muted) !important; }
.badge.text-bg-warning { background-color: var(--ox-amber-soft) !important; color: var(--ox-amber) !important; }
.badge.text-bg-success { background-color: var(--ox-green-soft) !important; color: var(--ox-green) !important; }
.badge.text-bg-danger { background-color: var(--ox-red-soft) !important; color: var(--ox-red) !important; }
.badge.text-bg-info { background-color: var(--cx-blue-soft) !important; color: #0046c0 !important; }
.badge.text-bg-primary { background-color: var(--cx-blue-soft) !important; color: #0046c0 !important; }
.badge.text-bg-dark { background-color: var(--ox-text) !important; }
.cx-gradient-bar { height: 4px; background: var(--cx-gradient); }
.list-group { --bs-list-group-border-color: var(--ox-border-soft); --bs-list-group-border-radius: 14px; }
.list-group-flush .list-group-item { border-color: var(--ox-border-soft); }
.progress { border-radius: 999px; background: #eef2f8; }
.progress-bar { border-radius: 999px; }
.tooltip { --bs-tooltip-bg: var(--ox-text); --bs-tooltip-border-radius: 8px; --bs-tooltip-opacity: 1; font-family: var(--ox-font-body); font-weight: 600; }

/* ----- Coque de l'application : rail d'icônes + barre du haut ----- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: var(--ox-rail-width); flex: 0 0 var(--ox-rail-width);
    background: var(--ox-surface); border-right: 1px solid var(--ox-border);
    position: sticky; top: 0; height: 100vh; padding: 14px 0 12px; align-items: center;
}
.app-brand { display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--ox-text); text-decoration: none; padding: 0 0 12px; }
.app-brand:hover { color: var(--ox-text); }
.app-brand-plate { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; }
.app-brand-logo { height: 44px; max-width: 44px; object-fit: contain; }
.app-sidebar .app-brand > span:not(.app-brand-plate) { display: none; }
.app-nav { display: flex; flex-direction: column; gap: 4px; align-items: center; width: 100%; }
.app-nav-link { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ox-faint); text-decoration: none; }
.app-nav-link i { font-size: 1.25rem; line-height: 1; }
.app-nav-link:hover { background: #f2f5fb; color: var(--ox-text); }
.app-nav-link.active { background: var(--cx-blue-soft); color: var(--cx-blue); }
.app-sidebar .app-nav-link span { display: none; }
/* libellé au survol (rail) */
.app-sidebar .app-nav-link::after { content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--ox-text); color: #fff; font-size: .8rem; font-weight: 600; padding: .3rem .6rem; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 1100; box-shadow: 0 4px 12px rgba(20,33,61,.18); }
.app-sidebar .app-nav-link:hover::after, .app-sidebar .app-nav-link:focus-visible::after { opacity: 1; }
.app-sidebar-footer { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--ox-border-soft); width: 100%; }
.app-sidebar-footer .avatar { width: 38px; height: 38px; flex-basis: 38px; }
.app-sidebar-footer .lh-sm { display: none; }
.app-sidebar-footer .app-nav-link { margin-top: 0 !important; }
/* bouton déplier / replier le menu (sous le logo) */
.app-sidebar-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; margin: 0 0 6px; border: 1px solid var(--ox-border); border-radius: 10px; background: var(--ox-surface); color: var(--ox-muted); font-size: .95rem; cursor: pointer; }
.app-sidebar-toggle:hover { background: #f2f5fb; color: var(--ox-text); }
/* ----- Menu déplié (libellés visibles) : classe sidebar-expanded sur <html> ----- */
html.sidebar-expanded { --ox-rail-width: 236px; }
html.sidebar-expanded .app-sidebar { align-items: stretch; padding-left: 12px; padding-right: 12px; }
html.sidebar-expanded .app-brand { flex-direction: row; justify-content: flex-start; gap: .6rem; padding: 0 4px 12px; font-family: var(--ox-font-head); font-weight: 800; font-size: 1.05rem; }
html.sidebar-expanded .app-brand > span:not(.app-brand-plate) { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.sidebar-expanded .app-brand-plate { width: 42px; height: 42px; flex-shrink: 0; }
html.sidebar-expanded .app-brand-logo { height: 38px; max-width: 38px; }
html.sidebar-expanded .app-sidebar-toggle { width: 100%; }
html.sidebar-expanded .app-nav { align-items: stretch; }
html.sidebar-expanded .app-sidebar .app-nav-link { width: auto; justify-content: flex-start; gap: .7rem; padding: 0 .7rem; font-weight: 600; font-size: .93rem; color: var(--ox-muted); }
html.sidebar-expanded .app-sidebar .app-nav-link i { width: 1.4rem; text-align: center; font-size: 1.15rem; }
html.sidebar-expanded .app-sidebar .app-nav-link span { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.sidebar-expanded .app-sidebar .app-nav-link:hover { color: var(--ox-text); }
html.sidebar-expanded .app-sidebar .app-nav-link.active { color: var(--cx-blue); font-weight: 700; }
html.sidebar-expanded .app-sidebar .app-nav-link::after { display: none; }
html.sidebar-expanded .app-sidebar-footer { align-items: stretch; }
html.sidebar-expanded .app-sidebar-footer .d-flex { padding: 0 4px; }
html.sidebar-expanded .app-sidebar-footer .lh-sm { display: block; min-width: 0; }
html.sidebar-expanded .app-sidebar-footer .text-white-50 { color: var(--ox-muted) !important; }
/* menu mobile (offcanvas) : libellés complets, fond clair */
.app-offcanvas { background: var(--ox-surface); color: var(--ox-text); width: 280px; }
.app-offcanvas .app-brand { flex-direction: row; gap: .6rem; padding: 0; font-family: var(--ox-font-head); font-weight: 800; }
.app-offcanvas .app-brand-plate { width: 40px; height: 40px; }
.app-offcanvas .app-brand-logo { height: 36px; max-width: 36px; }
.app-offcanvas .app-nav { align-items: stretch; }
.app-offcanvas .app-nav-link { width: auto; height: 42px; justify-content: flex-start; gap: .75rem; padding: 0 .75rem; color: var(--ox-text); font-weight: 600; }
.app-offcanvas .app-nav-link i { width: 1.4rem; text-align: center; color: var(--ox-muted); }
.app-offcanvas .app-nav-link.active i { color: var(--cx-blue); }
.app-offcanvas .offcanvas-header { border-bottom: 1px solid var(--ox-border); }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { height: var(--ox-topbar-height); background: var(--ox-bg); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1020; }
@media (max-width: 991.98px) { .app-topbar { background: var(--ox-surface); border-bottom: 1px solid var(--ox-border); padding: 0 .75rem; } .app-topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cx-gradient); } }
.app-search { position: relative; width: 340px; max-width: 40vw; }
.app-search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ox-faint); }
.app-search input { padding-left: 2.3rem; background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: 14px; min-height: 42px; font-size: .92rem; }
.app-search input:focus { background: #fff; }
/* Choix par saisie (client…) : le <select> reste dans la page pour le formulaire, la liste s'affiche sous le champ */
.combo { position: relative; }
.combo .combo-select { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.combo-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1055; background: #fff; border: 1px solid var(--ox-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(20, 33, 61, .16); max-height: 300px; overflow-y: auto; padding: .3rem; }
.combo-list[hidden] { display: none; }
.combo-item { display: flex; align-items: baseline; gap: .5rem; padding: .45rem .7rem; border-radius: 8px; cursor: pointer; font-weight: 600; }
.combo-item:hover, .combo-item.is-active { background: #eef4ff; }
.combo-item .combo-extra { margin-left: auto; font-size: .74rem; font-weight: 500; color: var(--ox-muted); white-space: nowrap; }
.combo-empty { padding: .6rem .7rem; color: var(--ox-muted); font-size: .86rem; }
/* Résultats de la recherche instantanée */
.app-search-results { position: absolute; top: calc(100% + 6px); left: 0; width: 520px; max-width: 80vw; min-width: 100%; background: #fff; border: 1px solid var(--ox-border); border-radius: 14px; box-shadow: 0 14px 36px rgba(20, 33, 61, .18); z-index: 1060; max-height: 70vh; overflow-y: auto; padding: .35rem; }
.app-search-results[hidden] { display: none; }
.app-search-results .sr-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ox-faint); font-weight: 800; padding: .5rem .75rem .2rem; }
.app-search-results .sr-item { display: flex; align-items: center; gap: .6rem; padding: .42rem .75rem; border-radius: 10px; color: var(--ox-text); text-decoration: none; min-width: 0; }
.app-search-results .sr-item > i { color: var(--ox-faint); font-size: 1rem; flex-shrink: 0; }
.app-search-results .sr-item:hover, .app-search-results .sr-item.is-active { background: #eef4ff; color: var(--ox-text); }
.app-search-results .sr-text { display: flex; flex-direction: column; min-width: 0; }
.app-search-results .sr-title { font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-search-results .sr-sub { font-size: .76rem; color: var(--ox-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-search-results mark { background: #fff1c2; color: inherit; padding: 0; border-radius: 2px; }
.app-search-results .sr-more .sr-title { font-weight: 600; font-size: .8rem; color: var(--cx-blue, #0a5ce6); }
.app-search-results .sr-empty { padding: .7rem .75rem; color: var(--ox-muted); font-size: .84rem; }
.app-topbar .btn-light { border-radius: 999px; background: var(--ox-surface); border: 1px solid var(--ox-border); padding: .25rem .6rem .25rem .3rem; }
.app-topbar .btn-accent { min-height: 42px; border-radius: 14px; padding-inline: 1rem; }
.app-content { padding: .25rem 1.5rem 3rem; }
@media (max-width: 991.98px) { .app-content { padding: 1rem 1rem 4rem; } }
@media (max-width: 575.98px) { .app-content { padding: .9rem .75rem 4rem; } }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 800; font-family: var(--ox-font-head); font-size: .85rem; flex: 0 0 36px; }
.avatar-sm { width: 28px; height: 28px; flex-basis: 28px; font-size: .7rem; }

/* ----- En-têtes de page ----- */
.page-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; margin: 0; color: var(--ox-text); }
.page-header > div:first-child > .small, .page-header > div:first-child > .text-muted { max-width: 72ch; }
.page-header .page-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.breadcrumb { font-size: .84rem; margin-bottom: .4rem; --bs-breadcrumb-divider-color: var(--ox-faint); }
.breadcrumb a { color: var(--ox-muted); text-decoration: none; }
.breadcrumb-item.active { color: var(--ox-text); font-weight: 600; }

/* ----- Cartes / tableaux ----- */
.card { border: 1px solid var(--ox-border); border-radius: var(--ox-radius); box-shadow: var(--ox-shadow); background: var(--ox-surface); }
.card-header { background: transparent; font-family: var(--ox-font-head); font-weight: 800; font-size: 1rem; color: var(--ox-text); border-bottom: 1px solid var(--ox-border-soft); padding: .85rem 1.25rem; }
.card-header:first-child { border-radius: var(--ox-radius) var(--ox-radius) 0 0; }
.card-body { padding: 1.1rem 1.25rem; }
.card-footer { background: transparent; border-top: 1px solid var(--ox-border-soft); padding: .75rem 1.25rem; }
.card-footer:last-child { border-radius: 0 0 var(--ox-radius) var(--ox-radius); }
.card > .list-group:last-child .list-group-item:last-child { border-bottom-left-radius: var(--ox-radius); border-bottom-right-radius: var(--ox-radius); }
.card > .table-responsive:last-child { border-radius: 0 0 var(--ox-radius) var(--ox-radius); }
.table { --bs-table-border-color: var(--ox-border-soft); --bs-table-hover-bg: #f6f8fd; --bs-table-striped-bg: #f9fafd; color: var(--ox-text); }
.table > :not(caption) > * > * { padding: .65rem .9rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ox-muted); font-weight: 700; border-bottom-width: 1px; background: #f8fafd; }
.table-hover tbody tr { cursor: default; }
.table a.row-link { color: inherit; text-decoration: none; }
.table a.row-link:hover { text-decoration: underline; }
.table-light, .table > .table-light > * > * { --bs-table-bg: #f8fafd; }
.stat-tile { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: var(--ox-radius); text-decoration: none; color: inherit; box-shadow: var(--ox-shadow); }
.stat-tile:hover { border-color: #b7c5d8; color: inherit; }
.stat-tile .stat-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; flex-shrink: 0; }
.stat-tile .stat-value { font-family: var(--ox-font-head); font-size: 1.45rem; font-weight: 800; line-height: 1; }
.stat-tile .stat-label { font-size: .8rem; color: var(--ox-muted); }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: .35rem; }
.color-bar { display: inline-block; width: 4px; align-self: stretch; border-radius: 2px; margin-right: .5rem; }
.badge-status { font-weight: 700; }
.empty-state { text-align: center; color: var(--ox-muted); padding: 2rem 1rem; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .5; }

/* ----- Formulaires (sections) ----- */
.form-section { background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: var(--ox-radius); padding: 1.15rem 1.35rem; margin-bottom: 1rem; box-shadow: var(--ox-shadow); }
.form-section > h2 { font-size: 1rem; font-weight: 800; color: var(--ox-text); margin-bottom: .9rem; }
.form-actions { position: sticky; bottom: 0; background: rgba(242,245,251,.94); backdrop-filter: blur(6px); padding: .75rem 0; border-top: 1px solid var(--ox-border); display: flex; gap: .5rem; flex-wrap: wrap; z-index: 5; }
.tech-choice .form-check { display: inline-flex; align-items: center; margin-right: 1rem; margin-bottom: .4rem; }
.tech-choice .form-check-label::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tech-color, #999); margin-right: .4rem; }
.required label.form-label::after, label.required::after { content: " *"; color: #dc3545; }

/* ----- Connexion ----- */
.login-page { background: linear-gradient(135deg, #f8a810 0%, #f87a10 28%, #0a5ce6 72%, #00c8f8 100%); }
.login-card .card-body { border-top: 5px solid; border-image: var(--cx-gradient) 1; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 420px; border: 0; border-radius: 1.25rem; }

/* ----- Pastilles de statut (frise) ----- */
.status-steps { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--ox-surface); border: 1px solid var(--ox-border); max-width: 100%; overflow-x: auto; }
.status-step { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; color: var(--ox-faint); }
.status-step.done { background: var(--ox-green-soft); color: var(--ox-green); }
.status-step.current { background: var(--cx-blue); color: #fff; }
.status-step.current.is-warning { background: var(--cx-orange); }
.status-step.current.is-done { background: var(--ox-green); }
.status-step.current.is-muted { background: var(--ox-muted); }

/* ----- Tuiles « terrain » et bandeau contextuel (fiche intervention) ----- */
.field-tile { display: flex; flex-direction: column; gap: .8rem; padding: 1.1rem; background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: var(--ox-radius); box-shadow: var(--ox-shadow); height: 100%; }
.field-tile .tile-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.field-tile .tile-title { font-family: var(--ox-font-head); font-weight: 800; font-size: 1rem; }
.field-tile .tile-sub { font-size: .82rem; color: var(--ox-muted); }
.tile-soft-blue { background: var(--cx-blue-soft); color: var(--cx-blue); }
.tile-soft-orange { background: var(--cx-orange-soft); color: var(--cx-orange); }
.tile-soft-green { background: var(--ox-green-soft); color: var(--ox-green); }
.tile-soft-gray { background: #f2f5fb; color: var(--ox-muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.chip-blue { background: var(--cx-blue-soft); color: #0046c0; }
.chip-orange { background: var(--cx-orange-soft); color: var(--cx-orange-dark); }
.chip-green { background: var(--ox-green-soft); color: var(--ox-green); }
.chip-amber { background: var(--ox-amber-soft); color: var(--ox-amber); }
.chip-red { background: var(--ox-red-soft); color: var(--ox-red); }
.chip-gray { background: #eef2f8; color: var(--ox-muted); }
.photo-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-thumb { display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; color: inherit; }
.photo-thumb img, .photo-thumb .photo-empty { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: linear-gradient(160deg, #dfe6f2, #c9d4e6); }
.photo-thumb .photo-empty { display: flex; align-items: center; justify-content: center; color: #6e7f9c; font-size: 1.4rem; }
.photo-thumb .photo-cap { font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.identity-panel { background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: var(--ox-radius); box-shadow: var(--ox-shadow); overflow: hidden; }
.identity-head { padding: 1.35rem 1.4rem 1.2rem; background: linear-gradient(135deg, #0a5ce6 0%, #1e8bf0 100%); color: #fff; }
.identity-head h1 { color: #fff; font-size: 1.5rem; margin: 0; }
.identity-head a { color: #fff; }
.identity-body { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem 1.4rem; }
.identity-actions { display: flex; flex-direction: column; gap: 8px; padding-top: .9rem; border-top: 1px solid var(--ox-border-soft); }
.identity-actions .btn { justify-content: flex-start; text-align: left; display: flex; align-items: center; gap: .6rem; width: 100%; }
.identity-actions form { margin: 0; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 62px; border-radius: 14px; background: var(--cx-blue-soft); color: var(--cx-blue); flex-shrink: 0; }
.date-tile .m { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.date-tile .d { font-family: var(--ox-font-head); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.note-internal { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ox-amber-soft); }
.note-internal .note-title { font-size: .74rem; font-weight: 800; color: var(--ox-amber); letter-spacing: .05em; text-transform: uppercase; }
.details-toggle { color: var(--ox-muted); font-size: .84rem; text-decoration: none; }
.details-toggle:hover { color: var(--ox-text); }

/* ----- Fiche intervention (tableau de bord) ----- */
.iv-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1199.98px) { .iv-layout { grid-template-columns: 1fr; } }
.iv-crumb { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.iv-crumb a { text-decoration: none; }
.iv-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.iv-pill.is-status { background: #fff; color: var(--cx-blue); font-weight: 800; }
.iv-pill.is-status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.iv-pill:hover { color: #fff; background: rgba(255,255,255,.28); }
.iv-pill.is-status:hover { color: var(--cx-blue); background: #fff; }
.iv-when { display: flex; align-items: center; gap: 14px; }
.iv-when .iv-day { font-family: var(--ox-font-head); font-weight: 800; font-size: 1rem; }
.iv-when a { font-weight: 600; text-decoration: none; font-size: .88rem; }
.iv-tech { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--ox-bg); }
.iv-tech .avatar { width: 40px; height: 40px; flex-basis: 40px; }
.iv-tech .iv-tech-name { font-weight: 700; }
.iv-tech .iv-tech-sub { font-size: .82rem; color: var(--ox-muted); }
.iv-client { display: flex; flex-direction: column; gap: 6px; }
.iv-client .iv-client-name { font-family: var(--ox-font-head); font-weight: 800; font-size: 1rem; color: var(--ox-text); text-decoration: none; }
.iv-client .iv-line { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.iv-client .iv-line i { color: var(--ox-muted); margin-top: 2px; }
.iv-notice { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; font-size: .88rem; font-weight: 600; }
.iv-notice.is-amber { background: var(--ox-amber-soft); color: var(--ox-amber); }
.iv-notice.is-green { background: var(--ox-green-soft); color: var(--ox-green); }
.iv-notice a, .iv-notice button { margin-left: auto; color: var(--cx-blue); text-decoration: none; font-weight: 700; background: none; border: 0; padding: 0; white-space: nowrap; }
.iv-workspace { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.iv-section { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.iv-section h2 { font-size: 1.2rem; margin: 0; }
.iv-section .iv-section-sub { font-size: .88rem; color: var(--ox-muted); }
.iv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 991.98px) { .iv-tiles { grid-template-columns: 1fr; } }
.field-tile .tile-head { display: flex; align-items: center; gap: 12px; }
.field-tile .tile-list { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.field-tile .tile-list a { text-decoration: none; }
.field-tile .tile-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.field-tile .tile-row .grow { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-tile .tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.iv-band { display: flex; gap: 20px; padding: 20px; background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: var(--ox-radius); box-shadow: var(--ox-shadow); }
@media (max-width: 991.98px) { .iv-band { flex-direction: column; } }
.iv-band .iv-band-photos { width: 420px; flex-shrink: 0; }
@media (max-width: 1399.98px) { .iv-band .iv-band-photos { width: 330px; } }
@media (max-width: 991.98px) { .iv-band .iv-band-photos { width: auto; } }
.iv-band .iv-band-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex-grow: 1; }
.iv-band .iv-band-title { display: flex; align-items: center; gap: 10px; }
.iv-band .iv-band-title h2 { font-size: 1rem; margin: 0; }
.iv-band .iv-band-title .sub { font-size: .82rem; color: var(--ox-muted); }
.iv-band .iv-band-text { margin: 0; font-size: .94rem; line-height: 1.55; white-space: pre-wrap; }
.iv-band .iv-band-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.iv-band .band-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0; }
.iv-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 991.98px) { .iv-cols { grid-template-columns: 1fr; } }
.iv-footer { font-size: .8rem; color: var(--ox-faint); }
.iv-footer a { color: inherit; }
.identity-actions .dropdown-menu form { margin: 0; }
.status-steps.is-wide { width: 100%; justify-content: space-between; }

/* ----- Planning ----- */
.btn-icon { width: 34px; padding-left: 0; padding-right: 0; justify-content: center; }
.btn-sm.btn-icon { min-height: 34px; }
/* en-tête : titre, onglets des vues, actions */
.pl-header { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: .9rem; }
.pl-title { font-size: 1.5rem; margin: 0; }
.pl-tabs { display: flex; gap: 4px; padding: 4px; background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: 999px; overflow-x: auto; max-width: 100%; }
.pl-tab { display: inline-flex; align-items: center; gap: .4rem; height: 34px; padding: 0 .9rem; border-radius: 999px; color: var(--ox-muted); font-weight: 700; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.pl-tab i { font-size: 1rem; }
.pl-tab:hover { background: #f2f5fb; color: var(--ox-text); }
.pl-tab.active { background: var(--cx-blue); color: #fff; }
.pl-actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
/* barre du calendrier : navigation, titre, vue, filtres */
.pl-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin-bottom: .75rem; }
.pl-nav { display: flex; gap: .3rem; align-items: center; }
.pl-bar-title { font-family: var(--ox-font-head); font-weight: 800; font-size: 1.15rem; text-transform: capitalize; color: var(--ox-text); }
.pl-bar-right { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.pl-datepick { position: relative; overflow: hidden; }
.pl-datepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.rt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; }
.rt-title { font-family: var(--ox-font-head); font-weight: 800; font-size: 1.15rem; text-transform: capitalize; }
/* boutons segmentés (Jour / Semaine / Mois, Couleur par) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--ox-surface); border: 1px solid var(--ox-border); border-radius: 12px; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg label { display: inline-flex; align-items: center; height: 28px; padding: 0 .7rem; border-radius: 9px; font-size: .82rem; font-weight: 700; color: var(--ox-muted); cursor: pointer; white-space: nowrap; }
.seg label:hover { color: var(--ox-text); }
.seg input:checked + label { background: var(--cx-blue); color: #fff; }
.seg .seg-link { display: inline-flex; align-items: center; height: 28px; padding: 0 .7rem; border-radius: 9px; font-size: .82rem; font-weight: 700; color: var(--ox-muted); text-decoration: none; white-space: nowrap; }
.seg .seg-link:hover { color: var(--ox-text); }
.seg .seg-link.active { background: var(--cx-blue); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--cx-blue); outline-offset: 1px; }
.planning-side .seg { display: flex; width: 100%; }
.planning-side .seg label { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0 .3rem; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
/* mise en page : filtres + calendrier */
.planning-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }
.planning-layout.filters-hidden { grid-template-columns: minmax(0, 1fr); }
.planning-layout.filters-hidden .planning-side { display: none; }
@media (max-width: 991.98px) { .planning-layout { grid-template-columns: 1fr; } .planning-side { order: 2; } }
.planning-main { min-width: 0; }
.planning-side { display: flex; flex-direction: column; gap: .75rem; }
.pl-card .card-header { display: flex; align-items: center; padding: .7rem 1rem; font-size: .92rem; }
.pl-card .card-body { padding: .6rem .75rem .75rem; }
.pl-links .btn-link { font-size: .78rem; font-weight: 700; text-decoration: none; }
.team-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ox-faint); margin: .35rem .25rem .3rem; font-weight: 800; }
.tech-list { display: flex; flex-direction: column; gap: 3px; }
.tech-pill { display: flex; align-items: center; gap: .55rem; padding: 4px 6px 4px 4px; border-radius: 12px; cursor: pointer; margin: 0; color: var(--ox-faint); transition: background .1s; }
.tech-pill input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.tech-pill .avatar { opacity: .35; filter: grayscale(1); }
.tech-pill .tech-name { flex: 1 1 auto; min-width: 0; font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-pill:hover { background: #f2f5fb; }
.tech-pill:has(input:checked) { background: var(--cx-blue-soft); color: var(--ox-text); }
.tech-pill:has(input:checked) .avatar { opacity: 1; filter: none; }
.tech-pill .tech-only { border: 0; background: transparent; color: var(--ox-faint); padding: 2px 4px; border-radius: 6px; opacity: 0; font-size: .85rem; }
.tech-pill:hover .tech-only { opacity: 1; }
.tech-pill .tech-only:hover { background: #fff; color: var(--cx-blue); }
.status-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--ox-border); background: var(--ox-surface); font-size: .76rem; font-weight: 700; color: var(--ox-faint); cursor: pointer; margin: 0; }
.status-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color, #999); opacity: .35; }
.status-chip:has(input:checked) { color: var(--ox-text); border-color: transparent; background: color-mix(in srgb, var(--chip-color, #999) 14%, #fff); }
.status-chip:has(input:checked) .dot { opacity: 1; }
.unscheduled-item { border: 1px solid var(--ox-border); border-left-width: 4px; border-radius: 10px; padding: .45rem .6rem; margin-bottom: .45rem; background: #fff; cursor: grab; font-size: .84rem; }

/* Carte « À planifier » comme zone de dépôt : bandeau visible pendant un glisser, surbrillance au survol, ligne ajoutée en évidence */
.unscheduled-drop { display: none; margin: 0 .75rem; padding: .45rem .6rem; border: 2px dashed var(--ox-border); border-radius: 10px; font-size: .78rem; font-weight: 700; color: var(--ox-faint); text-align: center; }
#unscheduledCard.is-armed .unscheduled-drop { display: block; margin-top: .6rem; }
#unscheduledCard.is-armed { outline: 2px dashed #b7c5d8; outline-offset: 2px; }
#unscheduledCard.is-over { outline-color: var(--cx-blue, #0a5ce6); background: #eef4ff; }
#unscheduledCard.is-over .unscheduled-drop { border-color: var(--cx-blue, #0a5ce6); color: var(--cx-blue, #0a5ce6); background: #fff; }
.unscheduled-item.is-new { animation: ox-flash 1.4s ease-out; }
@keyframes ox-flash { 0% { background: #dbe8ff; } 100% { background: transparent; } }
.unscheduled-item:active { cursor: grabbing; }
.unscheduled-item .title { font-weight: 700; }
.unscheduled-item .unscheduled-open { color: var(--ox-faint); font-size: .85rem; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.unscheduled-item .unscheduled-open:hover { color: var(--cx-blue, #0a5ce6); background: #eef4ff; }
.unscheduled-item .meta { color: var(--ox-muted); font-size: .76rem; }
/* calendrier (FullCalendar) */
#calendar { background: #fff; border: 1px solid var(--ox-border); border-radius: var(--ox-radius); padding: .5rem .5rem .25rem; box-shadow: var(--ox-shadow); }
.fc { --fc-border-color: #edf1f7; --fc-today-bg-color: #f4f8ff; --fc-page-bg-color: #fff; --fc-neutral-bg-color: #f7f9fc; --fc-non-business-color: rgba(233, 237, 244, .45); --fc-now-indicator-color: #d13a24; --fc-highlight-color: rgba(10, 92, 230, .12); --fc-event-selected-overlay-color: rgba(10, 92, 230, .1); font-size: .84rem; }
.fc .fc-scrollgrid { border-radius: 12px; overflow: hidden; border-color: #e3e8f1; }
.fc .fc-col-header-cell { background: #fff; border-color: #e3e8f1; }
.fc .fc-col-header-cell-cushion { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; text-decoration: none; color: var(--ox-muted); }
.fc .fc-dow { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.fc .fc-dnum { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--ox-font-head); font-weight: 800; font-size: 1rem; color: var(--ox-text); }
.fc .fc-dnum.is-today { background: var(--cx-blue); color: #fff; }
.fc .fc-day-today .fc-dow { color: var(--cx-blue); }
.fc .fc-timegrid-slot { height: 2.35em; border-color: #eef2f7; }
#calendar.slots-15 .fc-timegrid-slot { height: 1.2em; }
#calendar.slots-60 .fc-timegrid-slot { height: 4.4em; }
.fc .fc-timegrid-slot-minor { border-top-style: dotted; }
.fc .fc-timegrid-slot-label-cushion, .fc .fc-timegrid-axis-cushion { font-size: .72rem; font-weight: 700; color: var(--ox-faint); }
.fc .fc-timegrid-axis-cushion { text-transform: uppercase; letter-spacing: .04em; }
.fc .fc-timegrid-now-indicator-line { border-width: 2px 0 0; }
.fc .fc-timegrid-now-indicator-arrow { border-width: 6px 0 6px 6px; }
.fc .fc-daygrid-day-number { font-family: var(--ox-font-head); font-weight: 800; color: var(--ox-text); text-decoration: none; padding: 6px 8px; }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--cx-blue); }
.fc .fc-daygrid-more-link { font-weight: 700; color: var(--cx-blue); }
.fc .fc-list { border-radius: 12px; }
.fc .fc-list-day-cushion { background: #f7f9fc; font-weight: 800; }
.fc .fc-list-event:hover td { background: #f4f8ff; }
.fc .fc-list-event-dot { border-color: var(--ev-color, #0a5ce6); }
.fc-event { cursor: pointer; }
/* cases : fond pastel teinté, liseré de couleur à gauche, texte foncé — horaire, client, intitulé, ville, initiales */
.fc-timegrid-event.ev-intervention, .fc-daygrid-block-event.ev-intervention { background: var(--ev-bg, #e7f0ff) !important; border: 0 !important; border-left: 4px solid var(--ev-border, var(--ev-color, #0a5ce6)) !important; border-radius: 10px; color: var(--ox-text) !important; box-shadow: none; }
.fc-timegrid-event.ev-intervention:hover, .fc-daygrid-block-event.ev-intervention:hover { background: var(--ev-bg-strong, #d6e6ff) !important; }
.fc-timegrid-event .fc-event-main { padding: 5px 7px 4px 8px; color: inherit; }
.fc-timegrid-event .ev-frame { display: flex; flex-direction: column; gap: 2px; min-width: 0; height: 100%; overflow: hidden; }
.ev-head { display: flex; align-items: center; gap: 4px; line-height: 1.2; min-width: 0; }
.ev-time { font-size: .74rem; font-weight: 800; color: var(--ox-text); white-space: nowrap; letter-spacing: .01em; }
.ev-ico { font-size: .78rem; color: var(--ox-muted); flex-shrink: 0; }
.ev-ico-done { color: var(--ox-green); }
.ev-ico-run { color: var(--cx-blue, #0a5ce6); }
.ev-who { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; background: rgba(30, 41, 59, .09); color: #3a4657; font-size: .64rem; font-weight: 800; letter-spacing: .05em; white-space: nowrap; flex-shrink: 0; }
.ev-head .ev-who { margin-left: auto; }
.ev-who-none { background: var(--ox-red-soft); color: var(--ox-red); }
.ev-client { font-weight: 800; font-size: .84rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ox-text); }
.ev-title { font-size: .76rem; color: #3d4756; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-city { font-size: .76rem; color: var(--ox-muted); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-title .ev-city { display: inline; }
.ev-foot { display: flex; align-items: center; gap: 4px; padding-top: 2px; }
.pl-legend-item[hidden] { display: none; }
/* case courte (moins de 45 min) : une seule ligne */
.fc-timegrid-event .ev-frame.ev-short { flex-direction: row; align-items: center; gap: 5px; }
.ev-short .ev-time { font-size: .68rem; }
.ev-short .ev-client { font-size: .76rem; flex: 1 1 auto; }
.ev-short .ev-who { margin-left: auto; height: 16px; }
.ev-provisional { opacity: .8; }
/* Cases qui se chevauchent (semaine / jour) : côte à côte sans recouvrement ; survol = devant ; clic = devant et pleine largeur */
.fc .fc-timegrid-event-harness.is-hover { z-index: 50 !important; }
.fc .fc-timegrid-event-harness.is-front { z-index: 60 !important; left: 0 !important; right: 0 !important; }
.fc .fc-timegrid-event-harness.is-front .fc-timegrid-event, .fc .fc-daygrid-event-harness.is-front .fc-daygrid-event { box-shadow: 0 8px 22px rgba(20, 30, 50, .28), 0 0 0 2px var(--ev-color, #0a5ce6) !important; }
.fc .fc-daygrid-event-harness.is-front { z-index: 60 !important; }
.fc-timegrid-event .ev-frame.ev-allday { flex-direction: row; align-items: center; gap: 6px; }
.fc-daygrid-block-event .ev-frame.ev-allday { display: flex; flex-direction: row; align-items: center; gap: 6px; min-width: 0; padding: 1px 4px; }
.fc-daygrid-block-event .ev-frame.ev-allday .ev-head { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.fc-daygrid-block-event .ev-frame.ev-allday .ev-client { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-daygrid-block-event .ev-frame.ev-allday .ev-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.fc-timegrid-event.ev-provisional { border-left-style: dashed !important; }
.fc-timegrid-event.ev-unassigned { box-shadow: inset 0 0 0 1.5px var(--ox-red) !important; }
.fc-timegrid-event.ev-done, .fc-daygrid-event.ev-done { opacity: .78; }
.fc-timegrid-event.ev-done:hover, .fc-daygrid-event.ev-done:hover { opacity: 1; }
.ev-locked .fc-event-main::after { content: "\F47A"; font-family: "bootstrap-icons"; position: absolute; right: 5px; bottom: 3px; font-size: .68rem; color: var(--ox-faint); }
.fc-timegrid-event.ev-absence, .fc-daygrid-event.ev-absence { background: repeating-linear-gradient(45deg, #e9edf3, #e9edf3 6px, #f4f6f9 6px, #f4f6f9 12px) !important; border: 0 !important; color: var(--ox-muted) !important; border-radius: 8px; }
/* Absence sur la journée / plusieurs jours : bande grise dans la ligne « Journée » */
.fc-daygrid-event.ev-absence-band, .fc-timegrid-event.ev-absence-band { background: #e6e9ef !important; color: #3d4756 !important; border-radius: 8px; }
.fc-daygrid-event.ev-absence-band .fc-event-title, .fc-timegrid-event.ev-absence-band .fc-event-title { font-weight: 700; font-size: .76rem; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-daygrid-event.ev-absence-band .fc-event-title i, .fc-timegrid-event.ev-absence-band .fc-event-title i { color: var(--ox-muted); margin-right: 2px; }
/* Absence partielle : hachures derrière les cases, sans prendre de place dans la colonne */
.fc .fc-bg-event.ev-absence-bg { opacity: 1; background: repeating-linear-gradient(45deg, #e9edf3, #e9edf3 6px, #f6f7fa 6px, #f6f7fa 12px); border-radius: 6px; }
.fc .fc-bg-event.ev-absence-bg .fc-event-title { font-style: normal; font-size: .7rem; font-weight: 700; color: var(--ox-muted); margin: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc .fc-daygrid-event { border-radius: 6px; }
.ev-month { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 1px 4px; font-size: .76rem; color: var(--ox-text); }
.ev-month .ev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ev-color, #0a5ce6); flex-shrink: 0; }
.ev-month .ev-time { font-weight: 700; color: var(--ox-muted); }
.ev-month .ev-client { font-weight: 700; font-size: .76rem; }
.fc-daygrid-dot-event.ev-intervention { background: transparent !important; border: 0 !important; }
.fc-daygrid-dot-event.ev-intervention:hover { background: #f2f5fb !important; }
.ev-list .ev-client { display: inline; font-size: .86rem; }
.ev-list .ev-title { display: inline; font-size: .84rem; }
.fc .fc-event-selected, .fc .fc-event:focus { box-shadow: 0 0 0 2px var(--cx-blue) !important; }
.fc .fc-timegrid-col.fc-day-today { background: var(--fc-today-bg-color); }
.fc .fc-highlight { border-radius: 8px; }
.fc .fc-event-mirror { box-shadow: 0 6px 18px rgba(20,33,61,.2) !important; }
.planning-popover { max-width: 360px; border-radius: 14px; border-color: var(--ox-border); box-shadow: 0 12px 32px rgba(20,33,61,.16); }
.planning-popover .popover-header { background: #fff; border-bottom: 1px solid var(--ox-border-soft); font-family: var(--ox-font-head); font-weight: 800; border-radius: 14px 14px 0 0; }
.legend-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: .3rem; }
/* Légende sous le planning (suit « Couleur par ») */
.pl-legend { padding: .6rem .5rem 0; font-size: .8rem; color: var(--ox-muted); }
.pl-legend-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.3rem; }
.pl-legend-row[hidden] { display: none; }
.pl-legend-item { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.pl-legend-sw { width: 22px; height: 16px; border-radius: 5px; background: color-mix(in srgb, var(--sw, #0a5ce6) 20%, #fff); border-left: 3px solid color-mix(in srgb, var(--sw, #0a5ce6) 60%, #fff); flex-shrink: 0; }
@supports not (background: color-mix(in srgb, red 20%, white)) { .pl-legend-sw { background: var(--sw, #0a5ce6); opacity: .35; border-left: 0; } }

/* ----- Vue mobile "Ma journée" ----- */
.day-card { border-left: 5px solid var(--card-color, #0a5ce6); border-radius: 14px; }
.day-card .time { font-size: 1.1rem; font-weight: 700; }
.day-card .btn { min-height: 44px; }

/* ----- Détail intervention ----- */
.checklist-item { display: flex; gap: .5rem; align-items: flex-start; padding: .3rem 0; border-bottom: 1px dashed #e3e7ee; }
.checklist-item.done { color: #6b7280; text-decoration: line-through; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: .35rem 1rem; }
.kv dt { color: #6b7280; font-weight: 500; }
.kv dd { margin: 0; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: .4rem; } }
pre.prewrap { white-space: pre-wrap; font-family: inherit; font-size: inherit; margin: 0; }
.collection-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.collection-row .form-group, .collection-row .mb-3 { flex: 1; margin-bottom: 0 !important; }
/* Formations / habilitations du profil technicien : une ligne = intitulé, organisme, n°, obtenue le, valide jusqu'au */
.training-head { display: flex; gap: .4rem; margin-bottom: .25rem; padding-right: 2.6rem; }
.training-row { gap: .4rem; flex-wrap: wrap; }
.training-row input { min-width: 0; }
.training-row input[name$="[title]"] { flex: 3 1 12rem; }
.training-row input[name$="[organization]"] { flex: 2 1 7rem; }
.training-row input[name$="[reference]"] { flex: 1.4 1 5rem; }
.training-row input[name$="[obtainedAt]"], .training-row input[name$="[expiresAt]"] { flex: 1.3 1 8rem; }

/* ----- Planning par employé (Jour ↔ / Semaine ↔) ----- */
.rt { background: #fff; border: 1px solid var(--ox-border); border-radius: var(--ox-radius); overflow-x: auto; user-select: none; box-shadow: var(--ox-shadow); }
.rt-head, .rt-row { display: flex; min-width: 720px; border-bottom: 1px solid #e3e7ee; }
.rt-head { position: relative; background: #f8f9fb; z-index: 3; font-size: .8rem; font-weight: 600; color: #4b5563; }
.rt-label { flex: 0 0 170px; width: 170px; min-width: 170px; max-width: 170px; overflow: hidden; padding: .4rem .6rem; display: flex; align-items: center; gap: .5rem; border-right: 1px solid #e3e7ee; background: #fff; position: sticky; left: 0; z-index: 2; }
.rt-row .rt-label { align-self: stretch; }
.rt-name { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 0; }
.rt-count { margin-left: auto; }
.rt-team { background: #eef2f7; color: #4b5563; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: .25rem .6rem; border-bottom: 1px solid #e3e7ee; position: sticky; left: 0; }
.rt-timeline { flex: 1 1 auto; position: relative; min-height: 62px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 14 - 1px), transparent 0 calc(100% / 14)); }
.rt-hours { height: 28px; min-height: 28px; }
.rt-hour { position: absolute; top: 4px; padding-left: 3px; font-size: .75rem; color: #6b7280; }
.rt-gridline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid #eef0f4; }
.rt-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid #dc3545; z-index: 1; }
.rt-row.rt-over { background: #eaf3ff; }
.rt-row.rt-over .rt-timeline { outline: 2px dashed #0a5ce6; outline-offset: -2px; }
.rt-event { border: 0; border-left: 4px solid var(--ev-border, var(--ev-color, #0a5ce6)); background: var(--ev-bg, #e7f0ff); color: var(--ox-text); border-radius: 10px; padding: 4px 8px; font-size: .78rem; line-height: 1.25; overflow: hidden; cursor: pointer; }
.rt-event:hover { filter: brightness(.97); }
.rt-block { touch-action: none; }
.rt-block.rt-draggable { cursor: grab; }
.rt-dragging { opacity: .75; cursor: grabbing !important; z-index: 5; }
.rt-ev-time { font-weight: 800; font-size: .7rem; color: var(--ox-text); white-space: nowrap; }
.rt-ev-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-ev-sub { font-size: .72rem; color: var(--ox-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-resize { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.rt-resize:hover { background: rgba(10,92,230,.15); }
.rt-absence { background: repeating-linear-gradient(45deg, #dee2e6, #dee2e6 6px, #e9ecef 6px, #e9ecef 12px); color: #495057; cursor: default; }
.rt-event.ev-provisional { border-left-style: dashed; opacity: .8; }
.rt-event.ev-unassigned { box-shadow: inset 0 0 0 1.5px var(--ox-red); }
.rt-event.ev-done { opacity: .78; }
.rt-event.ev-done:hover { opacity: 1; }
.rt-event.ev-locked::after { content: "\F47A"; font-family: "bootstrap-icons"; position: absolute; right: 4px; bottom: 2px; font-size: .7rem; }
/* semaine */
.rt-week .rt-col { flex: 1 1 0; min-width: 90px; border-right: 1px solid #eef0f4; }
.rt-daycol { padding: .4rem .3rem; text-align: center; }
.rt-dayname { text-transform: uppercase; font-size: .7rem; color: #6b7280; }
.rt-cell { padding: 4px; min-height: 56px; display: flex; flex-direction: column; gap: 3px; }
.rt-cell.rt-over { background: #eaf3ff; outline: 2px dashed #0a5ce6; outline-offset: -2px; }
.rt-today { background: #fffbea; }
.rt-chip { cursor: grab; }
.rt-chip .rt-ev-sub { display: none; }
@media (max-width: 767.98px) { .rt-label { flex-basis: 110px; width: 110px; min-width: 110px; max-width: 110px; } .rt-name { font-size: .75rem; } .rt-chip .rt-ev-title { font-size: .7rem; } }

/* ===== Charge de travail / taux d'occupation ===== */
.wl-table { font-size: .82rem; }
.wl-table th, .wl-table td { vertical-align: middle; }
.wl-table .wl-name { min-width: 190px; white-space: nowrap; position: sticky; left: 0; z-index: 1; }
.wl-table thead th { background-color: #f8f9fb; font-weight: 600; color: #4b5563; }
.wl-dayname { font-size: .7rem; text-transform: uppercase; color: #6b7280; }
.wl-table .wl-team td { background-color: #eef2f7; color: #4b5563; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: .25rem .6rem; }
.wl-cell { text-align: center; padding: .35rem .3rem; min-width: 70px; }
.wl-link { display: block; color: inherit; text-decoration: none; }
.wl-planned { display: block; font-weight: 700; line-height: 1.1; }
.wl-cap { display: block; font-size: .7rem; color: #6b7280; }
.wl-rate { display: block; font-size: .7rem; color: #4b5563; }
.wl-bar { display: block; height: 4px; border-radius: 2px; background: rgba(0,0,0,.08); margin: 3px auto 2px; max-width: 64px; overflow: hidden; }
.wl-bar > span { display: block; height: 100%; background: #6b7280; border-radius: 2px; }
.wl-table td.wl-low { background-color: #e8f5e9; color: #1b5e20; }
.wl-table td.wl-mid { background-color: #c8e6c9; color: #1b5e20; }
.wl-table td.wl-high { background-color: #ffe0b2; color: #7a3e00; }
.wl-table td.wl-over { background-color: #ffcdd2; color: #8b0000; }
.wl-table td.wl-none, .wl-table td.wl-off { background-color: #f3f4f6; color: #9ca3af; }
.wl-table td.wl-absent { background: repeating-linear-gradient(45deg, #e5e7eb 0 6px, #f3f4f6 6px 12px); color: #6b7280; }
.wl-abs { font-size: .72rem; }
.wl-off-mark { color: #cbd5e1; }
.wl-table td.wl-today, .wl-table th.wl-today { box-shadow: inset 0 0 0 2px #ffd966; }
.wl-table th.wl-weekend { background-color: #f3f4f6; }
.wl-total { border-left: 2px solid #d1d5db !important; min-width: 110px; }
.wl-table .wl-foot td { font-weight: 600; background-color: #f8f9fb; }
.wl-table td.wl-has-unassigned { background-color: #fff5f5; color: #b91c1c; }
.wl-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid rgba(0,0,0,.08); }
.wl-swatch.wl-low { background: #e8f5e9; } .wl-swatch.wl-mid { background: #c8e6c9; } .wl-swatch.wl-high { background: #ffe0b2; } .wl-swatch.wl-over { background: #ffcdd2; }
.wl-swatch.wl-absent { background: repeating-linear-gradient(45deg, #e5e7eb 0 3px, #f3f4f6 3px 6px); } .wl-swatch.wl-off { background: #f3f4f6; }
/* Mode mois : cellules compactes */
.wl-month .wl-cell { min-width: 28px; padding: .3rem .05rem; font-size: .72rem; }
.wl-month .wl-bar, .wl-month .wl-name .small { display: none; }
.wl-month .wl-name { min-width: 150px; }
.wl-month .wl-total { min-width: 90px; }

/* Occupation dans la vue par employé */
.rt-load { margin-left: auto; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; white-space: nowrap; }
.rt-load-empty { background: #f3f4f6; color: #6b7280; }
.rt-load-low { background: #e8f5e9; color: #1b5e20; }
.rt-load-mid { background: #c8e6c9; color: #1b5e20; }
.rt-load-high { background: #ffe0b2; color: #7a3e00; }
.rt-load-over { background: #ffcdd2; color: #8b0000; }
.rt-load-none { background: #f3f4f6; color: #9ca3af; }
.rt-cell-load { margin-top: auto; font-size: .66rem; font-weight: 600; text-align: right; padding: 1px 3px; border-radius: 3px; align-self: flex-end; }
.rt-label { flex-wrap: wrap; }
.rt-label .rt-load { flex-basis: 100%; margin-left: 0; width: max-content; }

/* Fenêtre d'envoi du planning */
.email-tech-list { max-height: 260px; overflow: auto; border: 1px solid #e3e7ee; border-radius: 6px; padding: .4rem .6rem; }
.wl-low .wl-bar > span { background: #43a047; }
.wl-mid .wl-bar > span { background: #2e7d32; }
.wl-high .wl-bar > span { background: #ef6c00; }
.wl-over .wl-bar > span { background: #c62828; }

/* Assistant d'import */
.import-steps { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .8rem; }
.import-steps span { padding: .25rem .7rem; border-radius: 999px; background: #eef2f7; color: #6b7280; }
.import-steps span.done { background: #e8f5e9; color: #1b5e20; }
.import-steps span.active { background: #0a5ce6; color: #fff; font-weight: 600; }

/* Fichiers joints */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.attach-item { margin: 0; position: relative; border: 1px solid #e3e7ee; border-radius: 8px; overflow: hidden; background: #fff; }
.attach-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f3f4f6; }
.attach-item figcaption { padding: .3rem .5rem; font-size: .72rem; line-height: 1.3; }
.attach-item .attach-delete { position: absolute; top: 4px; right: 4px; }
.attach-item .attach-delete .btn { padding: 0 .35rem; opacity: .85; }
/* « Ajouter aux photos de l'installation » (copie d'une photo d'intervention) : bouton en haut à gauche de la vignette */
.attach-item .attach-copy { position: absolute; top: 4px; left: 4px; }
.attach-item .attach-copy .btn { padding: 0 .35rem; opacity: .85; }
.min-w-0 { min-width: 0; }

/* Constructeur de modèles de rapports */
.rb-section .card-header { background: #f8f9fb; }
.rb-field { padding: .35rem .25rem; border-bottom: 1px dashed #e3e7ee; }
.rb-field:last-child { border-bottom: 0; }

/* Rapports terrain */
.report-form .rf-item { padding: .7rem .9rem; }
.rf-label { font-weight: 600; margin-bottom: .35rem; display: block; }
.rf-check { display: flex; gap: .7rem; align-items: flex-start; font-size: 1.05rem; cursor: pointer; margin: 0; }
.rf-check .form-check-input { width: 1.5em; height: 1.5em; margin-top: 0; flex-shrink: 0; }
.rf-seg .btn { min-width: 70px; padding: .5rem .9rem; }
.rf-number .form-control { max-width: 180px; }
.report-actions { position: sticky; bottom: 0; background: #fff; padding: .75rem 0; border-top: 1px solid #e3e7ee; display: flex; gap: .5rem; flex-wrap: wrap; z-index: 5; }
.report-actions .btn { flex: 1 1 auto; }
.sig-pad { position: relative; border: 2px dashed #b8c2d3; border-radius: 8px; background: #fff; touch-action: none; }
.sig-pad canvas { display: block; width: 100%; border-radius: 6px; }
.sig-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9ca3af; pointer-events: none; font-size: .9rem; }
.sig-preview { max-height: 90px; border: 1px solid #e3e7ee; border-radius: 6px; background: #fff; }
.report-choice:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.report-value { white-space: pre-line; }

/* ---- Fiches Cerfa 15497 ---- */
.cerfa-checks .form-check { display: inline-block; min-width: 48%; margin-right: .5rem; }
.cerfa-form .form-section h2 { font-size: .95rem; }
.cerfa-badge { font-variant-numeric: tabular-nums; }
.eq-missing { color: #b45309; }
.eq-complete { color: #15803d; }

/* ===== Cartes (Leaflet) ===== */
.ox-map { width: 100%; height: 320px; border-radius: 12px; border: 1px solid var(--ox-border); background: #eef2f6; z-index: 0; }
.ox-map-sm { height: 240px; }
.ox-map-xs { height: 150px; }
.ox-map-lg { height: 420px; }
.ox-marker { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ox-marker-depot { font-size: .9rem; }
.ox-marker-pivot { width: 30px; height: 30px; border-width: 3px; box-shadow: 0 0 0 3px rgba(255,193,7,.6), 0 1px 4px rgba(0,0,0,.4); }
.ox-marker-contract { border-radius: .35rem; }
.leaflet-popup-content { font-size: .85rem; line-height: 1.35; margin: 10px 12px; }
.leaflet-popup-content a { font-weight: 600; }
.ox-legend { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 2px; }
.ox-legend-square { border-radius: 2px; }

/* Copie de test (ORGANITIX_COPIE_TEST=1) */
.test-copy-banner { position: sticky; top: 0; z-index: 2000; background: #dc2626; color: #fff; text-align: center; font-size: .85rem; font-weight: 600; padding: .35rem .75rem; }

/* Bouton « ELY SMART » (retour au portail), en haut à gauche de la barre du haut */
.ely-back { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 8px; border-radius: var(--ox-radius-sm); background: #fff; border: 1px solid #cfe3df; color: #166a63; font-family: var(--ox-font-head); font-weight: 800; font-size: .9rem; text-decoration: none; white-space: nowrap; box-shadow: var(--ox-shadow); flex: 0 0 auto; transition: background .15s, border-color .15s; }
.ely-back:hover, .ely-back:focus-visible { background: #eef7f5; border-color: #a9cfc8; color: #10554f; }
.ely-back .bi { font-size: .85rem; margin-right: -2px; }
.ely-back-logo { width: 24px; height: 24px; flex: 0 0 24px; }
@media (max-width: 359.98px) { .ely-back { padding: 0 10px 0 6px; } .ely-back-label { display: none; } }

/* ---------- Sélecteur « Quand utiliser cette fiche ? » (modèles de rapport, fiche Cerfa) ---------- */
.rule-picker .rp-label { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #667085; margin: 1rem 0 .5rem; }
.rule-picker .rp-label:first-child { margin-top: 0; }
.rule-picker .rp-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.rule-picker .rp-fam { position: relative; border: 2px solid #e4e8ef; border-radius: 12px; background: #fff; display: flex; align-items: stretch; transition: border-color .15s, background .15s; }
.rule-picker .rp-fam-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: .55rem .35rem; cursor: pointer; margin: 0; min-width: 0; }
.rule-picker .rp-fam-main input { position: absolute; opacity: 0; pointer-events: none; }
.rule-picker .rp-fam-name { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.rule-picker .rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: .3rem; vertical-align: 1px; }
.rule-picker .rp-count { color: #667085; font-size: .78rem; margin-top: 2px; }
.rule-picker .rp-more { border: 0; background: transparent; color: #667085; padding: 0 .35rem; border-left: 1px solid #eef1f5; border-radius: 0 10px 10px 0; }
.rule-picker .rp-more:hover { background: #f4f7fb; color: #1b2433; }
.rule-picker .rp-fam.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); }
.rule-picker .rp-fam.is-on::after { content: "\2713"; position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; display: grid; place-items: center; }
.rule-picker .rp-fam.is-part { border-color: var(--c); border-style: dashed; }
.rule-picker .rp-fam-main:focus-within { outline: 2px solid var(--c); outline-offset: 2px; border-radius: 10px; }
.rule-picker .rp-hint { font-size: .8rem; color: #667085; margin-top: .4rem; }
.rule-picker .rp-detail { margin-top: .6rem; }
.rule-picker .rp-detail-title { font-size: .8rem; font-weight: 700; color: var(--c); margin-bottom: .35rem; }
.rule-picker .rp-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rule-picker .rp-chip { margin: 0; cursor: pointer; }
.rule-picker .rp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rule-picker .rp-chip span { display: inline-block; border: 1.5px solid #e4e8ef; border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; background: #fff; }
.rule-picker .rp-chip input:checked + span { background: var(--cx-blue, #0a5ce6); border-color: var(--cx-blue, #0a5ce6); color: #fff; }
.rule-picker .rp-chip input:checked + span::before { content: "\2713  "; }
.rule-picker .rp-chip input:disabled + span { opacity: .75; cursor: default; }
.rule-picker .rp-chip input:focus-visible + span { outline: 2px solid var(--cx-blue, #0a5ce6); outline-offset: 2px; }
.rule-picker .rp-toggle { display: flex; border: 1.5px solid #e4e8ef; border-radius: 12px; overflow: hidden; }
.rule-picker .rp-toggle .btn { flex: 1; border: 0; border-radius: 0; font-weight: 600; color: #667085; padding: .5rem; }
.rule-picker .rp-toggle .btn-check:checked + .btn { background: var(--cx-blue-soft, #e7f0ff); color: var(--cx-blue-dark, #0046c0); }
/* Vue d'ensemble des fiches */
.doc-rules-table .fam-tag { display: inline-block; white-space: nowrap; border-radius: 6px; padding: 1px 8px; font-size: .78rem; font-weight: 700; color: #fff; margin: 1px 3px 1px 0; background: var(--c); }
.doc-rules-table .type-tag { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: .78rem; margin: 1px 3px 1px 0; background: #eef1f5; color: #344054; }
/* Choix du type d'intervention en 2 clics */
.family-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .4rem; margin-bottom: .5rem; }
.family-picker .family-btn { border: 0; border-radius: 12px; padding: .5rem .4rem; color: #fff; background: var(--c); font-weight: 800; font-family: Nunito, Figtree, sans-serif; font-size: .92rem; line-height: 1.15; opacity: .55; transition: opacity .15s, transform .15s, box-shadow .15s; }
.family-picker .family-btn small { display: block; font: 500 .74rem Figtree, sans-serif; opacity: .9; }
.family-picker .family-btn:hover { opacity: .85; }
.family-picker .family-btn.is-on { opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.family-picker .family-btn:focus-visible { outline: 2px solid #1b2433; outline-offset: 2px; }

/* Fiche client : chiffre « interventions » cliquable */
.stat-link { display: block; color: inherit; text-decoration: none; border-radius: .5rem; padding: .15rem 0; transition: background-color .15s; }
.stat-link:hover, .stat-link:focus { background: var(--bs-primary-bg-subtle, #e7f0ff); color: var(--bs-primary, #0a5ce6); }
.stat-link .small { color: var(--bs-primary, #0a5ce6); }

/* ---------- Santé (0.28.0) : pastille de l'administrateur + Paramètres → Santé ---------- */
.health-pill { --hp: #6c757d; --hp-soft: rgba(108, 117, 125, .12); display: inline-flex; align-items: center; gap: .45rem; height: 32px; padding: 0 .8rem 0 .65rem;
    border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ox-text); text-decoration: none; white-space: nowrap;
    background: linear-gradient(135deg, var(--hp-soft), rgba(255, 255, 255, .7)); border: 1px solid color-mix(in srgb, var(--hp) 28%, transparent);
    box-shadow: 0 1px 2px rgba(20, 33, 61, .06); transition: transform .15s, box-shadow .15s; }
.health-pill:hover { color: var(--ox-text); transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--hp) 22%, transparent); }
.health-pill .health-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp) 22%, transparent); }
.health-pill.is-warn .health-dot, .health-pill.is-error .health-dot { animation: health-pulse 2s ease-in-out infinite; }
.health-pill .health-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--hp); color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }
.health-pill.is-ok, .health-hero.is-ok, .health-card.is-ok { --hp: var(--ox-green); --hp-soft: rgba(27, 145, 80, .12); }
.health-pill.is-warn, .health-hero.is-warn, .health-card.is-warn { --hp: #e08a00; --hp-soft: rgba(224, 138, 0, .14); }
.health-pill.is-error, .health-hero.is-error, .health-card.is-error { --hp: var(--ox-red); --hp-soft: rgba(209, 58, 36, .13); }
.health-hero.is-na, .health-card.is-na { --hp: #8f9bb3; --hp-soft: rgba(143, 155, 179, .14); }
@keyframes health-pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp) 22%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--hp) 8%, transparent); } }

.health-hero { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.4rem; margin-bottom: 1.1rem; border-radius: var(--ox-radius);
    background: linear-gradient(120deg, var(--hp-soft), rgba(255, 255, 255, .85) 55%), var(--ox-surface); border: 1px solid color-mix(in srgb, var(--hp) 25%, var(--ox-border)); box-shadow: var(--ox-shadow); }
.health-hero h1 { font-family: var(--ox-font-head); font-size: 1.45rem; font-weight: 800; margin: 0; color: var(--ox-text); }
.health-hero-sub { color: var(--ox-muted); font-size: .85rem; }
.health-hero-ring { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.55rem; color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--hp) 75%, #fff), var(--hp)); box-shadow: 0 6px 18px color-mix(in srgb, var(--hp) 35%, transparent); }
.health-refresh { border-radius: 999px; border: 1px solid var(--ox-border); }

.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; align-items: start; }
.health-card { border-radius: var(--ox-radius-sm); background: var(--ox-surface); border: 1px solid var(--ox-border); box-shadow: var(--ox-shadow); overflow: hidden;
    border-left: 4px solid var(--hp); }
.health-card > summary { list-style: none; display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; cursor: pointer; }
.health-card > summary::-webkit-details-marker { display: none; }
.health-card > summary:hover { background: linear-gradient(90deg, var(--hp-soft), transparent 70%); }
.health-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; color: var(--hp); background: var(--hp-soft); }
.health-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .2rem; line-height: 1.25; }
.health-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.health-label { font-size: .74rem; color: var(--ox-muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-value { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 700; color: var(--ox-text); }
.health-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700;
    color: var(--hp); background: var(--hp-soft); }
.health-caret { flex: 0 0 auto; color: var(--ox-faint); font-size: .8rem; transition: transform .2s; }
.health-card[open] .health-caret { transform: rotate(180deg); }
.health-more { padding: 0 1rem .9rem 4.05rem; font-size: .84rem; color: var(--ox-muted); max-height: 190px; overflow: auto; }
.health-more p { margin-bottom: .35rem; }
.health-more ul { margin: 0; padding-left: 1rem; color: var(--ox-text); }
.health-more li { margin-bottom: .2rem; word-break: break-word; }
@media (max-width: 575.98px) { .health-chip span { display: none; } .health-more { padding-left: .9rem; } }

/* ---------- Mise à jour de l'appli terrain depuis Organitix (0.28.0) ---------- */
.apk-card .card-header i { color: var(--cx-blue); }
.apk-current { display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; margin-bottom: .8rem; border-radius: var(--ox-radius-sm);
    background: linear-gradient(120deg, var(--cx-blue-soft), rgba(255, 255, 255, .6)); border: 1px solid color-mix(in srgb, var(--cx-blue) 18%, transparent); }
.apk-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--cx-blue-light), var(--cx-blue)); box-shadow: 0 4px 12px color-mix(in srgb, var(--cx-blue) 30%, transparent); }
.apk-upload .apk-file { flex: 1 1 220px; min-width: 0; }
.apk-upload .progress { height: 6px; border-radius: 999px; }
.apk-upload .progress-bar { background: var(--cx-gradient); }
