/* ═══════════════════════════════════════════════════════════════════════════
   Eden Vanilla v2 — Design System
   Core + Plugins + Nicolas Hub
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root,
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-elevated: #1e293b;
  --bg-surface: #0b1120;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;
  --accent-primary: #6366f1;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.12);
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --border-color: #1e293b;
  --border-light: #334155;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-xs: 11px;
  --font-sm: 13px;
  --font-md: 15px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 28px;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --transition: 0.2s ease;
  --sidebar-w: 220px;
  --header-h: 52px;
  --nav-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --glass-bck: rgba(0, 0, 0, 0.17);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-elevated: #ffffff;
  --bg-surface: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-muted: #cbd5e1;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --glass-bck: rgba(255, 255, 255, 0.17);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#eden-app {
  width: 100%;
  height: 100%;
  position: relative;
  container-type: inline-size;
  container-name: eden-app;
}

html,
body {
  height: 100%;
  overflow: hidden;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 2px;
}

/* ── Utilities ── */
[hidden] {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: all var(--transition);
}

.btn-accent {
  background: var(--accent-primary);
  color: #fff;
}

.btn-accent:active {
  background: var(--accent-dark);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  min-height: 34px;
  font-size: var(--font-xs);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  min-width: 40px;
  min-height: 40px;
}

.btn-icon:active {
  background: var(--bg-tertiary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: var(--font-md);
  outline: none;
  transition: border-color var(--transition);
  background: var(--glass-bck);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8.2px);
  -webkit-backdrop-filter: blur(8.2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Auth Pages ── */
.eden-page {
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

.auth-logo h1 {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--accent-primary);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-top: 4px;
}

.auth-error {
  color: var(--red);
  font-size: var(--font-sm);
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
#eden-shell {
  display: flex;
  height: 100%;
  width: 100%;
  position: fixed;
  inset: 0;
  padding: 10px;
  flex-direction: column;
}

/* ── Sidebar (desktop) ── */
.eden-sidebar {
  width: var(--sidebar-w);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: width 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
}

.eden-sidebar.collapsed {
  width: 0;
  border-right: none;
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--accent-primary);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.nav-section {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 12px 6px;
}

/* ── Main area ── */
.eden-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.eden-content-container {
  display: flex;
  flex: 1;
  min-height: 0;
}

.eden-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  margin-bottom: 10px;
  border-radius: 16px;
}

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

.sidebar-toggle-btn {
  font-size: 20px !important;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.eden-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* padding-bottom elargi pour degager le FAB Nicolas (fixed, bottom-right) */
  padding: 24px 24px 80px;
}
/* Exceptions plein-ecran : les plugins IDE/docs/build gerent leur propre
   hauteur et ont besoin de 100% du viewport sans padding qui cree des gaps.
   On garde overflow-y: auto comme filet de sécurité au cas où le scroll
   interne d'un plugin (ex: WASM editor word-wrap) ne couvre pas tout. */
.eden-content:has(.ec-ide),
.eden-content:has(.docs-wrap),
.eden-content:has(.build-status) {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

/* ── Bottom nav (mobile only) ── */
.eden-bottom-nav {
  display: none;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
}

.eden-bottom-nav>div {
  display: flex;
  align-items: center;
  height: var(--nav-h);
}

.bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  min-height: 48px;
  justify-content: center;
}

.bottom-nav-btn.active {
  color: var(--accent-primary);
}

.bottom-nav-btn .bnav-icon {
  font-size: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NICOLAS — FAB + Chat Panel
   ═══════════════════════════════════════════════════════════════════════════ */
.nicolas-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-dark));
  color: #fff;
  border: none;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  z-index: 500;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  transition: transform var(--transition);
  touch-action: none;
  user-select: none;
}

.nicolas-fab:active {
  transform: scale(0.92);
}

.nicolas-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  z-index: 600;
  display: flex;
  flex-direction: column;
}

.nicolas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.nicolas-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nicolas-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--cyan));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
}

.nicolas-title {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--accent-primary);
}

.nicolas-status {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}

.nicolas-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nicolas-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: var(--font-sm);
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.nicolas-msg.user {
  align-self: flex-end;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px 14px 4px 14px;
}

.nicolas-msg.assistant {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px 14px 14px 4px;
}

.nicolas-msg.assistant.streaming {
  border-color: var(--accent-primary);
  animation: msg-pulse 1.2s ease-in-out infinite;
}

@keyframes msg-pulse {

  0%,
  100% {
    border-color: rgba(99, 102, 241, 0.3);
  }

  50% {
    border-color: var(--accent-primary);
  }
}

.nicolas-tool-result {
  align-self: center;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
}

.nicolas-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: calc(10px + var(--safe-bottom));
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  align-items: flex-end;
}

.nicolas-input-bar textarea {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  color: var(--text-primary);
  font-size: var(--font-md);
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  max-height: 120px;
  outline: none;
}

.nicolas-input-bar textarea:focus {
  border-color: var(--accent-primary);
}

.btn-accent-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: var(--font-sm);
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s, transform 0.3s;
  cursor: pointer;
  max-width: 340px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-color: var(--green);
  color: var(--green);
}

.toast.error {
  border-color: var(--red);
  color: var(--red);
}

.toast.warning {
  border-color: var(--amber);
  color: var(--amber);
}

.toast.info {
  border-color: var(--blue);
  color: var(--blue);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════════════════════════════════ */
.eden-loading {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

/* .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
} */
/* HTML: <div class="loader"></div> */
.loader {
  display: inline-flex;
  gap: 10px;
}

.loader:before,
.loader:after {
  content: "";
  height: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, #000 95%, #0000) 35% 35%/15px 15px no-repeat #fff;
  animation: l5 3s infinite;
}

@keyframes l5 {

  0%,
  11% {
    background-position: 35% 35%
  }

  14%,
  36% {
    background-position: 65% 35%
  }

  38%,
  61% {
    background-position: 65% 65%
  }

  64%,
  86% {
    background-position: 35% 65%
  }

  88%,
  100% {
    background-position: 35% 35%
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REUSABLE COMPONENTS (design system)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page container ── */
.page-container {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
}

.section-title-lg {
  font-size: 20px;
  font-weight: 700;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.tab {
  padding: 8px 16px;
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color var(--transition);
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: var(--font-md);
}

/* ── Cards (list items) ── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--accent-primary);
}

.card-lg {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
}

/* ── Badges (inline pills) ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-accent {
  background: var(--accent-glow);
  color: var(--accent-primary);
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.badge-amber {
  background: rgba(251, 191, 36, 0.15);
  color: var(--amber);
}

.badge-muted {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.badge-pill {
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── Tables ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
}

.table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.table tr:hover td {
  background: var(--bg-secondary);
}

/* ── List items (non-clickable) ── */
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.list-item:hover {
  background: var(--bg-tertiary);
}

/* ── Progress bar ── */
.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-fill.accent {
  background: var(--accent-primary);
}

.progress-fill.green {
  background: var(--green);
}

.progress-fill.gradient {
  background: linear-gradient(90deg, var(--accent-primary), var(--cyan));
}

/* ── Links ── */
a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Focus states ── */
.btn:focus-visible,
.tab:focus-visible,
.btn-icon:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROJECTS PAGE (core)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title {
  font-size: var(--font-xl);
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.project-card {
  background: var(--glass-bck);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8.2px);
  -webkit-backdrop-filter: blur(8.2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.project-card:hover {
  border-color: var(--accent-primary);
}

.project-card:active {
  transform: scale(0.99);
}

.project-card-name {
  font-size: var(--font-md);
  font-weight: 700;
  margin-bottom: 4px;
}

.project-card-meta {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}

.empty-state {
  text-align: center;
  color: var(--text-tertiary);
  padding: 60px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════════════════════════════════════════════ */
/* Mobile: media query + JS class fallback */
@media (max-width: 767px) {
  #eden-shell {
    flex-direction: column;
  }

  .eden-sidebar {
    display: none !important;
  }

  .eden-bottom-nav {
    display: flex !important;
  }

  .eden-content {
    padding: 16px;
    /* padding-bottom pour degager la bottom-nav mobile + safe-area iOS */
    padding-bottom: calc(16px + var(--nav-h) + var(--safe-bottom) + 16px);
  }

  .nicolas-fab {
    bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  }

  .nicolas-panel {
    width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .eden-header {
    padding: 0 10px;
  }

  .page-title {
    font-size: var(--font-lg);
  }
}

@media (min-width: 768px) {
  .eden-bottom-nav {
    display: none !important;
  }
}

/* Container query (works reliably in srcdoc iframes) */
@container eden-app (max-width: 767px) {
  #eden-shell {
    flex-direction: column;
  }

  .eden-sidebar {
    display: none !important;
  }

  .eden-bottom-nav {
    display: flex !important;
  }

  .eden-bottom-nav>div {
    display: flex;
    width: 100%;
  }

  .eden-main {
    width: 100%;
  }

  .eden-content {
    padding: 16px;
    padding-bottom: calc(16px + var(--nav-h) + var(--safe-bottom));
  }

  .nicolas-fab {
    bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  }

  .nicolas-panel {
    width: 100%;
    right: 0;
    left: 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .eden-header {
    padding: 0 10px;
  }

  .page-title {
    font-size: var(--font-lg);
  }

  .sidebar-toggle-btn {
    display: none !important;
  }

  .ide-layout {
    flex-direction: column;
    height: 100%;
  }

  .ide-file-tree,
  .ide-center,
  .ide-preview-area {
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
    display: none !important;
  }

  .ide-file-tree.mobile-active {
    display: flex !important;
    flex: 1;
    flex-direction: column;
  }

  .ide-center.mobile-active {
    display: flex !important;
    flex: 1;
    flex-direction: column;
  }

  .ide-preview-area.mobile-active {
    display: flex !important;
    flex: 1;
    flex-direction: column;
  }

  .ide-center.mobile-active .ide-editor-area {
    flex: 1;
    min-height: 0;
  }

  .ide-center.mobile-active .ide-console-panel {
    max-height: none !important;
  }
}

/* JS-based mobile class (for srcdoc iframes where media queries may not trigger) */
.eden-mobile #eden-shell {
  flex-direction: column;
}

.eden-mobile .eden-sidebar {
  display: none !important;
}

.eden-mobile .sidebar-toggle-btn {
  display: none !important;
}

.eden-mobile .eden-bottom-nav {
  display: flex !important;
}

.eden-mobile .eden-bottom-nav>div {
  display: flex;
  width: 100%;
}

.eden-mobile .eden-main {
  flex: 1;
  width: 100%;
  min-height: 0;
}

.eden-mobile .eden-content {
  padding: 16px;
  padding-bottom: calc(16px + var(--nav-h) + var(--safe-bottom));
}

.eden-mobile .nicolas-fab {
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
}

.eden-mobile .nicolas-panel {
  width: 100%;
  right: 0;
  left: 0;
}

.eden-mobile .project-grid {
  grid-template-columns: 1fr;
}

.eden-mobile .eden-header {
  padding: 0 10px;
}

.eden-mobile .page-title {
  font-size: var(--font-lg);
}

/* IDE plugin mobile override — only top-level panels hidden, children managed by JS */
.eden-mobile .ide-layout {
  flex-direction: column;
  height: 100%;
}

.eden-mobile .ide-file-tree,
.eden-mobile .ide-center,
.eden-mobile .ide-preview-area {
  width: 100% !important;
  min-width: 0 !important;
  border: none !important;
  display: none !important;
}

.eden-mobile .ide-file-tree.mobile-active {
  display: flex !important;
  flex: 1;
  flex-direction: column;
}

.eden-mobile .ide-center.mobile-active {
  display: flex !important;
  flex: 1;
  flex-direction: column;
}

.eden-mobile .ide-preview-area.mobile-active {
  display: flex !important;
  flex: 1;
  flex-direction: column;
}

.eden-mobile .ide-center.mobile-active .ide-editor-area {
  flex: 1;
  min-height: 0;
}

.eden-mobile .ide-center.mobile-active .ide-console-panel {
  max-height: none !important;
  border-top: none !important;
}


/* AJOUT JEREMIE */
.glass,
.homepage-nav-item {
 background: var(--glass-bck);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8.2px);
  -webkit-backdrop-filter: blur(8.2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}








/* ORIGINAL CODE KEVIN */
/* 
html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-md);
  outline: none;
  transition: border-color var(--transition);
}
.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--transition);
}

 */