/* RAFFINSTOCK v6.0.0 — Académie Industrielle & Universitaire PARC3D (css/academy-pro.css)
   Compatible thème Nuit & thème Clair via variables CSS de l'application */

/* Rend tous les onglets de l'Académie & Formation immédiatement visibles sur bureau */
@media (min-width: 768px) {
  .fp-app .fp-nav { flex-wrap: wrap; overflow-x: visible; }
  .fp-app .fp-ntab { padding: 8px 12px; font-size: 12.5px; }
}

.ap-wrap { display: flex; flex-direction: column; gap: 16px; color: var(--text, #e8eef7); }

/* Bannière académie */
.ap-banner {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 20px 22px; border-radius: 18px;
  background: linear-gradient(135deg, #0b1c38 0%, #102b4f 52%, #0e3852 100%);
  color: #f8fafc; border: 1px solid rgba(56, 189, 248, .35);
  box-shadow: 0 12px 32px rgba(2, 6, 23, .28);
}
.ap-banner.compact { padding: 16px 20px; }
.ap-banner-main { flex: 1; min-width: 280px; }
.ap-banner-main h3 { margin: 8px 0 6px; font-size: 20px; line-height: 1.25; color: #fff; }
.ap-banner-main p { margin: 0 0 8px; font-size: 13.5px; color: #cbd5e1; line-height: 1.5; }
.ap-disclaimer {
  font-size: 11.5px; color: #fde68a; background: rgba(245, 158, 11, .14);
  border: 1px solid rgba(245, 158, 11, .32); border-radius: 10px;
  padding: 8px 11px; line-height: 1.45; margin-top: 8px;
}
.ap-banner-side {
  display: flex; flex-direction: column; gap: 10px; justify-content: center;
  min-width: 240px; align-items: stretch;
}
.ap-mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ap-mini-kpis > div {
  background: rgba(2, 6, 23, .45); border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 12px; padding: 8px 10px; text-align: center;
}
.ap-mini-kpis b { display: block; font-size: 18px; color: #38bdf8; }
.ap-mini-kpis small { font-size: 10.5px; color: #cbd5e1; }

/* Pills & Badges */
.ap-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .03em;
}
.ap-pill.cyan { background: rgba(56, 189, 248, .22); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .38); }
.ap-pill.gold { background: rgba(245, 158, 11, .2); color: #fde047; border: 1px solid rgba(245, 158, 11, .4); }
.ap-pill.soft { background: rgba(148, 163, 184, .18); color: var(--text, #e2e8f0); border: 1px solid var(--border, rgba(148, 163, 184, .25)); }

.ap-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.ap-badge.pilot { background: rgba(245, 158, 11, .2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .45); }
.ap-badge.st-validated { background: rgba(34, 197, 94, .16); color: #4ade80; border: 1px solid rgba(34, 197, 94, .38); }
.ap-badge.st-published { background: rgba(56, 189, 248, .16); color: #38bdf8; border: 1px solid rgba(56, 189, 248, .38); }
.ap-badge.st-review { background: rgba(245, 158, 11, .16); color: #f59e0b; border: 1px solid rgba(245, 158, 11, .38); }
.ap-badge.st-draft { background: rgba(148, 163, 184, .18); color: #94a3b8; border: 1px solid rgba(148, 163, 184, .35); }
.ap-badge.st-archived { background: rgba(100, 116, 139, .18); color: #64748b; border: 1px solid rgba(100, 116, 139, .35); }

/* Sous-navigation */
.ap-subnav {
  display: flex; gap: 6px; overflow-x: auto; padding: 5px;
  background: var(--bg-surface, rgba(15, 23, 42, .8));
  border: 1px solid var(--border, rgba(148, 163, 184, .22)); border-radius: 13px;
}
.ap-subtab {
  appearance: none; border: none; background: transparent; color: var(--text-soft, #94a3b8);
  padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.ap-subtab:hover { background: rgba(56, 189, 248, .12); color: var(--text, #fff); }
.ap-subtab.active { background: #0284c7; color: #fff; box-shadow: 0 3px 12px rgba(2, 132, 199, .35); }

/* Boutons & champs */
.ap-btn {
  appearance: none; border: 1px solid var(--border, rgba(148, 163, 184, .3)); border-radius: 10px;
  padding: 9px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--bg-elevated, #1e293b); color: var(--text, #f1f5f9);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: .15s;
}
.ap-btn:hover:not(:disabled) { border-color: #38bdf8; transform: translateY(-1px); }
.ap-btn:disabled { opacity: .45; cursor: not-allowed; }
.ap-btn.primary { background: linear-gradient(135deg, #0284c7, #0ea5e9); color: #fff; border-color: #38bdf8; }
.ap-btn.ok { background: rgba(16, 185, 129, .2); color: #34d399; border-color: rgba(16, 185, 129, .45); }
.ap-btn.ghost { background: transparent; }
.ap-btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.ap-btn.xs { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }
.ap-btn.block { width: 100%; }

.ap-input, .ap-select, .ap-textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg-surface, #0f172a); color: var(--text, #f1f5f9);
  border: 1px solid var(--border, rgba(148, 163, 184, .3)); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; font-family: inherit;
}
.ap-select.sm { width: auto; padding: 5px 8px; font-size: 12px; }
.ap-textarea { resize: vertical; line-height: 1.5; }
.ap-muted { color: var(--text-soft, #94a3b8); font-size: 12.5px; }

/* Cartes 5 Filières */
.ap-tracks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ap-track-card {
  background: var(--bg-surface, rgba(15, 23, 42, .85));
  border: 1px solid var(--border, rgba(148, 163, 184, .22));
  border-top: 4px solid var(--tc, #38bdf8); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px; transition: .18s;
}
.ap-track-card.active { border-color: var(--tc, #38bdf8); box-shadow: 0 0 0 2px rgba(56, 189, 248, .25); }
.ap-track-top { display: flex; justify-content: space-between; align-items: center; }
.ap-track-ico { font-size: 24px; }
.ap-track-cnt { font-size: 11.5px; font-weight: 800; color: var(--tc, #38bdf8); background: rgba(148, 163, 184, .12); padding: 3px 8px; border-radius: 999px; }
.ap-track-card h4 { margin: 0; font-size: 15px; line-height: 1.25; }
.ap-track-card p { margin: 0; font-size: 12px; color: var(--text-soft, #94a3b8); line-height: 1.45; flex: 1; }
.ap-track-foot { display: flex; gap: 6px; justify-content: space-between; margin-top: 4px; }

/* Barre filtres */
.ap-filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 8px; }
.ap-results-bar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-soft, #94a3b8); }

/* Grille matières */
.ap-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ap-ccard {
  background: var(--bg-surface, rgba(15, 23, 42, .88));
  border: 1px solid var(--border, rgba(148, 163, 184, .22));
  border-left: 4px solid var(--tc, #38bdf8); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.ap-ccard.passed { border-color: rgba(34, 197, 94, .5); }
.ap-ccard-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.ap-code { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 800; color: #38bdf8; }
.ap-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.ap-ccard h5 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.ap-cmeta { font-size: 11.5px; color: var(--text-soft, #94a3b8); }
.ap-csum { margin: 0; font-size: 12.5px; color: var(--text-soft, #cbd5e1); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.ap-cprog { display: flex; flex-direction: column; gap: 3px; }
.ap-cprog small { font-size: 11px; color: var(--text-soft, #94a3b8); }
.ap-cbar { height: 7px; border-radius: 999px; background: rgba(148, 163, 184, .2); overflow: hidden; }
.ap-cbar i { display: block; height: 100%; background: linear-gradient(90deg, #0ea5e9, #34d399); border-radius: 999px; }
.ap-c3d-tag { font-size: 11px; color: #7dd3fc; background: rgba(14, 165, 233, .12); border: 1px solid rgba(14, 165, 233, .25); padding: 4px 8px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ccard-acts { display: flex; gap: 6px; margin-top: 2px; }
.ap-ccard-acts .primary { flex: 1; }
.ap-empty { padding: 32px; text-align: center; background: var(--bg-surface, rgba(15, 23, 42, .6)); border-radius: 14px; color: var(--text-soft, #94a3b8); grid-column: 1 / -1; }

/* Parcours Ingénieur en Raffinage L1–M2 */
.ap-prog-box {
  background: var(--bg-surface, rgba(15, 23, 42, .85));
  border: 1px solid var(--border, rgba(148, 163, 184, .22)); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.ap-prog-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-prog-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.ap-prog-head h4 { margin: 6px 0 4px; font-size: 18px; }
.ap-prog-notice { margin: 4px 0 0; font-size: 12px; color: #f59e0b; max-width: 720px; line-height: 1.45; }
.ap-prog-stat { text-align: right; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.ap-prog-stat b { font-size: 24px; color: #38bdf8; }
.ap-year-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ap-ypill {
  appearance: none; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--bg-elevated, rgba(30, 41, 59, .8)); color: var(--text, #e2e8f0);
  border: 1px solid var(--border, rgba(148, 163, 184, .22));
}
.ap-ypill.active { background: #0284c7; color: #fff; border-color: #38bdf8; }
.ap-ypill b { display: block; font-size: 13.5px; }
.ap-ypill small { font-size: 11px; opacity: .85; }
.ap-yr-detail h5 { margin: 0 0 10px; font-size: 15px; color: #38bdf8; }
.ap-sem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ap-sem-col { background: var(--bg-elevated, rgba(30, 41, 59, .55)); border: 1px solid var(--border, rgba(148, 163, 184, .2)); border-radius: 12px; padding: 12px; }
.ap-sem-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 800; font-size: 13px; }
.ap-sem-list { display: flex; flex-direction: column; gap: 7px; }
.ap-sem-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--bg-surface, rgba(15, 23, 42, .75));
  border: 1px solid var(--border, rgba(148, 163, 184, .18));
}
.ap-sem-item.done { border-color: rgba(34, 197, 94, .45); }
.ap-sem-item b { display: block; font-size: 13px; }
.ap-sem-item small { font-size: 11.5px; color: var(--text-soft, #94a3b8); }

/* Salle de cours numérique */
.ap-room { display: flex; flex-direction: column; gap: 14px; }
.ap-room-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-room-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-room-head {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 16px;
  background: linear-gradient(135deg, #0b1c38, #122e52); color: #fff;
  border: 1px solid rgba(56, 189, 248, .32);
}
.ap-room-head-l { flex: 1; min-width: 280px; }
.ap-room-head h3 { margin: 8px 0 6px; font-size: 21px; color: #fff; }
.ap-room-head p { margin: 0; font-size: 13.5px; color: #cbd5e1; line-height: 1.5; }
.ap-room-3d {
  min-width: 260px; max-width: 340px; padding: 12px 14px; border-radius: 12px;
  background: rgba(2, 6, 23, .48); border: 1px solid rgba(56, 189, 248, .35);
  display: flex; flex-direction: column; gap: 7px; justify-content: center;
}
.ap-sim-badge { font-size: 10.5px; font-weight: 800; color: #fde047; letter-spacing: .04em; text-transform: uppercase; }
.ap-room-3d b { font-size: 12.5px; color: #e2e8f0; }

.ap-room-layout { display: grid; grid-template-columns: 310px 1fr; gap: 14px; align-items: start; }
.ap-room-side {
  background: var(--bg-surface, rgba(15, 23, 42, .88));
  border: 1px solid var(--border, rgba(148, 163, 184, .22)); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.ap-side-prog > div:first-child { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.ap-side-nav { display: flex; flex-direction: column; gap: 5px; }
.ap-snav-btn {
  appearance: none; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
  background: transparent; color: var(--text, #e2e8f0); border: 1px solid var(--border, rgba(148, 163, 184, .2)); cursor: pointer;
}
.ap-snav-btn.active { background: #0284c7; color: #fff; border-color: #38bdf8; }
.ap-toc-title { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--text-soft, #94a3b8); margin-bottom: 6px; }
.ap-toc-ch { margin-bottom: 10px; }
.ap-toc-ch-h { font-size: 12px; font-weight: 800; color: #38bdf8; margin-bottom: 4px; }
.ap-toc-les {
  display: flex; align-items: flex-start; gap: 7px; width: 100%; text-align: left;
  padding: 7px 9px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--text, #e2e8f0); font-size: 12px; cursor: pointer; margin-bottom: 3px;
}
.ap-toc-les em { font-style: normal; line-height: 1.35; }
.ap-toc-les:hover { background: rgba(56, 189, 248, .12); }
.ap-toc-les.active { background: rgba(14, 165, 233, .22); border-color: rgba(56, 189, 248, .45); font-weight: 700; }
.ap-toc-les.done span { color: #34d399; font-weight: 900; }

/* Panneaux contenu */
.ap-card-pane {
  background: var(--bg-surface, rgba(15, 23, 42, .88));
  border: 1px solid var(--border, rgba(148, 163, 184, .22)); border-radius: 14px;
  padding: 18px 20px;
}
.ap-card-pane h4 { margin: 0 0 12px; font-size: 17px; }
.ap-card-pane h5 { margin: 0 0 8px; font-size: 14px; color: #38bdf8; }
.ap-pane-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ap-les-kicker { font-size: 11.5px; font-weight: 800; color: #f59e0b; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.ap-sec-block { margin-top: 16px; }
.ap-para { font-size: 14px; line-height: 1.65; margin: 0 0 10px; }
.ap-def-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ap-def { padding: 10px 12px; border-radius: 10px; background: var(--bg-elevated, rgba(30, 41, 59, .65)); border: 1px solid var(--border, rgba(148, 163, 184, .2)); }
.ap-def b { display: block; font-size: 12.5px; color: #38bdf8; margin-bottom: 4px; }
.ap-def p { margin: 0; font-size: 12.5px; line-height: 1.45; }

/* Formules mathématiques */
.ap-formula-box {
  padding: 14px 16px; border-radius: 12px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(14, 116, 144, .18), rgba(15, 23, 42, .75));
  border: 1px solid rgba(56, 189, 248, .4);
}
.ap-formula-name { font-size: 12.5px; font-weight: 800; color: #fde047; margin-bottom: 6px; }
.ap-formula-eq {
  font-family: 'JetBrains Mono', monospace; font-size: 14.5px; font-weight: 700;
  color: #fff; background: rgba(2, 6, 23, .55); padding: 10px 12px; border-radius: 8px;
  margin-bottom: 8px; overflow-x: auto;
}
.ap-formula-meta { font-size: 12.5px; line-height: 1.5; margin-bottom: 4px; }
.ap-formula-ex {
  font-size: 12.5px; line-height: 1.5; margin-top: 6px; padding: 8px 10px; border-radius: 8px;
  background: rgba(16, 185, 129, .14); border-left: 3px solid #34d399;
}

/* Exercice corrigé */
.ap-exo-box { padding: 12px 14px; border-radius: 12px; background: var(--bg-elevated, rgba(30, 41, 59, .65)); border: 1px solid var(--border, rgba(148, 163, 184, .24)); }
.ap-exo-sol { margin-top: 8px; }
.ap-exo-sol summary { cursor: pointer; font-weight: 700; color: #38bdf8; font-size: 13px; }
.ap-exo-res { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(34, 197, 94, .16); color: #4ade80; display: inline-block; font-size: 13px; }

.ap-list { margin: 6px 0 12px; padding-left: 20px; font-size: 13.5px; line-height: 1.6; }
.ap-list li { margin-bottom: 5px; }
.ap-chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: rgba(56, 189, 248, .15); color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, .3);
}
.ap-chip.soft { background: rgba(148, 163, 184, .16); color: var(--text, #e2e8f0); border-color: var(--border, rgba(148, 163, 184, .25)); }
.ap-chip.click { cursor: pointer; }
.ap-les-footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border, rgba(148, 163, 184, .2)); }

/* SVG */
.ap-svg-box { overflow-x: auto; }
.ap-svg { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto; }

/* Évaluation multi-formats */
.ap-eval-list { display: flex; flex-direction: column; gap: 12px; }
.ap-qcard { padding: 14px; border-radius: 12px; background: var(--bg-elevated, rgba(30, 41, 59, .65)); border: 1px solid var(--border, rgba(148, 163, 184, .22)); }
.ap-qcard.is-ok { border-color: #22c55e; }
.ap-qcard.is-ko { border-color: #ef4444; }
.ap-qtxt { margin: 8px 0 10px; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.ap-opts { display: flex; flex-direction: column; gap: 6px; }
.ap-opt {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--bg-surface, rgba(15, 23, 42, .65)); border: 1px solid var(--border, rgba(148, 163, 184, .18));
  cursor: pointer; font-size: 13px;
}
.ap-calc-row { display: flex; align-items: center; gap: 8px; max-width: 300px; }
.ap-qfb { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: rgba(15, 23, 42, .7); color: #e2e8f0; }
.ap-eval-foot { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ap-res-banner {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
.ap-res-banner.ok { background: rgba(34, 197, 94, .16); border: 1px solid rgba(34, 197, 94, .45); }
.ap-res-banner.ko { background: rgba(239, 68, 68, .16); border: 1px solid rgba(239, 68, 68, .45); }
.ap-res-banner p { margin: 4px 0 0; font-size: 13px; }

/* Bibliothèque, Apprenant & Admin */
.ap-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ap-lib-card {
  background: var(--bg-surface, rgba(15, 23, 42, .88));
  border: 1px solid var(--border, rgba(148, 163, 184, .22)); border-radius: 14px;
  padding: 15px; display: flex; flex-direction: column; gap: 8px;
}
.ap-lib-ico { font-size: 26px; }
.ap-lib-card h5 { margin: 0; font-size: 15px; }
.ap-lib-card p { margin: 0; font-size: 12.5px; color: var(--text-soft, #94a3b8); line-height: 1.45; flex: 1; }
.ap-eq-list { display: flex; flex-direction: column; gap: 5px; }
.ap-eq-list code {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  padding: 6px 9px; border-radius: 7px; background: rgba(2, 6, 23, .55); color: #7dd3fc;
}
.ap-schemas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }
.ap-ref-list { display: flex; flex-direction: column; gap: 8px; }
.ap-ref-item { padding: 10px 12px; border-radius: 10px; background: var(--bg-elevated, rgba(30, 41, 59, .6)); border: 1px solid var(--border, rgba(148, 163, 184, .2)); }
.ap-ref-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; font-size: 13px; }

.ap-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ap-kpi {
  background: var(--bg-surface, rgba(15, 23, 42, .88));
  border: 1px solid var(--border, rgba(148, 163, 184, .22)); border-radius: 14px;
  padding: 14px; text-align: center;
}
.ap-kpi b { display: block; font-size: 22px; color: #38bdf8; }
.ap-kpi span { font-size: 12px; color: var(--text-soft, #94a3b8); }
.ap-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.ap-track-bars { display: flex; flex-direction: column; gap: 10px; }
.ap-tbar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; gap: 8px; }
.ap-cert-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-hist-list { display: flex; flex-direction: column; gap: 6px; }
.ap-hitem {
  display: grid; grid-template-columns: 125px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 9px; font-size: 12px;
  background: var(--bg-elevated, rgba(30, 41, 59, .6)); border-left: 3px solid #38bdf8;
}
.ap-hitem.ok { border-left-color: #22c55e; }
.ap-hitem.ko { border-left-color: #ef4444; }
.ap-hitem em { font-style: normal; font-weight: 700; }

/* Admin Studio */
.ap-adm-table { display: flex; flex-direction: column; gap: 8px; }
.ap-adm-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg-elevated, rgba(30, 41, 59, .65));
  border: 1px solid var(--border, rgba(148, 163, 184, .2));
}
.ap-adm-row b { display: block; font-size: 13px; }
.ap-adm-row small { font-size: 11.5px; color: var(--text-soft, #94a3b8); }
.ap-adm-ctrls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.ap-form { display: flex; flex-direction: column; gap: 12px; }
.ap-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; }
.ap-fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ap-chk { flex-direction: row !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.ap-chk input { width: auto; }
.ap-note-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

/* Responsive tablette & smartphone */
@media (max-width: 960px) {
  .ap-filters { grid-template-columns: 1fr 1fr; }
  .ap-filters #apSearch { grid-column: 1 / -1; }
  .ap-room-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ap-filters { grid-template-columns: 1fr; }
  .ap-hitem { grid-template-columns: 1fr; }
  .ap-schemas-grid { grid-template-columns: 1fr; }
  .ap-banner { padding: 14px; }
  .ap-banner-main h3 { font-size: 17px; }
}
