/* --- ATLAS REFLEX STUDIO STYLES --- */
    .chip-status {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 20px;
      color: #94a3b8;
      padding: 0.35rem 0.85rem;
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .chip-status:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }
    .chip-status.active {
      background: rgba(245, 158, 11, 0.2);
      border-color: rgba(245, 158, 11, 0.5);
      color: #fbbf24;
    }
    .btn-period {
      background: transparent;
      border: none;
      color: #94a3b8;
      padding: 0.35rem 0.65rem;
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
      border-radius: 6px;
      transition: all 0.15s ease;
    }
    .btn-period:hover {
      color: #fff;
    }
    .btn-period.active {
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
    }
    .reflex-feed-row {
      padding: 1.15rem 1.35rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      transition: background 0.15s ease;
    }
    .reflex-feed-row:hover {
      background: rgba(255, 255, 255, 0.02);
    }
    .reflex-feed-row:last-child {
      border-bottom: none;
    }
    .reflex-score-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.02em;
    }


    /* --- REFLEX READABILITY & MARKDOWN EXPAND STYLES --- */
    .reflex-markdown-body {
      color: #f8fafc;
      font-size: 0.93rem;
      line-height: 1.7;
    }
    .reflex-markdown-body h1, 
    .reflex-markdown-body h2, 
    .reflex-markdown-body h3, 
    .reflex-markdown-body h4 {
      color: #ffffff;
      margin-top: 1rem;
      margin-bottom: 0.5rem;
      font-weight: 700;
      line-height: 1.35;
    }
    .reflex-markdown-body h1 { 
      font-size: 1.2rem; 
      color: #38bdf8; 
      border-bottom: 1px solid rgba(56, 189, 248, 0.2); 
      padding-bottom: 0.3rem; 
    }
    .reflex-markdown-body h2 { 
      font-size: 1.08rem; 
      color: #ffffff; 
      border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
      padding-bottom: 0.25rem; 
    }
    .reflex-markdown-body h3 { 
      font-size: 0.98rem; 
      color: #93c5fd; 
    }
    .reflex-markdown-body p {
      margin-bottom: 0.75rem;
      color: #f1f5f9;
      font-size: 0.93rem;
      line-height: 1.7;
    }
    .reflex-markdown-body ul, .reflex-markdown-body ol {
      margin-left: 1.35rem;
      margin-bottom: 0.75rem;
      color: #f1f5f9;
    }
    .reflex-markdown-body li {
      margin-bottom: 0.35rem;
      line-height: 1.65;
    }
    .reflex-markdown-body strong {
      color: #ffffff;
      font-weight: 700;
    }
    .reflex-markdown-body code {
      background: rgba(255, 255, 255, 0.12);
      color: #38bdf8;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 0.85rem;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    }
    .reflex-markdown-body pre {
      background: #030712;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      padding: 0.85rem 1rem;
      overflow-x: auto;
      margin-bottom: 0.75rem;
    }
    .reflex-markdown-body pre code {
      background: transparent;
      padding: 0;
      color: #e2e8f0;
      font-size: 0.84rem;
    }
    .reflex-markdown-body blockquote {
      border-left: 3px solid #38bdf8;
      background: rgba(56, 189, 248, 0.07);
      padding: 0.6rem 0.9rem;
      border-radius: 0 6px 6px 0;
      color: #e2e8f0;
      margin: 0.75rem 0;
    }
    .reflex-markdown-body hr {
      border: none;
      border-top: 1px solid rgba(255, 255, 255, 0.12);
      margin: 1rem 0;
    }
    .btn-toggle-answer {
      background: rgba(56, 189, 248, 0.12);
      border: 1px solid rgba(56, 189, 248, 0.35);
      border-radius: 6px;
      color: #38bdf8;
      font-size: 0.78rem;
      font-weight: 600;
      padding: 4px 10px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all 0.2s ease;
    }
    .btn-toggle-answer:hover {
      background: rgba(56, 189, 248, 0.22) !important;
      border-color: #38bdf8 !important;
      color: #ffffff !important;
      box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
    }
    .reflex-preview-clickable:hover {
      opacity: 0.85;
      text-decoration: underline dotted rgba(56, 189, 248, 0.5);
    }


    /* --- NOUVELLE MODALE À 2 COLONNES (SIDEBAR 5 ÉTAPES) --- */
    .modal-dialog-sidebar {
      max-width: 960px !important;
      width: 95vw !important;
      height: 700px !important;
      max-height: 92vh !important;
      padding: 0 !important;
      display: flex !important;
      flex-direction: column !important;
      overflow: hidden !important;
      background: rgba(15, 23, 42, 0.97) !important;
      backdrop-filter: blur(28px) !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      border-radius: 16px !important;
      box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 35px rgba(99, 102, 241, 0.15) !important;
    }

    .modal-sidebar-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.9rem 1.4rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(15, 23, 42, 0.65);
      flex-shrink: 0;
    }

    .modal-sidebar-header h3 {
      font-size: 1.15rem;
      font-weight: 700;
      color: #f8fafc;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .modal-sidebar-body {
      display: flex;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .modal-nav-sidebar {
      width: 250px;
      flex-shrink: 0;
      background: rgba(10, 15, 30, 0.55);
      border-right: 1px solid rgba(255, 255, 255, 0.08);
      padding: 1.15rem 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      overflow-y: auto;
    }

    .modal-nav-item {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      padding: 0.65rem 0.8rem;
      border-radius: 10px;
      border: 1px solid transparent;
      background: transparent;
      color: #94a3b8;
      font-size: 0.82rem;
      font-weight: 500;
      cursor: pointer;
      text-align: left;
      transition: all 0.2s ease;
      width: 100%;
      user-select: none;
    }

    .modal-nav-item:hover {
      background: rgba(255, 255, 255, 0.04);
      color: #f1f5f9;
      border-color: rgba(255, 255, 255, 0.06);
    }

    .modal-nav-item.active {
      background: rgba(99, 102, 241, 0.16);
      border-color: rgba(99, 102, 241, 0.45);
      color: #ffffff;
      font-weight: 600;
      box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
    }

    .modal-nav-item .nav-step-num {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
      color: #94a3b8;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 700;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .modal-nav-item.active .nav-step-num {
      background: #6366f1;
      color: #ffffff;
      box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
    }

    .modal-nav-item .nav-label-box {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .modal-nav-item .nav-step-title {
      font-size: 0.83rem;
      line-height: 1.25;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .modal-nav-item .nav-step-subtitle {
      font-size: 0.68rem;
      color: #64748b;
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .modal-nav-item.active .nav-step-subtitle {
      color: #a5b4fc;
    }

    .modal-step-pane-container {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      background: transparent;
    }

    .modal-step-pane {
      display: none;
      flex: 1;
      overflow-y: auto;
      padding: 1.35rem 1.6rem;
    }

    .modal-step-pane.active {
      display: block;
      animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .step-header-box {
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      padding-bottom: 0.75rem;
      margin-bottom: 1.1rem;
    }

    .step-header-box h4 {
      margin: 0 0 0.25rem 0;
      font-size: 1.05rem;
      color: #f8fafc;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .step-header-box p {
      margin: 0;
      font-size: 0.78rem;
      color: #94a3b8;
      line-height: 1.4;
    }

    .modal-step-footer {
      padding: 0.85rem 1.5rem;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(15, 23, 42, 0.7);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
      gap: 1rem;
    }

    @media (max-width: 768px) {
      .modal-dialog-sidebar {
        height: 94vh !important;
        width: 96vw !important;
      }
      .modal-sidebar-body {
        flex-direction: column !important;
      }
      .modal-nav-sidebar {
        width: 100% !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        padding: 0.5rem 0.75rem !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
      }
      .modal-nav-item {
        padding: 0.4rem 0.65rem !important;
        white-space: nowrap !important;
        width: auto !important;
      }
      .modal-nav-item .nav-step-subtitle {
        display: none !important;
      }
      .modal-step-pane {
        padding: 1rem !important;
      }
      .modal-step-footer {
        padding: 0.75rem 1rem !important;
      }
    }

    /* --- RBAC Visibility Choice Cards (Étape 5 & Bundles) --- */
    .rbac-choice-card {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      padding: 0.65rem 0.8rem;
      background: rgba(255, 255, 255, 0.025);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: var(--radius-md, 8px);
      cursor: pointer;
      font-size: 0.78rem;
      font-weight: 500;
      color: #94a3b8;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      user-select: none;
    }

    .rbac-choice-card:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.2);
      color: #f1f5f9;
      transform: translateY(-1px);
    }

    /* Active / Checked state matching Archetype selector styling */
    .rbac-choice-card:has(input[type="radio"]:checked),
    .rbac-choice-card.active {
      background: rgba(99, 102, 241, 0.12) !important;
      border: 1.5px solid #818cf8 !important;
      box-shadow: 0 0 16px rgba(99, 102, 241, 0.28) !important;
      color: #ffffff !important;
      font-weight: 600;
    }

    .rbac-choice-card input[type="radio"] {
      accent-color: #818cf8;
      width: 15px;
      height: 15px;
      cursor: pointer;
      margin: 0;
      flex-shrink: 0;
    }
  
    /* --- LUCIDE ICONS SOVEREIGN INTEGRATION --- */
    .lucide,
    i[data-lucide],
    svg.lucide {
      width: 1.15em;
      height: 1.15em;
      stroke-width: 2px;
      vertical-align: -0.18em;
      display: inline-block;
      flex-shrink: 0;
    }
    .icon-xs, .icon-xs svg.lucide { width: 0.85em; height: 0.85em; }
    .icon-sm, .icon-sm svg.lucide { width: 1em; height: 1em; }
    .icon-lg, .icon-lg svg.lucide { width: 1.35em; height: 1.35em; }
    .nav-item .nav-icon svg.lucide { width: 1.25em; height: 1.25em; }
    .archetype-icon svg.lucide { width: 1.6em; height: 1.6em; }

    /* ==========================================================================
       DINIA SUITE INTEGRATION (SOVEREIGN HEADER, WAFFLE & ACCOUNT MENU)
       ========================================================================== */

    :root {
      --bg-surface: #0f172a;
      --bg-hover: rgba(30, 41, 59, 0.7);
      --bg-active: rgba(51, 65, 85, 0.8);
      --primary-tint: rgba(99, 102, 241, 0.15);
      --primary-border: rgba(99, 102, 241, 0.35);
      --border-subtle: rgba(255, 255, 255, 0.08);
      --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      --shadow-jira: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
      --transition-fast: 0.15s ease;
      --transition-normal: 0.25s ease;
      --radius-full: 9999px;
    }
