/* ==========================================================================
   Plateforme nationale MRV — Back-office
   Charte institutionnelle : République Islamique de Mauritanie
   Ministère de l'Environnement et du Développement Durable
   ========================================================================== */

:root {
    /* Couleurs nationales */
    --rim-vert-950: #04261a;
    --rim-vert-900: #06301f;
    --rim-vert-800: #0b3d2a;
    --rim-vert-700: #0b4d33;
    --rim-vert-600: #0a6b3d;
    --rim-vert-500: #15804f;
    --rim-vert-100: #dcefe4;
    --rim-vert-50:  #eef6f1;
    --rim-or-700:   #8a6a14;
    --rim-or-600:   #a8831e;
    --rim-or-500:   #c99a1e;
    --rim-or-100:   #f6edd2;
    --rim-or-50:    #fbf7ea;
    --rim-rouge:    #b3121b;

    /* Neutres */
    --ink-900: #111a16;
    --ink-700: #33413a;
    --ink-500: #5d6b64;
    --ink-400: #85918b;
    --line:    #dfe5e1;
    --line-soft: #ecf0ed;
    --surface: #ffffff;
    --page:    #f4f6f4;

    /* États */
    --ok:     #15804f;
    --warn:   #b7791f;
    --danger: #b42318;
    --info:   #1d5c8a;

    --radius-sm: 4px;
    --radius:    6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(10, 40, 25, .06);
    --shadow:    0 1px 3px rgba(10, 40, 25, .08), 0 4px 12px rgba(10, 40, 25, .04);

    --topbar-h:  64px;
    --govbar-h:  34px;
    --sidebar-w: 272px;

    --font: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ----------------------------------------------------------------- Base -- */
html { min-height: 100%; }  /* pas de height:100% : il casserait le position:sticky de la barre supérieure au-delà du premier écran */
body.bo {
    margin: 0;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink-900);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}
body.bo h1, body.bo h2, body.bo h3, body.bo h4 { font-family: var(--font); letter-spacing: -.01em; }
body.bo a { color: inherit; }
body.bo :focus-visible { outline: 2px solid var(--rim-or-500); outline-offset: 2px; }

/* Bande aux couleurs nationales (rouge – vert – or – vert – rouge) */
.flag-band {
    height: 4px;
    background: linear-gradient(90deg,
        var(--rim-rouge) 0 12%, var(--rim-vert-600) 12% 44%,
        var(--rim-or-500) 44% 56%, var(--rim-vert-600) 56% 88%, var(--rim-rouge) 88% 100%);
}

/* ------------------------------------------------------ Bandeau d'État -- */
.govbar {
    height: var(--govbar-h);
    background: var(--rim-vert-950);
    color: #cfe2d7;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
}
.govbar strong { color: #fff; font-weight: 600; letter-spacing: .02em; }
.govbar .motto { color: var(--rim-or-500); font-style: italic; }
.govbar .sep { opacity: .35; margin: 0 10px; }
.govbar a { color: #cfe2d7; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.govbar a:hover { color: #fff; }
@media (max-width: 720px) { .govbar .motto, .govbar .sep { display: none; } .govbar { padding: 0 14px; } }

/* ---------------------------------------------------------------- Topbar -- */
.bo-topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center;
    padding: 0 24px 0 0;
}
.bo-brand {
    width: var(--sidebar-w);
    flex-shrink: 0;
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    height: 100%;
    border-right: 1px solid var(--line);
    text-decoration: none;
}
.bo-brand img { width: 40px; height: 40px; object-fit: contain; }
.bo-brand .t1 { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); line-height: 1.25; }
.bo-brand .t2 { display: block; font-size: 15px; font-weight: 800; color: var(--rim-vert-700); line-height: 1.2; }
.bo-brand .t2 span { color: var(--rim-or-600); }

.bo-topbar .toolbar { flex: 1; display: flex; align-items: center; gap: 14px; padding-left: 24px; min-width: 0; }
.bo-topbar .espace-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; color: var(--rim-vert-700);
    background: var(--rim-vert-50); border: 1px solid var(--rim-vert-100);
    padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.exercice-select { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-500); }
.exercice-select select {
    font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-900);
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; padding: 6px 30px 6px 10px; cursor: pointer;
}
.exercice-select select:focus { outline: none; border-color: var(--rim-vert-600); box-shadow: 0 0 0 3px rgba(14, 99, 64, .15); }

.bo-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bo-user .who { text-align: right; line-height: 1.2; }
.bo-user .who b { display: block; font-size: 13px; font-weight: 700; }
.bo-user .who small { font-size: 11.5px; color: var(--ink-500); }
.bo-user .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--rim-vert-700); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.btn-icon {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: #fff; color: var(--ink-700);
    border-radius: var(--radius); padding: 7px 11px; font-size: 13px; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn-icon:hover { background: var(--rim-vert-50); border-color: var(--rim-vert-100); color: var(--rim-vert-700); }
.btn-icon.danger:hover { background: #fdecea; border-color: #f5c2bc; color: var(--danger); }

.btn-icon, .exercice-select label { white-space: nowrap; }
.bo-brand > span { min-width: 0; }
@media (max-width: 1320px) {
    .bo-brand .t1 { display: none; }
    .bo-brand .t2 { font-size: 17px; }
    .btn-icon .lbl { display: none; }
}
@media (max-width: 1180px) {
    .bo-topbar .espace-tag { display: none; }
}
.sidebar-toggle { display: none; border: 0; background: none; font-size: 18px; color: var(--ink-700); padding: 8px 12px; cursor: pointer; }

/* --------------------------------------------------------------- Layout -- */
.bo-body { display: flex; min-height: calc(100vh - var(--topbar-h) - var(--govbar-h) - 4px); }

.bo-sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--rim-vert-900);
    color: #d3e4da;
    display: flex; flex-direction: column;
    position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: hidden;
}
.bo-nav { flex: 1; overflow-y: auto; padding: 16px 12px 24px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.bo-nav .nav-title {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--rim-or-500); padding: 14px 12px 6px;
}
.bo-nav a, .bo-nav button.nav-group {
    display: flex; align-items: center; gap: 11px; width: 100%;
    padding: 9px 12px; border-radius: var(--radius);
    color: #d3e4da; text-decoration: none; font-size: 13.5px; font-weight: 500;
    background: none; border: 0; text-align: left; cursor: pointer;
    transition: background .15s, color .15s;
}
.bo-nav a i, .bo-nav button.nav-group > span > i { width: 18px; text-align: center; color: #8fb8a2; font-size: 14px; }
.bo-nav a:hover, .bo-nav button.nav-group:hover { background: rgba(255,255,255,.06); color: #fff; }
.bo-nav a.active { background: var(--rim-vert-600); color: #fff; box-shadow: inset 3px 0 0 var(--rim-or-500); }
.bo-nav a.active i { color: #fff; }
.bo-nav button.nav-group { justify-content: space-between; font-weight: 600; color: #fff; }
.bo-nav button.nav-group > span { display: flex; align-items: center; gap: 11px; }
.bo-nav .chev { font-size: 10px; color: #8fb8a2; transition: transform .2s; }
.bo-nav .group.open > .nav-group .chev { transform: rotate(90deg); }
.bo-nav .group-items { display: none; margin: 2px 0 6px 21px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.12); }
.bo-nav .group.open > .group-items { display: block; }
.bo-nav .group-items a { font-size: 13px; padding: 7px 10px; }
.bo-nav .group-items .sub-title { font-size: 11px; color: #8fb8a2; padding: 8px 10px 2px; font-weight: 600; }
.bo-nav .group-items a i { font-size: 12px; }
.bo-nav .lock { margin-left: auto; font-size: 10px; opacity: .55; }

.bo-sidebar .side-foot {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px 20px; font-size: 11.5px; color: #8fb8a2;
    display: flex; justify-content: space-between; align-items: center;
}
.bo-sidebar .side-foot .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3fbf7f; margin-right: 6px; }

.bo-main { flex: 1; min-width: 0; padding: 28px 32px 40px; }
.bo-footer {
    margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
    font-size: 12px; color: var(--ink-400);
}

.sidebar-overlay { display: none; }

@media (max-width: 1023px) {
    .sidebar-toggle { display: inline-block; }
    .bo-brand { width: auto; border-right: 0; padding-left: 4px; }
    .bo-brand .t1 { display: none; }
    .bo-topbar .espace-tag { display: none; }
    .bo-user .who { display: none; }
    .bo-sidebar {
        position: fixed; top: 0; left: 0; z-index: 60; height: 100vh;
        transform: translateX(-100%); transition: transform .25s ease;
    }
    .bo-sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(4, 38, 26, .45); z-index: 55; }
    .bo-main { padding: 20px 16px 32px; }
}
@media (max-width: 640px) {
    .exercice-select label { display: none; }
    .btn-icon .lbl { display: none; }
}

/* -------------------------------------------------------- En-tête de page -- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head .crumbs { font-size: 12px; color: var(--ink-500); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
body.bo .page-head .crumbs a { color: var(--rim-vert-600); text-decoration: none; }
.page-head .crumbs a:hover { text-decoration: underline; }
.page-head h1 { font-size: 24px; font-weight: 800; margin: 0; color: var(--ink-900); }
.page-head p { margin: 4px 0 0; color: var(--ink-500); font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----------------------------------------------------------- Composants -- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.panel-body { padding: 20px; }

.btn-gov {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: 13.5px; font-weight: 600;
    padding: 9px 16px; border-radius: var(--radius);
    border: 1px solid var(--rim-vert-700); background: var(--rim-vert-700); color: #fff !important;
    text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-gov:hover { background: var(--rim-vert-800); border-color: var(--rim-vert-800); }
.btn-gov.outline { background: #fff; color: var(--rim-vert-700) !important; border-color: var(--line); }
.btn-gov.outline:hover { background: var(--rim-vert-50); border-color: var(--rim-vert-100); }
.btn-gov.gold { background: var(--rim-or-500); border-color: var(--rim-or-500); color: var(--rim-vert-950) !important; }
.btn-gov.gold:hover { background: var(--rim-or-600); border-color: var(--rim-or-600); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .kpis { grid-template-columns: 1fr; } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rim-vert-600); }
.kpi.gold::before { background: var(--rim-or-500); }
.kpi .lbl { font-size: 12px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; }
.kpi .val { font-size: 28px; font-weight: 800; color: var(--ink-900); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--ink-400); }

.progress-gov { height: 6px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.progress-gov > span { display: block; height: 100%; background: var(--rim-vert-600); border-radius: 999px; }

.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.pillar-top { padding: 18px 20px 16px; display: flex; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--line-soft); }
.pillar-ico { width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--radius); background: var(--rim-vert-50); color: var(--rim-vert-700); display: grid; place-items: center; font-size: 17px; }
.pillar-top h3 { margin: 0; font-size: 16px; font-weight: 700; }
.pillar-top p { margin: 3px 0 0; font-size: 13px; color: var(--ink-500); }
.pillar-stats { padding: 14px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-bottom: 1px solid var(--line-soft); }
.pillar-stats div { font-size: 12px; color: var(--ink-500); }
.pillar-stats b { display: block; font-size: 18px; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.pillar-progress { padding: 12px 20px 14px; border-bottom: 1px solid var(--line-soft); }
.pillar-progress .p-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-500); margin-bottom: 6px; }
.pillar-sectors { padding: 10px 12px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
body.bo .chip-link {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
    padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-700); text-decoration: none; background: #fff;
}
.chip-link:hover { border-color: var(--rim-vert-600); color: var(--rim-vert-700); background: var(--rim-vert-50); }
.chip-link i { font-size: 10px; color: var(--ink-400); }
.pillar-foot { margin-top: auto; padding: 12px 20px; display: flex; gap: 16px; font-size: 13px; background: #fafbfa; border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
body.bo .pillar-foot a { color: var(--rim-vert-600); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pillar-foot a:hover { text-decoration: underline; }

.alert-gov { border: 1px solid; border-left-width: 4px; border-radius: var(--radius); padding: 12px 16px; font-size: 13.5px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert-gov.info { background: #eef5fb; border-color: #c6dcee; border-left-color: var(--info); color: #173f5f; }
.alert-gov.ok { background: var(--rim-vert-50); border-color: var(--rim-vert-100); border-left-color: var(--ok); color: var(--rim-vert-800); }
.alert-gov.warn { background: var(--rim-or-50); border-color: var(--rim-or-100); border-left-color: var(--warn); color: #6b4b0f; }
.alert-gov.error { background: #fdecea; border-color: #f5c2bc; border-left-color: var(--danger); color: #7a1a12; }

.table-gov { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-gov th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); font-weight: 700; padding: 10px 14px; background: #f7f9f8; border-bottom: 1px solid var(--line); }
.table-gov td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.table-gov tr:last-child td { border-bottom: 0; }

.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.sector-card { display: flex; align-items: center; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink-900); transition: border-color .15s, box-shadow .15s; }
.sector-card:hover { border-color: var(--rim-vert-600); box-shadow: var(--shadow); }
.sector-card .ico { width: 38px; height: 38px; border-radius: var(--radius); background: var(--rim-vert-50); color: var(--rim-vert-700); display: grid; place-items: center; }
.sector-card b { display: block; font-size: 14px; }
.sector-card small { color: var(--ink-500); font-size: 12px; }
.sector-card .go { margin-left: auto; color: var(--ink-400); }

/* ----------------------------------------------------------- Modales app -- */
.app-modal-backdrop { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(4, 38, 26, .5); z-index: 2000; padding: 16px; }
.app-modal-backdrop.show { display: flex; }
.app-modal-backdrop .modal-content { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 460px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; }
.app-modal-backdrop .m-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.app-modal-backdrop .m-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.app-modal-backdrop .m-body { padding: 18px 20px; color: var(--ink-700); }
.app-modal-backdrop .m-foot { padding: 14px 20px; background: #f7f9f8; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; }
.app-modal-backdrop .x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-400); cursor: pointer; }
.field-gov { display: block; margin-bottom: 14px; }
.field-gov span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.field-gov input { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); box-sizing: border-box; }
.field-gov input:focus { outline: none; border-color: var(--rim-vert-600); box-shadow: 0 0 0 3px rgba(14, 99, 64, .15); }

/* Loader */
#loader-overlay { display: none; position: fixed; inset: 0; background: rgba(255,255,255,.6); backdrop-filter: blur(2px); z-index: 2990; }
#loader { display: none; position: fixed; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 4px solid var(--rim-vert-100); border-top-color: var(--rim-vert-600); border-radius: 50%; animation: bo-spin .8s linear infinite; z-index: 3000; }
@keyframes bo-spin { to { transform: rotate(360deg); } }

/* Modales Bootstrap au-dessus de la barre et de la navigation */
.modal { z-index: 1060 !important; }
.modal-backdrop { z-index: 1055 !important; }

/* ----------------------------------------------------- Harmonisation des écrans existants
   Les écrans de saisie utilisent des classes Tailwind / Bootstrap : on aligne
   leurs couleurs principales sur la charte (sans modifier leur structure).          */
body.bo .btn-primary { background-color: var(--rim-vert-700); border-color: var(--rim-vert-700); }
body.bo .btn-primary:hover, body.bo .btn-primary:focus { background-color: var(--rim-vert-800); border-color: var(--rim-vert-800); }
body.bo .btn-outline-primary { color: var(--rim-vert-700); border-color: var(--rim-vert-700); }
body.bo .btn-outline-primary:hover { background-color: var(--rim-vert-700); color: #fff; }
body.bo .form-control:focus, body.bo .form-select:focus { border-color: var(--rim-vert-600); box-shadow: 0 0 0 .2rem rgba(14, 99, 64, .15); }
body.bo .text-primary { color: var(--rim-vert-700) !important; }
body.bo .bg-primary { background-color: var(--rim-vert-700) !important; }
body.bo .card-pilier { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
body.bo table thead th { font-family: var(--font); }

@media print {
    .govbar, .bo-topbar, .bo-sidebar, .flag-band, .page-head .actions { display: none !important; }
    .bo-main { padding: 0; }
}

/* ----------------------------------------------- Profil en lecture seule (Expert) -- */
body.lecture-seule [onclick^="edit"],
body.lecture-seule [onclick^="delete"],
body.lecture-seule [onclick="openImportModal()"],
body.lecture-seule #validateSelected,
body.lecture-seule #invalidateSelected,
body.lecture-seule #deleteSelected,
body.lecture-seule .batch-actions input[type="checkbox"],
body.lecture-seule #selectAll { display: none !important; }

/* Pastilles et légendes */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.dot-l { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* =====================================================================
   ÉCRANS DE SAISIE (émission, atténuation, adaptation, soutien)
   Harmonisation des composants propres aux modules avec la charte.
   ===================================================================== */
body.bo #mainContainer > .container { padding: 0 !important; }
body.bo #mainContainer { font-family: var(--font); }

/* Cartes de formulaire et de tableau */
body.bo #mainContainer .bg-white.rounded-lg,
body.bo #mainContainer .bg-white.rounded-xl,
body.bo .action-table-container, body.bo .adapt-table-container {
    border: 1px solid var(--line) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-sm) !important;
}
body.bo #mainContainer h3, body.bo #mainContainer h4 { color: var(--ink-900); font-weight: 700; }

/* Titres de section des formulaires */
body.bo .section-title {
    color: var(--rim-vert-700); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 1px solid var(--line-soft); padding-bottom: 8px;
}
body.bo .section-title .badge-optional { background: var(--rim-or-50); color: var(--rim-or-700); border: 1px solid var(--rim-or-100); }

/* Champs */
body.bo .action-form-group label, body.bo .adapt-form-group label,
body.bo .action-filter-group label, body.bo .adapt-filter-group label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
body.bo .action-form-group label .required, body.bo .adapt-form-group label .required { color: var(--danger); }
body.bo .action-form-input, body.bo .action-form-select, body.bo .action-form-textarea,
body.bo .adapt-form-input, body.bo .adapt-form-select, body.bo .adapt-form-textarea,
body.bo #mainContainer input[type="text"], body.bo #mainContainer input[type="number"], body.bo #mainContainer input[type="date"],
body.bo #mainContainer select, body.bo #mainContainer textarea {
    font-family: var(--font); font-size: 14px; color: var(--ink-900);
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
body.bo .action-form-input:focus, body.bo .action-form-select:focus, body.bo .action-form-textarea:focus,
body.bo .adapt-form-input:focus, body.bo .adapt-form-select:focus, body.bo .adapt-form-textarea:focus,
body.bo #mainContainer input:focus, body.bo #mainContainer select:focus, body.bo #mainContainer textarea:focus {
    outline: none; border-color: var(--rim-vert-600); box-shadow: 0 0 0 3px rgba(10, 107, 61, .15);
}

/* Boutons des modules */
body.bo .action-btn, body.bo .adapt-btn {
    font-family: var(--font); font-weight: 600; font-size: 13px; border-radius: var(--radius);
    padding: 8px 14px; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px;
}
body.bo .action-btn-primary, body.bo .adapt-btn-primary,
body.bo .action-btn-success, body.bo .adapt-btn-success { background: var(--rim-vert-700); border-color: var(--rim-vert-700); color: #fff; }
body.bo .action-btn-primary:hover, body.bo .adapt-btn-primary:hover,
body.bo .action-btn-success:hover, body.bo .adapt-btn-success:hover { background: var(--rim-vert-800); border-color: var(--rim-vert-800); }
body.bo .action-btn-secondary, body.bo .adapt-btn-secondary { background: #fff; border-color: var(--line); color: var(--ink-700); }
body.bo .action-btn-secondary:hover, body.bo .adapt-btn-secondary:hover { background: #f4f6f4; }
body.bo .action-btn-danger, body.bo .adapt-btn-danger { background: #fff; border-color: #f5c2bc; color: var(--danger); }
body.bo .action-btn-danger:hover, body.bo .adapt-btn-danger:hover { background: var(--danger); color: #fff; }
body.bo .action-btn-excel, body.bo .adapt-btn-excel { background: #fff; border-color: var(--line); color: var(--rim-vert-700); }
body.bo .action-btn:disabled, body.bo .adapt-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Barres de filtres */
body.bo .action-filter-bar, body.bo .adapt-filter-bar { background: #f7f9f8; border-bottom: 1px solid var(--line); }
body.bo .batch-actions { background: #fafbfa !important; }

/* Tableaux de données */
body.bo .action-table, body.bo .adapt-table { font-family: var(--font); font-size: 13px; }
body.bo .action-table th, body.bo .adapt-table th {
    background: #f7f9f8 !important; color: var(--ink-500) !important; font-size: 11px; text-transform: uppercase;
    letter-spacing: .05em; font-weight: 700; border-color: var(--line) !important;
}
body.bo .action-table thead tr:first-child th.col-groupe { background: var(--rim-vert-50) !important; color: var(--rim-vert-700) !important; }
body.bo .action-table td, body.bo .adapt-table td { border-color: var(--line-soft) !important; }
body.bo .action-table tbody tr:hover, body.bo .adapt-table tbody tr:hover { background: #fafcfb !important; }
body.bo .status-badge-valid { background: var(--rim-vert-50); color: var(--rim-vert-700); }
body.bo .status-badge-pending { background: var(--rim-or-50); color: var(--rim-or-700); }

/* Modales d'import / suppression des modules */
body.bo .modal-content-action { border-radius: var(--radius-lg); border: 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); font-family: var(--font); }

/* Pagination des modules */
body.bo #mainContainer .bg-teal-600, body.bo #mainContainer .bg-purple-600 { background: var(--rim-vert-700) !important; }
