/* ============================================================
   PROQUELEC — Système d'Évaluation des Habilitations Électriques
   Style Sheet — Version 2026
============================================================ */

/* ---- Variables ---- */
:root {
  --navy: #0a0f1e;
  --navy-mid: #111827;
  --navy-light: #1a2235;
  --blue-primary: #1e5fbd;
  --blue-light: #2d7dd2;
  --blue-glow: rgba(30,95,189,0.3);
  --gold: #f5a623;
  --gold-light: #fbbf24;
  --gold-glow: rgba(245,166,35,0.25);
  --purple: #7c3aed;
  --purple-light: #8b5cf6;
  --green: #10b981;
  --green-light: #34d399;
  --red: #ef4444;
  --red-light: #f87171;
  --orange: #f97316;
  --gray-100: #f8fafc;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --white: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-dark: #1e293b;
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
}

/* Parcours stagiaire ouvert par QR/SMS : aucune navigation formateur. */
html.mobile-candidat-preload body { background: #0f172a; }
body.mobile-candidat-mode {
  min-width: 0;
  background: #0f172a;
  width: 100vw;
  min-height: 100dvh;
  overflow-x: hidden;
}
body.mobile-candidat-mode .navbar,
body.mobile-candidat-mode .mobile-menu,
body.mobile-candidat-mode .footer,
body.mobile-candidat-mode > section:not(#mobile-stagiaire),
body.mobile-candidat-mode #mobile-groupe-creation,
body.mobile-candidat-mode #mobile-groupe-details,
body.mobile-candidat-mode #mobile-stagiaire > .container > .section-header {
  display: none !important;
}
body.mobile-candidat-mode #mobile-stagiaire {
  display: block !important;
  min-height: 100dvh;
  width: 100vw;
  padding: 0;
}
body.mobile-candidat-mode #mobile-stagiaire > .container,
body.mobile-candidat-mode #mobile-groupe-access,
body.mobile-candidat-mode #mobile-groupe-access .mobile-card {
  width: 100%;
  max-width: none;
}
body.mobile-candidat-mode #mobile-stagiaire > .container { padding: 0; }
body.mobile-candidat-mode #mobile-groupe-access {
  max-width: 680px;
  margin: 0 auto;
}
body.mobile-candidat-mode #mobile-groupe-access .mobile-card {
  margin-top: 0 !important;
  padding: 1rem 0.75rem 1.5rem;
  border-radius: 0;
}
body.mobile-candidat-mode #mobile-groupe-access .mobile-panel-title {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
body.mobile-candidat-mode #mobile-groupe-candidat-form {
  margin-top: 1rem !important;
}
.mobile-candidat-sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  margin: -1rem -0.75rem 1rem;
  padding: 0.7rem 0.75rem;
  color: var(--white);
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}
.mobile-candidat-sticky-label {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-candidat-sticky-header strong {
  overflow: hidden;
  color: var(--white);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-submission-confirmation {
  margin-top: 1rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #14532d;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
}
.mobile-confirmation-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #16a34a;
  font-size: 1.75rem;
  font-weight: 700;
}
.mobile-submission-confirmation h3 {
  margin-bottom: 0.5rem;
  color: #166534;
}
.mobile-submission-confirmation p {
  margin: 0.35rem 0;
}
.mobile-confirmation-note {
  font-size: 0.85rem;
}
body.mobile-candidat-mode .mobile-question-list,
body.mobile-candidat-mode .mobile-question-list table {
  width: 100%;
  max-width: 100%;
}
body.mobile-candidat-mode .mobile-question-list {
  overflow-x: hidden;
}
body.mobile-candidat-mode .mobile-question-list .qcm-table-wrapper.mobile-carousel-empty {
  display: none;
}
body.mobile-candidat-mode .mobile-question-list .qcm-table-wrapper:not(.mobile-carousel-empty) {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.mobile-candidat-mode .mobile-question-list .qcm-paper-header,
body.mobile-candidat-mode .mobile-question-list .qcm-paper-table thead {
  display: none;
}
body.mobile-candidat-mode .mobile-question-list .qcm-paper-table,
body.mobile-candidat-mode .mobile-question-list .qcm-paper-table tbody,
body.mobile-candidat-mode .mobile-question-list .qcm-paper-table tr {
  display: block;
  width: 100%;
}
body.mobile-candidat-mode .mobile-question-list .qcm-question-tr:not(.mobile-carousel-current) {
  display: none;
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current {
  display: block;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current > td {
  display: block;
  width: 100% !important;
  padding: 1rem;
  border: 0;
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current .td-question {
  color: var(--white);
  font-size: 1rem;
  line-height: 1.5;
  background: rgba(30, 95, 189, 0.14);
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current .td-choices {
  padding-top: 0.75rem;
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current .qcm-choices-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current .qcm-row-choice {
  min-height: 48px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current .td-note {
  padding-top: 0;
  text-align: left;
}
body.mobile-candidat-mode .mobile-question-list .mobile-carousel-current .note-cell-box {
  display: inline-flex;
}
.mobile-carousel-controls {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid var(--border);
}
.mobile-carousel-progress { color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }
.mobile-carousel-buttons { display: flex; gap: 0.5rem; }
.mobile-carousel-hint { flex-basis: 100%; color: #fbbf24; font-size: 0.8rem; }
body.mobile-candidat-mode .mobile-carousel-controls button:disabled { opacity: 0.45; cursor: not-allowed; }
.mobile-carousel-page { min-height: 70dvh; display: flex; flex-direction: column; }
.mobile-chapter-page,
.mobile-question-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 0.5rem 2rem;
}
.mobile-chapter-page { text-align: center; align-items: center; }
.mobile-chapter-page h3,
.mobile-question-page h3 { color: var(--white); font-size: 1.2rem; line-height: 1.45; }
.mobile-chapter-page p { color: var(--text-secondary); max-width: 34rem; }
.mobile-chapter-kicker { color: var(--blue-light); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.mobile-page-choices { display: flex; flex-direction: column; gap: 0.65rem; }
.mobile-page-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-height: 52px;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.45;
}
.mobile-page-choice.selected { border-color: #34d399; background: rgba(16, 185, 129, 0.16); color: var(--white); }
.mobile-choice-check { flex: 0 0 1.35rem; color: var(--text-secondary); font-size: 1.2rem; line-height: 1.2; }
.mobile-page-choice.selected .mobile-choice-check { color: #34d399; }
body.mobile-candidat-mode .mobile-carousel-page .mobile-carousel-controls { margin-top: auto; }
body.mobile-candidat-mode .mobile-question-list button,
body.mobile-candidat-mode .mobile-question-list input,
body.mobile-candidat-mode .mobile-question-list select {
  min-height: 42px;
}
@media (max-width: 600px) {
  body.mobile-candidat-mode .form-grid-2 {
    grid-template-columns: 1fr;
  }
  body.mobile-candidat-mode .mobile-actions .btn-primary {
    width: 100%;
  }
}

.mobile-analysis-modal .mobile-analysis-content {
  color: #1e293b;
  background: #ffffff;
}
.mobile-analysis-modal .mobile-analysis-content h3,
.mobile-analysis-modal .mobile-analysis-content strong {
  color: #1e293b;
}
.mobile-analysis-modal .mobile-analysis-content table {
  color: #1e293b;
  background: #ffffff;
}
.mobile-analysis-modal .mobile-analysis-content td,
.mobile-analysis-modal .mobile-analysis-content th {
  color: #1e293b;
}
@media (max-width: 600px) {
  .mobile-analysis-modal {
    padding: 0.5rem;
  }
  .mobile-analysis-modal .mobile-analysis-content {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }
  .mobile-analysis-modal .mobile-analysis-content table {
    font-size: 0.78rem;
  }
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 72px; }
body {
  font-family: var(--font-main);
  background: var(--navy);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-mid); }
::-webkit-scrollbar-thumb { background: var(--blue-primary); border-radius: 3px; }

/* ---- Typography ---- */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10, 15, 30, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  padding-top: env(safe-area-inset-top);
}
.navbar.scrolled {
  background: rgba(10, 15, 30, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.nav-container {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.875rem 2rem;
}
.nav-brand { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.nav-logo-wrap {
  width: 42px; height: 42px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-primary), var(--navy-mid));
  border: 1.5px solid var(--blue-light);
}
.nav-logo-img { width: 100%; height: 100%; object-fit: cover; }
.nav-brand-text { display: flex; flex-direction: column; }
.brand-main { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--white); }
.brand-sub { font-size: 0.65rem; color: var(--gold); letter-spacing: 0.05em; }
.nav-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 0.35rem; margin-left: auto; flex: 1; min-width: 0; }
.nav-category { display: grid; grid-template-rows: 1.1rem auto; min-width: 0; border-left: 1px solid rgba(255,255,255,0.08); }
.nav-category:first-child { border-left: 0; }
.nav-category-label { padding-left: 0.55rem; color: var(--gold); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; line-height: 1.1rem; text-transform: uppercase; }
.nav-category-links { display: flex; align-items: stretch; align-content: flex-start; flex-wrap: wrap; gap: 0.1rem; min-width: 0; }
.nav-link {
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary);
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  text-align: center;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}
.nav-link.active { color: var(--gold); }
.nav-link-help { margin-left: 0.35rem; border-left: 1px solid var(--border); padding-left: 0.9rem; color: var(--blue-light); }
.nav-link-help:hover { color: var(--white); background: rgba(30, 95, 189, 0.18); }
.nav-cta {
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--white);
  transition: var(--transition); flex-shrink: 0;
  box-shadow: 0 2px 12px var(--blue-glow);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--blue-glow); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; padding: 0.5rem; position: relative; z-index: 1001;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu-overlay {
  display: none; position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.mobile-menu-overlay.visible { display: block; }
.mobile-menu {
  display: none; position: fixed; top: 68px; left: 0; right: 0; z-index: 999;
  background: var(--navy-mid); border-bottom: 1px solid var(--border);
  flex-direction: column; padding: 1rem;
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mobile-menu.open { display: flex; opacity: 1; transform: translateY(0); }
.mobile-link { padding: 0.875rem 1rem; border-radius: var(--radius-sm); font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.mobile-link:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.mobile-category { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.35rem 0 0.55rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.mobile-category:last-child { border-bottom: 0; }
.mobile-category-label { padding: 0.25rem 1rem 0.15rem; color: var(--gold); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

.help-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.help-card {
  padding: 1.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.help-card-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.85rem;
  border-radius: 7px;
  background: rgba(30,95,189,0.22);
  color: var(--blue-light);
  font-size: 0.72rem;
  font-weight: 800;
}
.help-card h3 { margin-bottom: 0.45rem; color: var(--white); font-size: 1rem; }
.help-card p { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.6; }
.rapport-table-hint { margin: -0.35rem 0 0.7rem; color: var(--text-secondary); font-size: 0.82rem; }
.rapport-types-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.rapport-types-table { width: 100%; min-width: 620px; border-collapse: collapse; color: var(--text-primary); font-size: 0.84rem; }
.rapport-types-table th { padding: 0.65rem 0.75rem; background: rgba(30,95,189,0.18); color: var(--white); text-align: left; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.rapport-types-table td { padding: 0.55rem 0.75rem; border-top: 1px solid rgba(255,255,255,0.08); vertical-align: middle; }
.rapport-types-table td:first-child { width: 24%; color: var(--blue-light); }
.rapport-types-table tr:hover { background: rgba(255,255,255,0.04); }
.rapport-type-check { width: 7rem; text-align: center !important; }
.rapport-type-check label { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rapport-type-check input { position: absolute; opacity: 0; pointer-events: none; }
.rapport-checkmark { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid var(--border); border-radius: 5px; color: transparent; background: rgba(255,255,255,0.04); font-size: 0; }
.rapport-type-check input:checked + .rapport-checkmark { border-color: #34d399; color: #34d399; background: rgba(16,185,129,0.16); font-size: 1.15rem; }
.rapport-entreprise-banner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.7rem; padding: 0.75rem; border-left: 3px solid var(--gold); background: rgba(245,166,35,0.1); color: var(--text-secondary); }
.rapport-entreprise-banner strong { color: var(--gold); }
.rapport-entreprise-table { min-width: 0; }
.rapport-activity-ok { color: #34d399; font-weight: 700; }

/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-circuit {
  position: absolute; border: 1px solid rgba(30,95,189,0.15);
  border-radius: 50%;
  animation: pulse-ring 6s ease-in-out infinite;
}
.circuit-1 { width: 600px; height: 600px; top: -100px; right: -150px; }
.circuit-2 { width: 400px; height: 400px; bottom: -100px; left: -100px; animation-delay: 2s; }
.circuit-3 { width: 800px; height: 800px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 4s; }
@keyframes pulse-ring {
  0%,100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.05); }
}
.circuit-3 { animation-name: pulse-ring3; }
@keyframes pulse-ring3 {
  0%,100% { opacity: 0.08; transform: translate(-50%,-50%) scale(1); }
  50% { opacity: 0.18; transform: translate(-50%,-50%) scale(1.03); }
}
.hero-particles { position: absolute; inset: 0; overflow: hidden; }
.particle {
  position: absolute; width: 3px; height: 3px;
  background: var(--gold); border-radius: 50%;
  animation: float-particle linear infinite;
  opacity: 0;
}
@keyframes float-particle {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 900px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(245,166,35,0.1); border: 1px solid rgba(245,166,35,0.3);
  border-radius: 99px; padding: 0.375rem 1rem;
  font-size: 0.8rem; font-weight: 600; color: var(--gold);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.5rem;
}
.badge-dot { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800; color: var(--white);
  margin-bottom: 0.75rem; line-height: 1.15;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--gold-light), var(--orange));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 700px; margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.hero-stat { text-align: center; }
.stat-number {
  display: block; font-size: 2.5rem; font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--blue-light), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.hero-scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 1;
}
.scroll-dot {
  width: 10px; height: 10px;
  background: var(--gold); border-radius: 50%;
  animation: bounce-dot 2s ease-in-out infinite;
}
@keyframes bounce-dot { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(12px); opacity: 0.4; } }

/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  color: var(--white); border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--blue-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--blue-glow); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: rgba(255,255,255,0.07); border: 1px solid var(--border);
  color: var(--white); border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  transition: var(--transition);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  background: transparent; border: 1.5px solid var(--blue-primary);
  color: var(--blue-light); border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  transition: var(--transition);
}
.btn-outline:hover { background: rgba(30,95,189,0.15); transform: translateY(-2px); }

.btn-outline-sm {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent; border: 1.5px solid var(--border);
  color: var(--text-secondary); border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500;
  transition: var(--transition);
}
.btn-outline-sm:hover { border-color: var(--blue-primary); color: var(--blue-light); }

.btn-danger-sm {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  color: var(--red-light); border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500;
  transition: var(--transition);
}
.btn-danger-sm:hover { background: rgba(239,68,68,0.2); }

.mobile-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.mobile-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.mobile-panel-title {
  font-size: 1.1rem; color: var(--white); margin-bottom: 1rem;
}
.mobile-code-row {
  display: flex; align-items: center; gap: 0.75rem;
}
.mobile-code-row .form-input {
  flex: 1;
}
.mobile-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem;
}
.mobile-summary {
  margin-top: 1.25rem; padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(30,95,189,0.08);
  border: 1px solid rgba(30,95,189,0.3);
  color: var(--text-secondary);
  line-height: 1.6;
}
.mobile-question-list {
  display: flex; flex-direction: column; gap: 0.8rem;
}
.mobile-question-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.mobile-question-label {
  font-size: 0.88rem; color: var(--white); margin-bottom: 0.75rem;
}
.mobile-question-options {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
}
.mobile-q-option {
  padding: 0.55rem 0.9rem; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-secondary);
}
.mobile-q-option.selected {
  background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.4); color: var(--green-light);
}
.mobile-submission-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}
.mobile-submission-head, .mobile-submission-footer {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; flex-wrap: wrap;
}
.mobile-submission-meta {
  font-size: 0.76rem; color: var(--text-secondary); margin-top: 0.2rem;
}
.mobile-submission-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 60px; padding: 0.3rem 0.55rem; border-radius: 999px;
  background: rgba(30,95,189,0.15); color: var(--blue-light); font-weight: 700;
}
.mobile-empty-state {
  padding: 1rem; border-radius: var(--radius); border: 1px dashed var(--border); color: var(--text-secondary);
}

@media (max-width: 860px) {
  .mobile-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTIONS
============================================================ */
.section { padding: 5rem 0; }
.section-dark { background: var(--navy-mid); }
.section-light { background: var(--navy-light); }
.container { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  background: rgba(30,95,189,0.15); border: 1px solid rgba(30,95,189,0.3);
  border-radius: 99px; padding: 0.25rem 0.875rem;
  font-size: 0.75rem; font-weight: 600; color: var(--blue-light);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.875rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; color: var(--white); margin-bottom: 0.875rem;
}
.section-desc { font-size: 1rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto; }

/* ============================================================
   INFO CARDS
============================================================ */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem; margin-bottom: 2rem;
}
.info-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.info-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.card-blue::before { background: linear-gradient(90deg, var(--blue-primary), var(--blue-light)); }
.card-gold::before { background: linear-gradient(90deg, var(--gold), var(--orange)); }
.card-purple::before { background: linear-gradient(90deg, var(--purple), var(--purple-light)); }
.info-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); box-shadow: var(--shadow); }
.card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.card-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 0.25rem; }
.card-blue .card-label { color: var(--blue-light); }
.card-gold .card-label { color: var(--gold); }
.card-purple .card-label { color: var(--purple-light); }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 0.375rem; }
.card-detail { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; }
.card-desc { font-size: 0.8rem; color: var(--text-secondary); }

/* ---- Formula Box ---- */
.formula-box {
  background: linear-gradient(135deg, rgba(30,95,189,0.12), rgba(124,58,237,0.08));
  border: 1px solid rgba(30,95,189,0.3);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem; text-align: center;
  margin-bottom: 2rem;
}
.formula-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 0.75rem; }
.formula-text { font-size: 1.2rem; font-weight: 600; color: var(--white); margin-bottom: 0.5rem; }
.formula-highlight {
  background: linear-gradient(135deg, var(--blue-light), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; font-weight: 800;
}
.formula-note { font-size: 0.85rem; color: var(--text-secondary); }

/* ---- Dual System ---- */
.dual-system { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .dual-system { grid-template-columns: 1fr; } }
.system-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem; overflow: hidden;
}
.system-panel-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1rem; font-weight: 700; color: var(--white);
  margin-bottom: 1rem;
}
.panel-icon { font-size: 1.2rem; }
.system-note { margin-top: 0.875rem; padding: 0.75rem; background: rgba(245,166,35,0.08); border: 1px solid rgba(245,166,35,0.2); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--gold); }

/* ---- Appreciation Table ---- */
.appreciation-table { display: flex; flex-direction: column; gap: 2px; }
.appr-row { display: grid; grid-template-columns: 100px 1fr 130px; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.82rem; }
.appr-header { background: rgba(255,255,255,0.05); font-weight: 700; color: var(--text-secondary); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.appr-excellent { background: rgba(16,185,129,0.12); color: var(--green-light); }
.appr-tres-bien { background: rgba(16,185,129,0.08); color: #6ee7b7; }
.appr-bien { background: rgba(30,95,189,0.12); color: var(--blue-light); }
.appr-assez-bien { background: rgba(30,95,189,0.08); color: #93c5fd; }
.appr-passable { background: rgba(245,166,35,0.1); color: var(--gold-light); }
.appr-insuffisant { background: rgba(249,115,22,0.1); color: var(--orange); }
.appr-faible { background: rgba(239,68,68,0.1); color: var(--red-light); }

/* ---- Rules Box ---- */
.rules-box {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
}
.rules-title { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 1.25rem; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.rule-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem; border-radius: var(--radius);
  font-size: 0.85rem; line-height: 1.5;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.rule-badge {
  flex-shrink: 0; padding: 0.2rem 0.6rem;
  border-radius: 99px; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.05em;
}
.rule-b1 .rule-badge { background: rgba(30,95,189,0.2); color: var(--blue-light); border: 1px solid rgba(30,95,189,0.3); }
.rule-b2 .rule-badge { background: rgba(245,166,35,0.15); color: var(--gold); border: 1px solid rgba(245,166,35,0.3); }
.rule-br .rule-badge { background: rgba(124,58,237,0.15); color: var(--purple-light); border: 1px solid rgba(124,58,237,0.3); }
.rule-bc .rule-badge { background: rgba(16,185,129,0.12); color: var(--green-light); border: 1px solid rgba(16,185,129,0.2); }
.rule-global { font-size: 0.85rem; color: var(--text-secondary); padding: 0.75rem; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); margin-top: 0.5rem; }

/* ============================================================
   FORM
============================================================ */
.eval-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  overflow: hidden;
}
/* ---- Module Selector ---- */
.module-selector-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.module-selector-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem;
}
.module-selector-title { font-size: 1rem; font-weight: 700; color: var(--white); }
.module-selector-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }
.module-selector-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-sm-sel {
  padding: 0.3rem 0.75rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.75rem; font-weight: 600;
  transition: var(--transition); cursor: pointer;
}
.btn-sm-sel:hover { background: rgba(30,95,189,0.2); color: var(--white); border-color: var(--blue-primary); }
.btn-sm-reset:hover { background: rgba(239,68,68,0.2); color: var(--red-light); border-color: rgba(239,68,68,0.3); }

.module-checkboxes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.625rem;
}
.mod-checkbox-label {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.875rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  cursor: pointer; transition: var(--transition); -webkit-user-select: none; user-select: none;
  font-size: 0.82rem; color: var(--text-secondary);
}
.mod-checkbox-label:hover { background: rgba(255,255,255,0.08); }
.mod-checkbox-label.active {
  background: rgba(30,95,189,0.12); border-color: rgba(30,95,189,0.4);
  color: var(--white); font-weight: 600;
}
.mod-checkbox-label.ht.active {
  background: rgba(124,58,237,0.12); border-color: rgba(124,58,237,0.4);
}
.mod-icon { font-size: 1rem; }
.mod-name { flex: 1; font-weight: 700; }
.mod-badge {
  font-size: 0.65rem; font-weight: 800; padding: 0.1rem 0.35rem;
  border-radius: 4px; background: rgba(255,255,255,0.1); color: var(--text-secondary);
}
.mod-checkbox-label.active .mod-badge { background: var(--blue-primary); color: var(--white); }
.mod-checkbox-label.ht.active .mod-badge { background: var(--purple); color: var(--white); }

/* ---- Form Sections ---- */
.form-section-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.form-section-blue { border-left: 3px solid var(--blue-primary); padding-left: 1rem; }
.form-section-gold { border-left: 3px solid var(--gold); padding-left: 1rem; }
.form-section-purple { border-left: 3px solid var(--purple); padding-left: 1rem; }
.form-section-header h3 { font-size: 1rem; font-weight: 700; color: var(--white); }
.form-section-icon { font-size: 1.25rem; }
.pts-badge {
  display: inline-block; padding: 0.15rem 0.5rem;
  background: rgba(30,95,189,0.2); border: 1px solid rgba(30,95,189,0.3);
  border-radius: 99px; font-size: 0.7rem; font-weight: 700;
  color: var(--blue-light); margin-left: 0.5rem;
}
.form-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 768px) { .form-grid-4 { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-select {
  padding: 0.625rem 0.875rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--white);
  font-size: 1rem; transition: var(--transition);
}
.form-input:focus, .form-select:focus { border-color: var(--blue-primary); background: rgba(30,95,189,0.1); box-shadow: 0 0 0 3px var(--blue-glow); }
.form-input::placeholder { color: var(--gray-500); }
.form-select option { background: var(--navy-mid); color: var(--white); }
.form-input option { background: var(--navy-mid); color: var(--white); }
.form-input optgroup { background: var(--navy-mid); color: var(--gold-light); font-weight: 700; font-style: normal; }
.form-input optgroup option { background: var(--navy-mid); color: var(--white); font-weight: 400; }

/* ---- Criteria Grid ---- */
.criteria-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 0.75rem; margin-bottom: 1rem;
}
.criterion-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  cursor: pointer; transition: var(--transition); -webkit-user-select: none; user-select: none;
}
.criterion-item:hover { background: rgba(255,255,255,0.08); }
.criterion-item.acquired {
  background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3);
}
.criterion-check {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 2px solid var(--gray-600);
  font-size: 0.9rem; transition: var(--transition);
}
.criterion-item.acquired .criterion-check {
  background: var(--green); border-color: var(--green);
  color: var(--white);
}
.criterion-code { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); }
.criterion-item.acquired .criterion-code { color: var(--green-light); }
.criterion-label { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.3; }
.criterion-item.acquired .criterion-label { color: var(--white); }

/* ---- Score Bar ---- */
.score-bar-container { margin-top: 0.5rem; }
.score-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.375rem; }
.score-bar { height: 8px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-primary), var(--blue-light)); transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; }
.bar-gold { background: linear-gradient(90deg, var(--gold), var(--orange)); }
.bar-purple { background: linear-gradient(90deg, var(--purple), var(--purple-light)); }

/* ---- TC Total ---- */
.tc-total-box {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(135deg, rgba(30,95,189,0.15), rgba(30,95,189,0.05));
  border: 1px solid rgba(30,95,189,0.3); border-radius: var(--radius-lg);
}
.tc-total-label { font-size: 0.9rem; font-weight: 700; color: var(--blue-light); }
.tc-total-value { font-size: 1.5rem; font-weight: 800; color: var(--white); }
.tc-total-pct { font-size: 1rem; font-weight: 700; color: var(--gold); }

/* ---- Tabs ---- */
.modules-tabs { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.tabs-header { display: flex; border-bottom: 1px solid var(--border); }
.tab-btn {
  flex: 1; padding: 0.875rem;
  background: transparent; color: var(--text-secondary);
  font-size: 0.875rem; font-weight: 600; border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.tab-btn.active { color: var(--white); background: rgba(255,255,255,0.06); border-bottom-color: var(--blue-primary); }
.tab-content { display: none; padding: 1.5rem; }
.tab-content.active { display: block; }

/* ---- QCM Grid ---- */
.qcm-explainer { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.qcm-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-secondary); }
.qcm-badge-std { padding: 0.15rem 0.5rem; background: rgba(30,95,189,0.15); border: 1px solid rgba(30,95,189,0.3); border-radius: 99px; font-size: 0.7rem; font-weight: 700; color: var(--blue-light); }
.qcm-badge-fond { padding: 0.15rem 0.5rem; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); border-radius: 99px; font-size: 0.7rem; font-weight: 700; color: var(--red-light); }
.qcm-badge-seuil { padding: 0.15rem 0.5rem; background: rgba(245,166,35,0.15); border: 1px solid rgba(245,166,35,0.4); border-radius: 99px; font-size: 0.7rem; font-weight: 700; color: var(--gold); }
.qcm-exam-selector { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.qcm-exam-btn {
  flex: 1 1 220px;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}
.qcm-exam-btn:hover { border-color: rgba(30,95,189,0.4); color: var(--text-primary); }
.qcm-exam-btn.active {
  background: linear-gradient(135deg, rgba(30,95,189,0.25), rgba(30,95,189,0.08));
  border-color: var(--blue-light);
  color: var(--blue-light);
  box-shadow: 0 0 0 1px rgba(30,95,189,0.3);
}
.qcm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.qcm-item {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.875rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  cursor: pointer; transition: var(--transition); -webkit-user-select: none; user-select: none;
}
.qcm-item:hover { background: rgba(255,255,255,0.08); }
.qcm-item.correct { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); }
.qcm-item.fond { border-left: 3px solid rgba(239,68,68,0.5); }
.qcm-item.fond.correct { border-left-color: var(--green); }
.qcm-num {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.8rem; font-weight: 800;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  transition: var(--transition);
}
.qcm-item.correct .qcm-num { background: var(--green); color: var(--white); }
.qcm-item.fond .qcm-num { background: rgba(239,68,68,0.15); color: var(--red-light); }
.qcm-item.fond.correct .qcm-num { background: var(--green); color: var(--white); }
.qcm-info { flex: 1; }
.qcm-label { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.3; }
.qcm-item.correct .qcm-label { color: var(--white); }
.qcm-pts { font-size: 0.7rem; font-weight: 700; color: var(--gray-500); margin-top: 0.2rem; }
.qcm-item.fond .qcm-pts { color: var(--red-light); }

/* ---- Form Actions ---- */
.form-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }

/* ============================================================
   RESULTS
============================================================ */
.result-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.report-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(10,15,30,0.8), rgba(30,95,189,0.08));
  border-bottom: 1px solid var(--border);
}
.report-logo { display: flex; align-items: center; gap: 1rem; }
.report-logo-img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; border: 2px solid var(--blue-primary); }
.report-org-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--white); }
.report-org-sub { font-size: 0.78rem; color: var(--text-secondary); margin: 0.1rem 0; }
.report-org-ref { font-size: 0.7rem; color: var(--gold); font-weight: 600; letter-spacing: 0.08em; }
.report-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.report-meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label { font-size: 0.65rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; }
.meta-value { font-size: 0.85rem; font-weight: 600; color: var(--white); }

/* Identity */
.report-identity {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.75rem 2rem; border-bottom: 1px solid var(--border);
}
.identity-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-primary), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: var(--white);
}
.identity-name { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 0.25rem; }
.identity-details { font-size: 0.85rem; color: var(--text-secondary); }
.identity-score-global { margin-left: auto; text-align: right; }
.sg-value { display: block; font-size: 2.5rem; font-weight: 800; font-family: var(--font-display); }
.sg-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* Modules Results */
.modules-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; padding: 1.75rem 2rem; }
.module-result-card {
  border-radius: var(--radius-lg); padding: 1.25rem;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.module-result-card:hover { transform: translateY(-3px); }
.mr-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.875rem; }
.mr-name { font-size: 0.9rem; font-weight: 800; }
.mr-badge { padding: 0.2rem 0.6rem; border-radius: 99px; font-size: 0.7rem; font-weight: 700; }
.mr-score { font-size: 1.75rem; font-weight: 800; font-family: var(--font-display); margin-bottom: 0.25rem; }
.mr-pct { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.875rem; }
.mr-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.mr-bar-fill { height: 100%; border-radius: 99px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.mr-appreciation { font-size: 0.78rem; margin-top: 0.625rem; font-weight: 600; }
.mr-attribution { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.5rem; font-size: 0.8rem; font-weight: 700; }

/* Avis */
.avis-section { padding: 1.75rem 2rem; border-top: 1px solid var(--border); }
.avis-card {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.5rem; border-radius: var(--radius-lg);
  border: 2px solid var(--border);
}
.avis-card.favorable { background: rgba(16,185,129,0.07); border-color: rgba(16,185,129,0.3); }
.avis-card.favorable-reserve { background: rgba(245,166,35,0.07); border-color: rgba(245,166,35,0.3); }
.avis-card.defavorable { background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.3); }
.avis-icon { font-size: 2rem; flex-shrink: 0; }
.avis-title { font-size: 1.15rem; font-weight: 800; color: var(--white); margin-bottom: 0.375rem; }
.avis-text { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.75rem; line-height: 1.6; }
.avis-habils { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.avis-expiration { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.habil-tag {
  padding: 0.25rem 0.875rem; border-radius: 99px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.05em;
  background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3);
  color: var(--green-light);
}

.recommandation-box {
  margin: 0 2rem 1.5rem;
  padding: 1.25rem; border-radius: var(--radius);
  background: rgba(30,95,189,0.08); border: 1px solid rgba(30,95,189,0.2);
}
.reco-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 0.375rem; }
.reco-text { font-size: 0.875rem; color: var(--text-secondary); }

.nfc-notice {
  margin: 0 2rem 1.5rem;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  background: rgba(245,166,35,0.06); border: 1px solid rgba(245,166,35,0.2);
  font-size: 0.82rem; color: var(--gold);
}
.report-actions {
  display: flex; flex-wrap: wrap; gap: 0.875rem;
  padding: 1.5rem 2rem; border-top: 1px solid var(--border);
}

/* ============================================================
   SESSIONS TABLE
============================================================ */
.filters-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.filter-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }
.filter-btn {
  padding: 0.375rem 0.875rem;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); transition: var(--transition);
}
.filter-btn:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.filter-btn.active { background: rgba(30,95,189,0.2); border-color: var(--blue-primary); color: var(--white); }
.sessions-tab-btn {
  padding: 0.55rem 1.2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  letter-spacing: 0.01em;
}
.sessions-tab-btn:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
.sessions-tab-btn.active {
  background: linear-gradient(135deg, rgba(16,185,129,0.2) 0%, rgba(5,150,105,0.1) 100%);
  border-color: rgba(16,185,129,0.5);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16,185,129,0.15);
}
.sessions-groupes-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sessions-groupes-header h3 { margin: 0; font-size: 1.1rem; color: var(--white); }

/* ── Carte Session Individuelle — Design Premium ────────────── */
.sg-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15,23,42,0.7) 0%, rgba(17,24,39,0.85) 100%);
  margin-bottom: 0.875rem;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.15s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.sg-card:hover {
  border-color: rgba(96,165,250,0.28);
  box-shadow: 0 4px 24px rgba(30,95,189,0.13);
  transform: translateY(-1px);
}
.sg-card[open] {
  border-color: rgba(96,165,250,0.38);
  box-shadow: 0 6px 32px rgba(30,95,189,0.18);
}

/* Summary (en-tête cliquable) */
.sg-card-summary {
  display: flex;
  align-items: stretch;
  gap: 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 72px;
  position: relative;
  transition: background 0.2s;
}
.sg-card-summary::marker,
.sg-card-summary::-webkit-details-marker { display: none; }
.sg-card-summary:hover { background: rgba(255,255,255,0.02); }
.sg-card-summary:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }

/* Accent bar gauche */
.sg-card-summary::before {
  content: '';
  width: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #6366f1 100%);
  flex-shrink: 0;
  border-radius: 0;
  transition: background 0.3s;
}
.sg-card[open] .sg-card-summary::before {
  background: linear-gradient(180deg, #60a5fa 0%, #818cf8 100%);
}

/* Zone titre + sous-titre */
.sg-card-summary-inner {
  flex: 1;
  padding: 0.85rem 0.75rem 0.85rem 1rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sg-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-card-sub {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mini-compteurs dans le header */
.sg-card-counters {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0 0.5rem;
  flex-shrink: 0;
}
.sg-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.sg-counter-val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-display, monospace);
}
.sg-counter-lbl {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  font-weight: 700;
  margin-top: 0.12rem;
}
.sg-counter.c-total .sg-counter-val { color: #94a3b8; }
.sg-counter.c-fav   .sg-counter-val { color: #34d399; }
.sg-counter.c-def   .sg-counter-val { color: #f87171; }
.sg-counter.c-pend  .sg-counter-val { color: #60a5fa; }

/* Chevron animé */
.sg-card-chevron {
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 0.9rem;
  flex-shrink: 0;
  padding-right: 0.75rem;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), color 0.2s;
}
.sg-card[open] .sg-card-chevron {
  transform: rotate(180deg);
  color: #60a5fa;
}
.sg-card-summary:hover .sg-card-chevron { color: #60a5fa; }

/* Séparateur haut du corps */
.sg-card[open] .sg-card-summary {
  border-bottom: 1px solid rgba(96,165,250,0.15);
}

/* Corps ouvert */
.sg-card-content { padding: 1.1rem 1.25rem 1.25rem 1.5rem; }
.sg-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 0.85rem; margin-bottom: 0.85rem;
}
.sg-card-title-legacy { font-size: 1.05rem; font-weight: 700; color: var(--white); }
.sg-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sg-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px;
}
.sg-badge-blue { background: rgba(30,95,189,0.15); color: #60a5fa; }
.sg-badge-green { background: rgba(16,185,129,0.15); color: #34d399; }
.sg-badge-red { background: rgba(239,68,68,0.15); color: #f87171; }
.sg-badge-gray { background: rgba(148,163,184,0.15); color: #94a3b8; }
.sg-empty { text-align: center; padding: 1.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.btn-view-sm { background: rgba(30,95,189,0.15); border: 1px solid rgba(30,95,189,0.4); color: #60a5fa; padding: 0.3rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-view-sm:hover { background: rgba(30,95,189,0.3); }
.btn-del-sm { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #f87171; padding: 0.3rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-del-sm:hover { background: rgba(239,68,68,0.25); }
.btn-green-sm { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.4); color: #34d399; padding: 0.3rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-green-sm:hover { background: rgba(16,185,129,0.3); }
.filter-search { flex: 1; max-width: 280px; }

.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-strip-item {
  padding: 1rem 1.25rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  text-align: center;
}
.stat-strip-item.stat-green { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.2); }
.stat-strip-item.stat-red { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); }
.stat-strip-item.stat-blue { background: rgba(30,95,189,0.08); border-color: rgba(30,95,189,0.25); }
.stat-strip-value { display: block; font-size: 1.75rem; font-weight: 800; font-family: var(--font-display); color: var(--white); }
.stat-strip-label { font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.sessions-table-wrap { border-radius: var(--radius-lg); overflow-x: auto; overflow-y: hidden; border: 1px solid var(--border); }
.sessions-table { width: 100%; border-collapse: collapse; }
#stag-table { min-width: 1280px; }
#stag-table th:last-child, #stag-table td:last-child { min-width: 250px; }
#stag-table .stag-actions { min-width: 230px; align-items: center; }
.sessions-table th {
  background: rgba(255,255,255,0.04); padding: 0.875rem 1rem;
  text-align: left; font-size: 0.75rem; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sessions-table td {
  padding: 0.875rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem; color: var(--text-primary);
  vertical-align: middle;
}
.sessions-table tr:hover td { background: rgba(255,255,255,0.03); }
.sessions-table tr:last-child td { border-bottom: none; }

/* ═══ Dossiers Sessions ════════════════════════════════════════ */
/* Dossier Sessions Actives */
.active-sessions-folder {
  margin: 0 0 0.75rem 0;
  border: 1px solid rgba(96,165,250,0.22);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15,23,42,0.55) 0%, rgba(30,58,138,0.1) 100%);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}
.active-sessions-folder[open] { border-color: rgba(96,165,250,0.38); }

.active-sessions-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  color: #bfdbfe;
  font-weight: 700;
  font-size: 0.95rem;
  user-select: none;
  transition: background 0.2s;
}
.active-sessions-summary::marker,
.active-sessions-summary::-webkit-details-marker { display: none; }
.active-sessions-summary:hover { background: rgba(96,165,250,0.05); }
.active-sessions-summary::after {
  content: '⌄';
  margin-left: auto;
  font-size: 1.2rem;
  color: #60a5fa;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  display: inline-block;
}
.active-sessions-folder[open] .active-sessions-summary::after { transform: rotate(180deg); }
.active-sessions-folder[open] .active-sessions-summary { border-bottom: 1px solid rgba(96,165,250,0.18); }
.active-sessions-summary span { color: #64748b; font-size: 0.82rem; font-weight: 500; }
.active-sessions-body { padding: 0.85rem 0.6rem 0.6rem; }

/* Dossier Archives */
.archive-folder {
  margin: 0.5rem 0 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.15);
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}
.archive-folder[open] { border-color: rgba(148,163,184,0.28); }
.archive-folder-summary {
  cursor: pointer;
  padding: 0.9rem 1.25rem;
  background: rgba(30,41,59,0.6);
  color: #94a3b8;
  font-weight: 700; font-size: 0.9rem;
  list-style: none;
  display: flex; align-items: center; gap: 0.6rem;
  transition: background 0.2s;
  user-select: none;
}
.archive-folder-summary:hover { background: rgba(30,41,59,0.85); color: #cbd5e1; }
.archive-folder-summary::marker,
.archive-folder-summary::-webkit-details-marker { display: none; }
.archive-folder-summary::after {
  content: '⌄';
  margin-left: auto; font-size: 1.1rem;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  display: inline-block;
}
.archive-folder[open] .archive-folder-summary::after { transform: rotate(180deg); }
.archive-folder[open] .archive-folder-summary { border-bottom: 1px solid rgba(148,163,184,0.12); }
.archive-folder-body { padding: 0.75rem 0.5rem 0.5rem; }
.archive-table thead th { font-weight: 600; }

.avis-chip {
  display: inline-block; padding: 0.2rem 0.625rem;
  border-radius: 99px; font-size: 0.72rem; font-weight: 700;
}
.avis-chip.favorable { background: rgba(16,185,129,0.15); color: var(--green-light); border: 1px solid rgba(16,185,129,0.3); }
.avis-chip.defavorable { background: rgba(239,68,68,0.12); color: var(--red-light); border: 1px solid rgba(239,68,68,0.25); }
.score-chip { font-weight: 700; font-size: 0.9rem; }
.habils-chip-list { display: flex; flex-wrap: wrap; gap: 4px; }
.habils-chip {
  padding: 0.1rem 0.4rem; border-radius: 99px;
  font-size: 0.65rem; font-weight: 800;
  background: rgba(30,95,189,0.15); color: var(--blue-light);
  border: 1px solid rgba(30,95,189,0.2);
}
.btn-view-sm {
  padding: 0.3rem 0.75rem; border-radius: var(--radius-sm);
  background: rgba(30,95,189,0.15); border: 1px solid rgba(30,95,189,0.2);
  color: var(--blue-light); font-size: 0.75rem; font-weight: 600;
  transition: var(--transition); cursor: pointer;
}
.btn-view-sm:hover { background: rgba(30,95,189,0.25); }
.btn-del-sm {
  padding: 0.3rem 0.5rem; border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.1); border: none;
  color: var(--red-light); font-size: 0.75rem;
  transition: var(--transition); cursor: pointer;
}
.btn-del-sm:hover { background: rgba(239,68,68,0.2); }

.no-sessions { text-align: center; padding: 4rem; color: var(--text-secondary); }
.no-sessions-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

.preloaded-notice {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding: 1.25rem;
  background: rgba(245,166,35,0.06); border: 1px solid rgba(245,166,35,0.15);
  border-radius: var(--radius); font-size: 0.85rem; color: var(--text-secondary);
}
.preloaded-icon { font-size: 1.5rem; }
.preloaded-notice strong { color: var(--gold); }
.preloaded-notice div { flex: 1; }

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: var(--navy); border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-container {
  max-width: 1300px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-logo { width: 40px; height: 40px; border-radius: 8px; }
.footer-brand-name { font-weight: 800; color: var(--white); }
.footer-brand-sub { font-size: 0.75rem; color: var(--text-secondary); }
.footer-center { text-align: center; }
.footer-ref { font-size: 0.8rem; font-weight: 700; color: var(--gold); margin-bottom: 0.3rem; }
.footer-copy { font-size: 0.78rem; color: var(--text-secondary); }
.footer-disclaimer { font-size: 0.72rem; color: var(--gray-600); margin-top: 0.25rem; }
.footer-norms { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.norm-badge {
  padding: 0.2rem 0.625rem; border-radius: 99px;
  background: rgba(30,95,189,0.1); border: 1px solid rgba(30,95,189,0.2);
  font-size: 0.7rem; font-weight: 700; color: var(--blue-light);
}

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 2rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--navy-mid); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2rem;
  max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border-radius: 50%;
  font-size: 0.875rem; color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* ============================================================
   TOAST
============================================================ */
.toast-container {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 3000;
  display: flex; flex-direction: column; gap: 0.5rem;
  padding-bottom: env(safe-area-inset-bottom);
}
.toast {
  padding: 0.875rem 1.25rem; border-radius: var(--radius);
  background: var(--navy-mid); border: 1px solid var(--border);
  color: var(--white); font-size: 0.875rem;
  box-shadow: var(--shadow); min-width: 280px;
  animation: slide-in-toast 0.3s ease;
  display: flex; align-items: center; gap: 0.75rem;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue-primary); }
.toast.warning { border-left: 3px solid #f59e0b; }
@keyframes slide-in-toast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   PRINT STYLES
============================================================ */
@media print {
  .navbar, .hero, .section-header, .filters-bar, .stats-strip,
  .sessions-table-wrap, .preloaded-notice, .footer, .form-actions,
  .report-actions, .btn-primary, .btn-secondary, .btn-outline,
  .toast-container, .modal-overlay { display: none !important; }
  body { background: white; color: #000; }
  #resultats { display: block !important; }
  .result-card { border: 1px solid #ddd; box-shadow: none; }
  .report-header { background: #f5f5f5; }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  /* Menu desktop trop large sous 1150px : bascule vers le menu hamburger complet */
  .nav-container {
    gap: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .nav-links { display: none; }
  .nav-container > .nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .hamburger { display: flex; flex: 0 0 auto; }
}
@media (max-width: 768px) {
  .nav-container > .nav-cta { display: none; }
  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .form-actions { justify-content: stretch; }
  .form-actions button { flex: 1; }
  .report-actions { flex-direction: column; }
  .modules-results { grid-template-columns: 1fr 1fr; }
  .sessions-table-wrap { overflow-x: auto; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .nav-brand-text { display: none; }
}
@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .modules-results { grid-template-columns: 1fr; }
  .criteria-grid { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BANDEAU ALERTES RENOUVELLEMENT
============================================================ */
.alerte-bandeau {
  position: fixed; top: 72px; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; gap: 1rem; padding: 0.75rem 2rem;
  background: linear-gradient(90deg, #92400e, #b45309);
  color: #fef3c7; font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.alerte-bandeau-icon { font-size: 1.2rem; }
.alerte-bandeau-lien { color: #fde68a; text-decoration: underline; margin-left: auto; white-space: nowrap; }
.alerte-bandeau-close {
  background: none; border: 1px solid rgba(255,255,255,0.3); color: #fef3c7;
  border-radius: 50%; width: 24px; height: 24px; cursor: pointer;
  font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   NAVBAR BADGE ALERTE
============================================================ */
.nav-alert-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: white; font-size: 0.65rem; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  margin-left: 4px; vertical-align: middle;
  animation: pulse-badge 1.5s ease infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* ============================================================
   MODALES AGRANDIES (Aperçu, Émargement, Attestation)
============================================================ */
.modal-large {
  max-width: 900px !important;
  width: 95vw !important;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-apercu-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem;
  background: var(--navy); border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  flex-wrap: wrap;
}
.modal-apercu-header > div:first-child {
  font-size: 1.1rem; font-weight: 700; color: var(--white);
}
.modal-apercu-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.attestation-options {
  display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.75rem 1.5rem; background: var(--navy-light); border-bottom: 1px solid var(--border);
}
.attestation-options label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}
.attestation-options input {
  border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem 0.6rem;
  font-size: 0.85rem; color: var(--text-primary); background: var(--navy-mid); min-width: 150px;
}
.attestation-options input:focus { outline: none; border-color: var(--blue-primary); }

/* ============================================================
   ALERTES BOX
============================================================ */
.alertes-box {
  margin-bottom: 1.5rem; border-radius: var(--radius);
  border: 1px solid rgba(245,166,35,0.4);
  background: rgba(245,166,35,0.07);
  overflow: hidden;
}
.alertes-box-header {
  padding: 0.75rem 1.25rem;
  background: rgba(245,166,35,0.15);
  font-weight: 700; color: var(--gold);
  font-size: 0.9rem;
}
.alerte-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1.25rem; border-top: 1px solid rgba(245,166,35,0.15);
  font-size: 0.85rem; color: var(--text-secondary);
  flex-wrap: wrap;
}
.alerte-item-badge {
  padding: 0.2rem 0.6rem; border-radius: 99px; font-size: 0.75rem; font-weight: 700;
}
.badge-expire { background: rgba(239,68,68,0.2); color: #f87171; }
.badge-alerte { background: rgba(245,166,35,0.2); color: var(--gold); }
.badge-valide { background: rgba(16,185,129,0.2); color: #34d399; }

/* ============================================================
   TABLEAU STAGIAIRES — Badges de statut
============================================================ */
.stag-statut {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.7rem; border-radius: 99px;
  font-size: 0.75rem; font-weight: 700;
}
.stag-valide  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.stag-alerte  { background: rgba(245,166,35,0.15); color: var(--gold); border: 1px solid rgba(245,166,35,0.3); }
.stag-expire  { background: rgba(239,68,68,0.15);  color: #f87171;  border: 1px solid rgba(239,68,68,0.3); }

/* ============================================================
   DASHBOARD — KPI Cards
============================================================ */
.dashboard-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.kpi-card {
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.kpi-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.kpi-value {
  font-size: 2.2rem; font-weight: 900;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.kpi-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }

.kpi-blue   .kpi-value { color: #60a5fa; }
.kpi-green  .kpi-value { color: #34d399; }
.kpi-orange .kpi-value { color: var(--gold); }
.kpi-red    .kpi-value { color: #f87171; }
.kpi-purple .kpi-value { color: #a78bfa; }
.kpi-gold   .kpi-value { color: var(--gold); }

.kpi-blue   { border-color: rgba(96,165,250,0.25); }
.kpi-green  { border-color: rgba(52,211,153,0.25); }
.kpi-orange { border-color: rgba(245,166,35,0.25); }
.kpi-red    { border-color: rgba(239,68,68,0.25); }
.kpi-purple { border-color: rgba(167,139,250,0.25); }
.kpi-gold   { border-color: rgba(245,166,35,0.25); }

/* ============================================================
   DASHBOARD — Graphiques
============================================================ */
.dashboard-charts {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.chart-card {
  flex: 1;
  min-width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.chart-wrap {
  position: relative;
  height: 260px;
}

/* Responsive dashboard */
@media (max-width: 768px) {
  .dashboard-charts { flex-direction: column; }
  .kpi-card { padding: 1rem; }
  .kpi-value { font-size: 1.75rem; }
}


/* ============================================================
   MODE RUBRIQUES SÉPARÉES (PAGES DÉDIÉES EN SÉPARATEURS)
   ============================================================ */
.page-rubrique {
  display: none !important;
}
.active-rubrique {
  display: block !important;
  animation: fadeInRubrique 0.25s ease-out;
}
section.hero.active-rubrique {
  display: flex !important;
}
@keyframes fadeInRubrique {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   STYLISATION DES CARTE QCM & CHOIX MULTIPLES (NF C 18-510)
============================================================ */
.qcm-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}
.qcm-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
}
.qcm-card.qcm-fondamentale {
  border-left: 4px solid var(--gold);
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.04), rgba(255, 255, 255, 0.02));
}
.qcm-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.qcm-card-num {
  background: rgba(30, 95, 189, 0.2);
  color: var(--blue-light);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(30, 95, 189, 0.3);
}
.qcm-fondamentale .qcm-card-num {
  background: rgba(245, 166, 35, 0.2);
  color: var(--gold);
  border-color: rgba(245, 166, 35, 0.3);
}
.qcm-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  flex-grow: 1;
}
.qcm-card-pts {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}
.qcm-card-question {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}
.qcm-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.qcm-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.qcm-choice:hover {
  background: rgba(30, 95, 189, 0.1);
  border-color: rgba(30, 95, 189, 0.3);
}
.qcm-choice-letter {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.qcm-choice-text {
  font-size: 0.875rem;
  color: var(--text);
}
.qcm-choice.selected {
  background: rgba(30, 95, 189, 0.18);
  border-color: var(--blue-light);
}
.qcm-choice.selected .qcm-choice-letter {
  background: var(--blue-light);
  color: #0f172a;
}
.qcm-choice.correct-answer {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #34d399 !important;
}
.qcm-choice.correct-answer .qcm-choice-letter {
  background: #34d399 !important;
  color: #0f172a !important;
}
.qcm-choice.wrong-answer {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #f87171 !important;
}
.qcm-choice.wrong-answer .qcm-choice-letter {
  background: #f87171 !important;
  color: #ffffff !important;
}
.qcm-explication {
  margin-top: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}
.qcm-expl-ok {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}
.qcm-expl-ko {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

/* ============================================================
   TABLEAU QCM FORMAT OFFICIEL UX (QUESTIONS | CHOIX | NOTE)
============================================================ */
.qcm-table-wrapper {
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qcm-paper-header {
  background: linear-gradient(90deg, #1e3a7a, #0f172a);
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--gold);
  text-align: center;
}

.qcm-paper-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.qcm-paper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.qcm-paper-table th {
  background: rgba(30, 58, 122, 0.3);
  color: var(--gold-light);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.qcm-paper-table th.col-q { width: 35%; text-align: left; }
.qcm-paper-table th.col-r { width: 55%; text-align: left; }
.qcm-paper-table th.col-n { width: 10%; text-align: center; }

.qcm-question-tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

/* ---- QCM Grid en 1 seule colonne pleine largeur ---- */
#qcm-grid, .qcm-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
  width: 100% !important;
}



/* ============================================================
   GRILLES DE CRITÈRES MODULES — FORMAT QUESTIONNAIRE OFFICIEL
============================================================ */

/* ---- En-tête module ---- */
.qcm-paper-header {
  background: linear-gradient(135deg, var(--navy-mid) 0%, #1a2a4a 100%);
  border: 1px solid rgba(30, 95, 189, 0.4);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.5rem;
}
.qcm-paper-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* ---- Tableau papier ---- */
.qcm-paper-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid rgba(30, 95, 189, 0.3);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.qcm-paper-table thead tr th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(30, 95, 189, 0.12);
  border-bottom: 1px solid rgba(30, 95, 189, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.qcm-paper-table thead tr th.col-q { width: 38%; text-align: left; }
.qcm-paper-table thead tr th.col-r { width: 54%; text-align: left; }
.qcm-paper-table thead tr th.col-n { width: 8%; text-align: center; }

/* ---- Lignes de question ---- */
.qcm-question-tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}
.qcm-question-tr:hover { background: rgba(30, 95, 189, 0.04); }
.qcm-question-tr:last-child { border-bottom: none; }

/* ---- Cellule question ---- */
.td-question {
  padding: 1rem 1rem 1rem 1.25rem;
  vertical-align: top;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.q-num-title {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
}
.q-num-title strong {
  color: var(--gold-light);
  font-size: 0.85rem;
}

/* ---- Cellule choix ---- */
.td-choices {
  padding: 0.75rem 1rem;
  vertical-align: top;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.qcm-choices-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ---- Colonne note ---- */
.td-note {
  padding: 1rem 0.5rem;
  vertical-align: middle;
  text-align: center;
  min-width: 64px;
}
.note-cell-box {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ---- Grille critères 1 colonne ---- */
.criteria-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
  width: 100% !important;
}

/* ---- Rangée choix interactive ---- */
.qcm-row-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  -webkit-user-select: none;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}
.qcm-row-choice:hover {
  background: rgba(30, 95, 189, 0.12);
  border-color: rgba(30, 95, 189, 0.35);
}
.qcm-row-choice.selected {
  background: rgba(30, 95, 189, 0.22) !important;
  border-color: var(--blue-light) !important;
}
.qcm-row-choice.selected .qcm-checkbox-icon { color: var(--blue-light); }
.qcm-row-choice.correct-answer {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: #34d399 !important;
}
.qcm-row-choice.correct-answer .qcm-checkbox-icon { color: #34d399; }
.qcm-row-choice.wrong-answer {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: #f87171 !important;
}
.qcm-row-choice.wrong-answer .qcm-checkbox-icon { color: #f87171; }

.qcm-choice-bullet {
  font-size: 0.82rem;
  color: var(--text-primary);
  flex: 1;
}
.qcm-dots-leader {
  flex-grow: 1;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
  margin: 0 0.5rem;
  height: 12px;
  min-width: 20px;
}
.qcm-checkbox-icon {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}

/* ---- Explication après réponse ---- */
.qcm-paper-expl {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.45;
}
.expl-ok {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}
.expl-ko {
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

/* ============================================================
   CONTRÔLES VRAI / FAUX & OUI / NON (QCM)
============================================================ */
.qcm-answer-box {
  margin-top: 0.75rem;
  padding: 0.875rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}
.qcm-vf-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}
.qcm-vf-table thead th {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-align: left;
  padding: 0 0 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.qcm-vf-table thead th:nth-child(1) { width: 55%; }
.qcm-vf-table thead th:nth-child(2),
.qcm-vf-table thead th:nth-child(3) { width: 22.5%; text-align: center; }
.qcm-vf-table tbody tr:not(:last-child) td {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.qcm-vf-table td {
  padding: 0.5rem 0.25rem;
}
.qcm-vf-proposition {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  padding-right: 0.5rem;
}
.qcm-on-wrap {
  display: flex;
  gap: 0.5rem;
}
.qcm-vf-btn,
.qcm-on-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.qcm-vf-btn {
  width: 100%;
  min-width: 64px;
  padding: 0.45rem 0.35rem;
  border-radius: 6px;
  font-size: 0.75rem;
}
.qcm-on-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}
.qcm-vf-btn:hover,
.qcm-on-btn:hover {
  border-color: var(--blue-light);
  color: var(--blue-light);
}
.qcm-vf-btn.selected,
.qcm-on-btn.selected {
  background: var(--blue-light);
  border-color: var(--blue-light);
  color: #0f172a;
}
.qcm-vf-btn.correct-answer,
.qcm-on-btn.correct-answer {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
  color: #34d399;
}
.qcm-vf-btn.wrong-answer,
.qcm-on-btn.wrong-answer {
  background: rgba(239, 68, 68, 0.15);
  border-color: #f87171;
  color: #f87171;
}

/* ============================================================
   ÉPREUVE PRATIQUE — GRILLE A/B/C/D (NF C 18-510, Annexe D)
   ============================================================ */
.pratique-grid th.col-abcd { text-align: center; }

.pratique-radio-cell {
  text-align: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: background 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}
.pratique-radio-cell:hover { background: rgba(255, 255, 255, 0.06); }
.pratique-radio-cell.selected-A { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.pratique-radio-cell.selected-B { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.pratique-radio-cell.selected-C { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.pratique-radio-cell.selected-D { background: rgba(239, 68, 68, 0.18); color: #f87171; }

.pratique-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.pratique-legend-item { display: flex; align-items: center; gap: 0.4rem; flex: 1 1 45%; }
.badge-abcd {
  width: 20px; height: 20px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 0.75rem;
  flex-shrink: 0;
}
.pratique-acceptation {
  padding: 0.7rem 1.25rem;
  background: rgba(16, 185, 129, 0.08);
  border-top: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  color: #34d399;
  line-height: 1.4;
}

/* ---- Bascule de mode : mise en situation réelle ↔ par questions ---- */
.pratique-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pratique-mode-btn {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.pratique-mode-btn:hover { border-color: var(--blue-light); color: var(--white); }
.pratique-mode-btn.active {
  background: var(--blue-primary);
  border-color: var(--blue-light);
  color: var(--white);
}
.pratique-mode-btn.active .pratique-subst-badge { background: rgba(255, 255, 255, 0.25); color: var(--white); }
.pratique-serie-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pratique-serie-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}
.pratique-serie-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.pratique-serie-btn:hover { border-color: var(--blue-light); color: var(--white); }
.pratique-serie-btn.active {
  background: var(--blue-primary);
  border-color: var(--blue-light);
  color: var(--white);
}
.pratique-serie-btn.active .pratique-subst-badge { background: rgba(255, 255, 255, 0.25); color: var(--white); }
.pratique-subst-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: var(--gold);
  color: #1e293b;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* ---- QCM de substitution ---- */
.pratique-subst-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(30, 95, 189, 0.06));
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 700;
  color: var(--white);
  font-size: 0.88rem;
}
.pratique-subst-icon { margin-right: 0.35rem; }
.pratique-subst-eval-toggle {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.pratique-subst-eval-toggle:hover { border-color: var(--blue-light); color: var(--white); }
.pratique-subst-eval-toggle.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a78bfa;
  color: #c4b5fd;
}
.pratique-subst-warn {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px dashed rgba(251, 191, 36, 0.4);
}
.pratique-subst-lvl-badge {
  margin-left: 0.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  border: 1px solid;
}
.pratique-subst-lvl-badge.lvl-A { color: #34d399; border-color: #34d399; background: rgba(52, 211, 153, 0.12); }
.pratique-subst-lvl-badge.lvl-B { color: #60a5fa; border-color: #60a5fa; background: rgba(96, 165, 250, 0.12); }
.pratique-subst-lvl-badge.lvl-C { color: #fbbf24; border-color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.pratique-subst-lvl-badge.lvl-D { color: #f87171; border-color: #f87171; background: rgba(248, 113, 113, 0.12); }
.pratique-subst-desc { font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); line-height: 1.5; }
.pratique-subst-question {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pratique-subst-q-title { font-size: 0.88rem; color: var(--white); margin-bottom: 0.6rem; line-height: 1.5; }
.pratique-subst-eval {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.pratique-subst-eval-label { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); margin-right: 0.25rem; }
.pratique-subst-eval-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}
.pratique-subst-eval-btn:hover { border-color: var(--blue-light); color: var(--white); }
.pratique-subst-eval-btn.selected-A { background: rgba(16, 185, 129, 0.25); border-color: #34d399; color: #34d399; }
.pratique-subst-eval-btn.selected-B { background: rgba(59, 130, 246, 0.25); border-color: #60a5fa; color: #60a5fa; }
.pratique-subst-eval-btn.selected-C { background: rgba(245, 158, 11, 0.25); border-color: #fbbf24; color: #fbbf24; }
.pratique-subst-eval-btn.selected-D { background: rgba(239, 68, 68, 0.25); border-color: #f87171; color: #f87171; }
.pratique-subst-verdict {
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.5rem;
}
.pratique-subst-verdict.ok { color: #34d399; }
.pratique-subst-verdict.ko { color: #f87171; }
.pratique-subst-manual {
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 0.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  color: #94a3b8;
  border: 1px dashed rgba(148, 163, 184, 0.4);
}
.pratique-subst-manual.yes {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.08);
}
.pratique-subst-bareme {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 1.25rem 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.pratique-subst-bareme-title { font-weight: 700; }
.pratique-subst-bareme-item {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pratique-subst-bareme-item.sel {
  outline: 2px solid var(--blue-light);
  color: var(--white);
}
.pratique-subst-bareme-item b.lvl-A { color: #34d399; }
.pratique-subst-bareme-item b.lvl-B { color: #60a5fa; }
.pratique-subst-bareme-item b.lvl-C { color: #fbbf24; }
.pratique-subst-bareme-item b.lvl-D { color: #f87171; }
.pratique-subst-bareme-hint { margin-left: auto; font-weight: 600; }
.pratique-subst-bareme-hint b.lvl-A { color: #34d399; }
.pratique-subst-bareme-hint b.lvl-B { color: #60a5fa; }
.pratique-subst-bareme-hint b.lvl-C { color: #fbbf24; }
.pratique-subst-bareme-hint b.lvl-D { color: #f87171; }

.pratique-subst-bilan {
  margin: 0.9rem 1.25rem 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pratique-subst-bilan.ok { border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.07); }
.pratique-subst-bilan.ko { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.07); }
.pratique-subst-bilan-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.pratique-subst-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}
.pratique-subst-legend b { margin-right: 0.2rem; }
.pratique-subst-bilan-verdict { font-size: 0.85rem; font-weight: 700; line-height: 1.5; }
.pratique-subst-bilan.ok .pratique-subst-bilan-verdict { color: #34d399; }
.pratique-subst-bilan.ko .pratique-subst-bilan-verdict { color: #f87171; }
.pratique-subst-bilan.pending .pratique-subst-bilan-verdict { color: var(--gold); }
.pratique-subst-override {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.pratique-subst-override input { accent-color: var(--gold); width: 16px; height: 16px; }




.brouillon-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  background: rgba(245,166,35,0.10); border: 1px solid rgba(245,166,35,0.35);
  border-left: 4px solid var(--gold); color: var(--text-primary);
  padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem;
  font-size: 0.85rem;
}
.brouillon-banner em { color: var(--text-secondary); font-size: 0.75rem; }

.btn-secondary-sm {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary); padding: 0.4rem 0.9rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-secondary-sm:hover { background: rgba(255,255,255,0.12); border-color: rgba(96,165,250,0.5); }
.tools-bar { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 0.75rem; }
#modal-content label { display: block; color: var(--text-secondary); font-size: 0.8rem; margin-bottom: 0.3rem; }
#modal-content .form-input { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: var(--text-primary); border-radius: var(--radius-sm); padding: 0.5rem 0.7rem; font-size: 1rem; }

.qcm-pts-row { display:flex; align-items:center; gap:0.5rem; margin-top:0.6rem; font-size:0.8rem; color:#94a3b8; }
.qcm-pts-label { white-space:nowrap; }
.qcm-pts-input { width:64px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.15); color:var(--text-primary); border-radius:6px; padding:0.3rem 0.5rem; font-size:1rem; }

/* ============================================================
   MOBILE IMPROVEMENTS — tap targets, overscroll, reduced-motion
============================================================ */

/* B3 — tap targets min 48px */
@media (max-width: 768px) {
  .filter-btn {
    min-height: 44px; padding: 0.5rem 0.875rem;
  }
  .criterion-item {
    min-height: 48px;
  }
  .sessions-tab-btn {
    min-height: 44px;
  }
  /* Cartes sessions — layout compact mobile */
  .sg-card-summary {
    min-height: 60px;
  }
  .sg-card-counters {
    gap: 0.25rem;
    padding: 0 0.25rem;
  }
  .sg-counter {
    min-width: 36px;
    padding: 0.2rem 0.3rem;
    border-radius: 6px;
  }
  .sg-counter-val { font-size: 0.9rem; }
  .sg-counter-lbl { font-size: 0.5rem; }
  .sg-card-chevron { width: 24px; padding-right: 0.5rem; }
  .sg-card-title { font-size: 0.88rem; }
  .sg-card-sub { font-size: 0.7rem; }
  .sg-card-summary-inner { padding: 0.65rem 0.5rem 0.65rem 0.75rem; }
  .sg-card-content { padding: 0.75rem 0.75rem 1rem 1rem; }
  .sg-btns { gap: 0.35rem; }
  .sg-btns button, .sg-btns .btn-secondary, .sg-btns .btn-primary {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.72rem !important;
  }
  .active-sessions-body { padding: 0.5rem 0.3rem 0.3rem; }
}

/* B4 — prevent pull-to-refresh on mobile candidate mode */
body.mobile-candidat-mode {
  overscroll-behavior: contain;
}

/* B4 — prevent rubber-banding on the candidate form */
body.mobile-candidat-mode #mobile-stagiaire {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* B5 — reduced motion: disable transitions/animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* C4 — fiches grid responsive override (inline style uses 350px min, too wide for phones) */
@media (max-width: 768px) {
  .fiches-grid,
  .container [style*="minmax(350px"] {
    grid-template-columns: 1fr !important;
  }
}

/* Safe-area: alerte-bandeau at top */
@media (max-width: 768px) {
  .alerte-bandeau {
    top: calc(68px + env(safe-area-inset-top));
  }
  .mobile-menu {
    top: calc(68px + env(safe-area-inset-top));
  }
}

/* ============================================================
   MOBILE TTS & SIGNATURE STYLES
============================================================ */
.btn-mobile-tts {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.btn-mobile-tts:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
}
.btn-outline-sm {
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-outline-sm:hover {
  background: rgba(248, 113, 113, 0.15);
}
.mobile-signature-box {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
