/* Sidebar */
    .sidebar {
      width: 270px;
      background: var(--bg-sidebar);
      border-right: 1px solid var(--border-color);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      z-index: 100;
    }

    .sidebar-header {
      padding: 1.25rem 1.25rem 1.15rem 1.25rem;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .sidebar-brand-link {
      display: inline-flex;
      align-items: center;
      gap: 0.65rem;
      text-decoration: none;
      transition: opacity 0.2s ease;
    }

    .sidebar-brand-link:hover {
      opacity: 0.88;
    }

    .brand-atlas-logo {
      height: 28px;
      width: auto;
      max-width: 140px;
      object-fit: contain;
      display: block;
    }

    html.dark .logo-light {
      display: none !important;
    }
    html.dark .logo-dark {
      display: block !important;
    }
    html:not(.dark) .logo-light {
      display: block !important;
    }
    html:not(.dark) .logo-dark {
      display: none !important;
    }

    .brand-sub-badge {
      font-size: 0.65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 2px 7px;
      border-radius: 6px;
      background: rgba(51, 204, 177, 0.12);
      color: #0d9488;
      border: 1px solid rgba(51, 204, 177, 0.3);
      white-space: nowrap;
    }

    html.dark .brand-sub-badge {
      background: rgba(51, 204, 177, 0.15);
      color: #33ccb1;
      border-color: rgba(51, 204, 177, 0.35);
    }

    /* Fallback legacy support */
    .sidebar-logo {
      width: 38px;
      height: 38px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.2));
      border: 1px solid var(--border-focus);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      box-shadow: 0 0 15px var(--primary-glow);
    }

    .sidebar-title-wrap h1 {
      font-size: 1.1rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: var(--text-main);
    }

    .sidebar-title-wrap p {
      font-size: 0.75rem;
      color: var(--text-dim);
      font-weight: 500;
    }


    /* Sidebar Quick Refresh Button */
    .sidebar-refresh-wrap {
      padding: 0.9rem 0.85rem 0.35rem 0.85rem;
    }

    .btn-sidebar-refresh {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 0.65rem;
      padding: 0.65rem 0.85rem;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.05));
      border: 1px solid rgba(99, 102, 241, 0.25);
      border-radius: var(--radius-md);
      color: #e2e8f0;
      font-size: 0.82rem;
      font-weight: 600;
      font-family: var(--font-body);
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      user-select: none;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

    .btn-sidebar-refresh:hover {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.12));
      border-color: rgba(99, 102, 241, 0.5);
      color: #ffffff;
      box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
      transform: translateY(-1px);
    }

    .btn-sidebar-refresh:active {
      transform: translateY(0px) scale(0.98);
      box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
    }

    .btn-sidebar-refresh:disabled {
      opacity: 0.7;
      cursor: not-allowed;
    }

    .refresh-icon-box {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 6px;
      background: rgba(99, 102, 241, 0.2);
      color: #818cf8;
      transition: all 0.25s ease;
      flex-shrink: 0;
    }

    .btn-sidebar-refresh:hover .refresh-icon-box {
      background: rgba(99, 102, 241, 0.35);
      color: #a5b4fc;
      box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
    }

    .refresh-svg {
      transition: transform 0.4s ease;
    }

    .btn-sidebar-refresh.is-refreshing .refresh-svg {
      animation: refreshSpin 0.75s linear infinite;
    }

    @keyframes refreshSpin {
      100% {
        transform: rotate(360deg);
      }
    }

    .refresh-text {
      flex: 1;
      text-align: left;
      letter-spacing: -0.01em;
    }

    .refresh-hotkey {
      font-size: 0.65rem;
      font-family: var(--font-mono);
      color: var(--text-dim);
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 1px 5px;
      border-radius: 4px;
      font-weight: 500;
      transition: all 0.2s;
    }

    .btn-sidebar-refresh:hover .refresh-hotkey {
      border-color: rgba(99, 102, 241, 0.4);
      color: #cbd5e1;
    }

    .sidebar-nav {
      flex: 1;
      padding: 1.25rem 0.85rem;
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      overflow-y: auto;
    }

    .nav-section-title {
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--text-dim);
      padding: 0.5rem 0.75rem 0.25rem 0.75rem;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.7rem 0.85rem;
      border-radius: var(--radius-md);
      color: var(--text-muted);
      font-size: 0.88rem;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.2s;
      border: 1px solid transparent;
      user-select: none;
    }

    .nav-item:hover {
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-main);
    }

    .nav-item.active {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
      border-color: rgba(99, 102, 241, 0.35);
      color: #c7d2fe;
    }

    .nav-item .nav-icon {
      font-size: 1.15rem;
    }

    .nav-item .nav-badge {
      margin-left: auto;
      font-size: 0.72rem;
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-muted);
      padding: 2px 7px;
      border-radius: 12px;
      font-weight: 600;
    }

    .nav-item.active .nav-badge {
      background: rgba(99, 102, 241, 0.3);
      color: #a5b4fc;
    }

    .sidebar-footer {
      padding: 1rem 1.15rem;
      border-top: 1px solid var(--border-color);
      background: rgba(0, 0, 0, 0.2);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }

    .user-profile-info {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      overflow: hidden;
    }

    .user-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, #4f46e5, #06b6d4);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.8rem;
      color: white;
      flex-shrink: 0;
    }

    .user-text-meta {
      overflow: hidden;
    }

    .user-text-meta strong {
      display: block;
      font-size: 0.82rem;
      color: #fff;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .user-text-meta span {
      display: block;
      font-size: 0.72rem;
      color: #34d399;
    }

    .btn-logout {
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.25);
      color: #fca5a5;
      padding: 0.4rem 0.6rem;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: 0.78rem;
      font-weight: 600;
      transition: all 0.2s;
    }

    .btn-logout:hover {
      background: rgba(239, 68, 68, 0.25);
      border-color: rgba(239, 68, 68, 0.5);
    }

    /* Main Workspace Container */
    .main-workspace {
      flex: 1;
      height: 100vh;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 65%);
    }

    .workspace-topbar {
      padding: 0;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      flex-direction: column;
      background: rgba(8, 12, 20, 0.92);
      backdrop-filter: blur(14px);
      position: sticky;
      top: 0;
      z-index: 50;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }

    html:not(.dark) .workspace-topbar {
      background: rgba(255, 255, 255, 0.96) !important;
      border-bottom-color: #e2e8f0 !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    }

    /* Ligne 1 : Barre Dinia Souveraine (Ajouts du jour) */
    .topbar-row-dinia {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 0.55rem 2rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(10, 15, 29, 0.45);
    }

    html:not(.dark) .topbar-row-dinia {
      background: rgba(248, 250, 252, 0.9);
      border-bottom-color: rgba(226, 232, 240, 0.85);
    }

    .topbar-dinia-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      min-width: 0;
    }

    .dinia-suite-brand {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      text-decoration: none;
      color: var(--text-main);
      transition: opacity 0.2s;
    }

    .dinia-suite-brand:hover {
      opacity: 0.85;
    }

    .dinia-suite-picto {
      width: 17px;
      height: 17px;
    }

    .dinia-suite-title {
      font-size: 0.88rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: var(--text-main);
    }

    .dinia-suite-tag {
      font-size: 0.65rem;
      font-weight: 600;
      padding: 1px 7px;
      border-radius: var(--radius-full);
      background: rgba(56, 189, 248, 0.12);
      color: #38bdf8;
      border: 1px solid rgba(56, 189, 248, 0.25);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .topbar-dinia-divider {
      width: 1px;
      height: 16px;
      background: var(--border-color);
      opacity: 0.6;
    }

    /* Ligne 2 : Navigation et Actions Workspace */
    .topbar-row-workspace {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
      padding: 0.85rem 2rem;
    }

    .workspace-row-left {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      flex: 1;
      min-width: 0;
    }

    .workspace-title-block h2 {
      font-size: 1.35rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .workspace-title-block p {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin-top: 0.15rem;
    }

    .workspace-top-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .search-input-wrap {
      position: relative;
      width: 260px;
    }

    .search-input-wrap input {
      width: 100%;
      background: rgba(15, 23, 42, 0.6);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-md);
      padding: 0.55rem 0.85rem 0.55rem 2.2rem;
      color: var(--text-main);
      font-size: 0.82rem;
      outline: none;
      transition: all 0.2s;
    }

    .search-input-wrap input:focus {
      border-color: var(--border-focus);
      background: rgba(15, 23, 42, 0.9);
      box-shadow: 0 0 12px var(--primary-glow);
    }

    .search-input-wrap .search-icon {
      position: absolute;
      left: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      font-size: 0.85rem;
      opacity: 0.6;
      pointer-events: none;
    }

    .btn-action-primary {
      background: linear-gradient(135deg, #10b981, #059669);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: white;
      padding: 0.55rem 1.1rem;
      border-radius: var(--radius-md);
      font-weight: 600;
      font-size: 0.85rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      transition: all 0.2s;
      box-shadow: 0 4px 14px var(--emerald-glow);
    }

    .btn-action-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    }

    .btn-action-indigo {
      background: linear-gradient(135deg, #6366f1, #4f46e5);
      border: 1px solid rgba(99, 102, 241, 0.4);
      color: white;
      padding: 0.55rem 1.1rem;
      border-radius: var(--radius-md);
      font-weight: 600;
      font-size: 0.85rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      transition: all 0.2s;
      box-shadow: 0 4px 14px var(--primary-glow);
    }

    .btn-action-indigo:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    }
