*{box-sizing:border-box}
:root{
  --orange:#F9650D;
  --orange2:#ff7a2f;
  --dark:#0b0b0b;
  --dark2:#151515;
  --bg:#f6f7f9;
  --card:#fff;
  --text:#18181b;
  --muted:#777;
  --border:#e7e7e9;
  --success:#249653;
  --danger:#d93535;
  --shadow:0 20px 50px rgba(0,0,0,.08);
  --radius:18px;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html,body{margin:0;min-height:100%;color:var(--text);background:var(--bg)}
button,input{font:inherit}
button{cursor:pointer}
.admin-app{min-height:100vh}
.app-shell{min-height:100vh;display:flex}
.sidebar{width:260px;background:linear-gradient(180deg,#0a0a0a,#161616);color:#fff;display:flex;flex-direction:column;padding:24px 18px;position:fixed;inset:0 auto 0 0;z-index:50}
.sidebar-brand{display:flex;align-items:center;gap:11px;padding:4px 6px 28px}
.sidebar-brand .brand-icon{width:42px;height:42px;border-radius:12px;background:var(--orange);display:grid;place-items:center;font-weight:800}
.sidebar-brand strong{display:block;font-size:14px;letter-spacing:.8px}
.sidebar-brand span{display:block;font-size:9px;color:rgba(255,255,255,.4);letter-spacing:1.2px;margin-top:2px}
.sidebar-nav{display:flex;flex-direction:column;gap:8px}
.nav-item{border:0;background:transparent;color:rgba(255,255,255,.65);padding:12px 13px;border-radius:11px;text-align:left;display:flex;gap:10px;align-items:center;transition:.2s}
.nav-item:hover,.nav-item.active{background:rgba(249,101,13,.12);color:#fff}
.nav-item.active{box-shadow:inset 3px 0 0 var(--orange)}
.sidebar-bottom{margin-top:auto}
.admin-user-box{display:flex;gap:10px;align-items:center;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.03)}
.avatar{width:36px;height:36px;border-radius:10px;background:rgba(249,101,13,.14);display:grid;place-items:center;color:#fff;font-weight:700}
.user-info{min-width:0}
.user-info strong,.user-info span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-info strong{font-size:11px}
.user-info span{font-size:9px;color:rgba(255,255,255,.38);margin-top:3px}
.logout-button{width:100%;margin-top:10px;border:1px solid rgba(255,255,255,.08);background:transparent;color:rgba(255,255,255,.7);padding:11px;border-radius:11px}
.logout-button:hover{background:#fff;color:#111}
.main-area{margin-left:260px;min-height:100vh;width:calc(100% - 260px)}
.topbar{height:88px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:30}
.eyebrow{display:block;font-size:9px;font-weight:800;letter-spacing:1.2px;color:var(--orange);margin-bottom:5px}
.topbar h1{font-size:25px;margin:0}
.topbar-actions{display:flex;gap:8px}
.content{padding:30px 34px 50px}
.global-message{display:none;margin-bottom:16px;padding:12px 14px;border-radius:12px;font-size:12px}
.global-message.success{display:block;background:#effaf2;color:#1f7c3d;border:1px solid #bfe4c9}
.global-message.error{display:block;background:#fff1f1;color:#b72e2e;border:1px solid #f0c4c4}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.stat-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;gap:14px;align-items:center;box-shadow:0 10px 25px rgba(0,0,0,.03)}
.stat-icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;font-size:20px}
.stat-icon.orange{background:rgba(249,101,13,.11)}
.stat-icon.blue{background:#eef4ff}
.stat-icon.green{background:#ebf8ef}
.stat-icon.dark{background:#f0f0f1}
.stat-card span{display:block;color:#888;font-size:10px;margin-bottom:5px}
.stat-card strong{display:block;font-size:25px;line-height:1}
.dashboard-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:18px;margin-top:18px}
.panel{background:#fff;border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 25px rgba(0,0,0,.03);overflow:hidden}
.panel-head{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 20px 0}
.panel-head h2{margin:0;font-size:16px}
.text-button{border:0;background:transparent;color:var(--orange);font-weight:700;font-size:11px}
.view{display:none}
.view.active{display:block}
.view-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px}
.view-head h2{margin:0;font-size:24px}
.view-head p{margin:6px 0 0;color:#838383;font-size:12px}
.view-tools{display:flex;gap:8px}
.search-input{width:310px;border:1px solid var(--border);background:#fff;border-radius:10px;padding:12px 13px;outline:none}
.search-input:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(249,101,13,.08)}
.secondary-button{border:1px solid var(--border);background:#fff;color:#222;padding:11px 13px;border-radius:10px;font-size:11px;font-weight:700}
.secondary-button:hover{border-color:#ccc;background:#fafafa}
.danger-button{border:0;background:var(--danger);color:#fff;padding:11px 13px;border-radius:10px;font-size:11px;font-weight:700}
.table-wrap{padding:8px 14px 14px}
.table-scroll{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:720px}
th,td{padding:13px 8px;border-bottom:1px solid #f0f0f1;text-align:left;font-size:11px;white-space:nowrap}
th{font-size:9px;text-transform:uppercase;letter-spacing:.8px;color:#999}
td strong{font-size:11px}
td a{color:#333;text-decoration:none}
td a:hover{color:var(--orange)}
.pill{display:inline-flex;padding:6px 8px;border-radius:7px;background:rgba(249,101,13,.08);color:var(--orange);font-size:9px;font-weight:700}
.delete-row{border:0;background:transparent;color:#888;padding:7px;border-radius:8px}
.delete-row:hover{background:#fff0f0;color:var(--danger)}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:60px 20px;color:#888}
.empty-state.compact{padding:40px 20px}
.empty-icon{font-size:28px;margin-bottom:4px}
.empty-state strong{color:#333;font-size:12px}
.empty-state span{font-size:10px}
.distribution{padding:25px 22px}
.distribution-row{margin-bottom:24px}
.distribution-row:last-child{margin-bottom:0}
.distribution-row>div:first-child{display:flex;justify-content:space-between;font-size:11px;margin-bottom:8px}
.distribution-row strong{color:#222}
.bar{height:8px;border-radius:20px;background:#ececef;overflow:hidden}
.bar span{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,var(--orange),var(--orange2));width:0}
.confirm-modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:20px}
.confirm-modal.active{display:flex}
.confirm-overlay{position:absolute;inset:0;background:rgba(0,0,0,.65);backdrop-filter:blur(6px)}
.confirm-card{position:relative;z-index:2;width:100%;max-width:380px;background:#fff;border-radius:18px;padding:28px;box-shadow:0 30px 90px rgba(0,0,0,.35);text-align:center}
.confirm-icon{width:48px;height:48px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#fff2f2;color:var(--danger);font-weight:800}
.confirm-card h3{margin:0;font-size:18px}
.confirm-card p{color:#777;font-size:12px}
.confirm-actions{display:flex;justify-content:center;gap:8px;margin-top:18px}
.mobile-only{display:none}
.login-background{position:fixed;inset:0;overflow:hidden;background:linear-gradient(180deg,#080808,#111)}
.login-orb{position:absolute;border:1px solid rgba(249,101,13,.12);border-radius:50%}
.login-orb-1{width:700px;height:700px;top:-500px;left:50%;transform:translateX(-50%)}
.login-orb-2{width:420px;height:420px;right:-240px;bottom:-250px}
.login-wrapper{min-height:100vh;display:grid;place-items:center;padding:20px;position:relative;z-index:2}
.login-card{width:100%;max-width:430px;padding:34px;border:1px solid rgba(255,255,255,.09);border-radius:24px;background:rgba(255,255,255,.045);backdrop-filter:blur(16px);box-shadow:0 30px 100px rgba(0,0,0,.45);color:#fff}
.login-brand{display:flex;gap:11px;align-items:center;margin-bottom:34px}
.brand-icon{width:43px;height:43px;border-radius:12px;background:var(--orange);display:grid;place-items:center;font-weight:800}
.login-brand strong,.login-brand span{display:block}
.login-brand strong{font-size:14px;letter-spacing:.8px}
.login-brand span{font-size:9px;letter-spacing:1.2px;color:rgba(255,255,255,.4);margin-top:2px}
.login-header{text-align:center;margin-bottom:25px}
.login-lock{font-size:30px;margin-bottom:8px}
.login-header h1{margin:0;font-size:28px}
.login-header p{margin:8px 0 0;color:rgba(255,255,255,.55);font-size:12px;line-height:1.6}
.input-group{margin-bottom:15px}
.input-group label{display:block;margin-bottom:7px;font-size:10px;font-weight:700}
.input-wrapper{height:52px;border:1px solid rgba(255,255,255,.12);border-radius:11px;background:rgba(255,255,255,.04);display:flex;align-items:center}
.input-wrapper>span{margin:0 11px;color:var(--orange)}
.input-wrapper input{width:100%;height:100%;border:0;outline:0;background:transparent;color:#fff;padding:0 12px 0 0}
.input-wrapper input::placeholder{color:rgba(255,255,255,.3)}
.password-toggle{border:0;background:transparent;color:#fff;padding:0 13px}
.login-button{width:100%;height:54px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff;font-weight:800;cursor:pointer}
.login-button:disabled{opacity:.7}
.button-loader{display:none}
.login-message{display:none;margin:0 0 12px;padding:10px 12px;border-radius:10px;font-size:10px}
.login-message.error{display:block;background:#fff0f0;color:#ffb3b3}
.login-message.success{display:block;background:#ecfff1;color:#0b6d2a}
.login-footer{display:flex;justify-content:space-between;margin-top:18px;color:rgba(255,255,255,.3);font-size:9px}
@media(max-width:1050px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:800px){
  .sidebar{transform:translateX(-100%);transition:.25s ease}
  .sidebar.open{transform:translateX(0)}
  .main-area{margin-left:0;width:100%}
  .mobile-only{display:inline-flex}
  .topbar{padding:0 18px;gap:10px}
  .content{padding:20px}
  .view-head{flex-direction:column;align-items:stretch}
  .view-tools{width:100%}
  .search-input{width:100%}
}
@media(max-width:560px){
  .stats-grid{grid-template-columns:1fr}
  .topbar{height:76px}
  .topbar h1{font-size:20px}
  .topbar-actions .secondary-button{font-size:9px;padding:9px 10px}
  .login-card{padding:26px 20px}
}


/* ============================================================
   MFACADEMY ANALYTICS
============================================================ */

.analytics-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}

.analytics-header h2 {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
}

.analytics-header p {
  margin-top: 6px;
  color: #7b8495;
  font-size: 13px;
}

.analytics-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analytics-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #687386;
  white-space: nowrap;
}

.analytics-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.10);
}

.analytics-status.loading span {
  background: #f59e0b;
}

.analytics-status.error span {
  background: #ef4444;
}


/* ============================================================
   STATISTIQUES
============================================================ */

.analytics-stats-grid {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 15px;
  margin-bottom: 20px;
}

.analytics-stat-card {
  min-height: 130px;
  padding: 20px;

  display: flex;
  align-items: flex-start;
  gap: 15px;

  background: #fff;

  border: 1px solid rgba(16,24,39,.08);
  border-radius: 18px;

  box-shadow:
    0 8px 30px rgba(9,14,28,.04);
}

.analytics-stat-icon {
  width: 44px;
  height: 44px;

  flex: none;

  display: grid;
  place-items: center;

  border-radius: 13px;

  font-size: 19px;
}

.analytics-stat-icon.orange {
  background: rgba(255,138,0,.11);
}

.analytics-stat-icon.green {
  background: rgba(34,197,94,.11);
}

.analytics-stat-icon.blue {
  background: rgba(59,130,246,.11);
}

.analytics-stat-icon.purple {
  background: rgba(139,92,246,.11);
}

.analytics-stat-icon.dark {
  background: rgba(15,23,42,.08);
}

.analytics-stat-card span {
  display: block;
  color: #7b8495;
  font-size: 11px;
  font-weight: 600;
}

.analytics-stat-card strong {
  display: block;
  margin-top: 6px;

  font-size: 27px;
  font-weight: 800;
  color: #101827;
}

.analytics-stat-card small {
  display: block;
  margin-top: 3px;

  color: #a0a7b4;
  font-size: 9px;
}


/* ============================================================
   GRILLES
============================================================ */

.analytics-main-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.7fr)
    minmax(300px, .9fr);

  gap: 20px;

  margin-bottom: 20px;
}


/* ============================================================
   GRAPHIQUE
============================================================ */

.analytics-chart-panel {
  min-height: 330px;
}

.analytics-chart {
  height: 240px;
  padding: 20px 10px 0;
}

.chart-bars {
  height: 100%;

  display: flex;
  align-items: flex-end;

  gap: 12px;
}

.chart-column {
  flex: 1;

  height: 100%;

  display: flex;
  flex-direction: column;

  justify-content: flex-end;
  align-items: center;

  gap: 8px;
}

.chart-value {
  font-size: 9px;
  font-weight: 800;
  color: #687386;
}

.chart-bar {
  width: 100%;
  max-width: 55px;

  min-height: 4px;

  border-radius:
    8px 8px 3px 3px;

  background:
    linear-gradient(
      to top,
      #ff8a00,
      #ffb24a
    );

  transition:
    height .5s ease;
}

.chart-label {
  font-size: 9px;
  color: #929baa;
}


/* ============================================================
   LISTES
============================================================ */

.analytics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analytics-list-row {
  display: grid;

  grid-template-columns:
    120px 1fr 45px;

  align-items: center;

  gap: 10px;
}

.analytics-list-name {
  font-size: 11px;
  font-weight: 700;
  color: #455063;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-list-bar {
  height: 7px;

  overflow: hidden;

  border-radius: 20px;

  background: #eef1f5;
}

.analytics-list-bar span {
  display: block;

  height: 100%;

  border-radius: inherit;

  background: #ff8a00;

  transition: width .5s ease;
}

.analytics-list-number {
  text-align: right;

  font-size: 10px;
  font-weight: 800;

  color: #687386;
}


/* ============================================================
   PAGES
============================================================ */

.analytics-pages-panel {
  margin-bottom: 20px;
}

.analytics-page-row {
  display: grid;

  grid-template-columns:
    40px minmax(0,1fr) 100px;

  align-items: center;

  gap: 15px;

  padding: 13px 8px;

  border-bottom:
    1px solid rgba(16,24,39,.06);
}

.analytics-page-row:last-child {
  border-bottom: 0;
}

.analytics-page-rank {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: #f4f6f8;

  color: #687386;

  font-size: 10px;
  font-weight: 800;
}

.analytics-page-info {
  min-width: 0;
}

.analytics-page-title {
  font-size: 11px;
  font-weight: 800;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-page-url {
  margin-top: 3px;

  color: #a0a7b4;

  font-size: 9px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-page-count {
  text-align: right;

  font-size: 11px;
  font-weight: 800;
}


/* ============================================================
   ACTIVITÉ
============================================================ */

.analytics-activity {
  display: flex;
  flex-direction: column;
}

.analytics-activity-row {
  display: flex;

  align-items: center;

  gap: 12px;

  padding: 13px 5px;

  border-bottom:
    1px solid rgba(16,24,39,.06);
}

.analytics-activity-row:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 9px;
  height: 9px;

  flex: none;

  border-radius: 50%;

  background: #22c55e;

  box-shadow:
    0 0 0 4px rgba(34,197,94,.09);
}

.activity-info {
  min-width: 0;
  flex: 1;
}

.activity-title {
  font-size: 11px;
  font-weight: 700;
}

.activity-details {
  margin-top: 3px;

  color: #929baa;

  font-size: 9px;
}

.activity-time {
  color: #a0a7b4;
  font-size: 9px;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1200px) {

  .analytics-stats-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 850px) {

  .analytics-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-main-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {

  .analytics-stats-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .analytics-stat-card {
    padding: 15px;
  }

  .analytics-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .analytics-stat-card strong {
    font-size: 22px;
  }

  .analytics-list-row {
    grid-template-columns:
      95px 1fr 35px;
  }

  .analytics-page-row {
    grid-template-columns:
      35px minmax(0,1fr) 60px;
  }

}

@media (max-width: 420px) {

  .analytics-stats-grid {
    grid-template-columns: 1fr;
  }

  .analytics-actions {
    width: 100%;
    justify-content: space-between;
  }

}

/* ============================================================
   SESSIONS EN DIRECT — ADMIN
============================================================ */

.direct-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.direct-modal.active{
  display:flex;
}

.direct-modal-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}

.direct-modal-card{
  position:relative;
  z-index:2;
  width:min(760px,100%);
  max-height:92vh;
  overflow-y:auto;
  padding:26px;
  border:1px solid var(--border);
  border-radius:20px;
  background:#fff;
  box-shadow:0 30px 90px rgba(0,0,0,.28);
}

.direct-modal-close{
  position:absolute;
  top:13px;
  right:13px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#f3f3f4;
  color:#222;
  font-size:20px;
  line-height:1;
}

.direct-modal-close:hover{
  background:var(--orange);
  color:#fff;
}

.direct-modal-header{
  padding-right:48px;
  margin-bottom:20px;
}

.direct-modal-header h2{
  margin:4px 0 0;
  font-size:22px;
}

.direct-modal-header p{
  margin:6px 0 0;
  color:#777;
  font-size:11px;
  line-height:1.5;
}

.direct-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.direct-field-full{
  grid-column:1/-1;
}

.direct-field label{
  display:block;
  margin-bottom:6px;
  font-size:10px;
  font-weight:800;
}

.direct-field input,
.direct-field select,
.direct-field textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:10px;
  outline:none;
  background:#fafafa;
  color:#222;
  padding:11px 12px;
  font-size:11px;
}

.direct-field input,
.direct-field select{
  height:44px;
}

.direct-field textarea{
  min-height:110px;
  resize:vertical;
}

.direct-field input:focus,
.direct-field select:focus,
.direct-field textarea:focus{
  border-color:var(--orange);
  background:#fff;
  box-shadow:0 0 0 3px rgba(249,101,13,.08);
}

.direct-form-message{
  display:none;
  margin-top:14px;
  padding:11px 12px;
  border-radius:9px;
  font-size:10px;
}

.direct-form-message.show{
  display:block;
}

.direct-form-message.error{
  background:#fff1f1;
  color:#b72e2e;
  border:1px solid #f0c4c4;
}

.direct-form-message.success{
  background:#effaf2;
  color:#1f7c3d;
  border:1px solid #bfe4c9;
}

.direct-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:18px;
}

.direct-action-group{
  display:flex;
  gap:5px;
  justify-content:flex-end;
}

.direct-action{
  width:32px;
  height:32px;
  border:0;
  border-radius:8px;
  background:#f3f4f6;
  color:#667085;
}

.direct-action:hover{
  background:rgba(249,101,13,.09);
  color:var(--orange);
}

.direct-status{
  display:inline-flex;
  align-items:center;
  padding:5px 8px;
  border-radius:7px;
  font-size:9px;
  font-weight:800;
}

.direct-status-a_venir{
  background:#fff7d6;
  color:#8a6100;
}

.direct-status-en_direct{
  background:#e9f8ef;
  color:#18783b;
}

.direct-status-terminee{
  background:#eef1f5;
  color:#667085;
}

@media(max-width:700px){
  .direct-modal{
    padding:10px;
  }

  .direct-modal-card{
    padding:20px 16px;
    border-radius:16px;
  }

  .direct-form-grid{
    grid-template-columns:1fr;
  }

  .direct-field-full{
    grid-column:auto;
  }

  .direct-modal-actions{
    flex-direction:column;
  }

  .direct-modal-actions button{
    width:100%;
  }
}





/* =========================================================
   RETOUR AU SITE
========================================================= */

.back-to-site-button {

  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  margin-bottom: 10px;

  padding: 11px 14px;

  border:
    1px solid
    rgba(249,101,13,.20);

  border-radius: 9px;

  background:
    rgba(249,101,13,.06);

  color:
    #f9650d;

  font-size: 11px;

  font-weight: 700;

  text-decoration: none;

  transition:
    .2s ease;
}


.back-to-site-button:hover {

  color: #fff;

  background: #f9650d;

  border-color: #f9650d;

  transform: translateY(-1px);

}