* {
  box-sizing: border-box;
}

:root {
  --bg-dark: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: rgba(37, 99, 235, 0.18);
  --green-soft: rgba(34, 197, 94, 0.16);
  --green-text: #bbf7d0;
  --red-soft: rgba(239, 68, 68, 0.16);
  --red-text: #fecaca;
  --yellow-soft: rgba(245, 158, 11, 0.16);
  --yellow-text: #fde68a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --sidebar-width: 250px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg-dark);
}

/* Fond vidÃ©o */
.video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-background .overlay,
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(2, 6, 23, 0.78),
    rgba(15, 23, 42, 0.78)
  );
}

/* App shell */
.app {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: rgba(3, 7, 18, 0.82);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.sidebar h2 {
  margin: 0 0 24px 0;
  font-size: 24px;
  color: var(--text);
}

.sidebar a {
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  transition: 0.25s ease;
  background: transparent;
  border: 1px solid transparent;
  font-weight: 600;
}

.sidebar a:hover {
  background: var(--blue-soft);
  border-color: rgba(96, 165, 250, 0.25);
  transform: translateX(3px);
}

.sidebar a svg {
  width: 18px;
  height: 18px;
}

.sidebar-bottom {
  margin-top: auto;
}

/* Contenu */
.content {
  flex: 1;
  padding: 32px;
}

.content h1 {
  margin: 0 0 28px 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.content h2 {
  margin: 0 0 18px 0;
  font-size: 28px;
}

.content h3 {
  margin: 0 0 10px 0;
  font-size: 22px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.card-stat {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.7s ease;
}

.card-stat svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: #93c5fd;
}

.card-stat h2 {
  margin: 0 0 6px 0;
  font-size: 34px;
  color: var(--text);
}

.card-stat p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Cartes catÃ©gories dashboard */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: 0.25s ease;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.7s ease;
}

.card:hover {
  transform: translateY(-6px);
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.28);
}

.card svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: #93c5fd;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Ancienne structure gÃ©nÃ©rale */
.page-shell,
.navbar,
.main-container {
  position: relative;
  z-index: 2;
}

.page-shell {
  min-height: 100vh;
  padding: 18px;
}

.navbar {
  max-width: 1400px;
  margin: 0 auto 18px auto;
  background: rgba(9, 14, 25, 0.72);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.nav-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.nav-subtitle {
  font-size: 13px;
  color: #94a3b8;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: #dbeafe;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link:hover {
  background: var(--blue-soft);
  color: #ffffff;
}

.nav-link-admin {
  background: var(--blue-soft);
  color: #ffffff;
}

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

/* Typo */
.eyebrow {
  margin: 0 0 10px 0;
  color: #93c5fd;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

h1,
h2,
h3 {
  margin: 0 0 12px 0;
}

h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  color: var(--text);
}

h2 {
  font-size: 28px;
  color: var(--text);
}

h3 {
  font-size: 22px;
  color: var(--text);
}

.hero-text,
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

/* Hero dashboard ancien layout */
.hero-dashboard {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.20),
    rgba(15, 23, 42, 0.18)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  gap: 14px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 14px;
  color: #bfdbfe;
  font-weight: 700;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
}

/* Dashboard panels */
.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}

.dashboard-card {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.dashboard-card-label {
  margin: 0 0 10px 0;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.category-link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Listes formations */
.formations-wrapper {
  margin-top: 10px;
}

.section-head {
  margin-bottom: 12px;
}

.category-section {
  margin-top: 30px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.category-header p {
  margin: 0;
  color: #bfdbfe;
  font-weight: 700;
  font-size: 14px;
}

.formations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid rgba(147, 197, 253, 0.15);
}

.card-status {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}

.status-open {
  background: var(--green-soft);
  color: var(--green-text);
  border: 1px solid rgba(134, 239, 172, 0.22);
}

.status-module {
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.status-locked {
  background: var(--red-soft);
  color: var(--red-text);
  border: 1px solid rgba(248, 113, 113, 0.18);
}

.card-meta {
  margin-bottom: 18px;
  font-size: 14px;
  color: #dbeafe;
  font-weight: 700;
}

.card-footer {
  display: flex;
}

/* Header page */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.badge {
  min-width: 120px;
  text-align: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.25);
  font-weight: 700;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #93c5fd;
  font-weight: 700;
}

.back-link:hover {
  color: #dbeafe;
  text-decoration: underline;
}

/* Boutons */
.btn,
button {
  appearance: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary,
button {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover,
button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-small {
  padding: 10px 14px;
  font-size: 13px;
}

.full-width {
  width: 100%;
}

/* Login / accÃ¨s */
.login-screen {
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(9, 14, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
}

.login-side {
  padding: 36px;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.20),
    rgba(15, 23, 42, 0.22)
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 18px;
  padding: 8px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.login-form-wrap {
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  width: 100%;
  max-width: 360px;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #e2e8f0;
}

.login-form input,
.admin-search {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.40);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 15px;
  outline: none;
}

.login-form input::placeholder,
.admin-search::placeholder {
  color: #cbd5e1;
}

.login-form input:focus,
.admin-search:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.error-message {
  min-height: 22px;
  margin: 12px 0 0 0;
  color: #fca5a5;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* PDF */
.pdf-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.pdf-viewer {
  width: 100%;
  height: 84vh;
  min-height: 950px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 18px;
  background: #ffffff;
}

.actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* QCM */
.question-block {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.question-block p {
  margin: 0 0 16px 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}

.question-help {
  margin: 0 0 14px 0;
  color: #93c5fd;
  font-size: 14px;
  font-style: italic;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  cursor: pointer;
  color: #e2e8f0;
}

.choice:hover {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(96, 165, 250, 0.30);
}

.choice input {
  transform: scale(1.15);
}

/* RÃ©sultats */
.result-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: 18px;
  font-weight: 700;
  border: 1px solid transparent;
}

.result-box h2 {
  margin: 0;
  font-size: 22px;
}

.result-box.success {
  background: var(--green-soft);
  color: var(--green-text);
  border-color: rgba(134, 239, 172, 0.22);
}

.result-box.medium {
  background: var(--yellow-soft);
  color: var(--yellow-text);
  border-color: rgba(252, 211, 77, 0.22);
}

.result-box.danger {
  background: var(--red-soft);
  color: var(--red-text);
  border-color: rgba(252, 165, 165, 0.22);
}

/* Admin */
.admin-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-table-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
}

.admin-table th {
  color: #93c5fd;
  font-size: 14px;
}

.details-panel {
  margin-top: 24px;
}

.answer-ok {
  color: #bbf7d0;
  font-weight: 700;
}

.answer-bad {
  color: #fecaca;
  font-weight: 700;
}

.hidden,
.protected-content.hidden {
  display: none;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 1280px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-panels {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .hero-dashboard {
    grid-template-columns: 1fr;
  }

  .login-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-bottom {
    margin-top: 10px;
  }

  .content {
    padding: 22px;
  }
}

@media (max-width: 900px) {
  .navbar,
  .main-container {
    padding: 18px;
  }

  .page-header,
  .category-header,
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pdf-viewer {
    height: 72vh;
    min-height: 620px;
  }
}

@media (max-width: 700px) {
  .categories,
  .dashboard-panels,
  .formations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-shell {
    padding: 10px;
  }

  .hero-dashboard,
  .login-side,
  .login-form-wrap {
    padding: 20px;
  }

  .pdf-viewer {
    min-height: 500px;
  }

  .nav-logo {
    width: 48px;
    height: 48px;
  }

  .nav-title {
    font-size: 16px;
  }

  .nav-subtitle {
    font-size: 12px;
  }

  h1,
  .content h1 {
    font-size: 30px;
  }

  h2,
  .content h2 {
    font-size: 24px;
  }

  h3,
  .content h3 {
    font-size: 20px;
  }
}

.timer-box {
  position: sticky;
  top: 10px;
  background: rgba(0,0,0,0.7);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 18px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
}

.timer-danger {
  color: #ff4d4d;
  font-weight: bold;
}
/* =========================
   PAGE QCM 2 COLONNES
========================= */

.qcm-page {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.qcm-sidebar {
  position: relative;
}

.qcm-sidebar > * {
  position: sticky;
  top: 24px;
}

.sidebar-back {
  display: inline-block;
  margin-bottom: 16px;
}

.timer-panel {
  width: 100%;
  background: rgba(8, 15, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.timer-label {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 10px;
  font-weight: 700;
}

.timer-value {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.timer-danger {
  color: #f87171;
}

.qcm-main {
  min-width: 0;
}

.qcm-content {
  background: rgba(10, 15, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.qcm-header {
  margin-bottom: 24px;
}

.qcm-content.hidden {
  display: none;
}

/* Ajuste la page de login Ã  l'intÃ©rieur du main */
.qcm-main .login-screen {
  min-height: calc(100vh - 48px);
}

/* Responsive */
@media (max-width: 1100px) {
  .qcm-page {
    grid-template-columns: 1fr;
  }

  .qcm-sidebar > * {
    position: static;
  }

  .timer-panel {
    margin-bottom: 12px;
  }
}
.qcm-progress-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.qcm-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 700;
}

.qcm-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qcm-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.25s ease;
}

.questions-left {
  margin-top: 12px;
  font-size: 14px;
  color: #dbeafe;
  font-weight: 700;
}
.admin-select {
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.40);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 15px;
  outline: none;
}

.admin-select option {
  color: #000000;
}

.session-badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.session-active {
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.session-ok {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  border: 1px solid rgba(134, 239, 172, 0.22);
}

.session-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border: 1px solid rgba(252, 211, 77, 0.22);
}

.session-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border: 1px solid rgba(252, 165, 165, 0.22);
}

.session-reason {
  margin-top: 4px;
  font-size: 12px;
  color: #cbd5e1;
}
.qcm-page {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.qcm-sidebar {
  position: relative;
}

.qcm-sidebar-sticky {
  position: sticky;
  top: 24px;
}

.sidebar-back {
  display: inline-block;
  margin-bottom: 16px;
}

.timer-panel {
  width: 100%;
  background: rgba(8, 15, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.timer-label {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 10px;
  font-weight: 700;
}

.timer-value {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.timer-danger {
  color: #f87171;
}

.qcm-progress-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.qcm-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 700;
}

.qcm-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qcm-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.25s ease;
}

.questions-left {
  margin-top: 12px;
  font-size: 14px;
  color: #dbeafe;
  font-weight: 700;
}

.qcm-main {
  min-width: 0;
}

.qcm-content {
  background: rgba(10, 15, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.qcm-header {
  margin-bottom: 24px;
}

.qcm-content.hidden {
  display: none;
}

.qcm-main .login-screen {
  min-height: calc(100vh - 48px);
}

@media (max-width: 1100px) {
  .qcm-page {
    grid-template-columns: 1fr;
  }

  .qcm-sidebar-sticky {
    position: static;
  }

  .timer-panel {
    margin-bottom: 12px;
  }
}
.btn-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border: 1px solid rgba(252, 165, 165, 0.22);
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.26);
}
.fdo-top-grid {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 20px;
  margin-bottom: 28px;
}

.fdo-identity-card,
.fdo-stats-card {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.20),
    rgba(15, 23, 42, 0.18)
  );
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.fdo-identity-line {
  margin: 0 0 10px 0;
  color: #dbeafe;
  font-size: 15px;
}

.fdo-stats-card {
  display: grid;
  gap: 14px;
}

.fdo-stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 1200px) {
  .fdo-top-grid {
    grid-template-columns: 1fr;
  }
}
.fdo-top-grid {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 20px;
  margin-bottom: 28px;
}

.fdo-identity-card,
.fdo-stats-card {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.20),
    rgba(15, 23, 42, 0.18)
  );
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.fdo-identity-line {
  margin: 0 0 10px 0;
  color: #dbeafe;
  font-size: 15px;
}

.fdo-stats-card {
  display: grid;
  gap: 14px;
}

.fdo-stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 1200px) {
  .fdo-top-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================
   ACCUEIL PUBLIC
========================= */

.public-home {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.public-hero {
  min-height: 68vh;
  display: flex;
  align-items: center;
  padding: 48px 18px 18px;
}

.public-hero-content {
  max-width: 820px;
  background: rgba(10, 15, 28, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  padding: 34px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
}

.public-hero-content h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  margin-bottom: 18px;
  max-width: 760px;
}

.public-hero-text {
  font-size: 18px;
  line-height: 1.8;
  color: #dbeafe;
  max-width: 720px;
  margin-bottom: 24px;
}

.public-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn-large {
  min-width: 220px;
  padding: 16px 24px;
  font-size: 16px;
}

.public-hero-note {
  color: #cbd5e1;
  font-size: 14px;
}

.public-hero-note a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

.public-hero-note a:hover {
  text-decoration: underline;
}

.public-section {
  padding: 8px 6px;
}

.public-section-head {
  margin-bottom: 18px;
}

.public-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.public-action-grid {
  grid-template-columns: repeat(2, 1fr);
}

.public-info-card,
.public-action-card,
.public-highlight-card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.10) 0%,
    rgba(255,255,255,0.06) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(10px);
}

.public-info-card h3,
.public-action-card h3 {
  margin-bottom: 12px;
}

.public-info-card p,
.public-action-card p,
.public-highlight-card p {
  margin: 0 0 18px 0;
  color: #dbeafe;
  line-height: 1.7;
}

.public-action-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.public-highlight-section {
  padding-bottom: 10px;
}

.public-highlight-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.public-highlight-actions {
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .public-cards-grid,
  .public-action-grid {
    grid-template-columns: 1fr;
  }

  .public-highlight-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .public-hero {
    min-height: auto;
    padding-top: 20px;
  }

  .public-hero-content {
    padding: 24px;
  }

  .btn-large {
    width: 100%;
  }
}
/* =========================
   ACCUEIL PUBLIC
========================= */

.public-home {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.public-hero {
  min-height: 68vh;
  display: flex;
  align-items: center;
  padding: 48px 18px 18px;
}

.public-hero-content {
  max-width: 820px;
  background: rgba(10, 15, 28, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 28px;
  padding: 34px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30);
}

.public-hero-content h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.98;
  margin-bottom: 18px;
  max-width: 760px;
}

.public-hero-text {
  font-size: 18px;
  line-height: 1.8;
  color: #dbeafe;
  max-width: 720px;
  margin-bottom: 24px;
}

.public-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn-large {
  min-width: 220px;
  padding: 16px 24px;
  font-size: 16px;
}

.public-hero-note {
  color: #cbd5e1;
  font-size: 14px;
}

.public-hero-note a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

.public-hero-note a:hover {
  text-decoration: underline;
}

.public-section {
  padding: 8px 6px;
}

.public-section-head {
  margin-bottom: 18px;
}

.public-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.public-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.public-info-card,
.public-action-card,
.public-highlight-card {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.10) 0%,
    rgba(255,255,255,0.06) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(10px);
}

.public-info-card {
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
}

.public-info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(37,99,235,0.20), transparent);
  opacity: 0;
  transition: 0.4s;
}

.public-info-card:hover::before {
  opacity: 1;
}

.public-info-card:hover {
  transform: translateY(-6px) scale(1.02);
}

.public-info-card h3,
.public-action-card h3 {
  margin-bottom: 12px;
}

.public-info-card p,
.public-action-card p,
.public-highlight-card p {
  margin: 0 0 18px 0;
  color: #dbeafe;
  line-height: 1.7;
}

.public-action-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.public-highlight-section {
  padding-bottom: 10px;
}

.public-highlight-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.public-highlight-actions {
  flex-shrink: 0;
}

.sub-unit {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.sub-unit h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: #bfdbfe;
}

@media (max-width: 1100px) {
  .public-cards-grid,
  .public-action-grid {
    grid-template-columns: 1fr;
  }

  .public-highlight-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .public-hero {
    min-height: auto;
    padding-top: 20px;
  }

  .public-hero-content {
    padding: 24px;
  }

  .btn-large {
    width: 100%;
  }
}
.public-hero {
  display: flex;
  justify-content: center;
  align-items: center;
}

.public-hero-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
  padding: 50px;
}
.public-hero-content h1 {
  text-align: center;
  font-weight: 800;
  font-size: clamp(48px, 6vw, 80px);
}

.section-head h2 {
  text-align: center;
  font-weight: 800;
  font-size: 32px;
}

.eyebrow {
  text-align: center;
}
.public-hero-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.public-hero-actions {
  justify-content: center;
}
.public-info-card h3,
.public-action-card h3 {
  text-align: center;
  font-weight: 700;
}
.public-info-card,
.public-action-card {
  text-align: center;
}
.public-info-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.public-hero-actions {
  justify-content: center;
}

.public-hero-actions .btn {
  min-width: 260px;
}
.admin-create-user-card {
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.admin-create-user-form {
  margin-top: 8px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.admin-inline-message {
  margin-top: 14px;
  min-height: 22px;
  font-weight: 700;
}

.admin-inline-message.success {
  color: #bbf7d0;
}

.admin-inline-message.error {
  color: #fecaca;
}

.admin-inline-message.info {
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}
textarea.admin-search {
  resize: vertical;
  min-height: 180px;
}
textarea.admin-search {
  resize: vertical;
  min-height: 180px;
}
.recruiter-stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.recruiter-toolbar {
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.recruiter-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 20px;
}

.recruiter-list-card,
.recruiter-detail-card {
  min-height: 560px;
}

.recruiter-empty-state {
  color: #cbd5e1;
  opacity: 0.9;
  padding: 10px 2px;
}

.recruiter-detail-head {
  margin-bottom: 16px;
}

.recruiter-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.recruiter-detail-actions {
  margin-top: 12px;
}

.recruiter-messages-list {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.recruiter-message {
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
}

.recruiter-message.recruiter {
  background: rgba(37, 99, 235, 0.12);
}

.recruiter-message.candidate {
  background: rgba(255, 255, 255, 0.05);
}

.recruiter-message.empty {
  text-align: center;
  color: #cbd5e1;
}

.recruiter-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 8px;
  color: #bfdbfe;
}

.recruiter-message-body {
  color: #e5eefc;
  line-height: 1.65;
}

@media (max-width: 1200px) {
  .recruiter-layout {
    grid-template-columns: 1fr;
  }

  .recruiter-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .recruiter-stats-grid,
  .recruiter-meta-grid {
    grid-template-columns: 1fr;
  }
}
.recruiter-stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.recruiter-toolbar {
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.recruiter-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 20px;
}

.recruiter-list-card,
.recruiter-detail-card {
  min-height: 560px;
}

.recruiter-empty-state {
  color: #cbd5e1;
  opacity: 0.9;
  padding: 10px 2px;
}

.recruiter-detail-head {
  margin-bottom: 16px;
}

.recruiter-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.recruiter-detail-actions {
  margin-top: 12px;
}

.recruiter-messages-list {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.recruiter-message {
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
}

.recruiter-message.recruiter {
  background: rgba(37, 99, 235, 0.12);
}

.recruiter-message.candidate {
  background: rgba(255, 255, 255, 0.05);
}

.recruiter-message.empty {
  text-align: center;
  color: #cbd5e1;
}

.recruiter-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 8px;
  color: #bfdbfe;
}

.recruiter-message-body {
  color: #e5eefc;
  line-height: 1.65;
}

@media (max-width: 1200px) {
  .recruiter-layout {
    grid-template-columns: 1fr;
  }

  .recruiter-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .recruiter-stats-grid,
  .recruiter-meta-grid {
    grid-template-columns: 1fr;
  }
}
.hidden {
  display: none !important;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.status-progress {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.status-success {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.status-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  font-size: 12px;
  font-weight: 800;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.unread-badge {
  display: inline-flex;
  margin-left: 8px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: #ef4444;
  color: white;
}

.recruiter-message.new-message,
.recruiter-message.new-highlight {
  outline: 1px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18), 0 0 20px rgba(34, 197, 94, 0.08);
}
.candidate-layout {
  align-items: start;
}

.candidate-top-stats {
  margin-bottom: 20px;
}

.candidate-messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.candidate-messages-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.candidate-message-input {
  margin-top: 10px;
  min-height: 120px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.btn-small {
  padding: 10px 14px;
  min-width: auto;
  font-size: 13px;
}

.notification {

    position: fixed;
    top: 20px;
    right: 20px;

    padding: 15px 20px;

    border-radius: 10px;

    color: white;

    font-family: Arial;
    font-size: 14px;

    z-index: 9999;

    animation: slideIn 0.3s ease;
}

.notification.error {
    background: #e74c3c;
}

.notification.success {
    background: #2ecc71;
}

.notification.warning {
    background: #f39c12;
}

@keyframes slideIn {

    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }

}