/* =========================================================
   AUDITMS.CSS — Styles spécifiques Audit M365
   Dépend de : css/theme.css
   ========================================================= */

:root { --sw: 220px; }

/* ── ÉCRAN DE CONNEXION ──────────────────────────────────── */
#login-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 1.5rem;
  padding: 2rem; text-align: center;
}
.login-logo { font-family: var(--mono); font-size: .78rem; letter-spacing: .2em; color: var(--text2); }
.login-logo span { color: var(--accent); }
.login-box {
  background: var(--bg2); border: 1px solid var(--bd2); border-radius: 12px;
  padding: 2rem; display: flex; flex-direction: column;
  align-items: center; gap: 1.25rem; width: 100%; max-width: 400px;
}
.lock-icon {
  width: 44px; height: 44px; background: var(--bg4); border: 1px solid var(--bd2);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.lock-icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; }
.login-box h2 { font-size: 1.2rem; font-weight: 500; }
.login-box p  { font-size: .8rem; color: var(--text2); line-height: 1.6; text-align: center; }

/* ── ÉCRAN LOGIN — BÉNÉFICES ─────────────────────────────── */
#login-screen { justify-content: center; }

.login-benefits {
  width: 100%; max-width: 520px;
  display: flex; flex-direction: column; gap: .6rem;
}
.lb-card {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 10px; padding: .9rem 1.1rem;
}
.lb-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.lb-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.lb-text { display: flex; flex-direction: column; gap: .25rem; }
.lb-title { font-size: .82rem; font-weight: 500; }
.lb-desc  { font-size: .75rem; color: var(--text2); line-height: 1.55; }

.login-footer {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 520px;
  font-size: .72rem; color: var(--text2); gap: 1rem; flex-wrap: wrap;
}
.login-details-link {
  color: var(--acc2); text-decoration: none; white-space: nowrap;
  font-size: .72rem; transition: color .12s;
}
.login-details-link:hover { color: var(--text); }

/* ── APP ─────────────────────────────────────────────────── */
#app { display: none; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sw); background: var(--bg2); border-right: 1px solid var(--bd);
  position: fixed; top: 0; left: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 1.25rem 0; z-index: 10;
}
.sb-logo {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  padding: 0 1.1rem 1.25rem; border-bottom: 1px solid var(--bd);
  color: var(--text2); margin-bottom: .75rem;
}
.sb-logo span { color: var(--accent); }
.sb-tenant { padding: 0 1.1rem .75rem; border-bottom: 1px solid var(--bd); margin-bottom: .75rem; }
.sb-tenant-lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); margin-bottom: .25rem; }
.sb-tenant-name { font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-tenant-dom  { font-size: .7rem; color: var(--text2); font-family: var(--mono); }
.nav-lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text2); padding: .4rem .6rem .25rem 1.1rem; }
.nav-item {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem;
  margin: 0 .4rem; border-radius: 6px; font-size: .82rem;
  color: var(--text3); cursor: pointer; transition: all .12s; user-select: none;
}
.nav-item:hover { background: var(--bg4); color: var(--text); }
.nav-item.active { background: rgba(59,130,246,.1); color: var(--acc2); }
.nav-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.sb-footer {
  margin-top: auto; padding: .75rem 1.1rem 0;
  border-top: 1px solid var(--bd); display: flex; flex-direction: column; gap: .4rem;
}
.sb-user { font-size: .7rem; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── LAYOUT PRINCIPAL ────────────────────────────────────── */
.main { margin-left: var(--sw); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 48px; background: var(--bg2); border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 5;
}
.topbar-title { font-size: .85rem; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.content { padding: 1.5rem; flex: 1; }

/* ── VUES ────────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ── VUE D'ENSEMBLE — HAUT ───────────────────────────────── */
.home-top { display: grid; grid-template-columns: 260px 1fr; gap: 1.1rem; margin-bottom: 1.25rem; align-items: start; }

.score-panel {
  background: var(--bg2); border: 1px solid var(--bd); border-radius: 9px;
  padding: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .85rem;
}
.score-ring { position: relative; width: 120px; height: 120px; }
.score-ring svg { transform: rotate(-90deg); }
.score-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num   { font-family: var(--mono); font-size: 2.2rem; font-weight: 500; line-height: 1; }
.score-denom { font-size: .65rem; color: var(--text2); font-family: var(--mono); }
.score-label { font-size: .75rem; font-weight: 500; padding: .25rem .8rem; border-radius: 99px; }
.score-desc  { font-size: .75rem; color: var(--text2); text-align: center; line-height: 1.5; max-width: 180px; }

/* ── GRAPHIQUES ──────────────────────────────────────────── */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.25rem; }
.chart-panel { background: var(--bg2); border: 1px solid var(--bd); border-radius: 9px; padding: 1.1rem; }
.chart-title { font-size: .65rem; font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .85rem; }
.chart-wrap  { position: relative; height: 170px; }

/* ── INTUNE — PLATEFORMES ────────────────────────────────── */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .85rem; margin-bottom: 1.1rem; }
.platform-card { background: var(--bg2); border: 1px solid var(--bd); border-radius: 9px; padding: 1rem 1.1rem; cursor: pointer; transition: border-color .12s; }
.platform-card:hover { border-color: var(--bd2); }
.pc-top   { display: flex; align-items: center; justify-content: space-between; margin-bottom: .85rem; }
.pc-os    { font-size: .82rem; font-weight: 500; }
.pc-total { font-family: var(--mono); font-size: 1.5rem; font-weight: 500; color: var(--acc2); }
.pc-stats { display: flex; flex-direction: column; gap: .3rem; }
.pc-stat  { display: flex; justify-content: space-between; font-size: .75rem; }
.pc-stat span:first-child { color: var(--text2); }
.pc-stat span:last-child  { font-family: var(--mono); font-weight: 500; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 100; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--bd2); border-radius: 11px; width: 100%; max-width: 600px; max-height: 78vh; display: flex; flex-direction: column; }
.modal-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--bd); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-head h3 { font-size: .85rem; font-weight: 500; }
.modal-hr { display: flex; align-items: center; gap: .65rem; }
.modal-cnt { font-family: var(--mono); font-size: .7rem; color: var(--text2); }
.modal-x { background: none; border: none; color: var(--text2); font-size: 1.05rem; cursor: pointer; padding: .15rem; }
.modal-x:hover { color: var(--text); }
.modal-body { overflow-y: auto; flex: 1; }
.modal-row { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1.25rem; border-bottom: 1px solid var(--bd); gap: 1rem; }
.modal-row:last-child { border-bottom: none; }
.modal-row:hover { background: var(--bg3); }
.mr-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mr-name { font-size: .8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-sub  { font-size: .7rem; color: var(--text2); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-meta { font-size: .68rem; color: var(--text2); white-space: nowrap; flex-shrink: 0; }
