.hub-header { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hub-kicker { font-family: monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; }
.hub-title { font-size: 36px; font-weight: 900; letter-spacing: 0.02em; margin: 0 0 8px; color: #fff; text-transform: uppercase; }
.hub-subtitle { color: var(--muted); font-size: 15px; margin: 0; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 18px; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.project-card-banner {
  height: 120px;
  background: linear-gradient(135deg, #111827 0%, #1e293b 50%, #0f172a 100%);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}
.project-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-card-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-card-thumb {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; object-fit: cover;
}
.project-card-title { font-size: 18px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.project-card-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex-shrink: 0; }
.engine-tag {
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px;
  background: rgba(99, 102, 241, 0.16); border: 1px solid rgba(99, 102, 241, 0.45); color: #a5b4fc;
  white-space: nowrap;
}
.engine-tag.tag-ue { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.45); color: #38bdf8; }
.engine-tag.tag-unity { background: rgba(248, 250, 252, 0.12); border-color: rgba(248, 250, 252, 0.35); color: #f8fafc; }
.engine-tag.tag-cpp { background: rgba(59, 130, 246, 0.16); border-color: rgba(59, 130, 246, 0.45); color: #93c5fd; }
.engine-tag.tag-csharp { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.engine-tag.tag-java { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.45); color: #fbbf24; }
.engine-tag.tag-python { background: rgba(234, 179, 8, 0.15); border-color: rgba(234, 179, 8, 0.45); color: #fde047; }
.project-card-desc { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.project-card-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(35, 40, 56, 0.7); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }

.doc-header { border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 26px; }
.doc-title-view { font-size: 32px; font-weight: 800; margin: 0 0 10px; }
.meta-pills { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.pill { background: var(--surface); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; }
.pill.status-valide { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.45); color: #34d399; }
.pill.status-en-cours { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.45); color: #fbbf24; }
.view-h1 { font-size: 25px; margin: 30px 0 14px; color: #ffffff; border-bottom: 1px solid rgba(56, 189, 248, 0.25); padding-bottom: 8px; letter-spacing: -0.01em; }
.view-h2 { font-size: 19px; margin: 22px 0 10px; color: #38bdf8; }
.view-h3 { font-size: 16px; margin: 16px 0 6px; color: #93c5fd; }
.view-h4 { font-size: 13px; margin: 14px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.swatch-bar { display: flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--border); padding: 4px 7px; border-radius: 6px; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.12s, border-color 0.12s; }
.swatch-dot:hover { transform: scale(1.15); }
.swatch-dot.selected { border-color: #ffffff; transform: scale(1.15); }
.custom-color-btn { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1px dashed var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text); cursor: pointer; overflow: hidden; background: var(--surface); }
.custom-color-btn input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: none; padding: 0; }
.view-link-card { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 14px 0; cursor: pointer; transition: 0.15s; }
.view-link-card:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.12); }
.view-text { line-height: 1.7; font-size: 15px; margin: 10px 0; }
.view-text code { background: #1e2433; padding: 2px 6px; border-radius: 4px; font-family: monospace; color: #38bdf8; }
.view-code { background: #0d0f17; border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow-x: auto; font-family: monospace; font-size: 13px; margin: 14px 0; }
.view-callout { padding: 14px 16px; border-radius: 8px; background: var(--surface); border-left: 4px solid var(--accent); margin: 14px 0; line-height: 1.5; }
.view-callout.warn { border-left-color: var(--warn); }
.view-callout.ok { border-left-color: var(--success); }
.view-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.view-table th, .view-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.view-table th { background: var(--surface); font-weight: 700; }
.view-checklist { list-style: none; padding: 0; margin: 12px 0; }
.view-checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.view-single-img { margin: 16px 0; text-align: center; }
.view-single-img img { max-width: 100%; max-height: 540px; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; }
.view-single-img figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.img-box-horizontal { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; align-items: flex-start; }
.img-box-horizontal figure { flex: 1 1 240px; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; }
.img-box-horizontal img { width: 100%; height: 220px; object-fit: contain; border-radius: 6px; cursor: zoom-in; background: var(--bg); }
.img-box-vertical { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.img-box-vertical figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; }
.img-box-vertical img { max-width: 100%; max-height: 480px; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.img-box-horizontal figcaption, .img-box-vertical figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.lightbox-overlay { position: fixed; inset: 0; background: rgba(5, 6, 10, 0.9); display: none; align-items: center; justify-content: center; z-index: 10001; cursor: zoom-out; padding: 24px; }
.lightbox-overlay img { max-width: 95vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); }
.page-nav-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.nav-card { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; cursor: pointer; transition: 0.15s; }
.nav-card:hover { border-color: var(--accent); }
.nav-card small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; margin-bottom: 4px; }
.nav-card.next { text-align: right; }
.doc-title-input { font-size: 26px; font-weight: 800; width: 100%; margin-bottom: 12px; }
.edit-block { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.edit-block-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.block-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #38bdf8; }
.edit-controls button { padding: 3px 8px; font-size: 12px; margin-left: 4px; }
.toolbar { display: flex; gap: 6px; margin-bottom: 8px; }
.toolbar button { padding: 4px 10px; font-size: 12px; }
.wysiwyg { min-height: 64px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px; line-height: 1.6; outline: none; }
.wysiwyg code { background: #1e2433; padding: 2px 5px; border-radius: 4px; font-family: monospace; color: #38bdf8; }
.add-palette { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border: 1px dashed var(--border); border-radius: 10px; margin-top: 20px; }

.emoji-picker-wrap { position: relative; }
.emoji-trigger-btn { width: 48px; height: 48px; font-size: 24px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; padding: 0; transition: 0.15s; }
.emoji-trigger-btn:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.12); }
.emoji-popover {
  position: fixed;
  width: 380px;
  max-height: 420px;
  background: #0d1018;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85);
  z-index: 10010;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.emoji-popover.open { display: flex; }
.emoji-popover-head { padding: 10px; border-bottom: 1px solid var(--border); display: flex; gap: 6px; background: var(--sidebar); }
.emoji-popover-head input { flex: 1; padding: 6px 10px; font-size: 13px; background: var(--bg); }
.emoji-popover-body { flex: 1; overflow-y: auto; padding: 10px; }
.emoji-cat-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; letter-spacing: 0.05em; }
.emoji-cat-title:first-child { margin-top: 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-cell { font-size: 22px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: none; background: transparent; cursor: pointer; padding: 0; transition: background 0.1s, transform 0.1s; }
.emoji-cell:hover { background: var(--surface); transform: scale(1.15); }
.emoji-cell.active { background: rgba(59, 130, 246, 0.25); outline: 1px solid var(--accent); }

.swatch-bar { display: flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--border); padding: 4px 7px; border-radius: 6px; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.12s, border-color 0.12s; }
.swatch-dot:hover { transform: scale(1.15); }
.swatch-dot.selected { border-color: #ffffff; transform: scale(1.15); }
.custom-color-btn { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1px dashed var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text); cursor: pointer; overflow: hidden; background: var(--surface); }
.custom-color-btn input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: none; padding: 0; }

.view-link-card { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 14px 0; cursor: pointer; transition: 0.15s; }
.view-link-card:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.12); }
.view-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.view-table th, .view-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.view-table th { background: var(--surface); font-weight: 700; }
.view-checklist { list-style: none; padding: 0; margin: 12px 0; }
.view-checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.img-box-horizontal { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; align-items: flex-start; }
.img-box-horizontal figure { flex: 1 1 240px; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; }
.img-box-horizontal img { width: 100%; height: 220px; object-fit: contain; border-radius: 6px; cursor: zoom-in; background: var(--bg); }
.img-box-vertical { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.img-box-vertical figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; }
.img-box-vertical img { max-width: 100%; max-height: 480px; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.img-box-horizontal figcaption, .img-box-vertical figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.edit-block { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.edit-block-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.block-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #38bdf8; }
.edit-controls button { padding: 3px 8px; font-size: 12px; margin-left: 4px; }
.toolbar { display: flex; gap: 6px; margin-bottom: 8px; }
.toolbar button { padding: 4px 10px; font-size: 12px; }
.wysiwyg { min-height: 64px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px; line-height: 1.6; outline: none; }
.wysiwyg code { background: #1e2433; padding: 2px 5px; border-radius: 4px; font-family: monospace; color: #38bdf8; }
.add-palette { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border: 1px dashed var(--border); border-radius: 10px; margin-top: 20px; }