/* ═══════════════════════════════════════════════════════════════
   LIBRAW — main.css v3.0
   Design : FMHY-inspired, sidebar layout, row-based resources
   ═══════════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:            #0f1117;
  --bg-sidebar:    #13161e;
  --bg-card:       #181c26;
  --bg-card-hover: #1c2030;
  --bg-input:      #12151d;
  --surface:       #1a1e28;
  --surface-2:     #1e2330;

  --border:        #252a38;
  --border-subtle: #1c2030;
  --border-hover:  #6c8eff;

  --text:          #e8ecf4;
  --text-muted:    #8b93a8;
  --text-dim:      #4a5168;

  --accent:        #6c8eff;
  --accent-dim:    rgba(108, 142, 255, 0.1);
  --accent-glow:   rgba(108, 142, 255, 0.05);
  --accent-2:      #a78bfa;

  --green:         #34d399;
  --green-dim:     rgba(52, 211, 153, 0.1);
  --red:           #f87171;
  --yellow:        #fbbf24;
  --orange:        #fb923c;

  --niveau-debutant: #34d399;
  --niveau-avance:   #fbbf24;
  --niveau-expert:   #f87171;

  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "DM Sans", system-ui, sans-serif;

  --radius:    6px;
  --radius-sm: 4px;
  --radius-lg: 10px;

  --transition:      180ms ease;
  --transition-fast: 80ms ease;

  --header-h:    54px;
  --sidebar-w:   240px;
  --content-max: 1200px;
  --guide-max:   760px;
}

/* ─── Google Fonts import ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: 100%;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-logo:hover { color: var(--text); }
.logo-icon {
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.logo-name { color: var(--text); font-weight: 600; }
.logo-sub { color: var(--text-dim); font-size: 0.75rem; }

.header-search {
  flex: 1;
  max-width: 400px;
}
.header-search-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  transition: border-color var(--transition);
}
.header-search-inner:focus-within { border-color: var(--accent); }
.header-search-icon { color: var(--text-dim); font-size: 0.8rem; }
.header-search-input {
  flex: 1; font-size: 0.82rem; color: var(--text); background: none;
}
.header-search-input::placeholder { color: var(--text-dim); }
.header-search-kbd {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 0.1rem 0.35rem;
}

.header-right {
  display: flex; align-items: center; gap: 0.75rem;
}
.header-link {
  font-size: 0.8rem; color: var(--text-muted);
  transition: color var(--transition);
}
.header-link:hover { color: var(--text); }
.header-gh {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem; color: var(--text-muted);
  transition: all var(--transition);
}
.header-gh:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile nav toggle */
.nav-toggle {
  display: none; width: 32px; height: 32px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); transition: all var(--transition);
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle-icon { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; transition: transform var(--transition);
}
.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }

/* ─── App shell (sidebar + main) ───────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--header-h));
  align-items: start;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.site-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.site-sidebar::-webkit-scrollbar { width: 4px; }
.site-sidebar::-webkit-scrollbar-track { background: transparent; }
.site-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section {
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}
.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.5rem 0.35rem;
  display: block;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.1rem; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.83rem; color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}
.sidebar-link:hover { color: var(--text); background: var(--surface); }
.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}
.sidebar-link.active::before {
  content: "";
  position: absolute; left: -0.75rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.sidebar-link-icon { font-size: 0.9rem; flex-shrink: 0; }
.sidebar-link-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem; border-radius: 20px;
}
.sidebar-divider {
  height: 1px; background: var(--border);
  margin: 0.5rem 1.25rem;
}

/* ─── Main content area ─────────────────────────────────────── */
.main-content {
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
}

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 3.5rem 2rem 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(108,142,255,0.03) 0%, transparent 100%);
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}
.hero-eyebrow-text {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--green); letter-spacing: 0.08em;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.hero-title span { color: var(--accent); }
.hero-tagline {
  font-size: 0.88rem; color: var(--text-muted);
  max-width: 520px; line-height: 1.7; margin-bottom: 2rem;
}
.hero-stats {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.hero-stat {
  display: flex; flex-direction: column; gap: 0.1rem;
}
.hero-stat strong {
  font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600;
  color: var(--accent); line-height: 1;
}
.hero-stat span {
  font-size: 0.7rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.hero-stat-sep { width: 1px; height: 28px; background: var(--border); }

/* ─── Section ────────────────────────────────────────────────── */
.section {
  padding: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.section:last-child { border-bottom: none; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title-group { display: flex; flex-direction: column; gap: 0.1rem; }
.section-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase;
}
.section-title {
  font-size: 1rem; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em;
}
.section-link {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--accent); transition: opacity var(--transition);
}
.section-link:hover { color: var(--accent); opacity: 0.7; }

/* ─── Category grid ──────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
}
.cat-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: all var(--transition);
}
.cat-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: inherit;
  transform: translateY(-1px);
}
.cat-emoji { font-size: 1.2rem; flex-shrink: 0; }
.cat-body { flex: 1; min-width: 0; }
.cat-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.cat-count {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-dim); display: block; margin-top: 0.1rem;
}

/* ─── Ressource row (nouvelle présentation) ──────────────────── */
.ressource-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.ressource-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
  position: relative;
}
.ressource-row:last-child { border-bottom: none; }
.ressource-row:hover { background: var(--bg-card-hover); }
.ressource-row.hidden { display: none; }

.row-badge {
  font-size: 0.75rem; flex-shrink: 0;
  opacity: 0.7;
}
.row-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.row-title {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  text-decoration: none; transition: color var(--transition);
  flex-shrink: 0;
}
.row-title:hover { color: var(--accent); }
.row-desc {
  font-size: 0.8rem; color: var(--text-muted);
  line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 400px;
}
.row-tags { display: flex; gap: 0.25rem; flex-wrap: wrap; flex-shrink: 0; }
.row-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; margin-left: auto; }
.row-verif {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--text-dim); white-space: nowrap;
}
.row-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.row-link {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-dim); padding: 0.2rem 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.row-link:hover { color: var(--accent); border-color: var(--accent); }
.row-link.primary { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-dim); }
.row-link.primary:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Niveau badges ──────────────────────────────────────────── */
.niveau-badge {
  font-family: var(--font-mono); font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  white-space: nowrap; border: 1px solid;
}
.niveau-debutant { color: var(--niveau-debutant); border-color: rgba(52,211,153,.25); background: rgba(52,211,153,.07); }
.niveau-avance   { color: var(--niveau-avance);   border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.07); }
.niveau-expert   { color: var(--niveau-expert);   border-color: rgba(248,113,113,.25); background: rgba(248,113,113,.07); }

/* ─── Tags ───────────────────────────────────────────────────── */
.tag {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--text-dim); padding: 0.1rem 0.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); background: var(--surface);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.card-tags { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }

/* ─── Search / Filter bar ───────────────────────────────────── */
.search-bar-wrapper {
  margin-bottom: 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.search-bar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem 0.75rem;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); }
.search-prefix { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; flex-shrink: 0; }
.search-input {
  flex: 1; font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text);
}
.search-input::placeholder { color: var(--text-dim); }
.search-cursor {
  font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.filter-bar {
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
}
.filter-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.filter-btn {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim);
  padding: 0.2rem 0.55rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.filter-btn:hover { color: var(--text-muted); border-color: var(--surface-2); }
.filter-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ─── No results ─────────────────────────────────────────────── */
.no-results {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-dim); padding: 2rem 0; text-align: center; display: none;
}
.no-results.visible { display: block; }

/* ─── Guide cards (compact list) ────────────────────────────── */
.guide-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.guide-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
  text-decoration: none; color: inherit;
}
.guide-row:last-child { border-bottom: none; }
.guide-row:hover { background: var(--bg-card-hover); }
.guide-row.hidden { display: none; }

.guide-row-main { flex: 1; min-width: 0; }
.guide-row-title {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.2rem; display: block;
  transition: color var(--transition);
}
.guide-row:hover .guide-row-title { color: var(--accent); }
.guide-row-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.guide-row-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.guide-row-cat { font-size: 0.72rem; color: var(--text-dim); }
.guide-row-arrow {
  font-size: 0.8rem; color: var(--text-dim);
  transition: color var(--transition), transform var(--transition);
}
.guide-row:hover .guide-row-arrow { color: var(--accent); transform: translateX(2px); }

/* ─── Guide cards (grid for home) ───────────────────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.6rem;
}
.guide-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1rem 1.1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.guide-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-1px); }
.guide-card.hidden { display: none; }
.guide-card-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.guide-card-cat { font-size: 0.72rem; color: var(--text-dim); }
.guide-card-title { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.guide-card-link { color: var(--text); text-decoration: none; transition: color var(--transition); }
.guide-card-link:hover { color: var(--accent); }
.guide-card-description { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.guide-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-top: auto;
}
.guide-card-cta {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent);
  margin-left: auto; transition: opacity var(--transition);
}
.guide-card-cta:hover { color: var(--accent); opacity: 0.7; }

/* ─── Page layout ────────────────────────────────────────────── */
.page-wrapper {
  max-width: 100%; padding: 2rem;
}
.page-header {
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--accent); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 0.4rem; display: block;
}
.page-title {
  font-size: 1.4rem; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 0.4rem;
}
.page-description { font-size: 0.85rem; color: var(--text-muted); max-width: 560px; }

/* ─── Category page ──────────────────────────────────────────── */
.cat-page-wrapper { padding: 2rem; }
.cat-page-header {
  margin-bottom: 1.75rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cat-page-title-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.cat-page-emoji { font-size: 1.4rem; }
.cat-page-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.cat-page-desc { font-size: 0.84rem; color: var(--text-muted); max-width: 500px; }
.cat-page-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); margin-top: 0.4rem; }

/* ─── Guide detail ───────────────────────────────────────────── */
.guide-wrapper {
  padding: 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.guide-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  display: flex; flex-direction: column; gap: 1rem;
}
.guide-meta-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em;
}
.meta-value { font-size: 0.78rem; color: var(--text-muted); }
.toc-nav {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem;
}
.toc-title {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--accent); letter-spacing: 0.08em; margin-bottom: 0.65rem;
}
.toc-links { display: flex; flex-direction: column; gap: 0.1rem; }
.toc-link {
  font-size: 0.74rem; color: var(--text-dim);
  padding: 0.2rem 0.4rem; border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition); line-height: 1.4;
}
.toc-link:hover, .toc-link.active { color: var(--accent); border-left-color: var(--accent); }
.toc-link.toc-h3 { padding-left: 0.8rem; font-size: 0.7rem; }
.back-link {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-dim); transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ─── Guide article ──────────────────────────────────────────── */
.guide-content {}
.guide-header {
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.guide-header-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.guide-cat { font-size: 0.74rem; color: var(--text-dim); }
.guide-title {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 0.5rem;
}
.guide-description { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; max-width: 580px; }

/* ─── Prose ──────────────────────────────────────────────────── */
.prose { max-width: var(--guide-max); }
.prose h2 {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-top: 2.5rem; margin-bottom: 0.75rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.prose h2::before { content: "// "; color: var(--accent); font-family: var(--font-mono); }
.prose h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 0.75rem; }
.prose ul, .prose ol { list-style: none; margin-bottom: 0.75rem; padding-left: 0; }
.prose ul li {
  font-size: 0.87rem; color: var(--text-muted); line-height: 1.65;
  padding-left: 1rem; position: relative; margin-bottom: 0.25rem;
}
.prose ul li::before { content: "—"; position: absolute; left: 0; color: var(--text-dim); font-family: var(--font-mono); }
.prose ol { counter-reset: ol-counter; }
.prose ol li {
  font-size: 0.87rem; color: var(--text-muted); line-height: 1.65;
  padding-left: 1.5rem; position: relative; margin-bottom: 0.25rem; counter-increment: ol-counter;
}
.prose ol li::before { content: counter(ol-counter) "."; position: absolute; left: 0; color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; }
.prose code { font-family: var(--font-mono); font-size: 0.8rem; background: var(--surface); color: var(--accent); padding: 0.15rem 0.35rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; overflow-x: auto; margin-bottom: 1rem; }
.prose pre code { background: none; border: none; padding: 0; font-size: 0.8rem; color: var(--text); }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 1rem; margin: 1rem 0; color: var(--text-dim); font-size: 0.85rem; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(108,142,255,.3); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: var(--accent); color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text-muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.82rem; }
.prose th, .prose td { padding: 0.5rem 0.75rem; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface); color: var(--text); font-weight: 600; }
.prose td { color: var(--text-muted); }

/* ─── Guides list page ───────────────────────────────────────── */
.guides-page-wrapper { padding: 2rem; }
.guides-page-header { margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.guides-filter-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.guides-filter-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sidebar);
}
.footer-inner {
  max-width: 100%; padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-left, .footer-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.footer-logo { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.footer-sep { color: var(--border); }
.footer-desc { font-size: 0.78rem; color: var(--text-dim); }
.footer-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }
.footer-link { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); transition: color var(--transition); }
.footer-link:hover { color: var(--accent); }
.footer-disclaimer { padding: 0.5rem 2rem 0.75rem; border-top: 1px solid var(--border-subtle); }
.footer-disclaimer-text { font-size: 0.68rem; color: var(--text-dim); line-height: 1.5; }

/* ─── 404 ────────────────────────────────────────────────────── */
.error-page { padding: 5rem 2rem; text-align: center; }
.error-code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--red); margin-bottom: 1rem; letter-spacing: 0.1em; }
.error-title { font-size: 2rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.error-message { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; }
.error-prompt { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); margin-bottom: 2rem; }
.error-prompt span { color: var(--accent); }
.error-links { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.error-link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); transition: all var(--transition); }
.error-link:hover, .error-link.primary { color: var(--accent); border-color: var(--accent); }

/* ─── Utilities ──────────────────────────────────────────────── */
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.warning-box { background: rgba(248,113,113,.06); border: 1px solid rgba(248,113,113,.2); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }
.warning-box::before { content: "⚠ "; color: var(--red); }

/* ─── GENERATOR PAGE ─────────────────────────────────────────── */
.gen-wrapper { padding: 2rem; }
.gen-header { margin-bottom: 2rem; }
.gen-title-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.gen-title { font-size: 1.35rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.gen-subtitle { color: var(--text-muted); font-size: 0.88rem; }
.gen-mode-bar { display: flex; gap: 0.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; align-items: center; }
.gen-mode-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-muted); font-size: 0.82rem; font-family: var(--font-mono); cursor: pointer; transition: all var(--transition); }
.gen-mode-btn:hover { border-color: var(--border-hover); color: var(--text); }
.gen-mode-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.mode-icon { font-size: 0.95rem; }
.gen-mode-spacer { flex: 1; }
.gen-upload-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius); background: transparent; color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono); cursor: pointer; transition: all var(--transition); user-select: none; }
.gen-upload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.gen-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.gen-form-col { display: flex; flex-direction: column; gap: 0; }
.gen-form { display: flex; flex-direction: column; gap: 0.9rem; }
.gen-form.hidden { display: none; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-label { font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-muted); letter-spacing: 0.03em; }
.form-label .req { color: var(--accent); }
.form-label .hint { color: var(--text-dim); font-size: 0.7rem; }
.form-input { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: var(--font-sans); font-size: 0.83rem; padding: 0.5rem 0.7rem; transition: border-color var(--transition); width: 100%; outline: none; }
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); }
.form-textarea { resize: vertical; min-height: 60px; font-family: var(--font-sans); line-height: 1.5; }
.form-textarea--lg { min-height: 180px; font-family: var(--font-mono); font-size: 0.78rem; }
.form-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.7rem center; padding-right: 2rem; }
.form-group--check { justify-content: flex-end; }
.check-row { display: flex; gap: 1rem; align-items: center; padding: 0.5rem 0; }
.check-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; user-select: none; }
.check-label input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.check-label:hover { color: var(--text); }
.gen-filename-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.2rem; padding: 0.5rem 0.8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.gen-filename-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); flex-shrink: 0; }
.gen-filename-value { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); word-break: break-all; }
.gen-preview-col { position: sticky; top: calc(var(--header-h) + 1.5rem); display: flex; flex-direction: column; gap: 0; }
.gen-preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.gen-preview-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); }
.gen-preview-actions { display: flex; gap: 0.4rem; align-items: center; }
.gen-copy-btn { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-mono); cursor: pointer; transition: all var(--transition); }
.gen-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.gen-copy-btn.copied { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.gen-download-btn { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-dim); color: var(--accent); font-size: 0.78rem; font-family: var(--font-mono); cursor: pointer; transition: all var(--transition); }
.gen-download-btn:hover { background: var(--accent); color: #fff; }
.gen-download-btn.copied { background: var(--accent); color: #fff; }
.gen-preview-split { display: flex; flex-direction: column; gap: 1.2rem; }
.gen-code-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.65; color: var(--text-muted); white-space: pre-wrap; word-break: break-all; max-height: 340px; overflow-y: auto; }
.gen-code-block code { color: inherit; background: none; padding: 0; font-size: inherit; }
.gen-card-preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.preview-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); padding: 0.5rem 0.8rem; background: var(--surface); border-bottom: 1px solid var(--border); }
#card-preview-inner { padding: 0.8rem; background: var(--bg); }
.preview-empty { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.78rem; text-align: center; padding: 1.5rem 0; }
.gen-featured-badge { display: inline-block; margin-bottom: 0.5rem; font-size: 0.7rem; font-family: var(--font-mono); color: var(--yellow); border: 1px solid var(--yellow); padding: 0.15rem 0.5rem; border-radius: var(--radius-sm); }
.gen-toast { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; margin-bottom: 1.2rem; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.8rem; animation: toastIn .15s ease; }
.gen-toast.hidden { display: none; }
.gen-toast--ok { background: rgba(52,211,153,.1); border: 1px solid var(--green); color: var(--green); }
.gen-toast--err { background: rgba(248,113,113,.1); border: 1px solid var(--red); color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Syntax highlight ───────────────────────────────────────── */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--text-dim); }
.token.punctuation { color: var(--text-muted); }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: var(--red); }
.token.boolean, .token.number { color: var(--yellow); }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: var(--green); }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string, .token.variable { color: var(--text); }
.token.atrule, .token.attr-value, .token.keyword { color: var(--accent); }
.token.function, .token.class-name { color: var(--accent-2); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile-first, 3 breakpoints
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tablette large (sidebar plus étroite) ──────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 190px; }
}

/* ─── Tablette / sidebar cachée, nav horizontale ─────────────── */
@media (max-width: 860px) {
  /* App shell : sidebar passe en dessous du header, pleine largeur */
  .app-shell { grid-template-columns: 1fr; }

  /* Sidebar : 2 lignes, flex-wrap */
  .site-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 0.2rem 0;
    overflow: visible;
  }
  .site-sidebar .sidebar-section {
    padding: 0;
    margin-bottom: 0;
    display: contents;
  }
  .site-sidebar .sidebar-label { display: none; }
  .site-sidebar .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.15rem;
  }
  .site-sidebar .sidebar-link {
    padding: 0.28rem 0.6rem;
    font-size: 0.77rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .site-sidebar .sidebar-link.active::before { display: none; }
  .site-sidebar .sidebar-divider {
    width: 1px; height: 18px;
    background: var(--border);
    margin: 0.1rem 0.3rem;
    flex-shrink: 0;
    align-self: center;
  }
  .site-sidebar .sidebar-link-count { display: none; }

  /* Generator : une colonne */
  .gen-body { grid-template-columns: 1fr; }
}

/* ─── Mobile (< 700px) ───────────────────────────────────────── */
@media (max-width: 700px) {

  /* Header */
  .nav-toggle { display: flex; }
  .header-search { display: none; }
  .logo-sub { display: none; }

  /* Paddings globaux */
  .section,
  .page-wrapper,
  .cat-page-wrapper,
  .guides-page-wrapper,
  .gen-wrapper { padding: 1rem; }

  /* Hero */
  .hero { padding: 1.5rem 1rem 1.25rem; }
  .hero-title { font-size: clamp(1.4rem, 8vw, 1.9rem); line-height: 1.2; }
  .hero-tagline { font-size: 0.83rem; }
  .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
  .hero-stat-sep { display: none; }

  /* Catégories grid */
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }

  /* ── Ressource rows : layout mobile ── */
  .ressource-list { border-radius: var(--radius); }
  .ressource-row {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    position: relative;
  }

  /* Badge emoji : masqué sur mobile, pas de place */
  .row-badge { display: none; }

  /* Titre + description : pleine largeur, description visible en bloc */
  .row-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    flex-wrap: nowrap;
  }
  .row-title { font-size: 0.9rem; }
  .row-desc {
    display: block; /* ré-afficher sur mobile mais en bloc sous le titre */
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
  }

  /* Tags + niveau : ligne secondaire */
  .row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    order: 3;
  }

  /* Verif + actions : côte à côte, alignés à droite */
  .row-meta { order: 4; margin-left: 0; }
  .row-actions {
    order: 4;
    margin-left: auto;
    gap: 0.35rem;
  }
  .row-link { font-size: 0.68rem; padding: 0.2rem 0.45rem; }

  /* ── Guide rows ── */
  .guide-row {
    padding: 0.75rem 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .guide-row-main { width: 100%; }
  .guide-row-meta {
    width: 100%;
    justify-content: flex-start;
    gap: 0.35rem;
  }
  .guide-row-arrow { display: none; }

  /* ── Guide cards (home) ── */
  .guide-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .guide-card { padding: 0.85rem; }
  .guide-card-description { font-size: 0.78rem; }
  /* Empêcher la description de déborder avec le badge */
  .guide-card-footer { flex-wrap: wrap; gap: 0.35rem; }

  /* ── Guide detail page ── */
  .guide-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1rem;
    overflow: hidden;
  }
  .guide-sidebar {
    position: static;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  .guide-meta-box, .toc-nav {
    width: 100%;
    box-sizing: border-box;
  }
  /* Prevent prose overflow on mobile */
  .prose { overflow-wrap: break-word; word-break: break-word; max-width: 100%; }
  .prose pre { overflow-x: auto; max-width: 100%; }
  .prose table { display: block; overflow-x: auto; }
  .main-content { overflow-x: hidden; }
  /* TOC sur mobile : items en ligne scrollable */
  .toc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .toc-link {
    border-left: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
  }
  .toc-link.active {
    border-color: var(--accent);
    background: var(--accent-dim);
  }
  .toc-link.toc-h3 { padding-left: 0.5rem; }

  /* ── Filtres ── */
  .filter-bar { gap: 0.25rem; flex-wrap: wrap; }
  .filter-btn { font-size: 0.68rem; padding: 0.2rem 0.45rem; }
  .search-bar { padding: 0.45rem 0.65rem; }
  .search-input { font-size: 0.8rem; }

  /* ── Guides page : filtres empilés ── */
  .guides-page-wrapper { padding: 1rem; }
  .guides-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .guides-filter-row .filter-bar:last-child { margin-left: 0; }

  /* ── Section headers ── */
  .section-header { flex-wrap: wrap; gap: 0.4rem; }

  /* ── Footer ── */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .footer-disclaimer { padding: 0.5rem 1rem 0.75rem; }
  .footer-left, .footer-right { flex-wrap: wrap; gap: 0.35rem; }

  /* ── Generator ── */
  .gen-mode-bar { flex-wrap: wrap; gap: 0.35rem; }
  .gen-mode-spacer { display: none; }
  .gen-upload-btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
}

/* ─── Très petit mobile (< 400px) ────────────────────────────── */
@media (max-width: 400px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.35rem; }
  .header-inner { padding: 0 0.85rem; }
  .row-actions { flex-direction: column; align-items: flex-end; gap: 0.25rem; }
}

.gen-mode-spacer { flex: 1; }

/* Boutons d'action unifiés (importer, copier, exporter) */
.gen-action-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.32rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem; font-family: var(--font-mono);
  cursor: pointer; user-select: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.gen-action-btn:hover { border-color: var(--border-hover); color: var(--text); }
.gen-action-btn.active-flash { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

/* Importer : bordure pointillée */
.gen-import-btn { border-style: dashed; }
.gen-import-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* Exporter : accent par défaut */
.gen-export-btn { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.gen-export-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.gen-export-btn.active-flash { background: var(--accent); color: #fff; }

/* ── Publish button ── */
.gen-publish-btn { border-color: #3fb950; background: rgba(63,185,80,.1); color: #3fb950; }
.gen-publish-btn:hover:not(:disabled) { background: #3fb950; color: #fff; border-color: #3fb950; }
.gen-publish-btn.active-flash { background: #3fb950; color: #fff; }
.gen-publish-btn:disabled { opacity: .35; cursor: not-allowed; }
.gen-danger-btn { border-color: #f85149 !important; color: #f85149 !important; background: rgba(248,81,73,.08) !important; }
.gen-danger-btn:hover { background: rgba(248,81,73,.18) !important; }

/* ── GitHub panel ── */
.gen-github-panel { margin-top: 1rem; border: 1px solid var(--border); border-radius: 6px; padding: 0.65rem 0.8rem; background: var(--surface); }
.gen-github-header { display: flex; align-items: center; justify-content: space-between; min-height: 1.6rem; }
.gen-github-toggle { background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: var(--text-muted); padding: 0.15rem 0.3rem; border-radius: 4px; transition: color .15s; font-family: var(--font-mono); }
.gen-github-toggle:hover { color: var(--accent); }
.gen-github-config { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.github-token-row { display: flex; gap: 0.4rem; align-items: center; }
.github-token-row .form-input { flex: 1; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.03em; }
.github-token-hint { font-size: 0.72rem; color: var(--text-muted); line-height: 1.55; margin: 0; }
.github-token-hint a { color: var(--accent); text-decoration: none; }
.github-token-hint a:hover { text-decoration: underline; }
.github-token-hint code { background: var(--surface-2, rgba(255,255,255,.06)); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.85em; font-family: var(--font-mono); }
.gen-github-status { font-size: 0.74rem; margin-top: 0.35rem; min-height: 1.1em; font-family: var(--font-mono); }
.gen-github-status--success { color: #3fb950; }
.gen-github-status--error   { color: #f85149; }
.gen-github-status--loading { color: var(--text-muted); }
.gen-github-status--warn    { color: #d29922; }

.gen-preview-actions { display: flex; gap: 0.4rem; align-items: center; }


/* ── Drag & Drop overlay ── */
.gen-dropzone-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15,17,23,.88);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transition: opacity .15s;
}
.gen-dropzone-overlay.hidden { display: none; }
.gen-dropzone-inner {
  border: 2px dashed var(--accent);
  border-radius: 12px;
  padding: 3rem 4rem;
  text-align: center;
  color: var(--accent);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  animation: drop-pulse .8s ease-in-out infinite alternate;
}
.gen-dropzone-inner svg { opacity: .85; }
.gen-dropzone-inner p { font-size: 1.1rem; font-family: var(--font-mono); margin: 0; color: var(--text); }
.gen-dropzone-inner code { background: var(--accent-dim); color: var(--accent); padding: .1em .4em; border-radius: 4px; }
.gen-drop-hint { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
@keyframes drop-pulse {
  from { box-shadow: 0 0 0 0 rgba(108,142,255,.2); }
  to   { box-shadow: 0 0 0 12px rgba(108,142,255,.0); border-color: rgba(108,142,255,.6); }
}

/* ── Batch queue panel ── */
.gen-batch-panel { margin-top: 1rem; border: 1px solid var(--border); border-radius: 6px; padding: 0.65rem 0.8rem; background: var(--surface); }
.batch-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.batch-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; padding: 0.3rem 0.4rem; border-radius: 4px; background: var(--surface-2, rgba(255,255,255,.04)); }
.batch-icon { font-size: 0.75rem; width: 1.1rem; text-align: center; flex-shrink: 0; }
.batch-ok      { color: #3fb950; }
.batch-err     { color: #f85149; }
.batch-loading { color: var(--text-muted); }
.batch-pending { color: var(--text-muted); }
.batch-name { flex: 1; color: var(--text); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-name--err { color: #f85149; }
.batch-meta { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.batch-remove { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; line-height: 1; padding: 0 0.2rem; flex-shrink: 0; }
.batch-remove:hover { color: #f85149; }

/* ═══════════════════════════════════════════════════════════════
   PAGE DISCORD
   ═══════════════════════════════════════════════════════════════ */

.discord-page { max-width: 720px; }

/* Hero */
.discord-hero {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding-bottom: 2rem; flex-wrap: wrap;
}
.discord-hero-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  display: flex; align-items: center; justify-content: center;
  color: #5865f2; flex-shrink: 0;
}
.discord-hero-text { flex: 1; min-width: 200px; }
.discord-hero-text .page-title { margin-bottom: 0.35rem; }

.discord-join-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: #5865f2;
  color: #fff; font-size: 0.85rem; font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap; flex-shrink: 0;
  align-self: flex-start; margin-top: 0.25rem;
}
.discord-join-btn:hover { background: #4752c4; color: #fff; transform: translateY(-1px); }

.discord-divider { height: 1px; background: var(--border); margin: 1.75rem 0; }

/* Sections */
.discord-section { margin-bottom: 0.5rem; }
.discord-section-title {
  font-size: 1rem; font-weight: 600; color: var(--text);
  margin: 0.4rem 0 1.1rem;
}

/* Channels */
.discord-channels { display: flex; flex-direction: column; gap: 1.25rem; }
.discord-channel-group {}
.channel-group-label {
  font-size: 0.72rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: block; margin-bottom: 0.4rem;
}
.channel-list {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.channel-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}
.channel-item:last-child { border-bottom: none; }
.channel-item:hover { background: var(--bg-card-hover); }
.channel-hash {
  font-family: var(--font-mono); font-size: 1rem;
  color: var(--text-dim); flex-shrink: 0; width: 16px; text-align: center;
}
.channel-emoji { font-size: 0.9rem; flex-shrink: 0; width: 16px; text-align: center; }
.channel-body { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; flex-wrap: wrap; }
.channel-name { font-size: 0.83rem; font-weight: 600; color: var(--text); flex-shrink: 0; }
.channel-desc { font-size: 0.76rem; color: var(--text-muted); }

/* Roles */
.discord-roles { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.85rem; }
.discord-role {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.5rem 0.8rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.role-badge {
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid; border-radius: var(--radius-sm);
  white-space: nowrap; flex-shrink: 0;
}
.role-desc { font-size: 0.78rem; color: var(--text-muted); }
.discord-roles-note { font-size: 0.78rem; color: var(--text-dim); line-height: 1.6; }

/* CTA final */
.discord-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem;
  background: rgba(88,101,242,0.06);
  border: 1px solid rgba(88,101,242,0.2);
  border-radius: var(--radius);
}
.discord-cta-text { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }

@media (max-width: 700px) {
  .discord-hero { flex-direction: column; gap: 1rem; }
  .discord-join-btn { width: 100%; justify-content: center; }
  .discord-cta { flex-direction: column; align-items: flex-start; }
  .discord-cta .discord-join-btn { width: 100%; justify-content: center; }
  .channel-body { flex-direction: column; gap: 0.1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   STARRED — ressources indispensables
   ═══════════════════════════════════════════════════════════════ */

/* Étoile dans les rows */
.row-star {
  font-size: 0.85rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(251,191,36,0.4));
}

/* Row starred : légère teinte dorée */
.ressource-row[data-starred="true"] {
  border-left: 2px solid rgba(251,191,36,0.4);
  background: linear-gradient(90deg, rgba(251,191,36,0.03) 0%, transparent 60%);
}
.ressource-row[data-starred="true"]:hover {
  background: linear-gradient(90deg, rgba(251,191,36,0.06) 0%, var(--bg-card-hover) 60%);
}

/* Liste starred sur la home : bordure dorée */
.ressource-list--starred {
  border-color: rgba(251,191,36,0.25);
}

/* Séparateur dans les filtres */
.filter-sep {
  color: var(--border);
  font-size: 0.8rem;
  padding: 0 0.1rem;
}

/* Compteur starred */
.starred-badge-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--yellow);
  border: 1px solid rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.07);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}
