/*
 * BLOC 6 — SYSTÈME
 * Couche de présentation ciblée : aucune règle métier, aucun état applicatif.
 */
/* Menu de l'utilisateur connecté — commun à l'ensemble de l'application. */
.user-menu-sentinelle{position:absolute;top:56px;right:12px;z-index:80;width:292px;overflow:hidden;border:1px solid #30445e;border-radius:11px;background:linear-gradient(145deg,#101b2c,#0b1423);box-shadow:0 18px 42px rgba(0,0,0,.42),0 0 0 1px rgba(255,255,255,.025) inset;color:#edf4ff}.user-menu-profile{min-height:84px;padding:15px 16px;border-bottom:1px solid #283a51}.user-menu-profile-row{display:flex;align-items:center;gap:11px}.user-menu-profile-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;color:#fff;font-size:12px;font-weight:800;letter-spacing:.04em;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}.user-menu-profile-name{color:#f6f9ff;font-size:13px;font-weight:780;line-height:1.2}.user-menu-profile-role{margin-top:3px;color:#9fb1c8;font-size:11px;line-height:1.25}.user-menu-profile-meta{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 0 49px}.user-menu-profile-tag{padding:3px 6px;border:1px solid #384c66;border-radius:4px;background:#142238;color:#aebed1;font-size:9px;font-weight:750;letter-spacing:.035em}.user-menu-profile-tag.h4{color:#d5bdff;border-color:#6948a2;background:#251a3b}.user-menu-profile-tag.h3{color:#ffb3b3;border-color:#8c4148;background:#31161b}.user-menu-profile-tag.h2{color:#f9d084;border-color:#826437;background:#2b2414}.user-menu-actions{padding:7px}.user-menu-action,.user-menu-logout{width:100%;min-height:39px;display:flex;align-items:center;gap:10px;border:0;border-radius:6px;padding:0 10px;background:transparent;color:#d9e4f1;font:650 12px Inter,ui-sans-serif,system-ui,sans-serif;text-align:left;cursor:pointer}.user-menu-action>i:first-child{display:grid;place-items:center;width:22px;height:22px;border-radius:5px;background:#1b3148;color:#79b9ec;font-size:11px}.user-menu-action span,.user-menu-logout span{flex:1}.user-menu-chevron{color:#71859d;font-size:10px}.user-menu-action:hover{background:#1b2b42;color:#fff}.user-menu-action:hover .user-menu-chevron{color:#c5d7ed}.user-menu-divider{height:1px;margin:0 7px;background:#283a51}.user-menu-logout{margin:7px;width:calc(100% - 14px);justify-content:center;background:#541b28;color:#ffd8df}.user-menu-logout i{color:#ff8ca0}.user-menu-logout:hover{background:#742337;color:#fff}
#user-avatar .system-user-portrait,.user-menu-profile-avatar .system-user-portrait{width:100%;height:100%;display:block;object-fit:cover}.system-user-portrait{border-radius:inherit}.account-modal{color:#eaf1fb;font:14px/1.45 Inter,ui-sans-serif,system-ui,sans-serif}.account-modal *{box-sizing:border-box}.account-modal-head{display:flex;align-items:center;gap:15px;padding:2px 0 18px;border-bottom:1px solid #2b3d56}.account-modal-portrait{width:64px;height:64px;overflow:hidden;border:1px solid #5f7798;border-radius:14px;background:#182741;flex:0 0 auto}.account-modal-portrait img{width:100%;height:100%;object-fit:cover}.account-modal-kicker{color:#a795ff;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.account-modal-head h2{margin:4px 0 0;color:#fff;font-size:20px;line-height:1.15}.account-modal-head p{margin:5px 0 0;color:#9bafc7;font-size:12px}.account-modal-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px;margin:18px 0}.account-modal-panel{padding:14px;border:1px solid #2d405a;border-radius:10px;background:#101b2c}.account-modal-panel h3{margin:0 0 12px;color:#aebfe0;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.account-modal-details{display:grid;gap:10px;margin:0}.account-modal-details div{display:grid;grid-template-columns:105px 1fr;gap:10px}.account-modal-details dt{color:#8196ae;font-size:12px}.account-modal-details dd{margin:0;color:#edf3fb;font-size:13px;font-weight:650}.account-status{display:flex;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #263953;color:#dce6f4;font-size:12px}.account-status:last-child{border:0;padding-bottom:0}.account-status i{display:grid;place-items:center;width:24px;height:24px;border-radius:6px;background:#17334a;color:#73c7ff}.account-status strong{display:block;color:#fff;font-size:12px}.account-status small{display:block;margin-top:2px;color:#8da1ba;font-size:11px}.account-modal-footer{display:flex;justify-content:flex-end;padding-top:15px;border-top:1px solid #2b3d56}.account-modal-footer button{min-height:36px;padding:0 14px;border:1px solid #42546f;border-radius:6px;background:#17253a;color:#e0e9f5;font-size:12px;font-weight:750;cursor:pointer}.settings-option{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #263953}.settings-option:last-child{border:0}.settings-option strong{display:block;color:#fff;font-size:13px}.settings-option small{display:block;margin-top:3px;color:#8da1ba;font-size:11px}.settings-option select{min-width:132px;min-height:34px;border:1px solid #40536f;border-radius:6px;background:#0a1423;color:#edf4ff;padding:0 8px;font-size:12px}.settings-option input{width:17px;height:17px;accent-color:#8b7cf6}.settings-save{background:#6d5de7!important;border-color:#8877ff!important;color:#fff!important}@media(max-width:600px){.account-modal-grid{grid-template-columns:1fr}.account-modal-details div{grid-template-columns:1fr}.settings-option{align-items:flex-start}.settings-option select{min-width:112px}}
#screen-content .jur-screen,
#screen-content .jur-admin-screen {
  --sys-surface: #0b1220;
  --sys-surface-raised: #101a2b;
  --sys-border: #23334a;
  --sys-muted: #8fa1b9;
  --sys-text: #edf4ff;
  --sys-accent: #8b7cf6;
  max-width: 1560px;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 30px) !important;
  color: var(--sys-text) !important;
  background: linear-gradient(145deg, #08101d 0%, #0b1321 52%, #0a1020 100%) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

/* Modules d'administration génériques : Workflow, API, audit et configuration. */
#screen-content[data-system-screen="27"],
#screen-content[data-system-screen="28"],
#screen-content[data-system-screen="29"],
#screen-content[data-system-screen="30"],
#screen-content[data-system-screen="31"],
#screen-content[data-system-screen="38"],
#screen-content[data-system-screen="42"],
#screen-content[data-system-screen="43"] {
  background: linear-gradient(145deg, #08101d, #0c1626 58%, #09111f) !important;
}

#screen-content[data-system-screen="27"] .screen-header,
#screen-content[data-system-screen="28"] .screen-header,
#screen-content[data-system-screen="29"] .screen-header,
#screen-content[data-system-screen="30"] .screen-header,
#screen-content[data-system-screen="31"] .screen-header {
  margin: 18px 20px 16px !important;
  padding: 17px 20px !important;
  border: 1px solid #283a55 !important;
  border-radius: 11px !important;
  background: linear-gradient(100deg, #111d30, #0d1728) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

#screen-content[data-system-screen="27"] .card,
#screen-content[data-system-screen="28"] .card,
#screen-content[data-system-screen="29"] .card,
#screen-content[data-system-screen="30"] .card,
#screen-content[data-system-screen="31"] .card {
  margin-left: 20px !important;
  margin-right: 20px !important;
  border: 1px solid #253852 !important;
  border-radius: 10px !important;
  background: #0e192a !important;
  box-shadow: 0 7px 20px rgba(0,0,0,.1);
}

#screen-content[data-system-screen="27"] .data-table th,
#screen-content[data-system-screen="28"] .data-table th,
#screen-content[data-system-screen="29"] .data-table th,
#screen-content[data-system-screen="30"] .data-table th,
#screen-content[data-system-screen="31"] .data-table th {
  color: #9aadc5 !important;
  font-size: .66rem !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#screen-content[data-system-screen="27"] .data-table tr,
#screen-content[data-system-screen="28"] .data-table tr,
#screen-content[data-system-screen="29"] .data-table tr,
#screen-content[data-system-screen="30"] .data-table tr,
#screen-content[data-system-screen="31"] .data-table tr {
  border-color: #243650 !important;
}

@media (max-width: 760px) {
  #screen-content[data-system-screen="27"] .screen-header,
  #screen-content[data-system-screen="28"] .screen-header,
  #screen-content[data-system-screen="29"] .screen-header,
  #screen-content[data-system-screen="30"] .screen-header,
  #screen-content[data-system-screen="31"] .screen-header,
  #screen-content[data-system-screen="27"] .card,
  #screen-content[data-system-screen="28"] .card,
  #screen-content[data-system-screen="29"] .card,
  #screen-content[data-system-screen="30"] .card,
  #screen-content[data-system-screen="31"] .card {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }
}

#screen-content .jur-admin-screen {
  --sys-accent: #f4b95d;
}

/* Le référentiel est une vue de consultation dense : une échelle plus contenue
   laisse davantage de place aux sources, qualifications et règles. */
#screen-content .jur-screen { font-size: .82rem; }
#screen-content .jur-screen .jur-title { font-size: clamp(.98rem, 1.35vw, 1.2rem) !important; }
#screen-content .jur-screen .jur-subtitle { font-size: .64rem !important; }
#screen-content .jur-screen .jur-kpi-card { min-height: 66px !important; padding: 10px 12px !important; }
#screen-content .jur-screen .jur-kpi-val { font-size: 1.12rem !important; }
#screen-content .jur-screen .jur-kpi-lbl { font-size: .53rem !important; }
#screen-content .jur-screen .jur-tab { min-height: 30px; font-size: .61rem !important; }
#screen-content .jur-screen h2 { font-size: .74rem !important; }
#screen-content .jur-screen h3 { font-size: .64rem !important; }
#screen-content .jur-screen th { font-size: .56rem !important; }
#screen-content .jur-screen td { font-size: .61rem !important; }

#screen-content .jur-header {
  position: relative;
  display: flex !important;
  align-items: flex-start !important;
  gap: 20px !important;
  min-height: 100px;
  margin: 0 0 18px !important;
  padding: 20px 22px !important;
  overflow: hidden;
  border: 1px solid var(--sys-border) !important;
  border-radius: 12px !important;
  background: linear-gradient(100deg, rgba(17, 29, 48, .98), rgba(11, 18, 32, .88)) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

#screen-content .jur-header::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  content: '';
  background: var(--sys-accent);
}

#screen-content .jur-header > div:first-child { padding-left: 4px; }

#screen-content .jur-title {
  margin: 0 !important;
  color: var(--sys-text) !important;
  font-size: clamp(1.05rem, 1.6vw, 1.5rem) !important;
  font-weight: 750 !important;
  letter-spacing: .025em !important;
  line-height: 1.2 !important;
}

#screen-content .jur-subtitle,
#screen-content .jur-header [style*="color:#6b7280"] {
  color: var(--sys-muted) !important;
  font-size: .72rem !important;
  line-height: 1.55 !important;
}

#screen-content .jur-header button {
  min-height: 32px;
  padding: 0 11px !important;
  border-radius: 6px !important;
  font-size: .7rem !important;
}

#screen-content .jur-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 18px !important;
}

#screen-content .jur-kpi-card {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  column-gap: 10px !important;
  align-items: center !important;
  min-height: 74px !important;
  padding: 12px 13px !important;
  border: 1px solid var(--sys-border) !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, rgba(17, 28, 46, .98), rgba(12, 20, 34, .98)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 7px 18px rgba(0,0,0,.12);
  text-align: left !important;
}

#screen-content .jur-kpi-card .jur-icon-box {
  grid-row: 1 / span 3;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  border-radius: 7px !important;
}

#screen-content .jur-kpi-val {
  color: var(--sys-text) !important;
  font-size: 1.38rem !important;
  font-weight: 760 !important;
  line-height: 1 !important;
}

#screen-content .jur-kpi-lbl {
  margin-top: 4px !important;
  color: var(--sys-muted) !important;
  font-size: .59rem !important;
  font-weight: 700 !important;
  letter-spacing: .055em !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
}

#screen-content .jur-kpi-card > div:last-child:not(.jur-icon-box) {
  color: #7185a0 !important;
  font-size: .58rem !important;
  line-height: 1.3 !important;
}

#screen-content .jur-tabs {
  display: flex !important;
  gap: 6px !important;
  margin: 0 0 18px !important;
  padding: 6px !important;
  overflow-x: auto;
  border: 1px solid var(--sys-border) !important;
  border-radius: 10px !important;
  background: #0a1220 !important;
  scrollbar-width: thin;
}

#screen-content .jur-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  color: #9caec4 !important;
  font-size: .68rem !important;
  font-weight: 700 !important;
  letter-spacing: .015em;
}

#screen-content .jur-tab:hover { color: var(--sys-text) !important; background: #142138 !important; }
#screen-content .jur-tab.active { color: var(--sys-text) !important; border-color: color-mix(in srgb, var(--sys-accent) 55%, #23334a) !important; box-shadow: inset 0 -2px 0 var(--sys-accent); }

#screen-content .jur-dashboard-grid,
#screen-content .jur-admin-dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start;
}

#screen-content .jur-dashboard-grid > div,
#screen-content .jur-admin-dashboard-grid > div {
  min-width: 0;
  padding: 16px !important;
  border: 1px solid var(--sys-border) !important;
  border-radius: 10px !important;
  background: rgba(14, 24, 40, .94) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.1);
}

#screen-content .jur-dashboard-grid > div:nth-child(3) { grid-column: 1 / -1; }
#screen-content .jur-admin-dashboard-grid > div:last-child { grid-column: 1 / -1; }

#screen-content .jur-screen h2,
#screen-content .jur-admin-screen h2 {
  color: var(--sys-text) !important;
  font-size: .82rem !important;
  letter-spacing: .025em;
}

#screen-content .jur-screen h3,
#screen-content .jur-admin-screen h3 {
  color: #c9d5e7 !important;
  font-size: .7rem !important;
}

#screen-content .jur-screen table,
#screen-content .jur-admin-screen table { border-collapse: separate; border-spacing: 0; }
#screen-content .jur-screen th,
#screen-content .jur-admin-screen th {
  color: #91a4bd !important;
  font-size: .61rem !important;
  letter-spacing: .05em;
  text-transform: uppercase;
}

#screen-content .jur-screen td,
#screen-content .jur-admin-screen td {
  color: #d4dfef !important;
  font-size: .68rem !important;
}

#screen-content .jur-screen input,
#screen-content .jur-screen select,
#screen-content .jur-screen textarea,
#screen-content .jur-admin-screen input,
#screen-content .jur-admin-screen select,
#screen-content .jur-admin-screen textarea {
  min-height: 34px;
  border-radius: 6px !important;
  background: #0a1322 !important;
  border-color: #31425c !important;
  color: var(--sys-text) !important;
}

@media (max-width: 1300px) {
  #screen-content .jur-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  #screen-content .jur-screen,
  #screen-content .jur-admin-screen { padding: 12px !important; }
  #screen-content .jur-header { flex-direction: column; min-height: auto; padding: 16px !important; }
  #screen-content .jur-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #screen-content .jur-dashboard-grid,
  #screen-content .jur-admin-dashboard-grid { grid-template-columns: 1fr !important; }
  #screen-content .jur-dashboard-grid > div:nth-child(3),
  #screen-content .jur-admin-dashboard-grid > div:last-child { grid-column: auto; }
}
