:root { --bt-brand: #5a9e32; }  /* remplacer par la couleur ONIL */
.bt-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.bt-modal { position: relative; background: #fff; color: #222; width: min(560px, 100%); max-height: 88vh;
  overflow: auto; border-radius: 8px; padding: 24px; font-family: inherit; font-size: 15px; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.bt-modal h2 { margin: 0 0 12px; font-size: 20px; color: var(--bt-brand); padding-right: 28px; }
.bt-modal p { margin: 0 0 12px; }
.bt-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 28px;
  line-height: 1; cursor: pointer; color: #555; }
.bt-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.bt-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.bt-btn { border: 0; border-radius: 6px; padding: 10px 18px; cursor: pointer; font-size: 15px; }
.bt-btn-primary { background: var(--bt-brand); color: #fff; }
.bt-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.bt-btn-ghost { background: #eee; color: #333; }
.bt-link { color: var(--bt-brand); }
.bt-note { font-size: 13px; color: #666; margin-top: 12px; }
.bt-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99998; background: #fff; color: #222;
  box-shadow: 0 -4px 14px rgba(0,0,0,.2); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between; font-size: 14px; font-family: inherit; }
.bt-banner-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media (max-width: 480px) { .bt-modal { padding: 18px; } .bt-btn { width: 100%; } .bt-banner-actions { width: 100%; justify-content: space-between; } }
@media print { .no-print { display: none !important; } }
/* BT-SIRH : identité ONIL – connexion, administration, libre service */

/* Connexion */
.login_big_box, .login_wrapper { background-color: var(--bt-brand) !important; }
.login_box .login_inp { border-color: var(--bt-brand) !important; }
.but_login, .btn_fp, .empLoginBtn { background-color: var(--bt-brand) !important; color: #fff !important; }
.login_box_type a, .login_big_box a { color: #fff !important; }
.login_logo { background-image: none !important; text-align: center; }
.login_logo .bt-login-logo { max-width: 260px; height: auto; display: inline-block; }
.login_logo .bt-login-sub { color: #444; font-size: 16px; margin-top: 8px; }

/* En-tête administration et libre service */
.layui-header, .top_box, .layui-layout-admin .layui-header { background-color: var(--bt-brand) !important; }
.layui-header .layui-nav-menu a, .top_nav a, .top_nav ul li a { color: #fff !important; }
.top_nav_hov, .layui-nav .layui-nav-item.layui-this a { background-color: rgba(255,255,255,.18) !important; }
.bt-header-brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 12px; }
.bt-header-logo { height: 40px; width: auto; }
.bt-header-title { color: #fff; font-weight: 600; white-space: nowrap; }
.bt-menu-icon { margin-right: 6px; width: 1.2em; text-align: center; }

/* Boutons, cases à cocher et liens */
.layui-btn, .layui-btn-normal { background-color: var(--bt-brand) !important; border-color: var(--bt-brand) !important; }
.layui-form-checked[lay-skin=primary] i, .layui-form-checked i { background-color: var(--bt-brand) !important; border-color: var(--bt-brand) !important; }
.layui-form-onswitch { background-color: var(--bt-brand) !important; border-color: var(--bt-brand) !important; }
a, .layui-link { color: var(--bt-brand); }

/* Pied de page */
.login_copy { color: #333; font-size: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .login_big_box { width: 92% !important; }
  .login_box { width: 100% !important; }
  .bt-header-title { display: none; }
  .bt-header-logo { height: 30px; }
  .login_logo .bt-login-logo { max-width: 200px; }
}
/* BT-MENU5 : menu du profil – remplace la largeur fixe de 135px du thème */
.system-user-menu.layui-nav-child,
.layui-layout-admin .layui-header .layui-nav-child.system-user-menu {
  width: auto !important;
  min-width: 240px !important;
  max-width: calc(100vw - 16px) !important;
  left: auto !important;
  right: 0 !important;
  top: 60px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  box-sizing: border-box;
}
.system-user-menu.layui-nav-child a {
  height: auto !important;
  line-height: 1.6 !important;
  padding: 10px 22px !important;
  white-space: nowrap !important;
}
/* BT-RESP : ajustements mobiles (≤ 768 px) */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  img, svg, canvas, video { max-width: 100%; height: auto; }

  /* Saisie : 16 px évite le zoom automatique sur iPhone */
  .login_box .login_inp,
  .login_box input[type=text],
  .login_box input[type=password],
  .layui-input, .layui-textarea, .layui-select {
    font-size: 16px !important;
    min-height: 44px;
  }

  /* Boutons : zone de toucher suffisante */
  .but_login, .btn_fp, .empLoginBtn, .layui-btn {
    min-height: 44px;
    line-height: 44px;
  }

  /* Tableaux et listes : défilement horizontal propre */
  .layui-table-box, .layui-table-view, .table-responsive, .dataTables_wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Cartes et colonnes du tableau de bord : une colonne sur téléphone */
  .layui-col-md3, .layui-col-md4, .layui-col-md6, .layui-col-md8, .layui-col-md12 {
    width: 100% !important;
    float: none !important;
  }
  .layui-card, .info-box, .layui-form-item .layui-inline {
    max-width: 100%;
    margin-right: 0 !important;
  }
}