/* CNSS Espace intranet — based on Figma */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #0f1729;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: hsl(30deg 15.38% 94.9%);
  background-color: hsl(30deg 15.38% 96.5%);
}
:root {
  --teal: #44b2ab;
  --teal-dark: #2f8a85;
  --blue: #155dfc;
  --blue-dark: #223a82;
  --ink: #0f1729;
  --ink-soft: #1d293d;
  --slate-700: #45556c;
  --slate-600: #62748e;
  --slate-500: #90a1b9;
  --slate-300: #cad5e2;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --red: #fb2c36;
  --gold: #fbbc05;
  --green: #00c950;
  --card-shadow: 0 1px 2px rgba(15,23,43,.04);
}

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--slate-200);
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}
.header-wrapper {
  height: 64px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}
.brand { flex: 0 0 auto; }
.brand-name { white-space: nowrap; }
.search { flex: 0 1 384px; min-width: 0; }
.header-actions { flex: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 50px; height: 46px; object-fit: contain; }
.brand-name {
  font-weight: 800; font-size: 18px; line-height: 24px;
  letter-spacing: 0;
  color: var(--blue-dark);
}
.search {
  position: relative; height: 38px;
  display: flex; align-items: center;
}
.search input {
  width: 100%; height: 100%;
  border-radius: 999px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding-block: 0;
  padding-inline: 40px 16px;
  font: inherit; font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.search input::placeholder { color: rgba(15,23,43,.5); }
.search input:focus { border-color: var(--blue); background: #fff; }
.search > svg {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--slate-500); pointer-events: none;
}
.header-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--slate-600); cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--slate-100); color: var(--ink); }
.icon-btn .badge {
  position: absolute; top: -2px; inset-inline-end: -2px;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  box-sizing: content-box;
}
.avatar-chip {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--slate-200); border: 1px solid var(--slate-300);
  overflow: hidden;
  cursor: pointer;
}
.avatar-chip img { width: 100%; height: 100%; object-fit: cover; }

/* Layout */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 0 64px;
  display: grid;
  grid-template-columns: 280px 600px 1fr;
  gap: 24px;
  &.no-sidebar {
    grid-template-columns: 280px 1fr;
  }
}

/* Sidebar */
.shell > aside {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: none;
}
.shell > aside::-webkit-scrollbar { display: none; }

.profile-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 8px;
  overflow: hidden; box-shadow: var(--card-shadow);
}
.profile-cover {
  height: 57px;
  background: url(./assets/cover.jpg) center/cover, linear-gradient(135deg, #44b2ab, #2f8a85);
  position: relative;
}
.profile-photo {
  position: absolute;
  left: 50%; bottom: -36px;
  transform: translateX(-50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--slate-200);
  overflow: hidden;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-info {
  text-align: center;
  padding: 44px 12px 16px;
  border-top: 1px solid #ededed;
  border-bottom: 1px solid var(--slate-100);
}
.profile-name { font-weight: 700; font-size: 16px; color: #101010; margin: 0; }
.profile-role { font-size: 12px; color: #717171; margin-top: 4px; }
.saved-items {
  margin-top: 4px;
  text-align: left;
  padding-inline-start: 10px;
  color: var(--ink);
  font-size: 14px;
  display: flex;
  gap: 4px;
  svg {
    width:22px;
    height: 22px;
    fill: #000;
  }
}

.nav { padding: 24px 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 12px;
  border-radius: 8px;
  color: var(--slate-700);
  font-size: 14px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a svg { width: 20px; height: 20px; flex: 0 0 20px; color: currentColor; }
.nav a:hover { background: var(--slate-100); color: var(--ink); }
.nav a.active {
  background: var(--slate-100);
  color: var(--ink);
  font-weight: 600;
}
.nav-sep {
  height: 1px;
  background: var(--slate-200);
  margin: 8px 0;
}

.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}
.card-h2 {
  font-size: 18px; font-weight: 700; color: var(--ink);
  margin: 0 0 16px 0; letter-spacing: 0.45px;
  min-width: 0;
}
.card-h2.tight { margin-bottom: 12px; }

.quicklinks { display: flex; flex-direction: column; }
.quicklinks a {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 6px;
  color: var(--slate-700);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: background .15s;
}
.quicklinks a:hover { background: var(--slate-50); color: var(--ink); }
.quicklinks a svg { 
  width: 16px;
  height: 16px;
  flex: 0 0 18px;
  fill: #0071ff;
 }

/* Middle column */
.middle { display: flex; flex-direction: column; gap: 24px; }

.feed-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 0 0;
}
.feed-title {
  font-size: 18px; font-weight: 700; color: var(--ink-soft);
  letter-spacing: 0.45px; margin: 0;
  text-transform: uppercase;
}
.more-btn {
  width: 24px; height: 24px; border: 0; background: transparent;
  border-radius: 4px; cursor: pointer; color: var(--slate-500);
  display: flex; align-items: center; justify-content: center;
}
.more-btn:hover { background: var(--slate-100); color: var(--ink); }

.tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--slate-200);
  overflow-x: auto;
  &.tabs--page {
    padding: 0px 0px;
    button {
      padding: 12px 16px;
      border-radius: 0;
    }
    button.active {
      background: rgb(238, 244, 255);
      color: var(--blue);
      font-weight: 600;
      box-shadow: var(--blue) 0px -2px 0px 0px inset;
    }
  }
}
.tabs button {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px;
  font: inherit; font-size: 14px; color: var(--slate-600);
  border-radius: 8px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tabs button:hover { background: var(--slate-50); color: var(--ink); }
.tabs button.active {
  background: #eef4ff; color: var(--blue); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(21,93,252,.15);
}

/* Post card */
.post {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  position: relative;
}
.post-media {
  position: relative;
  height: 320px;
  background: linear-gradient(135deg, #1a3a8a, #4361b3);
  overflow: hidden;
}
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bookmark {
  position: absolute; left: 16px; top: 16px;
  width: 36px; height: 36px;
  background: var(--blue); border: 0; border-radius: 6px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.bookmark:hover { background: var(--blue-dark); transform: scale(1.05); }
.pinned-badge {
  position: absolute; left: 16px; top: 16px;
  width: 36px; height: 36px;
  background: var(--blue); border-radius: 6px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.post-body { padding: 20px 24px 16px; }
.post-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.post-date { color: #717171; font-size: 12px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  font-size: 12px; color: var(--slate-700);
  background: #fff;
}
.post-title {
  font-family: 'Figtree', 'Inter', sans-serif;
  font-weight: 700; font-size: 22px; line-height: 1.2;
  color: #0e1930; margin: 0 0 8px 0;
}
.post-excerpt {
  font-family: 'Figtree', 'Inter', sans-serif;
  color: #4b5466; font-size: 14px; line-height: 1.55; margin: 0;
}
.post-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--slate-100);
  font-size: 13px; color: var(--slate-600);
}
.reactions { display: flex; align-items: center; gap: 6px; }
.reactions .stack { display: inline-flex; }
.reactions .stack > span {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff; font-size: 10px;
  margin-left: -4px;
}
.reactions .stack > span:first-child { margin-left: 0; }
.reactions .stack .like { background: var(--blue); color: #fff; }
.reactions .stack .heart { background: var(--red); color: #fff; }
.post-actions {
  display: flex; align-items: stretch;
  border-top: 1px solid var(--slate-100);
}
.post-actions button {
  flex: 1; border: 0; background: transparent;
  padding: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; color: var(--slate-700);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.post-actions button:hover { background: var(--slate-50); color: var(--blue); }
.post-actions button.is-on { color: var(--blue); font-weight: 600; }
.post-actions button + button { border-left: 1px solid var(--slate-100); }

/* Right rail */
.right { display: flex; flex-direction: column; gap: 24px; }
.forum-item {
  display: block;
  padding: 12px 0; border-bottom: 1px solid var(--slate-100);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: background .12s;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px;
}
.forum-item:hover { background: var(--slate-100); }
.forum-item .forum-title { padding-right: 4px; }
.forum-item:last-child { border-bottom: 0; }
.forum-title {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.35; margin: 0 0 6px 0;
}
.forum-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--slate-600); }
.forum-meta .mini-avatar {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  background: var(--slate-200);
}
.forum-meta .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.see-all {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 8px 0;
  color: var(--blue); font-size: 14px; font-weight: 500;
  background: 0; border: 0; cursor: pointer;
}
.see-all:hover { text-decoration: underline; }

.weather-row { display: flex; align-items: center; justify-content: space-between; }
.weather-loc { font-size: 16px; font-weight: 500; color: var(--ink-soft); }
.weather-time { font-size: 16px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }
.weather-temp { font-size: 48px; font-weight: 300; color: #000; line-height: 1; }
.sun {
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffee94, #ff9900);
  box-shadow: 0 0 18px rgba(255, 200, 0, .6), inset 0 4px 14px rgba(255,255,255,.7);
  position: relative;
}
.cloud-overlay {
  position: absolute; bottom: -4px; right: -10px;
  width: 50px; height: 28px;
  background: #fff;
  border-radius: 999px;
  box-shadow: -10px -8px 0 -4px #fff, 14px -10px 0 -3px #fff;
  opacity: .9;
}

.quote-text {
  font-style: italic; font-size: 15px; line-height: 1.4;
  color: #191c1e; padding: 4px 8px 0;
  position: relative;
}
.quote-text::before {
  content: '“';
  position: absolute; left: -6px; top: -16px;
  font-family: Georgia, serif;
  font-size: 56px; line-height: 1;
  color: rgba(0,61,155,.15);
}
.quote-author {
  text-align: right; font-style: italic; font-weight: 700;
  font-size: 11px; color: #003d9b; margin-top: 12px;
}

/* Espace formation rows */
.formation-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px;
  border-radius: 8px;
  transition: background .15s;
  cursor: pointer;
}
.formation-row:hover { background: var(--slate-50); }
.formation-thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  background: var(--slate-200); flex: 0 0 64px;
}
.formation-thumb img { width: 100%; height: 100%; object-fit: cover; }
.formation-body { flex: 1; min-width: 0; }
.formation-title { font-weight: 700; font-size: 15px; color: var(--ink-soft); margin: 0 0 4px 0; }
.formation-sub { font-size: 12px; color: var(--slate-600); margin-bottom: 8px; }
.progress {
  height: 6px; background: var(--slate-200); border-radius: 999px; overflow: hidden;
}
.progress > i {
  display: block; height: 100%;
  background: var(--blue);
  border-radius: 999px;
}

/* Document chips */
.docs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.doc-chip {
  border: 1px solid var(--slate-200);
  background: #fff;
  border-radius: 8px;
  padding: 14px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--slate-700);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.doc-chip:hover { border-color: var(--blue); color: var(--blue); background: #fafcff; }
.doc-chip svg { width: 18px; height: 18px; color: var(--slate-500); flex: 0 0 18px; }
.doc-chip:hover svg { color: var(--blue); }

.doc-search { position: relative; display: flex; gap: 0; }
.doc-search input {
  flex: 1; height: 42px; padding: 0 50px 0 16px;
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: 8px;
  font: inherit; font-size: 14px; outline: none;
  transition: border-color .15s, background .15s;
}
.doc-search input:focus { border-color: var(--blue); background: #fff; }
.doc-search button {
  position: absolute; right: 5px; top: 5px;
  width: 32px; height: 32px;
  background: var(--blue); border: 0; border-radius: 6px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.doc-search button:hover { background: var(--blue-dark); }

/* Communiqués */
.comm-tabs {
  display: flex; border-bottom: 1px solid var(--slate-100); margin-bottom: 8px;
}
.comm-tabs button {
  padding: 10px 14px;
  font: inherit; font-family: 'Lexend', 'Inter', sans-serif;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px;
  color: #809fbb;
  background: transparent; border: 0; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.comm-tabs button:hover { color: var(--ink-soft); }
.comm-tabs button.active { color: #183e83; border-bottom-color: var(--blue); }

.comm-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px;
  border-radius: 6px;
  transition: background .15s;
  cursor: pointer;
}
.comm-row:hover { background: var(--slate-50); }
.comm-row .text {
  font-size: 14px; color: var(--ink-soft); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; padding-right: 16px;
}
.comm-row .date {
  font-size: 12px; color: var(--slate-500); white-space: nowrap;
}

.pager { display: flex; justify-content: center; padding: 12px 0 0; }
.pager button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--blue);
  cursor: pointer;
}
.pager button:hover { text-decoration: underline; }

/* Magazines */
.mag {
  display: flex; gap: 16px;
}
.mag-cover {
  width: 100px; height: 140px; flex: 0 0 100px;
  background: var(--slate-200);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 2px 2px 8px rgba(0,0,0,.08);
  overflow: hidden;
}
.mag-cover img { width: 100%; height: 100%; object-fit: cover; }
.mag-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.mag-title { font-weight: 700; font-size: 13px; color: var(--ink-soft); margin: 0 0 4px; line-height: 1.3; }
.mag-author { font-size: 11px; color: var(--slate-600); margin-bottom: 4px; }
.mag-excerpt { font-size: 11px; color: var(--slate-600); line-height: 1.4; }
.mag-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px;
  color: #003d9b; font-weight: 700; font-size: 12px;
  text-decoration: none;
}
.mag-link:hover { text-decoration: underline; }

/* Page hero (non-home pages) */
.page-hero {
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--slate-600);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--slate-600); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .current { color: #0037b0; font-weight: 500; }
.breadcrumb svg { width: 12px; height: 12px; color: var(--slate-400); }
.page-h1 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.4px;
  color: #191c1e; margin: 0 0 4px 0;
}
.page-tagline { font-size: 14px; color: #434655; margin: 0; }

/* Article list (non-home middle column) */
.article {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.article-cover {
  height: 280px; background: var(--slate-200); position: relative;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Œuvres-Sociales: cards grid */
.os-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
  gap: 16px;
}
.os-card {
  display: flex; flex-direction: row; gap: 16px;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 16px;
}
.os-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.os-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(21,93,252,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  padding: 8px;
}
.os-card-content {
 display: flex; flex-direction: column; gap: 4px; 
}
.os-title { font-weight: 700; font-size: 13px; color: var(--ink-soft); margin: 0; }
.os-desc { font-size: 13px; color: var(--slate-600); line-height: 1.5; margin: 0; }

/* Annuaire / Directory */
.dir-filters {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.dir-filters select {
  padding: 8px 12px; border: 1px solid var(--slate-200); border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--ink-soft); background: #fff;
  cursor: pointer; flex-shrink: 0;
}
.dir-filters select:focus { outline: none; border-color: var(--blue); }
.dir-search-wrap {
  flex: 1; display: flex; gap: 6px; min-width: 200px;
}
.dir-search-wrap input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--slate-200); border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--ink);
}
.dir-search-wrap input:focus { outline: none; border-color: var(--blue); }
.dir-search-wrap button {
  padding: 0 14px; border: 1px solid var(--slate-200); border-radius: 8px;
  background: #fff; color: var(--slate-600); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.dir-search-wrap button:hover { border-color: var(--blue); color: var(--blue); }

.dir-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dir-card {
  min-width: 0;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px;
  padding: 20px 14px 14px; display: flex; flex-direction: column; align-items: center;
  transition: border-color .15s, box-shadow .15s; cursor: pointer;
}
.dir-card:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(21,93,252,.09); }
.dir-card-av {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, #3b7af8 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px;
  margin-bottom: 10px; flex-shrink: 0;
  overflow: hidden;
}
.dir-card-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dir-card-name { font-size: 13px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.3; width: 100%; }
.dir-card-poste { font-size: 11.5px; color: var(--slate-600); text-align: center; line-height: 1.4; margin-top: 2px; width: 100%; }
.dir-card-badge {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase;
  color: #183e83; background: #eef4ff; padding: 3px 9px; border-radius: 999px;
  margin-top: 6px; margin-bottom: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dir-card-info {
  width: 100%; border-top: 1px solid var(--slate-100);
  padding-top: 10px; display: flex; flex-direction: column; gap: 5px;
}
.dir-card-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--slate-700); overflow: hidden;
}
.dir-card-row svg { color: var(--slate-400); flex-shrink: 0; width: 13px; height: 13px; }
.dir-card-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-card-mat { font-size: 10.5px; color: var(--slate-500); font-family: monospace; }

.dir-empty { text-align: center; padding: 48px 0; color: var(--slate-500); font-size: 13px; grid-column: 1/-1; }

.dir-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 20px; flex-wrap: wrap; }
.dir-page-btn { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--slate-200); border-radius: 6px; background: #fff; color: var(--slate-700); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s, color .15s; }
.dir-page-btn:hover:not(:disabled) { background: var(--slate-50); border-color: var(--slate-300); }
.dir-page-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.dir-page-btn:disabled { opacity: .4; cursor: default; }
.dir-page-dots { padding: 0 2px; color: var(--slate-400); font-size: 13px; line-height: 32px; }

/* ─── Organigramme ─────────────────────────────────────────── */
.card--bleed {
  width: calc(100% + max(0px, (100vw - 1280px) / 2));
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.org-wrap { width: 100%; overflow: hidden; }
.org-canvas { width: 1400px; height: 1500px; position: relative; }
.ob { width: 200px; height: 65px; cursor: pointer; border-radius: 15px; margin: 10px 0; position: relative; }
.ob h5 { font-size: 12px; font-weight: 700; text-align: center; margin: 0; display: flex; justify-content: center; height: 100%; align-items: center; padding: 0 8px; line-height: 1.3; color: #4e6883; }
.ob-blue { background: #1e4486; }
.ob-blue h5 { color: #fff; font-size: 15px; }
.ob-dga { background: #427cae; }
.ob-dga h5 { color: #fff; }
.ob-pole { background: #cae7ec; }
.ob-pole h5 { color: #1e4486; }
.ob-white { background: #fff; box-shadow: rgba(30,68,134,.21) 0 6px 24px 0, rgb(30,68,134) 0 0 0 1px; }
.ob-gray { background: gainsboro; }
.ob-gray h5 { color: #1e4486; }

.ob-dg { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; }
.ob-grp1 { display: flex; flex-direction: column; position: absolute; top: 80px; left: 28%; }
.ob-grp2 { display: flex; flex-direction: column; position: absolute; top: 80px; right: 29%; }
.ob-grp3 { display: flex; flex-direction: column; position: absolute; top: 206px; right: 129px; }
.ob-grp4 { display: flex; justify-content: space-between; align-items: flex-start; position: absolute; top: 506px; width: 94%; }
.ob-grp20 { display: flex; justify-content: space-between; align-items: flex-start; position: absolute; top: 80px; flex-direction: column; right: 78%; }
.ob-node { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.ob-node .ob { width: 135px; height: 62px; }
.ob-node > .ob { width: 200px; height: 65px; }
.ob-is-row { display: flex; margin-top: 40px; }
.ob-isgrp { display: flex; flex-direction: column; margin: 0 10px; }

/* Connector lines */
.ob-dg::after { content:''; position:absolute; width:2px; height:412px; background:#cad5e2; left:50%; transform:translateX(-50%); bottom:-412px; }
.ob-grp1 .ob::after { content:''; position:absolute; width:230px; height:2px; background:#cad5e2; right:-230px; top:50%; transform:translateY(-50%); }
.ob-grp1 .ob-c2::before { content:''; position:absolute; width:47px; height:2px; background:#cad5e2; left:-47px; top:51%; transform:translateY(-50%); }
.ob-grp2 .ob::after { content:''; position:absolute; width:117px; height:2px; background:#cad5e2; left:-118px; top:50%; transform:translateY(-50%); }
.ob-grp2 .ob-c9::before { content:''; position:absolute; width:45px; height:2px; background:#cad5e2; right:-43px; top:50%; transform:translateY(-50%); }
.ob-grp3 .ob:first-child::before { content:''; position:absolute; width:34px; height:2px; background:#cad5e2; left:-34px; top:27px; }
.ob-grp3 .ob:not(:first-child)::before { content:''; position:absolute; width:34px; height:87px; border:2px solid transparent; border-bottom-color:#cad5e2; border-left-color:#cad5e2; left:-34px; top:-58px; }
.ob-grp20 .ob-c20a::before { content:''; position:absolute; width:40px; height:87px; border:2px solid transparent; border-top-color:#cad5e2; border-right-color:#cad5e2; right:-40px; top:32px; }
.ob-grp20 .ob-c20b::before { content:''; position:absolute; width:40px; height:87px; border:2px solid transparent; border-top-color:#cad5e2; border-right-color:#cad5e2; border-bottom-color:#cad5e2; right:-40px; top:32px; }
.ob-node1 > .ob::before { content:''; position:absolute; width:399px; height:30px; border:2px solid transparent; border-top-color:#cad5e2; border-left-color:#cad5e2; left:101px; top:-29px; }
.ob-node1 > .ob::after { content:''; position:absolute; left:102px; bottom:-30px; width:2px; height:30px; background:#cad5e2; }
.ob-node2 > .ob::before { content:''; position:absolute; width:390px; height:30px; border:2px solid transparent; border-top-color:#cad5e2; border-left-color:#cad5e2; left:102px; top:-29px; }
.ob-node2 > .ob::after { content:''; position:absolute; left:102px; bottom:-30px; width:2px; height:30px; background:#cad5e2; }
.ob-node3 > .ob::before { content:''; position:absolute; width:342px; height:30px; border:2px solid transparent; border-top-color:#cad5e2; border-left-color:#cad5e2; left:102px; top:-29px; }
.ob-node3 > .ob::after { content:''; position:absolute; left:102px; bottom:-30px; width:2px; height:30px; background:#cad5e2; }
.ob-node4 > .ob::before { content:''; position:absolute; width:2px; height:30px; background:#cad5e2; left:110px; top:-29px; }
.ob-node4 > .ob::after { content:''; position:absolute; left:111px; bottom:-60px; width:2px; height:60px; background:#cad5e2; }
.ob-grp13 .ob:first-child::before { display:none; }
.ob-isgrp:not(:last-child) .ob:first-child::before { content:''; position:absolute; width:160px; height:32px; border:2px solid transparent; border-top-color:#cad5e2; border-left-color:#cad5e2; left:70px; top:-30px; }
.ob-is-row .ob-isgrp:last-child .ob:first-child::before { content:''; position:absolute; width:2px; height:31px; background:#cad5e2; left:74px; top:-30px; }
.ob-isgrp .ob:not(:last-child)::after { content:''; position:absolute; width:5px; height:83px; border:2px solid transparent; border-top-color:#cad5e2; border-left-color:#cad5e2; left:-5px; top:30px; }
.ob-isgrp .ob:last-child::after { content:''; position:absolute; width:5px; height:2px; background:#cad5e2; left:-5px; top:29px; }
.ob-node2 .ob-c22::after { display:none; }

/* Hover card */
.ob-card { width:180px; padding:10px 5px; border-radius:10px; position:absolute; text-align:center; display:none; z-index:20; background:#fff; box-shadow:20px 20px 50px rgba(0,0,0,.3); top:0; left:50%; transform:translateX(-50%); pointer-events:none; }
.ob:hover .ob-card { display:block; }
.ob-card img { width:96px; height:96px; border:2px solid #001648; border-radius:50%; object-fit:cover; }
.ob-card h6 { color:#001648; font-size:11px; font-weight:700; margin:6px 0 2px; text-align:center; line-height:1.3; }
.ob-card p { color:#001648; font-size:11px; margin:0; text-align:center; }

/* RH stats */
.stats {
  display: grid; grid-template-columns: repeat(1, 1fr); gap: 12px;
}
.stat {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 16px;
}
.stat .label { font-size: 12px; color: var(--slate-600); }
.stat .value {
  font-size: 28px; font-weight: 700; color: var(--ink-soft);
  margin-top: 4px;
  font-family: 'Figtree','Inter',sans-serif;
}
.stat .delta { font-size: 12px; color: var(--green); margin-top: 4px; }

/* Course cards (CNSS-Academy) */
.course-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.course {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.course:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21,93,252,.12);
}
.course-cover {
  height: 130px;
  background: linear-gradient(135deg, #4361b3, #1a3a8a);
  position: relative;
  overflow: hidden;
}
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-pill {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.7); color: #fff;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.course-body { padding: 14px 16px 16px; }
.course-title { font-weight: 700; font-size: 14px; color: var(--ink-soft); margin: 0 0 6px; line-height: 1.35; }
.course-meta { font-size: 12px; color: var(--slate-600); display: flex; gap: 12px; }

/* Footer */
.app-footer {
  border-top: 1px solid var(--slate-200);
  background: #fff;
  padding: 24px 80px;
  margin-top: 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--slate-600);
}
.app-footer a { color: var(--slate-600); text-decoration: none; margin-left: 16px; }
.app-footer a:hover { color: var(--blue); }

/* Bookmark btn variant for non-home covers (legacy — saved-items page only) */
.cover-bookmark {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,.9); color: var(--ink-soft);
}
.cover-bookmark:hover { background: #fff; color: var(--blue); }

/* Clickable cover wrapper used by PostCard. Block link so the cover image
   keeps its full-width layout. */
.post-cover-link, .post-cover-wrap {
  display: block; position: relative;
  text-decoration: none; color: inherit;
}
.post-cover-link:hover img,
.post-cover-link:focus-visible img { filter: brightness(.97); }

/* Small status badge in the cover corner — only rendered when the post is
   saved. Pure indicator, not interactive (the toggle lives in the footer). */
.cover-saved-badge {
  position: absolute; top: 12px; left: 12px;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

/* Forum left badge dot */
.forum-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); display: inline-block;
  margin-right: 6px;
}
.r-num { color: var(--blue); font-weight: 600; font-family: 'Lexend','Inter',sans-serif; }

/* ── Post detail page ────────────────────────────────────────────────────── */

.post-hero-img {
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a3a8a, #4361b3);
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-hero-zoom {
  position: absolute; bottom: 12px; left: 12px;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: .75;
  transition: opacity .15s;
}
.post-hero-img:hover .post-hero-zoom { opacity: 1; }

.post-detail-title {
  font-family: 'Figtree', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin: 0 0 20px 0;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--slate-100);
}

.post-body-prose {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.post-body-prose p { margin: 0 0 1.2em 0; }
.post-body-prose p:last-child { margin-bottom: 0; }
.post-body-prose h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 1.6em 0 0.6em; }
.post-body-prose h3 { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin: 1.4em 0 0.5em; }
.post-body-prose blockquote {
  border-left: 3px solid var(--teal);
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  color: var(--slate-700);
  font-style: italic;
}

.post-reactions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--slate-100);
  margin-bottom: 0;
}

.comments-section { padding-top: 28px; }

.comments-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 20px 0;
}

.comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 600;
  padding: 0 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  align-items: flex-start;
}
.dir-avatar {
  background: var(--blue);
  color: #fff;
  align-items: center;
  display: flex;
  justify-content: center;
  border-radius: 50%;
}
.comment-textarea {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--slate-50);
  resize: vertical;
  outline: none;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.comment-textarea:focus { border-color: var(--blue); background: #fff; }
.comment-textarea::placeholder { color: var(--slate-500); }

.comment-submit {
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.comment-submit:hover { background: var(--blue-dark); }
.comment-submit:disabled { background: var(--slate-300); cursor: default; }

.comment-list { display: flex; flex-direction: column; gap: 20px; }

.comment-item { display: flex; gap: 12px; align-items: flex-start; }

.comment-body {
  flex: 1;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.comment-name { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.comment-role { font-size: 11px; color: var(--slate-600); }
.comment-date { font-size: 11px; color: var(--slate-500); margin-left: auto; }
.comment-text { font-size: 13px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

/* PostCard → detail navigation link */
.post-body-link { display: block; text-decoration: none; color: inherit; }
.post-body-link:hover .post-title { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-top: 16px;
}
.back-link:hover { text-decoration: underline; }

/* ── Gallery Grid (card view) ──────────────────────────────────────────────── */
.gallery-grid {
  position: relative; width: 100%; display: grid; gap: 2px;
  overflow: hidden; background: var(--slate-200);
}
.gallery-grid--1 { grid-template-columns: 1fr; height: 320px; }
.gallery-grid--2 { grid-template-columns: 1fr 1fr; height: 260px; }
.gallery-grid--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 260px; }
.gallery-grid--3 .gallery-cell:first-child { grid-row: 1 / 3; }
.gallery-grid--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 260px; }
.gallery-cell { overflow: hidden; position: relative; background: var(--slate-200); }
.gallery-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery-cell:hover img { transform: scale(1.04); }
.gallery-more {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700; pointer-events: none;
}
.gallery-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.8px; padding: 4px 10px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px; pointer-events: none;
}
.gallery-badge svg { width: 12px; height: 12px; }

/* ── Event Cover ───────────────────────────────────────────────────────────── */
.event-badges {
  position: absolute; bottom: 52px; left: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.event-date-badge, .event-location-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(4px); width: fit-content;
}
.event-date-badge svg, .event-location-badge svg { width: 14px; height: 14px; }
.event-rsvp {
  position: absolute; bottom: 12px; right: 16px; height: 34px; padding: 0 20px;
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
}
.event-rsvp:hover { background: var(--blue-dark); transform: translateY(-1px); }
.event-rsvp.is-going { background: var(--green); }

/* ── Document Preview ──────────────────────────────────────────────────────── */
.doc-preview {
  display: flex; align-items: center; gap: 16px; padding: 20px 16px;
  background: var(--slate-50); border-bottom: 1px solid var(--slate-200);
}
.doc-preview-thumb {
  width: 72px; height: 88px; flex: 0 0 72px; position: relative;
  border-radius: 6px; overflow: hidden; background: var(--slate-200);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.doc-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-ext-badge {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  letter-spacing: 0.5px; padding: 2px 6px; border-radius: 4px;
}
.doc-preview-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.doc-preview-name { font-size: 14px; font-weight: 600; color: var(--ink-soft); word-break: break-word; }
.doc-preview-size { font-size: 12px; color: var(--slate-600); }
.doc-download-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  height: 32px; padding: 0 16px; background: var(--blue); color: #fff;
  border: 0; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; align-self: flex-start; transition: background .15s;
}
.doc-download-btn:hover { background: var(--blue-dark); }
.doc-download-btn svg { width: 14px; height: 14px; }

/* ── Video Thumb ───────────────────────────────────────────────────────────── */
.video-thumb { cursor: pointer; }
.video-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.25); pointer-events: none;
}
.video-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; background: rgba(255,255,255,.92); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); pointer-events: none; transition: transform .2s, background .15s; z-index: 1;
}
.video-play-btn svg { width: 24px; height: 24px; margin-left: 3px; }
.video-thumb:hover .video-play-btn { transform: translate(-50%,-50%) scale(1.1); background: #fff; }
.video-duration {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; pointer-events: none; z-index: 1;
}

/* ── Poll Card ─────────────────────────────────────────────────────────────── */
.poll-card { padding: 4px 0 8px; }
.poll-question { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.4; }
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-option {
  position: relative; width: 100%; height: 40px; border: 1.5px solid var(--slate-200);
  border-radius: 8px; background: var(--slate-50); cursor: pointer; overflow: hidden;
  display: flex; align-items: center; padding: 0 12px; font: inherit; font-size: 13px;
  color: var(--ink-soft); transition: border-color .15s; text-align: left;
}
.poll-option:hover:not(:disabled) { border-color: var(--blue); background: #fafcff; }
.poll-option:disabled { cursor: default; }
.poll-option--voted { border-color: var(--blue); color: var(--blue); font-weight: 600; }
.poll-option-bar {
  position: absolute; left: 0; top: 0; height: 100%;
  background: rgba(21,93,252,.08); transition: width .5s ease;
  border-radius: 6px 0 0 6px; pointer-events: none;
}
.poll-option--voted .poll-option-bar { background: rgba(21,93,252,.15); }
.poll-option-label { position: relative; flex: 1; z-index: 1; }
.poll-option-pct { position: relative; font-size: 12px; font-weight: 600; color: var(--slate-600); z-index: 1; }
.poll-option:not(:disabled) .poll-option-pct { opacity: 0; }
.poll-option:disabled .poll-option-pct { opacity: 1; }
.poll-footer { margin-top: 10px; font-size: 12px; color: var(--slate-600); }

/* ── Gallery Detail Grid (post.html) ───────────────────────────────────────── */
.gallery-detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #000;
}
.gallery-detail-cell {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: 0; padding: 0; cursor: zoom-in; background: var(--slate-200);
}
.gallery-detail-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gallery-detail-cell:hover img { transform: scale(1.06); }
.gallery-detail-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff;
  font-size: 11px; opacity: 0; transition: opacity .2s;
}
.gallery-detail-cell:hover .gallery-detail-caption { opacity: 1; }

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.lightbox-content {
  position: relative; max-width: 90vw; max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img {
  max-width: 88vw; max-height: 82vh; object-fit: contain;
  border-radius: 4px; display: block; box-shadow: 0 8px 48px rgba(0,0,0,.6);
}
.lightbox-close {
  position: fixed; top: 20px; right: 24px; width: 40px; height: 40px;
  background: rgba(255,255,255,.15); border: 0; border-radius: 50%; color: #fff;
  font-size: 18px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .15s; z-index: 1001;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  background: rgba(255,255,255,.15); border: 0; border-radius: 50%; color: #fff;
  font-size: 28px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .15s; z-index: 1001; line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-nav--prev { left: 20px; }
.lightbox-nav--next { right: 20px; }
.lightbox-caption {
  position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.85); font-size: 13px; background: rgba(0,0,0,.5);
  padding: 6px 16px; border-radius: 999px; white-space: nowrap;
  max-width: 80vw; overflow: hidden; text-overflow: ellipsis;
}
.lightbox-counter {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600;
}

/* ── Forum ─────────────────────────────────────────────────────────────────── */
.forum-stats-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 8px;
  box-shadow: var(--card-shadow);
}
.forum-online {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--slate-600);
}
.forum-online-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px;
  background: var(--green); box-shadow: 0 0 0 3px rgba(0,201,80,.15);
}
.forum-online strong { color: var(--ink); }
.forum-online-sep { color: var(--slate-300); }
.forum-new-topic-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 18px;
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.forum-new-topic-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }

.forum-filter-bar { display: flex; align-items: center; gap: 10px; }
.forum-search { flex: 1; position: relative; height: 36px; }
.forum-search input {
  width: 100%; height: 100%; border: 1px solid var(--slate-200); border-radius: 8px;
  background: var(--slate-50); padding: 0 12px 0 36px;
  font: inherit; font-size: 14px; color: var(--ink); outline: none;
  transition: border-color .15s, background .15s;
}
.forum-search input:focus { border-color: var(--blue); background: #fff; }
.forum-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--slate-500); pointer-events: none;
}
.forum-sort-btn {
  display: flex; align-items: center;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--slate-200); border-radius: 8px; background: #fff;
  font: inherit; font-size: 13px; color: var(--slate-600); cursor: pointer; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.forum-sort-btn:hover { border-color: var(--slate-300); color: var(--ink); }
.forum-sort-btn.active { border-color: var(--blue); color: var(--blue); font-weight: 600; background: #eef4ff; }

.forum-table {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 8px;
  box-shadow: var(--card-shadow); overflow: hidden;
}
.forum-table-head {
  display: grid; grid-template-columns: 1fr 80px 220px;
  padding: 10px 20px; background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--slate-600);
}
.forum-thread {
  display: grid; grid-template-columns: 1fr 80px 220px;
  padding: 16px 20px; align-items: center;
  border-bottom: 1px solid var(--slate-100);
  transition: background .12s;
}
.forum-thread:last-child { border-bottom: none; }
.forum-thread:hover { background: #f9fbff; cursor: pointer; }
.forum-thread-main { min-width: 0; padding-right: 20px; }
.forum-thread-badges {
  display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; align-items: center;
}
.forum-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap;
}
.forum-badge--pinned { background: #fff3e0; color: #e65100; }
.forum-badge--hot    { background: #ffeef0; color: var(--red); }
.forum-badge--new    { background: #eef4ff; color: var(--blue); }
.forum-badge--closed { background: var(--slate-100); color: var(--slate-600); }
.forum-badge--cat    { background: var(--slate-100); color: var(--slate-700); }
.forum-thread-title {
  font-size: 14px; font-weight: 600; color: var(--blue-dark);
  text-decoration: none; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .12s;
}
.forum-thread:hover .forum-thread-title { color: var(--blue); }
.forum-thread-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12px; color: var(--slate-600);
}
.forum-mini-avatar {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  overflow: hidden;
}
.forum-mini-avatar--photo { background: var(--slate-200); padding: 0; }
.forum-mini-avatar--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.forum-thread-stat { text-align: center; }
.forum-stat-num { font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1; }
.forum-stat-label { font-size: 11px; color: var(--slate-600); margin-top: 2px; }
.forum-thread-last { display: flex; flex-direction: column; gap: 3px; }
.forum-last-date { font-size: 12px; color: var(--ink-soft); font-weight: 500; line-height: 1.4; }
.forum-last-user {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--slate-600);
}
.forum-pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 0;
}
.forum-page-btn {
  width: 36px; height: 36px; border-radius: 6px;
  border: 1px solid var(--slate-200); background: #fff;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--slate-600);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.forum-page-btn:hover:not(:disabled):not(.active) { border-color: var(--blue); color: var(--blue); }
.forum-page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.forum-page-btn:disabled { opacity: 0.4; cursor: default; }

/* ── Forum Post Detail ────────────────────────────────────────────────────── */
.fp-header {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px;
  padding: 20px 24px; box-shadow: var(--card-shadow);
}
.fp-title {
  font-family: 'Figtree', 'Inter', sans-serif;
  font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--ink); margin: 0 0 12px;
  line-height: 1.35;
}
.fp-header-meta {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--slate-600); flex-wrap: wrap;
}
.fp-header-meta strong { color: var(--ink-soft); }
.fp-header-meta svg { color: var(--slate-400); }
.fp-meta-sep { color: var(--slate-300); }

.fp-thread { display: flex; flex-direction: column; gap: 8px; }

.fp-post {
  display: flex; gap: 0;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px;
  overflow: hidden; box-shadow: var(--card-shadow);
  transition: background .12s;
}
.fp-post--op { background: #fafcff; border-color: #d0e2ff; }
.fp-post--op .fp-post-author-col { background: #eef4ff; border-right-color: #d0e2ff; }

.fp-post-author-col {
  width: 130px; flex: 0 0 130px;
  padding: 20px 14px; border-right: 1px solid var(--slate-100);
  background: var(--slate-50);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px;
}
.fp-avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.fp-avatar--photo { background: var(--slate-200); }
.fp-avatar--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-post-author-name {
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  word-break: break-word; line-height: 1.3;
}
.fp-post-author-role {
  font-size: 10.5px; color: var(--slate-500); line-height: 1.4;
}
.fp-author-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; margin-top: 2px;
}
.fp-author-badge--op { background: #eef4ff; color: var(--blue); }

.fp-post-body-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.fp-post-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-bottom: 1px solid var(--slate-100);
  background: transparent;
}
.fp-post-date { font-size: 11.5px; color: var(--slate-500); }
.fp-post-num {
  font-size: 11px; font-weight: 600; color: var(--slate-400);
  background: var(--slate-100); padding: 1px 7px; border-radius: 6px;
}

.fp-post-prose {
  flex: 1; padding: 16px 18px;
  font-size: 14px; line-height: 1.7; color: var(--ink-soft);
}
.fp-post-prose p { margin: 0 0 0.9em; }
.fp-post-prose p:last-child { margin-bottom: 0; }

.fp-post-actions {
  display: flex; align-items: center; gap: 2px;
  padding: 8px 14px; border-top: 1px solid var(--slate-100);
}
.fp-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 9px; border-radius: 6px;
  border: 0; background: transparent;
  font: inherit; font-size: 12px; color: var(--slate-600);
  cursor: pointer; transition: background .12s, color .12s;
}
.fp-action-btn:hover { background: var(--slate-100); color: var(--ink); }
.fp-action-btn.is-on { color: var(--blue); }
.fp-action-btn.is-on svg { stroke: var(--blue); }
.fp-action-btn--muted { color: var(--slate-400); }
.fp-action-btn--muted:hover { color: var(--red); background: #fff0f0; }
.fp-like-count { font-size: 12px; font-weight: 600; }
.fp-action-sep { width: 1px; height: 16px; background: var(--slate-200); margin: 0 4px; flex-shrink: 0; }

.fp-replies-divider {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0 8px;
  font-size: 12px; font-weight: 600; color: var(--slate-600);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.fp-replies-divider::before, .fp-replies-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--slate-200);
}

.fp-closed-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; background: var(--slate-50);
  border: 1px solid var(--slate-200); border-radius: 10px;
  font-size: 13px; color: var(--slate-600);
}
.fp-closed-banner svg { color: var(--slate-400); flex-shrink: 0; }
.fp-closed-link {
  margin-left: auto; color: var(--blue);
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.fp-closed-link:hover { text-decoration: underline; }

.fp-reply-form { padding: 20px 24px; }
.fp-reply-form-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.fp-reply-form-title {
  font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 0;
}
.fp-reply-textarea {
  width: 100%; min-height: 110px;
  border: 1px solid var(--slate-200); border-radius: 8px;
  padding: 12px 14px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--slate-50); resize: vertical;
  transition: border-color .15s, background .15s;
}
.fp-reply-textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.fp-reply-textarea::placeholder { color: var(--slate-500); }
.fp-reply-submit {
  height: 38px; padding: 0 22px;
  background: var(--blue); color: #fff;
  border: 0; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.fp-reply-submit:hover { background: var(--blue-dark); }
.fp-reply-submit:disabled { background: var(--slate-300); cursor: default; }

.fp-back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--slate-600);
  text-decoration: none; padding: 4px 0;
  transition: color .12s;
}
.fp-back-link:hover { color: var(--blue); }

/* Forum Post Right Rail */
.fp-info-list { display: flex; flex-direction: column; }
.fp-info-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--slate-100);
  font-size: 12px; color: var(--ink-soft);
}
.fp-info-row:last-child { border-bottom: none; padding-bottom: 0; }
.fp-info-label { color: var(--slate-500); width: 78px; flex-shrink: 0; font-size: 11.5px; }

.fp-related-item {
  display: block; text-decoration: none;
  padding: 10px 0; border-bottom: 1px solid var(--slate-100);
}
.fp-related-item:last-child { border-bottom: none; }
.fp-related-cat {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--blue-dark); background: #eef4ff;
  padding: 1px 7px; border-radius: 999px; margin-bottom: 5px;
}
.fp-related-title {
  font-size: 12.5px; font-weight: 500; color: var(--ink-soft);
  line-height: 1.4; display: block;
  transition: color .12s;
}
.fp-related-item:hover .fp-related-title { color: var(--blue); }
.fp-related-meta { font-size: 11px; color: var(--slate-500); margin-top: 3px; display: block; }

.fp-rules-list {
  margin: 0; padding-left: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.fp-rules-list li { font-size: 12px; color: var(--slate-700); line-height: 1.5; }

/* ── Documents & Publications ─────────────────────────────────────────────── */
.docs-filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  flex-wrap: wrap;
}
.docs-filter-search {
  position: relative; flex: 0 1 260px; min-width: 140px;
}
.docs-filter-search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--slate-400); pointer-events: none;
}
.docs-filter-search input {
  width: 100%; height: 36px;
  border: 1px solid var(--slate-200); border-radius: 6px;
  padding: 0 12px 0 32px;
  font: inherit; font-size: 13px; color: var(--ink);
  background: #fff; outline: none;
  transition: border-color .15s;
}
.docs-filter-search input:focus { border-color: var(--blue); }
.docs-filter-select {
  height: 36px; padding: 0 28px 0 12px;
  border: 1px solid var(--slate-200); border-radius: 6px;
  font: inherit; font-size: 13px; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2390a1b9' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none;
  outline: none; cursor: pointer;
  transition: border-color .15s;
}
.docs-filter-select:focus { border-color: var(--blue); }
.docs-filter-apply {
  height: 36px; padding: 0 18px;
  border: 1px solid var(--slate-200); border-radius: 6px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--blue); background: #eef4ff;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.docs-filter-apply:hover { background: #dbeafe; border-color: #bfdbfe; }

.docs-table-wrap { 
  width: 100%;
  --grid-template: 1fr 90px 70px;
}
.docs-table-head {
  display: grid;
  grid-template-columns: var(--grid-template);
  padding: 11px 20px;
  background: #3730a3;
  color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  gap: 16px;
}
.docs-table-row {
  display: grid;
  grid-template-columns: var(--grid-template);
  padding: 14px 20px;
  gap: 16px;
  align-items: start;
  border-bottom: 1px solid var(--slate-200);
  transition: background .12s;
}
.docs-table-row:last-child { border-bottom: none; }
.docs-table-row:hover { background: #f9fbff; }
.docs-title-link {
  font-size: 13px; font-weight: 600;
  color: var(--blue-dark); text-decoration: none;
  line-height: 1.4;
  transition: color .12s;
}
.docs-title-link:hover { color: var(--blue); text-decoration: underline; }
.docs-filename {
  display: block; margin-top: 2px;
  font-size: 11px; color: var(--blue);
  opacity: .75;
}
.docs-desc {
  font-size: 13px; color: var(--slate-600); line-height: 1.5;
  margin: 5px 0 0; padding: 0;
}
.docs-version-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  font-size: 11px; font-weight: 600; color: var(--slate-600);
  font-family: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  letter-spacing: 0.3px;
}
.docs-ref {
  font-size: 12px; color: var(--slate-600);
}

/* Pinned post banner */
.pinned-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius, 12px) var(--radius, 12px) 0 0;
  letter-spacing: .3px;
}

/* Saved posts empty state */
.saved-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.8;
}
.saved-empty svg { display: block; margin: 0 auto 12px; opacity: .3; }

/* Publications enregistrées sidebar link */
a.saved-items {
  text-decoration: none;
  color: inherit;
}
a.saved-items:hover {
  color: var(--blue);
}

/* ── Language Switcher ─────────────────────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-btn {
  width: auto !important;
  padding: 0 8px !important;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.lang-code { font-size: 12px; font-weight: 700; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15,23,43,.10);
  min-width: 140px;
  padding: 4px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.lang-menu button {
  border: 0;
  background: transparent;
  text-align: start;
  padding: 9px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background .12s;
}
.lang-menu button:hover { background: var(--slate-100); }
.lang-menu button.active { background: var(--slate-100); font-weight: 600; }

/* ── RTL overrides ─────────────────────────────────────────────────────────── */
[dir="rtl"] body {
  font-family: 'Almarai', 'Inter', -apple-system, sans-serif;
}
[dir="rtl"] .brand-name {
  font-family: 'Almarai', sans-serif;
  font-weight: 800;
}
[dir="rtl"] .nav a {
  font-family: 'Almarai', sans-serif;
}
/* Notification / mail badge stays top-right of the icon in RTL — no flip needed
   since inset-inline-end handles it. Profile photo is centered — no flip needed. */
[dir="rtl"] .forum-thread-main { padding-right: 0; padding-left: 20px; }
[dir="rtl"] .profile-photo { left: auto; right: 50%; transform: translateX(50%); }

/* ── Dictionnaire des indicateurs ──────────────────────────────────────────── */
.dict-page-hero {
  padding: 20px 0 16px;
}
.dict-page-title {
  font-size: 22px; font-weight: 700; color: var(--ink-soft); margin: 0 0 14px;
}
.dict-search {
  background: #fff;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit; font-size: 14px;
  color: var(--ink);
  outline: none;
  width: 200px;
  transition: border-color .15s;
}
.dict-search:focus { border-color: var(--teal); }
.dict-table-wrap {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.dict-table-head {
  display: grid;
  grid-template-columns: 14% 15% 12% 25% 24% 10%;
  padding: 10px 14px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  gap: 6px; align-items: center;
}
.dict-table-row {
  display: grid;
  grid-template-columns: 14% 15% 12% 25% 24% 10%;
  padding: 10px 14px;
  gap: 6px; align-items: start;
  border-bottom: 1px solid var(--slate-100);
  font-size: 13px; color: var(--ink-soft);
  transition: background .12s;
}
.dict-table-row:last-child { border-bottom: none; }
.dict-table-row:hover { background: #f4fcfb; }
.dict-ref { font-weight: 600; color: var(--teal-dark); }
.dict-interet {
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--slate-700);
}
.dict-info-btn {
  background: none; border: none;
  color: var(--teal); font-size: 13px; font-weight: 500;
  cursor: pointer; padding: 0; font-family: inherit;
  white-space: nowrap;
}
.dict-info-btn:hover { text-decoration: underline; }
.dict-pagination {
  display: flex; align-items: center; gap: 3px;
  padding: 14px 0 4px; flex-wrap: wrap;
}
.dict-page-btn {
  min-width: 30px; height: 30px; padding: 0 6px;
  border: 1px solid var(--slate-200); border-radius: 5px;
  background: #fff; color: var(--ink-soft);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  font-family: inherit;
}
.dict-page-btn:hover:not(:disabled) { background: var(--slate-50); border-color: var(--slate-300); }
.dict-page-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.dict-page-btn:disabled { opacity: 0.4; cursor: default; }
/* Modal overlay */
.dict-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.dict-modal {
  background: #fff; border-radius: 12px;
  width: 520px; max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}
.dict-modal-header {
  background: var(--teal); color: #fff;
  padding: 16px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.dict-modal-close {
  background: none; border: none; color: #fff;
  font-size: 20px; cursor: pointer; padding: 0; line-height: 1; opacity: 0.8;
  flex-shrink: 0; margin-top: 2px;
}
.dict-modal-close:hover { opacity: 1; }
.dict-modal-body { padding: 20px; }
.dict-modal-field { margin-bottom: 14px; }
.dict-modal-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--slate-600); margin-bottom: 4px;
}
.dict-modal-value { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ── Lexique des termes ─────────────────────────────────────────────────────── */
.lex-alpha-bar {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px;
}
.lex-alpha-btn {
  min-width: 30px; height: 30px; padding: 0 6px;
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: #fff; color: var(--teal-dark);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .12s, color .12s;
  font-family: inherit;
}
.lex-alpha-btn:hover { background: var(--teal); color: #fff; }
.lex-alpha-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.lex-search-label {
  font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px;
}
.lex-search {
  background: #fff; border: 1px solid var(--slate-300);
  border-radius: 4px; padding: 7px 12px;
  font: inherit; font-size: 14px; color: var(--ink);
  outline: none; width: 190px;
  transition: border-color .15s;
  margin-bottom: 18px;
}
.lex-search:focus { border-color: var(--teal); }
.lex-table-wrap {
  background: #fff; border: 1px solid var(--slate-200);
  border-radius: 0; overflow: hidden; box-shadow: var(--card-shadow);
}
.lex-table-head {
  display: grid; grid-template-columns: 34% 1fr;
  padding: 10px 16px;
  background: var(--blue-dark); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  gap: 16px;
}
.lex-table-row {
  display: grid; grid-template-columns: 34% 1fr;
  padding: 12px 16px; gap: 16px; align-items: start;
  border-bottom: 1px solid var(--slate-100);
  transition: background .12s;
}
.lex-table-row:last-child { border-bottom: none; }
.lex-table-row:hover { background: #f4fcfb; }
.lex-mot {
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.2px;
}
.lex-exp { font-size: 13px; color: var(--slate-700); line-height: 1.55; }
[dir="rtl"] .quicklinks a { flex-direction: row-reverse; }
