:root {
  --cf-grey: #1e293b;
  --cf-grey-2: #64748b;
  --cf-line: #e2e8f0;
  --cf-bg: #f8fafc;
  --cf-surface: #ffffff;
  --mpg-green: #18a095;
  --mpg-green-dark: #0e6c64;
  --mpg-yellow: #f8b332;
  --mpg-orange: #e8501f;
  --mpg-blue: #0a2540;
  --shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-soft: 0 8px 24px -6px rgba(15, 23, 42, 0.04);
  --shadow-premium: 0 20px 48px -12px rgba(10, 37, 64, 0.08), 0 8px 16px -4px rgba(10, 37, 64, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(226, 232, 240, 0.7);
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --navbar-height: 110px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--cf-grey);
  background:
    linear-gradient(180deg, rgba(24, 160, 149, 0.05), rgba(248, 179, 50, 0.03) 360px, transparent 720px),
    var(--cf-bg);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Premium Top Navbar */
.top-navbar {
  height: var(--navbar-height);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--cf-line);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: height 0.3s ease, background 0.3s ease;
}

.top-navbar-container {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.top-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.top-navbar-brand .brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.top-navbar-brand .brand-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--cf-grey);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.top-navbar-brand .brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--mpg-green);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.top-navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.top-navbar-nav .nav-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cf-grey-2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.top-navbar-nav .nav-button b {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.top-navbar-nav .nav-button i {
  display: none !important; /* Hide chevron on top navbar */
}

.top-navbar-nav .nav-button:hover {
  background: rgba(24, 160, 149, 0.05);
  color: var(--mpg-green-dark);
}

.top-navbar-nav .nav-button.active {
  background: rgba(24, 160, 149, 0.09);
  color: var(--mpg-green-dark);
  box-shadow: none;
}

.top-navbar-nav .nav-button.active b {
  background: var(--mpg-green);
  color: #ffffff;
  box-shadow: none;
}

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

.compact-role-selector {
  display: flex;
  border: 1px solid var(--cf-line);
  background: var(--cf-bg);
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.role-toggle-btn {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.role-toggle-btn.active {
  background: var(--cf-surface);
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.08);
}

.mode-toggle-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 24px;
}

.mode-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.mode-toggle-btn.active {
  background: var(--cf-surface);
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.08);
}

.top-navbar-actions .reset-btn {
  margin: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--cf-line);
  background: var(--cf-surface);
  color: var(--cf-grey-2);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.top-navbar-actions .reset-btn:hover {
  background: #fff0f0;
  border-color: #fca5a5;
  color: var(--mpg-orange);
}

.sidebar {
  background: var(--cf-surface);
  border-right: 1px solid var(--cf-line);
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  transition: all 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 10px;
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  background: var(--cf-bg);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.brand-logo {
  max-width: 100%;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  transition: all 0.2s ease;
}

.nav-collapsed .brand-logo {
  max-height: 28px;
}

.brand-mark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(10, 37, 64, 0.08);
  flex-shrink: 0;
}

.brand-mark span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 6px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
  line-height: 1;
}

.brand-mark span:nth-child(1) {
  background: var(--mpg-yellow);
}

.brand-mark span:nth-child(2) {
  background: var(--mpg-orange);
}

.brand-mark span:nth-child(3) {
  background: var(--mpg-green);
}

.brand-title {
  color: var(--cf-grey);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.collapse-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  background: var(--cf-surface);
  color: var(--cf-grey-2);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.collapse-button:hover {
  background: var(--cf-bg);
  color: var(--cf-grey);
  border-color: color-mix(in srgb, var(--cf-line), var(--cf-grey) 20%);
}

.collapse-button span {
  font-size: 14px;
  line-height: 1;
}

.nav-title {
  color: var(--cf-grey-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 22px 0 8px;
  padding-left: 6px;
  opacity: 0.8;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--cf-grey-2);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-button b {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--cf-bg);
  color: var(--cf-grey-2);
  font-size: 12px;
  flex: 0 0 auto;
  transition: all 0.2s ease;
}

.nav-button b svg,
.mobile-nav-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.nav-button i {
  font-style: normal;
  opacity: 0.4;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: var(--cf-bg);
  color: var(--cf-grey);
}

.nav-button:hover b {
  background: var(--cf-surface);
  color: var(--mpg-green);
  box-shadow: 0 2px 8px rgba(24, 160, 149, 0.15);
}

.nav-button:hover i {
  transform: translateX(2px);
  opacity: 0.8;
}

.nav-button.active {
  background: rgba(24, 160, 149, 0.06);
  color: var(--mpg-green-dark);
  font-weight: 600;
}

.nav-button.active b {
  background: var(--mpg-green);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(24, 160, 149, 0.25);
}

.nav-button.active i {
  opacity: 0.8;
  color: var(--mpg-green-dark);
}

.nav-collapsed .sidebar {
  padding: 14px 10px;
}

.nav-collapsed .brand {
  justify-content: center;
  padding: 8px;
}

.nav-collapsed .brand-mark {
  font-size: 9px;
}

.nav-collapsed .brand-title,
.nav-collapsed .nav-title,
.nav-collapsed .nav-button span,
.nav-collapsed .nav-button i,
.nav-collapsed .collapse-button strong,
.nav-collapsed #resetDemo {
  display: none;
}

.nav-collapsed .nav-button {
  justify-content: center;
  padding: 9px 0;
}

.nav-collapsed .nav-button.active {
  box-shadow: inset 0 -3px 0 var(--mpg-green);
}

.main {
  min-width: 0;
}

.topbar {
  height: 76px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: var(--navbar-height);
  z-index: 5;
}

.topbar-container {
  max-width: 1440px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.topbar h1 {
  margin: 0;
  color: var(--cf-grey);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.button {
  border: 1px solid var(--cf-line);
  background: var(--cf-surface);
  color: var(--cf-grey);
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13.5px;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.button:hover {
  border-color: color-mix(in srgb, var(--cf-line), var(--cf-grey) 30%);
  background: var(--cf-bg);
  color: var(--cf-grey);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  background: var(--mpg-green);
  border-color: var(--mpg-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 160, 149, 0.2);
}

.button.primary:hover {
  background: var(--mpg-green-dark);
  border-color: var(--mpg-green-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(24, 160, 149, 0.3);
}

.button.orange {
  background: var(--mpg-orange);
  border-color: var(--mpg-orange);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 80, 31, 0.2);
}

.button.orange:hover {
  background: #cc4014;
  border-color: #cc4014;
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 80, 31, 0.3);
}

.workspace {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.mobile-nav {
  display: none;
}

.interview-strip {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr minmax(150px, 220px);
  align-items: center;
  gap: 12px;
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-left: 6px solid var(--axis-color);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  padding: 12px 18px;
  transition: transform 0.2s ease;
}

.interview-strip strong {
  color: var(--cf-grey);
  font-size: 17px;
  margin-right: 6px;
  font-weight: 800;
}

.interview-strip span {
  color: var(--cf-grey-2);
  font-size: 12.5px;
  font-weight: 600;
}

.interview-client {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
}

.interview-client strong {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.interview-client span {
  font-size: 12px;
}

.progress-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-track i {
  display: block;
  height: 100%;
  background: var(--axis-color);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.cols-2 {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

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

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(24, 160, 149, 0.08) 0%, rgba(10, 37, 64, 0.06) 100%),
    var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  overflow: hidden;
}

.hero-panel > div:first-child {
  padding: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mpg-green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-panel h2 {
  max-width: 840px;
  margin: 0 0 12px;
  color: var(--mpg-blue);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-panel p {
  max-width: 760px;
  margin: 0;
  color: var(--cf-grey-2);
  font-size: 15px;
  line-height: 1.6;
}

.hero-status {
  display: grid;
  align-content: center;
  gap: 12px;
  background: var(--mpg-blue);
  color: #fff;
  padding: 32px;
  box-shadow: -4px 0 24px rgba(10, 37, 64, 0.15);
}

.hero-status span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-status strong {
  font-size: 24px;
  line-height: 1.2;
}

.step-card .panel-body {
  min-height: 150px;
  display: grid;
  align-content: space-between;
}

.panel {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-premium);
  border-color: color-mix(in srgb, var(--cf-line), var(--mpg-green) 20%);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--cf-line);
  background: linear-gradient(180deg, var(--cf-surface), var(--cf-bg));
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  color: var(--cf-grey);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel-header h2 {
  font-size: 18px;
}

.panel-body {
  padding: 20px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--cf-grey-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--cf-line);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--cf-surface);
  color: var(--cf-grey);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--mpg-green);
  box-shadow: 0 0 0 4px rgba(24, 160, 149, 0.12);
}

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

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.kpi {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
}

.kpi strong {
  display: block;
  color: var(--mpg-blue);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi span {
  color: var(--cf-grey-2);
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  display: inline-block;
}

.kpi .category-badge {
  margin-bottom: 8px;
}

.question-layout {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 18px;
  align-items: start;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed States */
.question-layout.left-collapsed {
  grid-template-columns: 1fr 340px;
}

.question-layout.right-collapsed {
  grid-template-columns: 280px 1fr;
}

.question-layout.left-collapsed.right-collapsed {
  grid-template-columns: 1fr;
}

/* Collapsed Panels */
.toc-panel.collapsed,
.insight-panel.collapsed {
  display: none !important;
}

/* Premium Sidebars Positioning */
.toc-panel,
.insight-panel {
  position: sticky;
  top: 164px !important;
}

/* Toggle Sidebar Buttons styling */
.btn-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--cf-bg);
  color: var(--cf-grey-2);
  border: 1px solid var(--cf-line);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sidebar-toggle:hover {
  background: #edf2f7;
  color: var(--cf-grey);
  border-color: #cbd5e1;
}

/* Premium Glassmorphic style for insight-panel when open */
.toc-panel,
.insight-panel {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.03) !important;
  transition: all 0.3s ease;
}

.toc-list {
  display: grid;
  gap: 6px;
}

.toc-axis {
  border-left: 5px solid var(--axis-color);
  padding-left: 10px;
}

.toc-axis + .toc-axis {
  margin-top: 8px;
}

.issue-search {
  margin-bottom: 12px;
}

.issue-search label {
  font-size: 12px;
}

.toc-axis summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 6px;
  cursor: pointer;
  list-style: none;
  color: var(--cf-grey);
  font-weight: 800;
}

.toc-axis summary::-webkit-details-marker {
  display: none;
}

.toc-axis summary::before {
  content: "›";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--axis-color), white 84%);
  color: var(--cf-grey);
  transform: rotate(0deg);
  transition: transform 0.12s ease;
  flex: 0 0 auto;
}

.toc-axis[open] summary::before {
  transform: rotate(90deg);
}

.toc-axis summary span {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.toc-axis summary small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  background: #eef2f2;
  color: var(--cf-grey-2);
  font-size: 12px;
}

.toc-axis h3 {
  margin: 12px 0 8px;
  color: var(--cf-grey);
  font-size: 14px;
}

.toc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid var(--cf-line);
  background: var(--cf-surface);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 500;
  transition: all 0.2s ease;
}

.toc-item.active {
  border-color: var(--axis-color);
  background: color-mix(in srgb, var(--axis-color), white 94%);
  color: var(--cf-grey);
  font-weight: 600;
}

.toc-item:hover {
  border-color: color-mix(in srgb, var(--cf-line), var(--cf-grey) 20%);
  background: var(--cf-bg);
}

.toc-item small {
  color: var(--cf-grey-2);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f4f6f5;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
  vertical-align: middle;
}

.category-inline {
  width: 24px;
  height: 24px;
  margin-right: 4px;
}

.category-toc {
  width: 26px;
  height: 26px;
  margin-left: 8px;
}

.category-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 8px;
}

.category-item span {
  min-width: 0;
}

.category-maturite {
  background: #e7f6f4;
}

.category-interet {
  background: #fff3d6;
}

.category-ombre {
  background: #fce7df;
}

.category-non-concerned {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
}

.category-review-later {
  background: #fef3c7;
  border: 1px dashed #fcd34d;
}



.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c6cbc9;
  flex: 0 0 auto;
}

.status-dot.done {
  background: var(--mpg-green);
}

.status-dot.skip {
  background: var(--cf-grey-2);
}

.question-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  overflow: visible;
}

.question-head {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border-top: 0;
  box-shadow: inset 0 6px 0 var(--axis-color);
  padding: 24px 28px;
  border-bottom: 1px solid var(--cf-line);
  background: linear-gradient(180deg, var(--cf-surface), var(--cf-bg));
}

.question-head p {
  margin: 0 0 6px;
  color: var(--cf-grey-2);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.question-head h2 {
  margin: 0;
  color: var(--mpg-blue);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.score-block {
  padding: 24px 28px;
  display: grid;
  gap: 20px;
}

.score-matrix {
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  background: var(--cf-surface);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.score-matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--axis-color), white 92%), var(--cf-surface));
  border-bottom: 1px solid var(--cf-line);
}

.score-matrix-head strong {
  display: block;
  color: var(--mpg-blue);
  font-size: 16px;
  font-weight: 800;
}

.score-matrix-head span {
  color: var(--cf-grey-2);
  font-size: 13px;
  font-weight: 600;
}

.score-matrix-grid {
  display: grid;
  grid-template-columns: 160px repeat(4, minmax(80px, 1fr));
  gap: 1px;
  background: var(--cf-line);
}

.score-corner,
.score-column-title,
.score-row-title,
.score-cell {
  background: var(--cf-surface);
}

.score-column-title {
  min-height: 60px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--cf-line);
}

.score-column-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  color: var(--cf-grey);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  padding: 0 4px;
}

.score-column-title strong {
  color: var(--cf-grey);
  font-size: 12.5px;
  font-weight: 800;
}

.score-column-title small {
  color: var(--cf-grey-2);
  font-size: 10.5px;
  font-weight: 600;
}

.score-row-title {
  min-height: 60px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px 16px;
  box-shadow: inset 4px 0 0 var(--axis-color);
}

.score-row-title strong {
  color: var(--cf-grey);
  font-size: 15px;
  font-weight: 800;
}

.score-row-title small {
  color: var(--cf-grey-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.score-cell {
  min-height: 60px;
  border: 0;
  color: var(--cf-grey);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 8px;
  text-align: center;
  touch-action: manipulation;
  cursor: pointer;
  transition: all 0.2s ease;
}

.score-cell span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.score-cell i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--cf-line);
  border-radius: 50%;
  background: var(--cf-surface);
  transition: all 0.2s ease;
  box-shadow: inset 0 0 0 3px var(--cf-surface);
}

.score-cell small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.score-cell:hover {
  background: color-mix(in srgb, var(--axis-color), white 94%);
}

.score-cell:hover i {
  border-color: var(--axis-color);
}

.score-cell.active {
  background: color-mix(in srgb, var(--axis-color), white 92%);
}

.score-cell.active i {
  background: var(--axis-color);
  border-color: var(--axis-color);
  box-shadow: inset 0 0 0 4px var(--cf-surface);
}

.score-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: stretch;
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  background: var(--cf-surface);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.score-label {
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--cf-line);
  padding-right: 16px;
}

.score-label strong {
  color: var(--mpg-blue);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.score-label small {
  color: var(--cf-grey-2);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.score-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.score-option {
  border: 1px solid var(--cf-line);
  background: var(--cf-surface);
  color: var(--cf-grey);
  border-radius: 10px;
  min-height: 76px;
  padding: 12px;
  font-weight: 700;
  touch-action: manipulation;
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.score-option:hover {
  transform: translateY(-2px);
  border-color: var(--axis-color);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.06);
}

.score-option span,
.score-option small {
  display: block;
}

.score-option i {
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cf-bg);
  color: var(--cf-grey);
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.score-option span {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--cf-grey);
}

.score-option small {
  color: var(--cf-grey-2);
  font-size: 11px;
  font-weight: 600;
  margin-top: 1px;
}

.score-option.active {
  background: var(--axis-color);
  border-color: var(--axis-color);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--axis-color), transparent 75%);
}

.score-option.active small {
  color: rgba(255, 255, 255, 0.85);
}

.score-option.active i {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.score-row-want {
  box-shadow: inset 5px 0 0 0 var(--axis-color), var(--shadow-soft);
}

.score-row-can {
  box-shadow: inset 5px 0 0 0 var(--cf-grey-2), var(--shadow-soft);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cf-grey);
  font-weight: 700;
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
}

.switch-row input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--mpg-green);
}

.interview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
}

.quick-action-panel {
  display: grid;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--axis-color), transparent 70%);
  border-left: 5px solid var(--axis-color);
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--axis-color), white 95%), var(--cf-surface));
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.quick-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-action-head strong {
  display: block;
  color: var(--mpg-blue);
  font-size: 16.5px;
  font-weight: 800;
}

.quick-action-head span {
  color: var(--cf-grey-2);
  font-size: 12.5px;
  font-weight: 700;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inline-action-list {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--cf-line);
  padding-top: 14px;
}

.inline-action-list div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  background: var(--cf-surface);
  padding: 10px 14px;
  box-shadow: 0 2px 4px rgba(10, 37, 64, 0.02);
  transition: all 0.2s ease;
}

.inline-action-list div:hover {
  border-color: var(--axis-color);
  transform: translateX(2px);
  box-shadow: 0 4px 8px rgba(10, 37, 64, 0.04);
}

.inline-action-list strong {
  color: var(--cf-grey);
  font-size: 14px;
  font-weight: 700;
}

.inline-action-list span {
  color: var(--cf-grey-2);
  font-size: 12px;
  font-weight: 600;
}

.toc-panel,
.insight-panel {
  position: sticky;
  top: 164px !important;
}

.insight-list {
  display: grid;
  gap: 12px;
}

.context-list {
  display: grid;
  gap: 10px;
}

.context-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--cf-line);
  border-left: 4px solid var(--axis-color);
  border-radius: 8px;
  background: var(--cf-surface);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.context-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.04);
  border-color: color-mix(in srgb, var(--cf-line), var(--cf-grey-2) 30%);
}

.context-item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--axis-color), white 90%);
  color: var(--axis-color);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.context-item p {
  margin: 0;
  color: var(--cf-grey);
  font-size: 13.5px;
  line-height: 1.45;
}

.context-item strong {
  font-weight: 800;
}

.insight-item {
  border: 1px solid var(--cf-line);
  border-left: 4px solid var(--item-color);
  background: var(--cf-surface);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.insight-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.04);
  border-color: color-mix(in srgb, var(--cf-line), var(--cf-grey-2) 30%);
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

canvas {
  width: 100%;
  max-width: 100%;
  background: var(--cf-surface);
}

#wantChart,
#canChart {
  min-height: 420px;
}

.action-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.action-table th,
.action-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

.action-table th {
  color: var(--cf-grey);
  background: var(--cf-bg);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--cf-line);
}

.action-table td {
  border-bottom: 1px solid var(--cf-line);
  color: var(--cf-grey);
}

.action-table tr {
  transition: background 0.15s ease;
}

.action-table tr:hover td {
  background: color-mix(in srgb, var(--mpg-green), transparent 97%);
}

.action-table tr:last-child td {
  border-bottom: none;
}

.action-table td .button {
  padding: 6px 12px;
  font-size: 12px;
  min-height: auto;
  background: transparent;
  color: var(--mpg-orange);
  border: 1px solid color-mix(in srgb, var(--mpg-orange), transparent 80%);
  border-radius: 6px;
  box-shadow: none;
}

.action-table td .button:hover {
  background: var(--mpg-orange);
  color: #fff;
  border-color: var(--mpg-orange);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--mpg-orange), transparent 80%);
  transform: translateY(-1px);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--mpg-green), transparent 90%);
  color: var(--mpg-green-dark);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--mpg-green), transparent 80%);
}

.report {
  background: var(--cf-surface);
  max-width: 1120px;
  margin: 20px auto;
  border: 1px solid var(--cf-line);
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  overflow: hidden;
}

.report-page {
  min-height: 840px;
  padding: 60px 80px;
  position: relative;
  background: var(--cf-surface);
  border-bottom: 1px solid var(--cf-line);
}

.report-page:last-child {
  border-bottom: none;
}

.report-cover-logo {
  max-width: 320px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  margin-bottom: 32px;
  display: block;
}

.report-cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 840px;
  background: 
    radial-gradient(circle at top right, color-mix(in srgb, var(--mpg-green), transparent 90%), transparent 400px),
    radial-gradient(circle at bottom left, color-mix(in srgb, var(--mpg-orange), transparent 93%), transparent 500px),
    var(--cf-surface);
  padding: 80px;
  position: relative;
}

.report-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--mpg-yellow), var(--mpg-orange), var(--mpg-green));
}

.report-title {
  color: var(--mpg-blue);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 32px 0 16px;
  letter-spacing: -0.03em;
}

.report-cover p {
  margin: 8px 0;
  font-size: 16px;
  color: var(--cf-grey);
  display: flex;
  gap: 12px;
}

.report-cover p strong {
  min-width: 120px;
  color: var(--cf-grey-2);
}

.report-page h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--mpg-blue);
  margin-top: 0;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 8px;
}

.report-page h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 4px;
  background: var(--mpg-green);
  border-radius: 2px;
}

.report-page p {
  color: var(--cf-grey);
  font-size: 15px;
  line-height: 1.6;
  margin: 10px 0;
}

.muted {
  color: var(--cf-grey-2);
  font-size: 13.5px;
}

.empty {
  color: var(--cf-grey-2);
  padding: 32px;
  text-align: center;
  border: 2px dashed var(--cf-line);
  border-radius: 12px;
  background: var(--cf-bg);
  font-size: 14px;
}

/* --- Strategic Analysis System (Matrice 2x2 & Profils) --- */
.profile-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.profile-kpi-box {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cf-grey-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--mpg-blue);
  line-height: 1.1;
}

.kpi-value small {
  font-size: 14px;
  color: var(--cf-grey-2);
  font-weight: 600;
}

.profile-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-red { background: #fce7df; color: var(--mpg-orange); }
.badge-yellow { background: #fff3d6; color: #b27a06; }
.badge-green { background: #e7f6f4; color: var(--mpg-green-dark); }
.badge-green-dark { background: var(--mpg-green-dark); color: #fff; }
.badge-blue { background: #edf5fe; color: #0a2540; }
.badge-orange { background: #fff2ed; color: var(--mpg-orange); }
.badge-grey { background: var(--cf-bg); color: var(--cf-grey-2); }

.strategy-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.quadrant-card {
  border: 1.5px solid var(--cf-line);
  border-radius: 14px;
  padding: 20px;
  background: var(--cf-surface);
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quadrant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
}

.quadrant-forces { border-left: 6px solid var(--mpg-green); }
.quadrant-chantiers { border-left: 6px solid var(--mpg-orange); }
.quadrant-acquis { border-left: 6px solid #3b82f6; }
.quadrant-vigilances { border-left: 6px solid var(--cf-grey-2); }

.quadrant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--cf-line);
  padding-bottom: 8px;
}

.quadrant-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--cf-grey);
}

.quadrant-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--cf-bg);
  color: var(--cf-grey);
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px;
}

.quadrant-desc {
  font-size: 12.5px;
  color: var(--cf-grey-2);
  margin: 0;
  line-height: 1.4;
}

.quadrant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.empty-quadrant {
  font-size: 12.5px;
  color: var(--cf-grey-2);
  font-style: italic;
  padding: 10px 0;
}

.urgent-action-box {
  background: #fff5f2;
  border-left: 4px solid var(--mpg-orange);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--cf-grey);
  line-height: 1.5;
}

/* --- Star Profiles Styles (Cerfrance Modern Identity) --- */
.star-profiles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.axis-star-column {
  border: 1px solid var(--cf-line);
  border-top: 5px solid var(--axis-color);
  border-radius: 12px;
  background: var(--cf-surface);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.axis-star-column:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-premium);
}

.axis-column-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--cf-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.axis-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.axis-column-header h3 {
  margin: 0;
  color: var(--mpg-blue);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
}

.axis-canvas-container {
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--cf-surface);
  flex-grow: 1;
}

.axis-column-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--cf-line);
  background: var(--cf-bg);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cf-grey-2);
  text-align: center;
}

/* Tab Control Styles */
.synthesis-tabs {
  display: inline-flex;
  background: var(--cf-bg);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--cf-line);
}

.tab-btn {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cf-grey);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--mpg-blue);
}

.tab-btn.active {
  background: var(--cf-surface);
  color: var(--mpg-blue);
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08);
}

/* Dossiers Table Styles */
.dossiers-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.dossiers-table th {
  padding: 14px 20px;
  background: var(--cf-bg);
  color: var(--cf-grey-2);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--cf-line);
}

.dossiers-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--cf-line);
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

.dossiers-table tbody tr {
  transition: all 0.2s ease;
}

.dossiers-table tbody tr:hover td {
  background-color: rgba(24, 160, 149, 0.015);
}

/* Highlight active row */
.dossiers-table tbody tr.active-row td {
  background-color: rgba(24, 160, 149, 0.04);
}

.dossiers-table tbody tr.active-row {
  border-left: 4px solid var(--mpg-green);
}

.dossiers-table tbody tr:not(.active-row) {
  border-left: 4px solid transparent;
}

/* Dossier Progress Bar */
.dossier-progress-bar-container {
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dossier-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mpg-yellow), var(--mpg-green));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* KPI mini progress */
.kpi-mini-progress {
  height: 6px;
  background-color: #f1f5f9;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.kpi-mini-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mpg-yellow), var(--mpg-green));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Sector tag & Status Badge adjustments if any */
.sector-tag {
  transition: all 0.2s ease;
  display: inline-block;
  letter-spacing: 0.02em;
}

.status-badge {
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* Dossier Creation Panel Glassmorphism */
.dossier-creation-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-premium);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dossier Inline Edit Grid */
.inline-edit-grid {
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   ROLE SELECTOR PREMIUM
   ========================================================================== */
.role-selector-premium {
  box-shadow: inset 0 1px 3px rgba(10, 37, 64, 0.02);
}

.role-badge-btn {
  border: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-badge-btn:hover {
  background-color: rgba(24, 160, 149, 0.05) !important;
  transform: translateY(-1px);
}

.role-badge-btn:active {
  transform: translateY(0);
}

.role-badge-btn .role-check {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.role-badge-btn[style*="var(--cf-surface)"] .role-check {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   ADMINISTRATION MODULE
   ========================================================================== */
.admin-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.admin-sidebar-card {
  position: sticky;
  top: 24px;
}

.admin-quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--cf-line);
  border-radius: 10px;
  background: var(--cf-surface);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
}

.admin-quest-item:hover {
  border-color: var(--mpg-green);
  background: rgba(24, 160, 149, 0.02);
  transform: translateX(4px);
}

.admin-quest-item.active {
  border-color: var(--mpg-green);
  background: rgba(24, 160, 149, 0.05);
  box-shadow: 0 4px 14px rgba(24, 160, 149, 0.08);
}

.admin-quest-icon {
  font-size: 20px;
  margin-right: 12px;
}

.admin-quest-label {
  font-weight: 700;
  color: var(--mpg-blue);
  flex-grow: 1;
  font-size: 13.5px;
}

/* Questions grouping by axis */
.admin-axis-group {
  margin-bottom: 24px;
  border: 1.5px dashed var(--cf-line);
  padding: 16px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.6);
  transition: all 0.2s ease;
}

.admin-axis-group:hover {
  border-color: var(--cf-grey-2);
  background: rgba(248, 250, 252, 0.95);
}

.admin-axis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--cf-line);
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-axis-title {
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cf-grey);
}

.admin-axis-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-issue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.admin-issue-row:hover {
  border-color: var(--cf-grey-2);
  background: var(--cf-bg);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.02);
}

.admin-issue-row.active {
  border-color: var(--mpg-orange);
  background: rgba(232, 80, 31, 0.03);
  box-shadow: inset 4px 0 0 var(--mpg-orange), 0 4px 12px rgba(232, 80, 31, 0.06);
}

.admin-issue-meta {
  font-size: 10.5px;
  font-weight: 800;
  background: var(--cf-bg);
  padding: 3px 8px;
  border-radius: 5px;
  margin-right: 12px;
  font-family: monospace;
}

.admin-issue-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--cf-grey);
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* Question Editor Card styling */
.admin-editor-card {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.admin-editor-section-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--mpg-blue);
  margin: 24px 0 14px;
  border-bottom: 2px solid var(--cf-line);
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-help-example-card {
  background: var(--cf-bg);
  border: 1px solid var(--cf-line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 80px 180px 1fr auto;
  gap: 12px;
  align-items: center;
  transition: all 0.2s ease;
}

.admin-help-example-card:hover {
  background: var(--cf-surface);
  border-color: var(--cf-grey-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.admin-help-followup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-help-followup-row input {
  transition: border-color 0.2s ease;
}

.admin-help-followup-row input:focus {
  border-color: var(--mpg-orange);
  outline: none;
}

/* Question Illustration Banner in Advisor Interview */
.question-illustration-banner {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--cf-line);
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.05);
  background-color: var(--cf-surface);
}

.question-illustration-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.question-illustration-banner:hover img {
  transform: scale(1.03);
}

/* Admin Illustration Uploader Styles */
.admin-illustration-card {
  transition: all 0.3s ease;
}

.admin-illustration-card:hover {
  border-color: var(--mpg-blue) !important;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.04);
}

.admin-illustration-preview-box {
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.admin-illustration-card:hover .admin-illustration-preview-box {
  border-color: rgba(10, 37, 64, 0.2);
}

/* Premium Advisor Toggles Redesign */
.premium-toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.premium-toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cf-surface);
  border: 2px solid var(--cf-line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
  user-select: none;
}

.premium-toggle-card:hover {
  transform: translateY(-2px);
  border-color: var(--cf-grey-3);
  box-shadow: var(--shadow-medium);
}

.toggle-card-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--cf-bg);
  border-radius: 6px;
  transition: all 0.25s ease;
}

.toggle-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.toggle-card-content strong {
  font-size: 13px;
  color: var(--cf-dark);
  font-weight: 700;
  transition: all 0.25s ease;
}

.toggle-card-content span {
  display: none;
}

/* Custom switch toggle track & thumb */
.toggle-card-switch {
  display: flex;
  align-items: center;
}

.switch-track {
  width: 34px;
  height: 18px;
  background: var(--cf-grey-4);
  border-radius: 100px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active State styling for Sujet Concerné (🎯 green) */
.premium-toggle-card#toggleConcerned.active {
  border-color: var(--mpg-green);
  background: color-mix(in srgb, var(--mpg-green) 4%, var(--cf-surface));
}

.premium-toggle-card#toggleConcerned.active .toggle-card-icon {
  background: var(--mpg-green);
  color: #fff;
}

.premium-toggle-card#toggleConcerned.active .toggle-card-content strong {
  color: var(--mpg-green);
}

.premium-toggle-card#toggleConcerned.active .switch-track {
  background: var(--mpg-green);
}

.premium-toggle-card#toggleConcerned.active .switch-thumb {
  left: calc(100% - 15px);
}

/* Active State styling for À Revoir Plus Tard (📌 orange) */
.premium-toggle-card#toggleReview.active {
  border-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 5%, var(--cf-surface));
}

.premium-toggle-card#toggleReview.active .toggle-card-icon {
  background: #f59e0b;
  color: #fff;
}

.premium-toggle-card#toggleReview.active .toggle-card-content strong {
  color: #d97706;
}

.premium-toggle-card#toggleReview.active .switch-track {
  background: #f59e0b;
}

.premium-toggle-card#toggleReview.active .switch-thumb {
  left: calc(100% - 15px);
}

/* Deactivated Question State */
.disabled-content .score-matrix {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(1) blur(0.2px);
  transition: all 0.3s ease;
}

.non-concerned-alert {
  background: color-mix(in srgb, var(--cf-grey) 8%, var(--cf-surface));
  border: 1px dashed var(--cf-line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 14px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--cf-grey);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Synthesis Review Later Panel Styles */
.review-later-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.review-later-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 12px;
}

.review-panel-desc {
  font-size: 13px;
  color: var(--cf-grey);
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
  text-align: left;
}

.review-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  background: var(--cf-bg);
  border: 1px dashed var(--cf-line);
  border-radius: 12px;
  gap: 8px;
}

.empty-state-icon {
  font-size: 34px;
  margin-bottom: 2px;
  animation: bounce-subtle 2.5s infinite ease-in-out;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.review-empty-state strong {
  font-size: 15px;
  color: var(--mpg-green);
  font-weight: 700;
}

.review-empty-state p {
  font-size: 12px;
  color: var(--cf-grey);
  margin: 0;
}

.review-later-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Custom Scrollbar for review list */
.review-later-list::-webkit-scrollbar {
  width: 6px;
}
.review-later-list::-webkit-scrollbar-track {
  background: var(--cf-bg);
  border-radius: 100px;
}
.review-later-list::-webkit-scrollbar-thumb {
  background: var(--cf-grey-4);
  border-radius: 100px;
}
.review-later-list::-webkit-scrollbar-thumb:hover {
  background: var(--cf-grey-3);
}

.review-later-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-left: 5px solid var(--axis-color);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 16px;
}

.review-later-item:hover {
  transform: translateX(4px);
  background: var(--cf-bg);
  border-color: var(--cf-grey-4);
  box-shadow: var(--shadow-soft);
}

.review-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  flex: 1;
  text-align: left;
}

.review-item-badge {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-item-title {
  font-size: 13px;
  color: var(--cf-dark);
  font-weight: 600;
  line-height: 1.35;
}

.review-item-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cf-grey);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.review-later-item:hover .review-item-action {
  color: var(--axis-color);
}

.review-action-arrow {
  transition: transform 0.2s ease;
}

.review-later-item:hover .review-action-arrow {
  transform: translateX(3px);
}


@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .question-layout,
  .grid.cols-2,
  .grid.cols-3,
  .chart-row,
  .kpis,
  .strategy-matrix-grid,
  .star-profiles-grid {
    grid-template-columns: 1fr !important;
  }

  .interview-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: #fff;
  }

  .app-shell {
    display: block;
    padding-bottom: 72px;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--cf-line);
    box-shadow: 0 -10px 30px rgba(20, 35, 35, 0.12);
  }

  .mobile-nav-button {
    min-height: 46px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--cf-grey-2);
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-nav-button span {
    display: block;
    margin-bottom: 2px;
  }

  .mobile-nav-button.active {
    background: #e8f5f3;
    color: var(--mpg-green-dark);
  }

  .topbar {
    height: auto;
    min-height: 58px;
    padding: 10px 14px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar .button {
    display: none;
  }

  .workspace {
    padding: 12px 12px 24px;
  }

  .panel,
  .question-card,
  .interview-strip,
  .kpi {
    border-radius: 7px;
    box-shadow: none;
  }

  .interview-strip {
    grid-template-columns: 1fr;
    position: sticky;
    top: 58px;
    z-index: 4;
    margin: -2px 0 10px;
    padding: 8px 10px;
    gap: 7px;
  }

  .interview-strip strong {
    font-size: 16px;
  }

  .interview-strip span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
  }

  .interview-client {
    justify-items: start;
  }

  .question-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .toc-panel {
    display: none;
  }

  .question-card {
    order: 1;
    overflow: visible !important;
  }

  .question-head {
    position: static !important;
  }

  .insight-panel {
    order: 3;
  }

  .toc-panel .panel-header,
  .insight-panel .panel-header {
    padding: 12px;
  }

  .toc-panel .panel-body,
  .insight-panel .panel-body {
    padding: 12px;
  }

  .toc-panel .toc-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .toc-panel .toc-axis {
    border-left-width: 0;
    border-top: 5px solid var(--axis-color);
    min-width: 280px;
    padding: 8px 0 0;
    scroll-snap-align: start;
  }

  .toc-panel .toc-axis h3 {
    margin: 0 0 8px;
    font-size: 13px;
  }

  .toc-item {
    min-height: 44px;
  }

  .question-head {
    padding: 12px;
    box-shadow: inset 0 4px 0 var(--axis-color);
  }

  .question-head p {
    font-size: 12px;
    line-height: 1.35;
  }

  .question-head h2 {
    font-size: 19px;
  }

  .score-block {
    padding: 12px;
    gap: 12px;
  }

  .score-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .score-matrix-head {
    display: grid;
    gap: 6px;
    padding: 14px;
  }

  .score-matrix-grid {
    grid-template-columns: 1fr 1fr;
    background: #fff;
    gap: 10px;
    padding: 12px;
  }

  .score-corner,
  .score-column-title {
    display: none;
  }

  .score-row-title {
    grid-column: 1 / -1;
    min-height: auto;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 12px;
  }

  .score-cell {
    min-height: 74px;
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    grid-template-columns: 26px 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: start;
    gap: 2px 8px;
    text-align: left;
  }

  .score-cell i {
    grid-row: 1 / 3;
  }

  .score-cell span,
  .score-cell small {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .score-cell span {
    font-size: 14px;
    font-weight: 800;
  }

  .score-cell small {
    color: var(--cf-grey-2);
    font-size: 11px;
    font-weight: 700;
  }

  .score-label {
    border-right: 0;
    border-bottom: 1px solid var(--cf-line);
    padding: 0 0 10px;
  }

  .score-label strong {
    font-size: 19px;
  }

  .score-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .score-option {
    min-height: 74px;
    font-size: 16px;
    grid-template-columns: 30px 1fr;
  }

  .score-option small {
    font-size: 12px;
  }

  .field textarea {
    min-height: 130px;
  }

  .interview-actions {
    position: static;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--cf-line);
    border-radius: 8px;
    padding: 8px;
  }

  .interview-actions .button {
    min-height: 48px;
  }

  .interview-actions .orange {
    grid-column: 1 / -1;
  }

  .quick-action-panel {
    padding: 12px;
  }

  .quick-action-head {
    display: grid;
  }

  .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .quick-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field-grid,
  .chart-row,
  .grid.cols-3,
  .kpis {
    grid-template-columns: 1fr;
  }

  .action-table,
  .dossiers-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .report-page {
    min-height: auto;
    padding: 22px 16px;
  }

  .report-title {
    font-size: 34px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .no-print {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .grid.cols-2 {
    grid-template-columns: 1fr !important;
  }

  .report-page {
    min-height: 100vh;
    page-break-after: always;
  }
}

/* Style pour la ligne en cours de modification dans le plan d'action */
.action-table tr.editing-row {
  background-color: rgba(245, 158, 11, 0.08) !important;
  border-left: 4px solid #f59e0b;
}

/* AI Loaders & Indicators */
.ai-pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--mpg-orange);
  box-shadow: 0 0 0 rgba(232, 80, 31, 0.4);
  animation: ai-pulse 1.5s infinite;
}

@keyframes ai-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 80, 31, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(232, 80, 31, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 80, 31, 0);
  }
}

/* Floating RSE Assistant Chatbot */
#rse-copilot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: inherit;
}

.copilot-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--mpg-blue), #0b2f54);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.copilot-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.copilot-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(10, 37, 64, 0.3), 0 0 15px rgba(232, 80, 31, 0.2);
}

.copilot-btn:hover::before {
  opacity: 1;
}

.copilot-icon {
  font-size: 18px;
}

.copilot-badge {
  background-color: var(--mpg-orange);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  position: absolute;
  top: -4px;
  right: -4px;
  border: 1.5px solid white;
}

/* Chat window panel */
.copilot-window {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 380px;
  height: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(10, 37, 64, 0.25);
  border: 1px solid var(--cf-line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#rse-copilot-container.chat-open .copilot-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.copilot-header {
  background: linear-gradient(135deg, var(--mpg-blue), #0b2f54);
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.copilot-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copilot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #c4c4c4;
}

.copilot-dot.active {
  background-color: #2ec872;
  box-shadow: 0 0 8px #2ec872;
}

.copilot-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copilot-header-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.copilot-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages */
.copilot-messages {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  background-color: #f7f9fb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.copilot-welcome {
  text-align: center;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--cf-grey);
}

.copilot-welcome p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.copilot-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.copilot-chip-btn {
  background: white;
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--mpg-blue);
  box-shadow: 0 2px 4px rgba(10, 37, 64, 0.02);
}

.copilot-chip-btn:hover {
  background: var(--mpg-blue);
  color: white;
  border-color: var(--mpg-blue);
  transform: translateX(2px);
  box-shadow: 0 4px 8px rgba(10, 37, 64, 0.08);
}

.copilot-message {
  display: flex;
  width: 100%;
}

.copilot-message.user {
  justify-content: flex-end;
}

.copilot-message.assistant {
  justify-content: flex-start;
}

.copilot-message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.copilot-message.user .copilot-message-bubble {
  background-color: var(--mpg-orange);
  color: white;
  border-bottom-right-radius: 2px;
}

.copilot-message.assistant .copilot-message-bubble {
  background-color: white;
  color: var(--cf-grey);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--cf-line);
}

.copilot-message-bubble ul {
  margin: 6px 0 0 0;
  padding-left: 20px;
}

.copilot-message-bubble li {
  margin-bottom: 4px;
}

/* Typing animation */
.typing-dots span {
  animation: typing-bounce 1.4s infinite both;
  display: inline-block;
  font-size: 20px;
  line-height: 0;
}

.typing-dots span:nth-child(2) {
  animation-delay: .2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: .4s;
}

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Chat footer input */
.copilot-footer {
  padding: 12px;
  border-top: 1px solid var(--cf-line);
  background: white;
  display: flex;
  gap: 8px;
}

.copilot-footer input {
  flex-grow: 1;
  border: 1.5px solid var(--cf-line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.copilot-footer input:focus {
  border-color: var(--mpg-blue);
}

.copilot-footer button {
  background: var(--mpg-blue);
  color: white;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.copilot-footer button:hover {
  background-color: var(--mpg-orange);
}

/* Minimized Sidebar role switcher styling */
.nav-collapsed .role-selector-premium {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.nav-collapsed .role-badge-btn {
  justify-content: center !important;
  padding: 10px 0 !important;
  border-radius: 8px !important;
  height: 40px !important;
  width: 100% !important;
  transition: all 0.2s ease !important;
}

/* Style the active button */
.nav-collapsed .role-badge-btn.active {
  background: rgba(24, 160, 149, 0.08) !important;
  color: var(--mpg-green-dark) !important;
  box-shadow: inset 0 0 0 1px rgba(24, 160, 149, 0.15) !important;
  transform: none !important;
}

/* Style the inactive button */
.nav-collapsed .role-badge-btn:not(.active) {
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0.6 !important;
  transform: none !important;
}

.nav-collapsed .role-badge-btn:hover {
  background: var(--cf-bg) !important;
  opacity: 1 !important;
  transform: none !important;
}

.nav-collapsed .role-badge-btn:active {
  transform: scale(0.95) !important;
}

.nav-collapsed .role-badge-btn div,
.nav-collapsed .role-badge-btn .role-check {
  display: none !important;
}

/* Print optimizations */
@media print {
  #rse-copilot-container {
    display: none !important;
  }
  .no-print {
    display: none !important;
  }
}

/* Breadcrumb topbar integration */
.topbar h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.topbar-breadcrumb-separator {
  color: var(--cf-grey-2);
  font-weight: 300;
  font-size: 20px;
  user-select: none;
}

.topbar-current-question {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(24, 160, 149, 0.06);
  border: 1px solid rgba(24, 160, 149, 0.15);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--cf-grey);
  max-width: 500px;
  transition: all 0.2s ease;
}

.topbar-current-question:hover {
  background: rgba(24, 160, 149, 0.1);
  border-color: rgba(24, 160, 149, 0.25);
}

.topbar-question-num {
  font-weight: 800;
  color: var(--axis-color, var(--mpg-green-dark));
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topbar-question-label {
  color: var(--cf-grey);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .topbar-current-question {
    max-width: 300px;
  }
}

@media (max-width: 760px) {
  .topbar h1 {
    flex-wrap: wrap;
    gap: 6px;
  }
  .topbar-breadcrumb-separator,
  .topbar-current-question {
    display: none; /* Hide on mobile to avoid layout breaking, as user has it on the card */
  }
}

/* --- DETAILED SIRET MODAL & PORTEFEUILLE STYLES --- */

.detailed-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 37, 64, 0.45);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
  overflow-y: auto;
  padding: 40px 10px;
  box-sizing: border-box;
}

.detailed-modal-content {
  background-color: white;
  width: 92%;
  max-width: 680px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(10, 37, 64, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border: 1px solid rgba(10, 37, 64, 0.1);
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-detail-item .detail-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--cf-grey-2);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.modal-detail-item .detail-value {
  font-size: 14px;
  color: var(--cf-grey);
  font-weight: 600;
  word-break: break-word;
}

.siret-modal-profile {
  display: flex;
  flex-direction: column;
}

.siret-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.siret-badge {
  font-family: inherit;
  transition: all 0.2s ease;
}

.siret-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(24, 160, 149, 0.15);
}

.siret-data-card {
  box-shadow: 0 4px 12px rgba(24, 160, 149, 0.04);
  transition: all 0.2s ease;
}

.siret-data-card:hover {
  box-shadow: 0 6px 16px rgba(24, 160, 149, 0.08);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Hide SIRET-related elements and other interactive features during printing */
@media print {
  .detailed-modal-backdrop,
  .dossiers-filter-bar,
  .table-pagination,
  .btn-view-siret,
  #toggleCreateDossier,
  .btn-edit-dossier,
  .btn-delete-dossier,
  .siret-data-card {
    display: none !important;
  }
}

/* Questionnaire Flash - Esthétique Premium */

.question-layout.flash-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flash-issue-row {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.015);
}

.flash-issue-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.05);
  border-color: rgba(24, 160, 149, 0.25);
}

.flash-issue-row.non-concerned {
  opacity: 0.55;
  background: #f8fafc;
  filter: grayscale(40%);
}

.flash-issue-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.flash-axis-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flash-theme-badge {
  font-size: 11px;
}

.flash-issue-title {
  color: var(--cf-grey);
}

.flash-issue-controls {
  display: flex;
  gap: 10px;
}

.flash-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--cf-line);
  background: var(--cf-bg);
  color: var(--cf-grey);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.flash-control-btn:hover {
  background: #edf2f7;
  border-color: #cbd5e1;
}

.flash-control-btn.active {
  background: var(--mpg-green);
  color: white;
  border-color: var(--mpg-green);
  box-shadow: 0 2px 8px rgba(24, 160, 149, 0.2);
}

.flash-control-btn.active-gold {
  background: var(--mpg-orange);
  color: white;
  border-color: var(--mpg-orange);
  box-shadow: 0 2px 8px rgba(232, 80, 31, 0.25);
  animation: starPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes starPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.flash-qualify-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  background: white;
  color: var(--cf-grey);
  border: 1px solid rgba(74, 85, 104, 0.2);
  border-radius: 6px;
  font-weight: 700;
}

.flash-qualify-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.flash-qualify-btn:active {
  transform: translateY(1px);
}

.flash-qualify-btn.active-maitrise {
  background: var(--mpg-green) !important;
  color: white !important;
  border-color: var(--mpg-green) !important;
  box-shadow: 0 3px 8px rgba(24, 160, 149, 0.3);
}

.flash-qualify-btn.active-prioritaire {
  background: var(--mpg-orange) !important;
  color: white !important;
  border-color: var(--mpg-orange) !important;
  box-shadow: 0 3px 8px rgba(232, 80, 31, 0.3);
}

.flash-qualify-btn.active-mineur {
  background: var(--mpg-blue) !important;
  color: white !important;
  border-color: var(--mpg-blue) !important;
  box-shadow: 0 3px 8px rgba(10, 37, 64, 0.2);
}

.flash-qualify-btn.active-non-concerne {
  background: #ef4444 !important;
  color: white !important;
  border-color: #ef4444 !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

.flash-control-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: #f1f5f9;
}

.flash-issue-comment {
  position: relative;
}

.flash-issue-comment.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.flash-textarea-wrapper {
  position: relative;
  display: flex;
  width: 100%;
}

.flash-textarea {
  width: 100%;
  min-height: 90px;
  height: 90px;
  padding: 8px 38px 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 8px;
  border: 1px solid var(--cf-line);
  background: var(--cf-surface);
  color: var(--cf-grey);
  font-family: var(--font-sans);
  resize: vertical;
  transition: all 0.2s ease;
}

.flash-textarea:focus {
  border-color: var(--mpg-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 160, 149, 0.1);
}

.flash-textarea-actions {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flash-action-btn {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 2px;
  line-height: 1;
}

.flash-action-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

.flash-ai-loader {
  display: flex;
}

/* Pulsing AI dot */
.ai-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--mpg-orange);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

@media (max-width: 1100px) {
  .flash-issue-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Clean Flash printing styles */
@media print {
  .flash-issue-controls, 
  .flash-textarea-actions, 
  .flash-actions-footer, 
  .interview-mode-selector,
  .flash-ai-loader,
  .flash-intro-card {
    display: none !important;
  }
  
  .question-layout.flash-layout {
    display: block !important;
  }
  
  .flash-issue-row {
    display: block !important;
    border: none !important;
    border-bottom: 1px dashed var(--cf-line) !important;
    padding: 12px 0 !important;
    page-break-inside: avoid;
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
  }
  
  .flash-issue-title {
    font-size: 14px !important;
    margin-top: 4px !important;
    font-weight: 700 !important;
  }
  
  .flash-issue-comment {
    margin-top: 6px !important;
    opacity: 1 !important;
  }
  
  .flash-textarea {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
    min-height: unset !important;
    font-size: 12px !important;
    color: #334155 !important;
  }
}

/* Interactive In-Situ Actions styling under questions */
.interactive-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cf-surface);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--cf-line);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-action-row:hover {
  border-color: color-mix(in srgb, var(--axis-color, var(--mpg-orange)) 40%, var(--cf-line));
  background: white;
  box-shadow: 0 4px 10px rgba(10, 37, 64, 0.05);
}

.interactive-action-row input.action-inline-title {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--cf-grey);
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.interactive-action-row input.action-inline-title:hover {
  background: rgba(0, 0, 0, 0.02);
}

.interactive-action-row input.action-inline-title:focus {
  border-color: var(--mpg-blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(45, 96, 255, 0.1);
  outline: none;
}

.interactive-action-row select.action-inline-priority,
.interactive-action-row select.action-inline-status,
.interactive-action-row input.action-inline-due {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--cf-line);
  background: white;
  font-weight: 600;
  color: var(--cf-grey);
  cursor: pointer;
  transition: all 0.2s;
}

.interactive-action-row select.action-inline-priority:hover,
.interactive-action-row select.action-inline-status:hover,
.interactive-action-row input.action-inline-due:hover {
  border-color: var(--cf-grey-2);
}

.interactive-action-row select.action-inline-priority:focus,
.interactive-action-row select.action-inline-status:focus,
.interactive-action-row input.action-inline-due:focus {
  border-color: var(--mpg-orange);
  outline: none;
}

.interactive-action-row .btn-delete-action-inline {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--cf-grey-2);
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.interactive-action-row .btn-delete-action-inline:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  transform: scale(1.1);
}

.btn-dismiss-quick-suggestion,
.btn-dismiss-plan-suggestion {
  transition: all 0.15s ease;
  border-radius: 4px;
}

.btn-dismiss-quick-suggestion:hover,
.btn-dismiss-plan-suggestion:hover {
  color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.08) !important;
  transform: scale(1.2);
}

/* ==========================================================================
   HORIZONTAL GUIDE SYSTEM (PREMIUM WORKFLOW RETAIL)
   ========================================================================== */

.top-guide-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(10, 37, 64, 0.025);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.top-guide-panel.expanded {
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.05);
}

.top-guide-panel.collapsed {
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.015);
}

.top-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.top-guide-header:hover {
  background: rgba(255, 255, 255, 0.7);
}

.top-guide-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-guide-icon {
  font-size: 16px;
  background: #fff8e1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.top-guide-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cf-grey);
}

.guide-category-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.guide-category-badge.pending {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.guide-category-badge.non-concerned {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #cbd5e1;
  opacity: 0.85;
}

.top-guide-toggle-btn {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  color: var(--cf-grey-2);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.top-guide-toggle-btn:hover {
  background: #edf2f7;
  color: var(--cf-grey);
  border-color: #cbd5e1;
}

.top-guide-body {
  padding: 0 20px 20px 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  animation: slideDown 0.25s ease-out;
}

.top-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  margin-top: 16px;
}

.top-guide-section {
  display: flex;
  flex-direction: column;
}

.top-guide-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--cf-grey-2);
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--cf-line);
  padding-bottom: 6px;
}

.top-guide-relance-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-guide-relance-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.top-guide-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.top-guide-relance-item p {
  margin: 0;
  font-size: 13px;
  color: var(--cf-grey);
  line-height: 1.45;
}

.top-guide-examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.top-guide-example-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(226, 232, 240, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: all 0.2s;
}

.top-guide-example-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transform: translateY(-1px);
}

.top-guide-example-icon {
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.top-guide-example-content {
  display: flex;
  flex-direction: column;
}

.top-guide-example-content strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--cf-grey);
  margin-bottom: 2px;
}

.top-guide-example-content p {
  margin: 0;
  font-size: 11px;
  color: var(--cf-grey-2);
  line-height: 1.35;
}

.question-main-content {
  display: flex;
  flex-direction: column;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Premium Horizontal Stepper Styles (Sommaire des enjeux) */
.horizontal-stepper {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(10, 37, 64, 0.02);
  transition: all 0.3s ease;
}

.horizontal-stepper:hover {
  box-shadow: 0 8px 32px rgba(10, 37, 64, 0.04);
  border-color: rgba(24, 160, 149, 0.2);
}

.stepper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.stepper-title-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stepper-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cf-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stepper-progress-badge {
  font-size: 11px;
  color: var(--cf-grey-2);
  font-weight: 600;
}

.stepper-search-container {
  display: flex;
  align-items: center;
}

.stepper-search-input {
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  width: 180px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cf-grey);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper-search-input:focus {
  border-color: var(--mpg-green);
  width: 220px;
  box-shadow: 0 0 0 3px rgba(24, 160, 149, 0.12);
  background: #ffffff;
}

.stepper-axis-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stepper-axis-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 2px 4px;
  transition: background-color 0.2s ease;
}

.stepper-axis-row:hover {
  background-color: rgba(248, 250, 252, 0.6);
}

.stepper-axis-label {
  width: 140px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--axis-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.stepper-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stepper-pill-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.stepper-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--axis-color);
  background: #ffffff;
  color: var(--axis-color);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 0;
}

.stepper-pill:hover {
  transform: scale(1.18);
  background: var(--axis-color);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--axis-color);
}

.stepper-pill.active {
  background: var(--axis-color);
  color: #ffffff;
  border-color: var(--axis-color);
  animation: neonPulse 1.8s infinite alternate;
}

.stepper-pill.done {
  background: var(--axis-color);
  color: #ffffff;
  border-color: var(--axis-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.stepper-pill.non-concerned {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  text-decoration: line-through;
  opacity: 0.65;
  box-shadow: none;
}

.stepper-pill.non-concerned:hover {
  background: #cbd5e1;
  color: #64748b;
  border-color: #94a3b8;
  box-shadow: none;
}

.stepper-pill-review-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background-color: var(--mpg-orange);
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* Tooltip Premium absolute positions */
.stepper-tooltip {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stepper-tooltip strong {
  font-weight: 700;
  color: #38bdf8; /* Soft blue highlight for the issue ID */
}

.stepper-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}

.stepper-pill-wrapper:hover .stepper-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Pulse animation utilizing CSS variable colors dynamically */
@keyframes neonPulse {
  0% {
    box-shadow: 0 0 4px var(--axis-color), 0 0 1px var(--axis-color);
  }
  100% {
    box-shadow: 0 0 12px var(--axis-color), 0 0 18px var(--axis-color);
  }
}

/* Print helper classes */
.only-print {
  display: none !important;
}

@media print {
  .only-print {
    display: block !important;
  }
}

/* Glassmorphic Auth Modal Styles */
.auth-modal-content {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 20px 40px rgba(10, 37, 64, 0.15) !important;
}

.auth-tabs {
  display: flex;
  gap: 16px;
}

.auth-tab-btn {
  transition: all 0.25s ease;
  position: relative;
}

.auth-tab-btn:hover {
  color: var(--mpg-green) !important;
}

/* Toggle Switch Style */
.toggle-switch-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .toggle-slider {
  background-color: var(--mpg-green);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Referent View & General Admin Tables */
.referent-grid, .admin-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.referent-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--mpg-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advisor-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.advisor-status-badge.active {
  background-color: rgba(24, 160, 149, 0.1);
  color: var(--mpg-green);
}

.advisor-status-badge.inactive {
  background-color: rgba(232, 80, 31, 0.1);
  color: var(--mpg-orange);
}

.reassign-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--cf-line);
  font-size: 12px;
  font-weight: 600;
  background-color: white;
  color: var(--cf-grey);
  cursor: pointer;
  width: 100%;
  max-width: 180px;
}

.reassign-select:hover {
  border-color: var(--cf-grey-2);
}

/* Tabs for Admin View */
.admin-tabs-nav {
  display: flex;
  gap: 2px;
  background: var(--cf-bg);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
  width: fit-content;
  border: 1px solid var(--cf-line);
}

.admin-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  color: var(--cf-grey-2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-tab-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--cf-grey);
}

.admin-tab-btn.active {
  background: white;
  color: var(--mpg-blue);
  box-shadow: 0 2px 5px rgba(10, 37, 64, 0.05);
}

/* ==========================================================================
   REFONTE DU BANDEAU SUPÉRIEUR (TOP NAVBAR DUAL-ROW ARCHITECTURE)
   ========================================================================== */

/* Structure en double ligne pour éliminer définitivement tout chevauchement */
.top-navbar-container {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}

.top-navbar-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.top-navbar-main-row {
  height: 60px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.top-navbar-nav-row {
  height: 50px;
  justify-content: flex-start;
}

.top-navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.top-navbar-brand .brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.top-navbar-brand .brand-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--cf-grey);
}

.top-navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.top-navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.top-navbar-nav .nav-button {
  padding: 6px 14px;
  font-size: 13px;
  gap: 8px;
}

/* 1. Résolutions intermédiaires standard (Ordinateurs portables / petits écrans de bureau) */
@media (max-width: 1360px) {
  .top-navbar-nav .nav-button {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* 2. Écrans moyens (Tablettes en orientation paysage / Portables 12 pouces)
   - On masque le titre textuel "Ma Performance Globale" (déjà présent sur le logo)
   - On réduit le bouton de réinitialisation et le profil à leurs icônes/avatars respectifs */
@media (max-width: 1220px) {
  .top-navbar-brand .brand-title {
    display: none !important;
  }
  .top-navbar-actions .reset-btn .reset-text {
    display: none !important;
  }
  .top-navbar-actions .reset-btn {
    padding: 8px 10px !important;
    border-radius: 50% !important;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .user-profile-widget .user-profile-details {
    display: none !important;
  }
  .user-profile-widget {
    padding: 4px !important;
    border-radius: 50% !important;
    gap: 0 !important;
  }
  .user-profile-widget .btn-logout {
    display: none !important;
  }
  .user-profile-widget:hover .btn-logout {
    display: block !important;
    position: absolute;
    top: 40px;
    right: 0;
    background: white !important;
    border: 1px solid var(--cf-line) !important;
    border-radius: 8px;
    padding: 6px 10px !important;
    box-shadow: var(--shadow-premium);
    z-index: 10;
  }
}

/* 3. Tablettes standard (Masquage des libellés de la navigation supérieure)
   - On ne conserve que les superbes icônes avec infobulle explicative native */
@media (max-width: 1024px) {
  .top-navbar-nav .nav-button span {
    display: none !important;
  }
  .top-navbar-nav .nav-button {
    padding: 8px 10px !important;
  }
}

/* 4. Petites tablettes / Grand mobiles (Masquage du simulateur de rôle rapide) */
@media (max-width: 900px) {
  .compact-role-selector {
    display: none !important;
  }
}

/* 5. Mobiles (Masquage de la navigation supérieure doublée)
   - Mobile utilise déjà le menu du bas, pas besoin de surcharger le haut */
@media (max-width: 760px) {
  :root {
    --navbar-height: 56px !important;
  }
  .top-navbar-container {
    padding: 0 16px !important;
  }
  .top-navbar-nav-row {
    display: none !important;
  }
  .top-navbar-main-row {
    height: 100% !important;
    border-bottom: none !important;
  }
  .top-navbar {
    height: var(--navbar-height) !important;
  }
  .topbar {
    top: var(--navbar-height) !important;
  }
  .top-navbar-brand .brand-logo {
    height: 32px !important;
  }
}

/* 6. Désactivation de l'IA (grisement et blocage d'interaction) */
.disabled-ai {
  opacity: 0.45 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}
.disabled-ai * {
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* ==========================================================================
   REFONTE DE LA CONNEXION (SSO, MAGIC LINK & RECUPERATION MOT DE PASSE)
   ========================================================================== */

.sso-button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 42px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid var(--cf-line);
  color: var(--mpg-blue-dark);
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.05);
}

.sso-btn:hover {
  background: var(--cf-bg);
  border-color: var(--cf-grey-2);
  box-shadow: 0 4px 10px rgba(10, 37, 64, 0.08);
  transform: translateY(-1px);
}

.sso-btn:active {
  transform: translateY(0);
}

.sso-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--cf-grey-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--cf-line);
}

.auth-divider:not(:empty)::before {
  margin-right: .75em;
}

.auth-divider:not(:empty)::after {
  margin-left: .75em;
}

.auth-link {
  color: var(--mpg-orange);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-link:hover {
  color: var(--mpg-blue);
  text-decoration: underline;
}

/* Success Card CSS with Pulse Animations */
.auth-success-card {
  text-align: center;
  padding: 10px 0;
  animation: fadeIn 0.4s ease-out;
}

.auth-success-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(30, 185, 128, 0.1);
  border-radius: 50%;
  margin: 0 auto 20px auto;
  position: relative;
}

.auth-success-icon-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(30, 185, 128, 0.15);
  animation: ssoPulse 1.8s infinite ease-in-out;
}

@keyframes ssoPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.auth-success-icon {
  font-size: 32px;
  color: var(--mpg-green);
  z-index: 2;
}

/* Simulated SSO Popup Panel */
.sso-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 37, 64, 0.45);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease-out;
  overflow-y: auto;
  padding: 40px 10px;
  box-sizing: border-box;
}

.sso-popup-card {
  width: 380px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.15);
  border: 1px solid var(--cf-line);
  overflow: hidden;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sso-popup-header {
  padding: 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--cf-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sso-popup-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sso-popup-title-group img {
  width: 20px;
  height: 20px;
}

.sso-popup-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--mpg-blue-dark);
  margin: 0;
}

.sso-popup-body {
  padding: 20px;
}

.sso-account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 240px;
  overflow-y: auto;
}

.sso-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--cf-line);
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.sso-account-row:hover {
  background: var(--cf-bg);
  border-color: var(--mpg-green);
  transform: translateX(2px);
}

.sso-account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mpg-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.sso-account-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sso-account-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--mpg-blue-dark);
}

.sso-account-email {
  font-size: 11px;
  color: var(--cf-grey-2);
}

.sso-account-badge {
  font-size: 10px;
  background: rgba(10, 37, 64, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--mpg-blue-dark);
  font-weight: 600;
}

.sso-popup-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--cf-line);
  text-align: right;
}

.sso-popup-close-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--cf-line);
  background: white;
  color: var(--cf-grey);
  cursor: pointer;
  font-weight: 600;
}

.sso-popup-close-btn:hover {
  background: #edf2f7;
  color: var(--mpg-blue-dark);
}

/* Hierarchical Drill-down Chart Styles */
.hierarchical-drilldown-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.axis-drill-card {
  background: #ffffff;
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.axis-drill-card:hover {
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.06);
  transform: translateY(-2px);
}

.axis-drill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  gap: 20px;
}

.axis-drill-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.axis-drill-indicator {
  font-size: 11px;
  color: var(--cf-grey-2);
  transition: transform 0.3s ease;
  display: inline-block;
  margin-right: 4px;
}

.axis-drill-card.open .axis-drill-indicator {
  transform: rotate(90deg);
}

.axis-drill-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cf-grey-1);
  font-family: 'Outfit', -apple-system, sans-serif;
}

.axis-drill-bars-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 450px;
  flex-shrink: 0;
}

/* Double bar styles */
.drill-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.drill-bar-label {
  min-width: 50px;
  font-weight: 700;
  color: var(--cf-grey-2);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.drill-bar-track {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.drill-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.drill-bar-value {
  min-width: 25px;
  text-align: right;
  font-weight: 700;
  color: var(--cf-grey-1);
}

/* Themes list (Accordion level 2) */
.themes-drill-container {
  display: none;
  padding: 8px 20px 20px 20px;
  background: #fafbfc;
  border-top: 1px solid var(--cf-line);
}

.axis-drill-card.open .themes-drill-container {
  display: block;
}

.theme-drill-card {
  background: #ffffff;
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  margin-top: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
  transition: all 0.2s ease;
}

.theme-drill-card:hover {
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.04);
}

.theme-drill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  gap: 20px;
}

.theme-drill-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.theme-drill-indicator {
  font-size: 9px;
  color: var(--cf-grey-2);
  transition: transform 0.3s ease;
  display: inline-block;
  margin-right: 4px;
}

.theme-drill-card.open .theme-drill-indicator {
  transform: rotate(90deg);
}

.theme-drill-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cf-grey-1);
  font-family: 'Outfit', -apple-system, sans-serif;
}

.theme-drill-bars-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 350px;
  flex-shrink: 0;
}

/* Questions list (Accordion level 3) */
.questions-drill-container {
  display: none;
  padding: 8px 16px 16px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--cf-line);
  flex-direction: column;
  gap: 8px;
}

.theme-drill-card.open .questions-drill-container {
  display: flex;
}

.question-drill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--cf-line);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  gap: 20px;
}

.question-drill-row:hover {
  background: #edf2f7;
  border-color: #cbd5e1;
  transform: translateX(4px);
}

.question-drill-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.question-drill-number {
  font-weight: 700;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  min-width: 35px;
  text-align: center;
}

.question-drill-label {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  transition: color 0.2s ease;
}

.question-drill-row:hover .question-drill-label {
  color: var(--mpg-blue-dark);
  text-decoration: underline;
}

.question-drill-bars-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 250px;
  flex-shrink: 0;
}

.question-not-concerned {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  font-weight: 500;
  text-align: right;
  width: 250px;
  flex-shrink: 0;
  padding-right: 12px;
}

/* Category Badge inside Question Row */
.question-category-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 8px;
}

/* Print optimizations */
@media print {
  .themes-drill-container,
  .questions-drill-container {
    display: flex !important; /* Always open in print */
  }
  .axis-drill-card, .theme-drill-card {
    box-shadow: none !important;
    break-inside: avoid;
    border: 1px solid #cbd5e1 !important;
    margin-bottom: 12px !important;
  }
  .axis-drill-header, .theme-drill-header {
    background: #f8fafc !important;
    cursor: default !important;
  }
  .axis-drill-indicator, .theme-drill-indicator {
    display: none !important;
  }
}

/* ==========================================================================
   REFONTE RESPONSIVE PREMIUM - MOBILES & TABLETTES
   ========================================================================== */

/* 1. Backdrop pour les Drawers (toutes résolutions) */
.sidebar-backdrop {
  display: none !important;
}

/* 2. Écrans Tablettes & Moyens (< 1180px) */
@media (max-width: 1180px) {
  /* Backdrop actif uniquement sur mobile/tablette */
  .sidebar-backdrop {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 37, 64, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Mode tiroirs (Drawers) pour les volets latéraux */
  .toc-panel,
  .insight-panel {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 310px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    z-index: 1000 !important;
    margin: 0 !important;
    background: var(--cf-surface) !important;
    box-shadow: 0 20px 48px rgba(10, 37, 64, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 0 !important;
    border: none !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Forcer display flex pour écraser display none, et interdire l'interaction si effacé */
  .toc-panel.collapsed,
  .insight-panel.collapsed {
    display: flex !important;
    pointer-events: none !important;
  }

  .toc-panel {
    left: 0 !important;
    transform: translateX(0) !important;
    border-right: 1px solid var(--cf-line) !important;
  }

  .toc-panel.collapsed {
    transform: translateX(-100%) !important;
  }

  .insight-panel {
    right: 0 !important;
    transform: translateX(0) !important;
    border-left: 1px solid var(--cf-line) !important;
  }

  .insight-panel.collapsed {
    transform: translateX(100%) !important;
  }

  /* Ajustements des hauteurs de défilement internes des volets tiroirs */
  .toc-panel .panel-body,
  .insight-panel .panel-body {
    max-height: calc(100vh - 70px) !important;
    flex-grow: 1;
    overflow-y: auto;
  }

  /* La zone de contenu occupe toute la largeur */
  .question-layout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .question-main-content {
    width: 100% !important;
  }

  /* Questionnaire Flash en mode mobile/tablette (inline vertical) */
  .question-layout.flash-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .flash-layout .toc-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    transform: none !important;
    box-shadow: 0 4px 20px rgba(10, 37, 64, 0.05) !important;
    border-radius: 12px !important;
    border: 1px solid var(--cf-line) !important;
    display: flex !important;
  }

  .flash-layout .toc-panel .panel-body {
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* 3. Mobiles & Petites Tablettes (< 760px) */
@media (max-width: 760px) {
  /* Restructuration Topbar en mode colonne élastique */
  .topbar {
    height: auto !important;
    padding: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
  }

  .topbar-container {
    padding: 14px 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    height: auto !important;
  }

  .topbar > div:first-child {
    width: 100%;
  }

  .topbar h1 {
    font-size: 18px !important;
    gap: 8px !important;
  }

  .topbar-company {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }

  .compact-mode-selector {
    margin-left: 0 !important;
    height: 28px !important;
  }

  .mode-toggle-btn {
    height: 20px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
  }

  .topbar-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    border-top: 1px solid var(--cf-line);
    padding-top: 10px;
    margin-top: 2px;
  }

  .topbar-actions .tag {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  .topbar-actions .button {
    font-size: 11px !important;
    padding: 4px 10px !important;
    min-height: 30px !important;
  }

  /* Transformation magique du tableau des dossiers en cartes */
  .dossiers-table thead {
    display: none !important;
  }

  .dossiers-table,
  .dossiers-table tbody,
  .dossiers-table tr {
    display: block !important;
    width: 100% !important;
  }

  .dossiers-table tr {
    background: var(--cf-surface) !important;
    border: 1px solid var(--cf-line) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.02) !important;
    box-sizing: border-box !important;
  }

  .dossiers-table tr:hover {
    background: var(--cf-surface) !important;
    box-shadow: var(--shadow-soft) !important;
  }

  .dossiers-table td {
    display: block !important;
    padding: 6px 0 !important;
    border: none !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Injection des en-têtes textuels pour les colonnes standard */
  .dossiers-table tr:not(.dossier-edit-row) td:nth-of-type(1):before { content: "Entreprise"; font-weight: 800; color: var(--cf-grey-2); font-size: 10px; display: block; text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.5px; }
  .dossiers-table tr:not(.dossier-edit-row) td:nth-of-type(2):before { content: "Secteur & Date"; font-weight: 800; color: var(--cf-grey-2); font-size: 10px; display: block; text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.5px; }
  .dossiers-table tr:not(.dossier-edit-row) td:nth-of-type(3):before { content: "Niveau de complétude"; font-weight: 800; color: var(--cf-grey-2); font-size: 10px; display: block; text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.5px; }
  .dossiers-table tr:not(.dossier-edit-row) td:nth-of-type(4):before { content: "KPIs Clés"; font-weight: 800; color: var(--cf-grey-2); font-size: 10px; display: block; text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.5px; }
  .dossiers-table tr:not(.dossier-edit-row) td:nth-of-type(5):before { content: "Statut de l'entretien"; font-weight: 800; color: var(--cf-grey-2); font-size: 10px; display: block; text-transform: uppercase; margin-bottom: 3px; letter-spacing: 0.5px; }

  /* Ajustements pour les boutons d'actions au bas de la carte client */
  .dossiers-table tr:not(.dossier-edit-row) td:last-child {
    border-top: 1px solid var(--cf-line) !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  /* Style des lignes d'édition en colonne */
  .dossiers-table tr.dossier-edit-row td {
    padding: 0 !important;
  }
  
  .inline-edit-grid {
    grid-template-columns: 1fr !important;
    padding: 8px 4px !important;
    gap: 10px !important;
  }

  /* KPI et Marges Globales */
  .workspace {
    padding: 16px 14px 72px !important;
  }

  .kpis {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .kpi {
    padding: 14px 18px !important;
  }
}

/* ==========================================================================
   ONGLET FICHE CLIENT & GESTION DE DOSSIER DE CONFIDENTIALITÉ
   ========================================================================== */

/* Grille principale en deux colonnes pour le profil client */
.dossier-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .dossier-profile-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Zone de danger (Danger Zone) */
.danger-zone-panel {
  border: 1px solid #fee2e2 !important;
  background-color: #fef2f2 !important;
  border-radius: 12px;
  margin-top: 15px;
}

.danger-zone-panel .panel-header {
  border-bottom: 1px solid #fecaca !important;
  background-color: #fee2e2 !important;
  padding: 12px 18px;
}

.danger-zone-panel .panel-header h3 {
  color: #991b1b !important;
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.danger-zone-panel .panel-body {
  padding: 18px;
}

.button.danger-btn {
  background-color: #dc2626 !important;
  color: white !important;
  border: none !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.button.danger-btn:hover {
  background-color: #b91c1c !important;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.3);
}

/* Raccourcis de navigation rapides */
.quick-navigation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.quick-nav-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
}

.quick-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--mpg-green);
}

.quick-nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cf-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.quick-nav-card:hover .quick-nav-icon {
  background: color-mix(in srgb, var(--mpg-green) 10%, var(--cf-surface));
}

.quick-nav-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-nav-info strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--cf-grey);
}

.quick-nav-info span {
  font-size: 11px;
  color: var(--cf-grey-2);
}

/* Style interactif des lignes du Tableau de bord (simplifié) */
.dossiers-table tr.clickable-dossier-row {
  cursor: pointer;
  transition: all 0.2s;
}

.dossiers-table tr.clickable-dossier-row:hover {
  background-color: rgba(24, 160, 149, 0.03) !important;
}

.dossiers-table tr.clickable-dossier-row.active-row {
  background-color: rgba(24, 160, 149, 0.05) !important;
}

.dossiers-table tr.clickable-dossier-row.active-row td:first-child {
  border-left: 4px solid var(--mpg-green) !important;
}

/* Placeholder for contenteditable */
[contenteditable=true]:empty:before,
[contenteditable=true]:has(> br:only-child):before {
  content: attr(placeholder);
  color: var(--cf-grey-2);
  pointer-events: none;
  display: block;
}

/* Hover effects for editor toolbar buttons */
.toolbar-btn {
  transition: all 0.2s ease;
}
.toolbar-btn:hover {
  background-color: #e2e8f0 !important;
  color: var(--cf-dark) !important;
}
.toolbar-btn:active {
  background-color: #cbd5e1 !important;
}

/* Typography inside editable notes */
#issueNote h1, .flash-textarea h1 {
  font-size: 1.3em;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 5px;
  color: var(--cf-dark);
}
#issueNote h2, .flash-textarea h2 {
  font-size: 1.15em;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 4px;
  color: var(--cf-dark);
}
#issueNote h3, .flash-textarea h3 {
  font-size: 1.05em;
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 3px;
  color: var(--cf-dark);
}
#issueNote ul, .flash-textarea ul {
  padding-left: 20px;
  margin-top: 6px;
  margin-bottom: 6px;
}
#issueNote ol, .flash-textarea ol {
  padding-left: 20px;
  margin-top: 6px;
  margin-bottom: 6px;
}

/* Premium Modal Styles & Animations */
@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.flash-modal-container {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#flashIssueModalBackdrop {
  transition: all 0.3s ease;
}

/* Ensure the cards header in grid is premium */
.flash-card-header:hover {
  filter: brightness(0.92);
}




