/* ==========================================================
   admin-enterprise-theme.css — V2 performance/contrast
   Look professionnel / expert — Le P'tit Motivateur Admin
   Purement visuel : ne modifie aucune logique.
   ========================================================== */

:root{
  --lpm-bg:#f3f6f5;
  --lpm-surface:#ffffff;
  --lpm-surface-soft:#f8fbfa;
  --lpm-sidebar:#092f2a;
  --lpm-sidebar-2:#0e4038;
  --lpm-ink:#183f38;
  --lpm-muted:#536f68;
  --lpm-line:#dfe9e6;
  --lpm-accent:#4dd5c1;
  --lpm-accent-dark:#0b6d5f;
  --lpm-accent-soft:#e9f8f5;
  --lpm-danger:#a23c3c;
  --lpm-warning:#9a6c11;
  --lpm-shadow:0 12px 34px rgba(8,49,43,.075);
  --lpm-shadow-strong:0 22px 55px rgba(8,49,43,.13);
}

html{
  background:var(--lpm-bg);
}

body{
  background:
    radial-gradient(circle at 80% -10%,rgba(77,213,193,.085),transparent 34rem),
    var(--lpm-bg)!important;
  color:var(--lpm-ink)!important;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif!important;
  letter-spacing:-.01em;
}

.app{
  grid-template-columns:268px minmax(0,1fr)!important;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
  padding:26px 18px!important;
  background:
    radial-gradient(circle at 20% 0%,rgba(83,218,198,.13),transparent 20rem),
    linear-gradient(180deg,var(--lpm-sidebar-2),var(--lpm-sidebar))!important;
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:18px 0 45px rgba(5,35,30,.06);
}

.sidebar .brand{
  position:relative;
  margin:0 0 28px!important;
  padding:4px 10px 18px;
  font-size:21px!important;
  line-height:1.15;
  letter-spacing:-.03em;
}

.sidebar .brand::after{
  content:"CONTROL CENTER";
  display:block;
  margin-top:7px;
  color:rgba(226,247,242,.47);
  font-size:9px;
  font-weight:850;
  letter-spacing:.16em;
}

.sidebar button{
  position:relative;
  display:flex;
  align-items:center;
  min-height:43px;
  margin-bottom:4px!important;
  padding:10px 12px!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  color:rgba(231,248,244,.72)!important;
  font-size:13px;
  font-weight:720;
  transition:
    background .16s ease,
    border-color .16s ease,
    transform .16s ease,
    color .16s ease;
}

.sidebar button:hover{
  background:rgba(255,255,255,.075)!important;
  border-color:rgba(255,255,255,.055)!important;
  color:#fff!important;
  transform:translateX(2px);
}

.sidebar button.active{
  background:
    linear-gradient(135deg,rgba(83,218,198,.18),rgba(83,218,198,.09))!important;
  border-color:rgba(104,231,210,.18)!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 var(--lpm-accent);
}

.sidebar button.active::after{
  content:"";
  position:absolute;
  right:10px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--lpm-accent);
  box-shadow:0 0 0 4px rgba(77,213,193,.08);
}

.content{
  padding:30px 34px 50px!important;
}

.topbar{
  margin-bottom:22px!important;
  padding:4px 2px;
}

.topbar h1{
  font-size:28px!important;
  line-height:1.15;
  letter-spacing:-.035em;
}

.admin-name{
  border:1px solid var(--lpm-line);
  background:rgba(255,255,255,.88)!important;
  box-shadow:none!important;
  backdrop-filter:blur(10px);
  color:#355c54;
  font-size:12px;
  font-weight:750;
}

.stats{
  gap:12px!important;
}

.stat-card{
  position:relative;
  overflow:hidden;
  padding:18px!important;
  border:1px solid var(--lpm-line);
  border-radius:16px!important;
  background:linear-gradient(180deg,#fff,#fbfdfc)!important;
  box-shadow:var(--lpm-shadow)!important;
}

.stat-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:3px;
  background:linear-gradient(90deg,var(--lpm-accent-dark),var(--lpm-accent));
  opacity:.75;
}

.stat-label{
  margin-bottom:7px!important;
  color:var(--lpm-muted)!important;
  font-size:11px!important;
  font-weight:780;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.stat-value{
  color:#153f37;
  font-size:29px!important;
  font-weight:820!important;
  letter-spacing:-.04em;
}

.section{
  margin-top:16px!important;
  padding:20px!important;
  border:1px solid var(--lpm-line);
  border-radius:16px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:var(--lpm-shadow)!important;
}

.section h2{
  letter-spacing:-.025em;
}

.toolbar{
  gap:9px!important;
}

input,
select,
textarea{
  min-height:42px;
  padding:10px 12px!important;
  border:1px solid #d9e5e2!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#193f38!important;
  font-size:13px;
  box-shadow:inset 0 1px 0 rgba(14,74,64,.018);
  transition:
    border-color .15s ease,
    box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#79cfc0!important;
  box-shadow:0 0 0 3px rgba(77,213,193,.11)!important;
}

.primary,
.secondary,
.danger,
.org-row-actions button,
.bulk-action-button{
  min-height:39px;
  border-radius:9px!important;
  font-size:12px!important;
  font-weight:780!important;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.primary{
  background:
    linear-gradient(135deg,#0d7a69,#0a6659)!important;
  box-shadow:0 7px 16px rgba(10,102,89,.15);
}

.primary:hover{
  transform:translateY(-1px);
  box-shadow:0 9px 20px rgba(10,102,89,.2);
}

.secondary{
  background:#fff!important;
  border-color:#d4e4e0!important;
  color:#315f56!important;
}

.secondary:hover{
  background:#f6fbf9!important;
  transform:translateY(-1px);
}

.table-wrap,
.org-table-wrap{
  overflow:auto;
  border:1px solid var(--lpm-line)!important;
  border-radius:13px!important;
  background:#fff;
}

table{
  min-width:760px;
}

th{
  padding:11px 12px!important;
  background:#f7faf9;
  color:#748681!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.07em!important;
  border-bottom:1px solid var(--lpm-line)!important;
}

td{
  padding:12px!important;
  color:#294e47;
  font-size:12px;
  border-bottom:1px solid #edf2f0!important;
}

tbody tr{
  transition:background .12s ease;
}

tbody tr:hover{
  background:#f8fcfb!important;
}

.user-name,
.org-name{
  color:#153f37!important;
  font-weight:820!important;
}

.small,
.org-sub,
.muted,
.org-muted{
  color:#758984!important;
}

.badge,
.org-status{
  border:1px solid rgba(11,109,95,.08);
  background:var(--lpm-accent-soft)!important;
  color:var(--lpm-accent-dark)!important;
  font-size:10px!important;
  font-weight:820!important;
}

.bulk-users-panel{
  top:10px!important;
  border:1px solid #cae4de!important;
  border-radius:15px!important;
  background:rgba(248,253,252,.96)!important;
  box-shadow:var(--lpm-shadow-strong)!important;
}

.bulk-users-actions{
  gap:6px!important;
}

.bulk-action-button{
  background:#fff!important;
  border-color:#d6e5e1!important;
}

.bulk-action-button.active{
  background:#e8f7f3!important;
  border-color:#9ed4ca!important;
  color:#0b685a!important;
}

.bulk-action-body{
  border-radius:12px!important;
}

.org-summary-grid{
  gap:10px!important;
}

.org-summary-card{
  position:relative;
  overflow:hidden;
  padding:15px!important;
  border:1px solid var(--lpm-line)!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#fff,#fbfdfc)!important;
  box-shadow:0 7px 20px rgba(8,49,43,.045);
}

.org-summary-card small{
  color:#748681!important;
  font-size:9px!important;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.org-summary-card strong{
  margin-top:6px!important;
  font-size:26px!important;
  letter-spacing:-.04em;
}

.org-tabs{
  padding:4px!important;
  border:1px solid var(--lpm-line)!important;
  border-radius:12px!important;
  background:#f7faf9!important;
}

.org-tab{
  min-height:36px;
  padding:8px 11px!important;
  border-radius:8px!important;
  color:#667b76!important;
  font-size:11px;
}

.org-tab.active{
  background:#fff!important;
  color:#0a6b5c!important;
  box-shadow:0 3px 10px rgba(8,49,43,.07);
}

.org-modal-backdrop{
  background:rgba(5,28,24,.52)!important;
  backdrop-filter:blur(4px);
}

.org-modal{
  border:1px solid rgba(255,255,255,.5);
  border-radius:18px!important;
  box-shadow:0 30px 90px rgba(0,0,0,.24)!important;
}

.org-modal-head{
  border-bottom:1px solid var(--lpm-line)!important;
}

.org-form-section{
  padding-bottom:16px;
  border-bottom:1px solid #edf2f0;
}

.org-form-section:last-child{
  border-bottom:0;
}

.org-form-section h3{
  margin-bottom:11px!important;
  color:#173f38!important;
  font-size:14px!important;
  letter-spacing:-.015em;
}

.org-setting{
  border:1px solid #e2ece9!important;
  border-radius:10px!important;
  background:#f9fcfb!important;
}

.login-card{
  border:1px solid var(--lpm-line);
  box-shadow:0 26px 65px rgba(6,51,44,.13)!important;
}

@media(max-width:980px){
  .app{
    grid-template-columns:220px minmax(0,1fr)!important;
  }

  .content{
    padding:24px 20px 40px!important;
  }
}

@media(max-width:760px){
  .app{
    display:block!important;
  }

  .sidebar{
    position:relative;
    width:100%;
    height:auto;
    min-height:0!important;
  }

  .content{
    padding:18px 12px 35px!important;
  }
}


/* V2 — densité maîtrisée, rendu offscreen paresseux */
html{scrollbar-gutter:stable}
.stat-card,.section,.org-summary-card,.im-card,.legal-card,.bc-card{content-visibility:auto;contain-intrinsic-size:180px}
.stat-value,.org-summary-card strong,.im-kpi strong{font-variant-numeric:tabular-nums}
.muted,.placeholder,.small{color:#536f68!important}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(33,252,220,.42)!important;outline-offset:2px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}
