/*
 * Theme Name:        CRC Research Hub
 * Theme URI:         https://crc.mooc-science.eu
 * Description:       Thème enfant du thème Vlog (meks) — Plateforme sécurisée de pilotage de la recherche CRC. Direction visuelle "Institutionnel Sombre". Commission Recherche et Criminologie — CNDC.
 * Author:            Commission Recherche et Criminologie (CRC)
 * Author URI:        https://mooc-science.eu
 * Template:          vlog
 * Version:           1.0.0
 * License:           GNU General Public License v2 or later
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       crc-research-hub
 */

/* ============================================================
   DESIGN SYSTEM — Direction A "Institutionnel Sombre"
   Palette : Navy profond + Bleu acier + Accents data
   Police  : IBM Plex Mono (codes/data) + IBM Plex Sans (corps)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

/* ── TOKENS ────────────────────────────────── */
:root {
  --crc-bg-deep:       #07131F;
  --crc-bg-base:       #0B1F3A;
  --crc-bg-surface:    #0F2D52;
  --crc-bg-elevated:   #163660;
  --crc-bg-hover:      #1A3E72;

  --crc-blue:          #2E8DE8;
  --crc-blue-light:    #4FA3E0;
  --crc-blue-dim:      #1A5FA8;
  --crc-teal:          #1DB87E;
  --crc-teal-light:    #3DCCA0;
  --crc-amber:         #EFA827;
  --crc-amber-light:   #F5C842;
  --crc-red:           #E85050;
  --crc-purple:        #8B7FE8;
  --crc-coral:         #E8784F;

  --crc-text-primary:   #E8EFF7;
  --crc-text-secondary: #8BAAC8;
  --crc-text-muted:     #4D6B8A;
  --crc-text-accent:    #4FA3E0;

  --crc-border:         rgba(46,141,232,.15);
  --crc-border-strong:  rgba(46,141,232,.30);
  --crc-border-accent:  rgba(46,141,232,.60);

  --crc-font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --crc-font-sans: 'IBM Plex Sans', system-ui, sans-serif;

  --crc-radius-sm: 4px;
  --crc-radius-md: 8px;
  --crc-radius-lg: 12px;
  --crc-sidebar:   220px;
  --crc-trans:     all .18s cubic-bezier(.4,0,.2,1);
}

/* ── BODY & RESET ──────────────────────────── */
body.crc-platform {
  font-family: var(--crc-font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--crc-text-primary);
  background: var(--crc-bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* Masquer les éléments Vlog sur les pages plateforme */
body.crc-platform #header,
body.crc-platform .vlog-site-header,
body.crc-platform #footer,
body.crc-platform .vlog-site-footer,
body.crc-platform .vlog-topbar,
body.crc-platform .vlog-copyright,
body.crc-platform .vlog-breadcrumbs { display: none !important; }

body.crc-platform #content { padding: 0 !important; }
body.crc-platform .vlog-section { padding: 0 !important; margin: 0 !important; }
body.crc-platform .container { max-width: 100% !important; padding: 0 !important; }

/* ── APP LAYOUT ────────────────────────────── */
.crc-app {
  display: flex;
  min-height: 100vh;
  background: var(--crc-bg-deep);
}

/* ── SIDEBAR ───────────────────────────────── */
.crc-sidebar {
  width: var(--crc-sidebar);
  flex-shrink: 0;
  background: var(--crc-bg-base);
  border-right: 1px solid var(--crc-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.crc-sidebar::-webkit-scrollbar { width: 4px; }
.crc-sidebar::-webkit-scrollbar-thumb { background: var(--crc-border-strong); border-radius: 2px; }

.crc-logo {
  padding: 16px;
  border-bottom: 1px solid var(--crc-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.crc-logo-icon {
  width: 36px; height: 36px;
  background: var(--crc-bg-surface);
  border: 1px solid var(--crc-border-strong);
  border-radius: var(--crc-radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.crc-logo-icon svg { width: 20px; height: 20px; }

.crc-logo-title {
  font-family: var(--crc-font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--crc-text-primary);
  letter-spacing: .02em; line-height: 1.2;
}
.crc-logo-sub { font-size: 10px; color: var(--crc-text-muted); margin-top: 2px; }

.crc-nav-section {
  font-family: var(--crc-font-mono);
  font-size: 9px; font-weight: 600;
  color: var(--crc-text-muted);
  letter-spacing: .12em; text-transform: uppercase;
  padding: 16px 16px 6px;
}

.crc-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  color: var(--crc-text-secondary); font-size: 13px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: var(--crc-trans); cursor: pointer;
}
.crc-nav-item:hover { background: var(--crc-bg-hover); color: var(--crc-text-primary); text-decoration: none; }
.crc-nav-item.is-active { background: rgba(46,141,232,.12); color: var(--crc-blue-light); border-left-color: var(--crc-blue); }

.crc-nav-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-blue   { background: var(--crc-blue); }
.dot-teal   { background: var(--crc-teal); }
.dot-amber  { background: var(--crc-amber); }
.dot-purple { background: var(--crc-purple); }
.dot-gray   { background: var(--crc-text-muted); }

.crc-sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--crc-border);
}

.crc-user-block {
  display: flex; align-items: center; gap: 8px;
}
.crc-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--crc-bg-surface);
  border: 1px solid var(--crc-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--crc-font-mono); font-size: 11px; font-weight: 600;
  color: var(--crc-blue-light); flex-shrink: 0;
}
.crc-user-name  { font-size: 12px; font-weight: 500; color: var(--crc-text-primary); line-height: 1.2; }
.crc-user-role  { font-size: 10px; color: var(--crc-teal); font-family: var(--crc-font-mono); }

/* ── MAIN + TOPBAR ─────────────────────────── */
.crc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.crc-topbar {
  background: var(--crc-bg-base);
  border-bottom: 1px solid var(--crc-border);
  padding: 0 40px; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; position: sticky; top: 0; z-index: 90;
}
.crc-breadcrumb {
  font-family: var(--crc-font-mono); font-size: 12px;
  color: var(--crc-text-muted);
  display: flex; align-items: center; gap: 6px;
}
.crc-breadcrumb-current { color: var(--crc-text-primary); }
.crc-topbar-right { display: flex; align-items: center; gap: 8px; }
.crc-sem-badge {
  font-family: var(--crc-font-mono); font-size: 11px;
  color: var(--crc-text-muted);
  background: var(--crc-bg-surface);
  border: 1px solid var(--crc-border); border-radius: var(--crc-radius-sm);
  padding: 3px 10px;
}
.crc-sem-badge span { color: var(--crc-blue-light); font-weight: 600; }
.crc-status-live {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--crc-font-mono); font-size: 11px;
  color: var(--crc-text-muted);
}
.crc-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--crc-teal);
  animation: crc-pulse 2s ease-in-out infinite;
}
@keyframes crc-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── CONTENT AREA ──────────────────────────── */
.crc-content { flex: 1; padding: 40px; }

.crc-page { display: none; }
.crc-page.is-active { display: block; }

.crc-page-header { margin-bottom: 32px; }
.crc-page-title {
  font-family: var(--crc-font-mono); font-size: 22px; font-weight: 600;
  color: var(--crc-text-primary); letter-spacing: -.02em; margin: 0 0 6px;
}
.crc-page-title span { color: var(--crc-blue-light); }
.crc-page-desc { font-size: 13px; color: var(--crc-text-secondary); margin: 0; }

/* ── GRILLES ───────────────────────────────── */
.crc-grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.crc-grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.crc-grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }

/* ── METRIC CARD ───────────────────────────── */
.crc-metric {
  background: var(--crc-bg-surface);
  border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-lg);
  padding: 16px 18px;
  transition: var(--crc-trans);
}
.crc-metric:hover { border-color: var(--crc-border-strong); background: var(--crc-bg-elevated); }
.crc-metric-label {
  font-family: var(--crc-font-mono); font-size: 10px; font-weight: 600;
  color: var(--crc-text-muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px;
}
.crc-metric-value {
  font-family: var(--crc-font-mono); font-size: 32px; font-weight: 600;
  line-height: 1; margin-bottom: 4px;
}
.crc-mv-blue   { color: var(--crc-blue-light); }
.crc-mv-teal   { color: var(--crc-teal-light); }
.crc-mv-amber  { color: var(--crc-amber-light); }
.crc-mv-purple { color: #ADA3F0; }
.crc-metric-sub { font-size: 11px; color: var(--crc-text-muted); }

/* ── CARD ──────────────────────────────────── */
.crc-card {
  background: var(--crc-bg-base);
  border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-lg);
  padding: 24px; margin-bottom: 16px;
}
.crc-card-title {
  font-family: var(--crc-font-mono); font-size: 11px; font-weight: 600;
  color: var(--crc-text-secondary); letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--crc-border);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── PROGRESS BARS ─────────────────────────── */
.crc-prog-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.crc-prog-lbl { font-family: var(--crc-font-mono); font-size: 11px; color: var(--crc-text-secondary); min-width: 32px; }
.crc-prog-track { flex: 1; height: 6px; background: var(--crc-bg-deep); border-radius: 3px; border: 1px solid var(--crc-border); overflow: hidden; }
.crc-prog-fill { height: 6px; border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.cpf-blue   { background: var(--crc-blue); }
.cpf-teal   { background: var(--crc-teal); }
.cpf-amber  { background: var(--crc-amber); }
.crc-prog-pct { font-family: var(--crc-font-mono); font-size: 11px; color: var(--crc-text-muted); min-width: 34px; text-align: right; }

/* ── BADGE ─────────────────────────────────── */
.crc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--crc-font-mono); font-size: 10px; font-weight: 500;
  padding: 3px 9px; border-radius: 20px; letter-spacing: .03em;
}
.cb-blue   { background: rgba(46,141,232,.15); color: var(--crc-blue-light); border: 1px solid rgba(46,141,232,.3); }
.cb-teal   { background: rgba(29,184,126,.15); color: var(--crc-teal-light); border: 1px solid rgba(29,184,126,.3); }
.cb-amber  { background: rgba(239,168,39,.15);  color: var(--crc-amber-light); border: 1px solid rgba(239,168,39,.3); }
.cb-red    { background: rgba(232,80,80,.15);   color: #F08080; border: 1px solid rgba(232,80,80,.3); }
.cb-gray   { background: rgba(77,107,138,.2);   color: var(--crc-text-secondary); border: 1px solid var(--crc-border); }
.cb-green  { background: rgba(29,184,126,.15);  color: var(--crc-teal-light); border: 1px solid rgba(29,184,126,.3); }
.cb-purple { background: rgba(139,127,232,.15); color: #ADA3F0; border: 1px solid rgba(139,127,232,.3); }
.cb-coral  { background: rgba(232,120,79,.15);  color: #F0A080; border: 1px solid rgba(232,120,79,.3); }

/* ── BOUTONS ───────────────────────────────── */
.crc-btn {
  font-family: var(--crc-font-mono); font-size: 12px; font-weight: 500;
  padding: 8px 16px; border-radius: var(--crc-radius-md);
  border: 1px solid var(--crc-border-strong);
  background: var(--crc-bg-surface); color: var(--crc-text-secondary);
  cursor: pointer; transition: var(--crc-trans); letter-spacing: .02em;
}
.crc-btn:hover { background: var(--crc-bg-hover); color: var(--crc-text-primary); border-color: var(--crc-border-accent); }
.crc-btn:active { transform: scale(.97); }
.crc-btn-primary { background: var(--crc-blue-dim); border-color: var(--crc-blue); color: #fff; }
.crc-btn-primary:hover { background: var(--crc-blue); }
.crc-btn-danger  { background: rgba(232,80,80,.1); border-color: rgba(232,80,80,.3); color: #F08080; }
.crc-btn-danger:hover { background: rgba(232,80,80,.2); }
.crc-btn-sm { font-size: 10px; padding: 4px 10px; }

/* ── FORMULAIRES ───────────────────────────── */
.crc-form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.crc-form-label {
  font-family: var(--crc-font-mono); font-size: 10px; font-weight: 600;
  color: var(--crc-text-muted); letter-spacing: .08em; text-transform: uppercase;
}
.crc-input, .crc-select, .crc-textarea {
  font-family: var(--crc-font-sans); font-size: 13px;
  color: var(--crc-text-primary); background: var(--crc-bg-deep);
  border: 1px solid var(--crc-border-strong); border-radius: var(--crc-radius-md);
  padding: 8px 12px; width: 100%; transition: var(--crc-trans); outline: none;
}
.crc-input::placeholder, .crc-textarea::placeholder { color: var(--crc-text-muted); }
.crc-input:focus, .crc-select:focus, .crc-textarea:focus {
  border-color: var(--crc-blue);
  box-shadow: 0 0 0 3px rgba(46,141,232,.15);
}
.crc-select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234D6B8A' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.crc-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

/* ── TABS ──────────────────────────────────── */
.crc-tabs { display: flex; border-bottom: 1px solid var(--crc-border); margin-bottom: 24px; }
.crc-tab {
  font-family: var(--crc-font-mono); font-size: 11px; font-weight: 500;
  color: var(--crc-text-muted); padding: 10px 18px;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; letter-spacing: .04em; transition: var(--crc-trans);
}
.crc-tab:hover { color: var(--crc-text-secondary); }
.crc-tab.is-active { color: var(--crc-blue-light); border-bottom-color: var(--crc-blue); }
.crc-tab-panel { display: none; }
.crc-tab-panel.is-active { display: block; }

/* ── TABLEAUX ──────────────────────────────── */
.crc-table-wrap { overflow-x: auto; border-radius: var(--crc-radius-md); border: 1px solid var(--crc-border); }
.crc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.crc-table th {
  font-family: var(--crc-font-mono); font-size: 9px; font-weight: 600;
  color: var(--crc-text-muted); letter-spacing: .1em; text-transform: uppercase;
  text-align: left; padding: 10px 14px;
  background: var(--crc-bg-surface); border-bottom: 1px solid var(--crc-border-strong);
  white-space: nowrap;
}
.crc-table td { padding: 10px 14px; border-bottom: 1px solid var(--crc-border); color: var(--crc-text-primary); vertical-align: middle; }
.crc-table tbody tr:last-child td { border-bottom: none; }
.crc-table tbody tr:hover td { background: var(--crc-bg-hover); }
.crc-empty { text-align: center; padding: 36px; color: var(--crc-text-muted); font-family: var(--crc-font-mono); font-size: 12px; }

/* ── ALERTS ────────────────────────────────── */
.crc-alert { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--crc-border); }
.crc-alert:last-child { border-bottom: none; }
.crc-alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.crc-alert-title { font-size: 13px; font-weight: 500; color: var(--crc-text-primary); margin-bottom: 2px; }
.crc-alert-desc  { font-size: 12px; color: var(--crc-text-secondary); }

/* ── CHECKLIST ─────────────────────────────── */
.crc-check-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--crc-border); }
.crc-check-item:last-child { border-bottom: none; }
.crc-check-item input[type="checkbox"] { width: 16px; height: 16px; border-radius: 3px; cursor: pointer; accent-color: var(--crc-blue); flex-shrink: 0; margin-top: 1px; }
.crc-check-text { font-size: 13px; color: var(--crc-text-secondary); line-height: 1.5; cursor: pointer; }
.crc-check-text.done { text-decoration: line-through; color: var(--crc-text-muted); }

/* ── CRC CALCULATOR ────────────────────────── */
.crc-calc-result {
  background: rgba(46,141,232,.08); border: 1px solid var(--crc-border-accent);
  border-radius: var(--crc-radius-md); padding: 16px 18px; margin-top: 16px;
}
.crc-calc-n    { font-family: var(--crc-font-mono); font-size: 40px; font-weight: 600; color: var(--crc-blue-light); line-height: 1; margin-bottom: 6px; }
.crc-calc-ic   { font-family: var(--crc-font-mono); font-size: 12px; color: var(--crc-text-secondary); margin-bottom: 4px; }
.crc-calc-ratio{ font-size: 12px; color: var(--crc-amber); font-family: var(--crc-font-mono); }

/* ── SATURATION METER ──────────────────────── */
.crc-sat-track { height: 12px; background: var(--crc-bg-deep); border-radius: 6px; overflow: hidden; border: 1px solid var(--crc-border); margin: 8px 0; }
.crc-sat-fill  { height: 12px; border-radius: 6px; background: var(--crc-blue); transition: width .6s; }
.crc-sat-fill.warn { background: var(--crc-amber); }
.crc-sat-fill.done { background: var(--crc-teal); }

/* ── CALENDAR ──────────────────────────────── */
.crc-cal-grid { display: grid; grid-template-columns: repeat(10,1fr); gap: 5px; margin-top: 10px; }
.crc-cal-cell {
  height: 32px; border-radius: var(--crc-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--crc-font-mono); font-size: 11px; font-weight: 500;
  border: 1px solid var(--crc-border); cursor: pointer; transition: var(--crc-trans);
}
.cc-past    { background: rgba(29,184,126,.1); border-color: rgba(29,184,126,.25); color: var(--crc-teal-light); }
.cc-current { background: rgba(46,141,232,.2); border-color: var(--crc-blue); color: var(--crc-blue-light); font-weight: 700; }
.cc-future  { background: var(--crc-bg-deep); color: var(--crc-text-muted); }
.crc-cal-cell:hover { border-color: var(--crc-border-strong); color: var(--crc-text-primary); }

/* ── PHASE PILLS ───────────────────────────── */
.crc-phase-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.crc-phase-pill {
  font-family: var(--crc-font-mono); font-size: 11px;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--crc-border);
  background: var(--crc-bg-surface); color: var(--crc-text-muted);
  cursor: pointer; transition: var(--crc-trans);
}
.crc-phase-pill:hover { border-color: var(--crc-border-strong); color: var(--crc-text-secondary); }
.crc-phase-pill.is-active { background: rgba(46,141,232,.15); border-color: var(--crc-blue); color: var(--crc-blue-light); }

/* ╔══════════════════════════════════════════╗
   ║   MODULE WP3 — MOTEUR DE RECHERCHE       ║
   ║   BIBLIOGRAPHIQUE                        ║
   ╚══════════════════════════════════════════╝ */

/* ── BARRE DE RECHERCHE PRINCIPALE ──────────── */
.crc-bib-search-bar {
  position: relative;
  margin-bottom: 20px;
}

.crc-bib-search-input {
  width: 100%;
  padding: 14px 20px 14px 52px;
  font-family: var(--crc-font-sans); font-size: 15px;
  color: var(--crc-text-primary); background: var(--crc-bg-surface);
  border: 1px solid var(--crc-border-strong); border-radius: var(--crc-radius-lg);
  outline: none; transition: var(--crc-trans);
}
.crc-bib-search-input::placeholder { color: var(--crc-text-muted); }
.crc-bib-search-input:focus {
  border-color: var(--crc-blue);
  box-shadow: 0 0 0 4px rgba(46,141,232,.12);
  background: var(--crc-bg-elevated);
}

.crc-bib-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--crc-text-muted); pointer-events: none;
}

.crc-bib-search-count {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--crc-font-mono); font-size: 11px; color: var(--crc-text-muted);
}

/* ── FILTRES THÉMATIQUES ──────────────────── */
.crc-bib-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.crc-bib-filter {
  font-family: var(--crc-font-mono); font-size: 11px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--crc-border);
  background: var(--crc-bg-surface); color: var(--crc-text-muted);
  cursor: pointer; transition: var(--crc-trans);
}
.crc-bib-filter:hover { border-color: var(--crc-border-strong); color: var(--crc-text-secondary); }
.crc-bib-filter.is-active { color: var(--crc-text-primary); border-color: transparent; }
.crc-bib-filter[data-code="ALL"].is-active { background: var(--crc-blue-dim); border-color: var(--crc-blue); }
.crc-bib-filter[data-code="DEV"].is-active { background: rgba(46,141,232,.2); border-color: var(--crc-blue); color: var(--crc-blue-light); }
.crc-bib-filter[data-code="ENV"].is-active { background: rgba(29,184,126,.2); border-color: var(--crc-teal); color: var(--crc-teal-light); }
.crc-bib-filter[data-code="CRI"].is-active { background: rgba(232,80,80,.2); border-color: var(--crc-red); color: #F08080; }
.crc-bib-filter[data-code="FEM"].is-active { background: rgba(139,127,232,.2); border-color: var(--crc-purple); color: #ADA3F0; }
.crc-bib-filter[data-code="VIC"].is-active { background: rgba(232,120,79,.2); border-color: var(--crc-coral); color: #F0A080; }
.crc-bib-filter[data-code="RES"].is-active { background: rgba(239,168,39,.2); border-color: var(--crc-amber); color: var(--crc-amber-light); }
.crc-bib-filter[data-code="BIO"].is-active { background: rgba(61,204,160,.2); border-color: var(--crc-teal-light); color: var(--crc-teal-light); }
.crc-bib-filter[data-code="EPS"].is-active { background: rgba(46,141,232,.15); border-color: var(--crc-blue-light); color: var(--crc-blue-light); }
.crc-bib-filter[data-code="POL"].is-active { background: rgba(239,168,39,.15); border-color: var(--crc-amber); color: var(--crc-amber-light); }
.crc-bib-filter[data-code="REC"].is-active { background: rgba(29,184,126,.15); border-color: var(--crc-teal); color: var(--crc-teal-light); }
.crc-bib-filter[data-code="CYB"].is-active { background: rgba(139,127,232,.15); border-color: var(--crc-purple); color: #ADA3F0; }

/* ── CARTE RÉFÉRENCE ──────────────────────── */
.crc-ref-card {
  background: var(--crc-bg-base);
  border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-lg);
  padding: 18px 20px;
  margin-bottom: 10px;
  transition: var(--crc-trans);
  cursor: default;
}
.crc-ref-card:hover {
  border-color: var(--crc-border-strong);
  background: var(--crc-bg-elevated);
}

.crc-ref-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
  margin-bottom: 8px;
}
.crc-ref-title {
  font-size: 14px; font-weight: 500;
  color: var(--crc-text-primary); line-height: 1.4;
  flex: 1;
}
.crc-ref-year {
  font-family: var(--crc-font-mono); font-size: 13px;
  font-weight: 600; color: var(--crc-blue-light);
  flex-shrink: 0;
}
.crc-ref-authors {
  font-size: 12px; color: var(--crc-text-secondary);
  font-style: italic; margin-bottom: 8px;
}
.crc-ref-source {
  font-size: 12px; color: var(--crc-text-muted);
  margin-bottom: 10px;
}

.crc-ref-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; margin-bottom: 10px;
}

.crc-ref-relevance {
  display: flex; gap: 2px;
}
.crc-rel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--crc-border-strong);
  transition: var(--crc-trans);
}
.crc-rel-dot.filled { background: var(--crc-amber); }

.crc-ref-note {
  font-size: 11px; color: var(--crc-text-muted);
  font-style: italic; padding-top: 8px;
  border-top: 1px solid var(--crc-border);
  line-height: 1.5;
}

/* ── LIENS VERS LES BASES ─────────────────── */
.crc-ref-links {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 10px; border-top: 1px solid var(--crc-border);
}
.crc-ref-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--crc-font-mono); font-size: 10px; font-weight: 500;
  padding: 4px 10px; border-radius: var(--crc-radius-sm);
  border: 1px solid var(--crc-border);
  background: var(--crc-bg-surface); color: var(--crc-text-muted);
  text-decoration: none; transition: var(--crc-trans);
  cursor: pointer;
}
.crc-ref-link:hover { background: var(--crc-bg-hover); color: var(--crc-text-primary); border-color: var(--crc-border-strong); text-decoration: none; }
.crc-ref-link.doi    { border-color: rgba(46,141,232,.3); color: var(--crc-blue-light); }
.crc-ref-link.doi:hover { background: rgba(46,141,232,.1); border-color: var(--crc-blue); }

/* ── MOTEUR DE RECHERCHE EXTERNE ─────────── */
.crc-search-engines {
  background: var(--crc-bg-base);
  border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.crc-se-title {
  font-family: var(--crc-font-mono); font-size: 11px; font-weight: 600;
  color: var(--crc-text-muted); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}
.crc-se-grid {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px;
}
.crc-se-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 10px;
  background: var(--crc-bg-surface); border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-md);
  color: var(--crc-text-secondary); cursor: pointer;
  text-decoration: none; transition: var(--crc-trans);
  font-size: 11px; font-family: var(--crc-font-mono);
  font-weight: 500; text-align: center; line-height: 1.3;
}
.crc-se-btn:hover { border-color: var(--crc-border-strong); background: var(--crc-bg-hover); color: var(--crc-text-primary); text-decoration: none; }
.crc-se-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.crc-se-btn.se-scopus:hover     { border-color: rgba(239,168,39,.4);  color: var(--crc-amber-light); }
.crc-se-btn.se-wos:hover        { border-color: rgba(46,141,232,.4);  color: var(--crc-blue-light); }
.crc-se-btn.se-pubmed:hover     { border-color: rgba(29,184,126,.4);  color: var(--crc-teal-light); }
.crc-se-btn.se-scholar:hover    { border-color: rgba(46,141,232,.4);  color: var(--crc-blue-light); }
.crc-se-btn.se-jstor:hover      { border-color: rgba(232,120,79,.4);  color: #F0A080; }
.crc-se-btn.se-crossref:hover   { border-color: rgba(139,127,232,.4); color: #ADA3F0; }
.crc-se-btn.se-cairn:hover      { border-color: rgba(239,168,39,.4);  color: var(--crc-amber-light); }
.crc-se-btn.se-criminologie:hover { border-color: rgba(29,184,126,.4); color: var(--crc-teal-light); }

.crc-se-query-row {
  display: flex; gap: 8px; margin-top: 14px; align-items: center;
}
.crc-se-query {
  flex: 1; font-family: var(--crc-font-sans); font-size: 13px;
  color: var(--crc-text-primary); background: var(--crc-bg-deep);
  border: 1px solid var(--crc-border-strong); border-radius: var(--crc-radius-md);
  padding: 8px 12px; outline: none; transition: var(--crc-trans);
}
.crc-se-query:focus { border-color: var(--crc-blue); box-shadow: 0 0 0 3px rgba(46,141,232,.12); }
.crc-se-query::placeholder { color: var(--crc-text-muted); }

/* ── STATISTIQUES BIBLIOGRAPHIQUES ───────── */
.crc-bib-stats {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px;
  margin-bottom: 16px;
}
.crc-bib-stat {
  background: var(--crc-bg-surface);
  border: 1px solid var(--crc-border); border-radius: var(--crc-radius-md);
  padding: 10px 14px; text-align: center;
}
.crc-bib-stat-v { font-family: var(--crc-font-mono); font-size: 22px; font-weight: 600; color: var(--crc-blue-light); }
.crc-bib-stat-l { font-size: 11px; color: var(--crc-text-muted); margin-top: 2px; font-family: var(--crc-font-mono); }

/* ── VUE AUTEURS CLÉS ─────────────────────── */
.crc-auteur-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--crc-bg-base); border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-lg); padding: 16px 18px; margin-bottom: 10px;
  transition: var(--crc-trans);
}
.crc-auteur-card:hover { border-color: var(--crc-border-strong); background: var(--crc-bg-elevated); }
.crc-auteur-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--crc-bg-surface); border: 1px solid var(--crc-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--crc-font-mono); font-size: 12px; font-weight: 600;
  color: var(--crc-blue-light); flex-shrink: 0;
}
.crc-auteur-name { font-size: 14px; font-weight: 500; color: var(--crc-text-primary); margin-bottom: 2px; }
.crc-auteur-origin { font-size: 11px; color: var(--crc-text-muted); margin-bottom: 6px; }
.crc-auteur-oeuvre { font-size: 12px; color: var(--crc-text-secondary); font-style: italic; margin-bottom: 6px; }
.crc-auteur-contrib { font-size: 12px; color: var(--crc-text-secondary); line-height: 1.5; }

/* ── MODÈLES INTERNATIONAUX ───────────────── */
.crc-intl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.crc-intl-table th {
  font-family: var(--crc-font-mono); font-size: 10px; font-weight: 600;
  color: var(--crc-text-muted); letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 14px; background: var(--crc-bg-surface);
  border-bottom: 1px solid var(--crc-border-strong); text-align: left;
}
.crc-intl-table td { padding: 10px 14px; border-bottom: 1px solid var(--crc-border); color: var(--crc-text-secondary); vertical-align: top; }
.crc-intl-table tr:last-child td { border-bottom: none; }
.crc-intl-table tr:hover td { background: var(--crc-bg-hover); }
.crc-intl-table td:first-child { color: var(--crc-text-primary); font-weight: 500; white-space: nowrap; }
.crc-intl-ok   { color: var(--crc-teal-light) !important; }
.crc-intl-warn { color: var(--crc-amber-light) !important; }
.crc-intl-no   { color: #F08080 !important; }

/* ── PRISMA FLOW ───────────────────────────── */
.crc-prisma-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--crc-border);
}
.crc-prisma-step:last-child { border-bottom: none; }
.crc-prisma-num {
  width: 52px; height: 52px; border-radius: var(--crc-radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--crc-font-mono); font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.crc-prisma-info { flex: 1; }
.crc-prisma-lbl  { font-size: 13px; font-weight: 500; color: var(--crc-text-primary); margin-bottom: 2px; }
.crc-prisma-sub  { font-size: 11px; color: var(--crc-text-muted); }

/* ── SCROLLBAR GLOBAL ──────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--crc-bg-deep); }
::-webkit-scrollbar-thumb { background: var(--crc-border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--crc-border-accent); }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 1024px) {
  .crc-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crc-se-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crc-grid-2, .crc-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .crc-sidebar { display: none; }
  .crc-content { padding: 16px; }
  .crc-topbar  { padding: 0 16px; }
  .crc-grid-4  { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crc-se-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crc-bib-stats { grid-template-columns: repeat(3,1fr); }
}
@media print {
  .crc-sidebar, .crc-topbar { display: none !important; }
  body.crc-platform { background: white !important; color: black !important; }
}

/* ── CORRECTIF LARGEUR VLOG ────────────────────────────────
   Force la plateforme CRC à occuper toute la largeur
   en neutralisant les conteneurs Vlog
────────────────────────────────────────────────────────── */

body.crc-platform,
body.crc-platform #page,
body.crc-platform #content,
body.crc-platform #primary,
body.crc-platform .vlog-site-content,
body.crc-platform .vlog-section,
body.crc-platform .vlog-content,
body.crc-platform .container,
body.crc-platform .entry-content,
body.crc-platform .entry-content-single {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

body.crc-platform .crc-app {
    width: 100% !important;
    min-height: 100vh !important;
}

/* ── BOUTONS TOPBAR ─────────────────────────── */
.crc-topbar-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--crc-font-mono); font-size: 11px;
  color: var(--crc-text-muted); text-decoration: none;
  padding: 5px 11px;
  border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-sm);
  background: var(--crc-bg-surface);
  transition: var(--crc-trans);
}
.crc-topbar-btn:hover { color: var(--crc-text-primary); border-color: var(--crc-border-strong); text-decoration: none; }
.crc-topbar-btn--logout { color: #E85050; border-color: rgba(232,80,80,.3); background: rgba(232,80,80,.07); }
.crc-topbar-btn--logout:hover { color: #F08080; background: rgba(232,80,80,.15); border-color: rgba(232,80,80,.5); text-decoration: none; }

/* ── CORRECTIF LARGEUR VLOG ────────────────── */
body.crc-platform,
body.crc-platform #page,
body.crc-platform #content,
body.crc-platform #primary,
body.crc-platform .vlog-site-content,
body.crc-platform .vlog-section,
body.crc-platform .vlog-content,
body.crc-platform .container,
body.crc-platform .entry-content,
body.crc-platform .entry-content-single {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}
body.crc-platform .crc-app {
    width: 100% !important;
    min-height: 100vh !important;
}

/* ── TABLEAU INTERNATIONAL SCROLL ──────────── */
.crc-intl-table-wrap {
    overflow-x: auto;
    border-radius: var(--crc-radius-md);
    border: 1px solid var(--crc-border);
}
.crc-intl-table { min-width: 900px; }
.crc-intl-table td[title] { cursor: help; }

/* ── PRISMA GUIDE TOOLTIP ───────────────────── */
.crc-prisma-guide-btn {
    font-family: var(--crc-font-mono);
    font-size: 9px; color: var(--crc-text-muted);
    cursor: help;
    border: 1px solid var(--crc-border);
    border-radius: 50%;
    width: 14px; height: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: var(--crc-trans);
}
.crc-prisma-guide-btn:hover {
    border-color: var(--crc-blue);
    color: var(--crc-blue-light);
}

/* ── CORRECTIF FINAL LARGEUR VLOG ───────────── */
body.crc-platform,
body.crc-platform #page,
body.crc-platform #content,
body.crc-platform #primary,
body.crc-platform .vlog-site-content,
body.crc-platform .vlog-section,
body.crc-platform .vlog-content,
body.crc-platform .container,
body.crc-platform .entry-content,
body.crc-platform .entry-content-single {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}
body.crc-platform .crc-app { width: 100% !important; min-height: 100vh !important; }

/* ── BOUTONS TOPBAR ─────────────────────────── */
.crc-topbar-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--crc-font-mono); font-size: 11px;
  color: var(--crc-text-muted); text-decoration: none;
  padding: 5px 11px; border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-sm); background: var(--crc-bg-surface); transition: var(--crc-trans);
}
.crc-topbar-btn:hover { color: var(--crc-text-primary); border-color: var(--crc-border-strong); text-decoration: none; }
.crc-topbar-btn--logout { color: #E85050; border-color: rgba(232,80,80,.3); background: rgba(232,80,80,.07); }
.crc-topbar-btn--logout:hover { color: #F08080; background: rgba(232,80,80,.15); border-color: rgba(232,80,80,.5); text-decoration: none; }

/* ── MODULES CRIMINOLOGIQUES — boutons bases ── */
.crc-se-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 12px 8px;
  background: var(--crc-bg-surface); border: 1px solid var(--crc-border);
  border-radius: var(--crc-radius-md); color: var(--crc-text-secondary);
  cursor: pointer; text-decoration: none; transition: var(--crc-trans);
  font-size: 11px; font-family: var(--crc-font-mono); font-weight: 500;
  text-align: center; line-height: 1.3;
}
.crc-se-btn:hover { border-color: var(--crc-border-strong); background: var(--crc-bg-hover); color: var(--crc-text-primary); text-decoration: none; }
.crc-se-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── ASSISTANT IA — animation dots ─────────── */
@keyframes ia-dot { 0%,100%{opacity:.3;transform:scale(.8)} 50%{opacity:1;transform:scale(1)} }
#ia-loading span { animation: ia-dot 1.2s ease-in-out infinite; }
#ia-loading span:nth-child(2) { animation-delay: .2s; }
#ia-loading span:nth-child(3) { animation-delay: .4s; }

/* ── SIDEBAR SCROLL ─────────────────────────── */
.crc-sidebar { overflow-y: auto; overflow-x: hidden; }

/* ── NAV ITEM HOVER ROUGE DÉCONNEXION ────────── */
.crc-nav-item[data-href*="logout"],
.crc-nav-item.nav-logout { color: rgba(232,80,80,.7) !important; }
.crc-nav-item.nav-logout:hover { background: rgba(232,80,80,.1) !important; color: #F08080 !important; }

/* ── CORRECTIF MENU MOBILE VLOG sur pages CRC ── */
body.crc-platform .vlog-responsive-header,
body.crc-platform #dl-menu,
body.crc-platform .dl-trigger,
body.crc-platform .dl-menu,
body.crc-platform .vlog-mob-nav,
body.crc-platform .vlog-responsive-header .vlog-nav-wrap {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ── MENU MOBILE CRC NATIF ──────────────────── */
@media (max-width: 768px) {

  /* Sidebar CRC visible en overlay sur mobile */
  .crc-sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
  }

  .crc-sidebar.is-open {
    display: flex;
    transform: translateX(0);
  }

  .crc-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 998;
  }

  .crc-sidebar-overlay.is-open { display: block; }

  /* Bouton hamburger CRC dans la topbar mobile */
  .crc-mobile-menu-btn {
    display: flex !important;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--crc-bg-surface);
    border: 1px solid var(--crc-border);
    border-radius: var(--crc-radius-sm);
    cursor: pointer; flex-shrink: 0;
  }

  .crc-mobile-menu-btn svg { width: 18px; height: 18px; color: var(--crc-text-secondary); }

  .crc-topbar { padding: 0 16px; gap: 8px; }
  .crc-content { padding: 16px; }
  .crc-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crc-grid-2, .crc-grid-3 { grid-template-columns: 1fr; }
  .crc-wp-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .crc-mobile-menu-btn { display: none !important; }
  .crc-sidebar-overlay { display: none !important; }
}

/* ── MENU MOBILE VLOG — priorité z-index ────── */
.vlog-responsive-header,
.dl-menu,
.dl-trigger,
.vlog-mob-nav {
    z-index: 99999 !important;
    position: relative;
}

/* S'assurer que le header Vlog est visible sur les pages non-plateforme */
body:not(.crc-platform) #header { display: block !important; }
body:not(.crc-platform) .vlog-site-footer { display: block !important; }

/* ═══════════════════════════════════════════════
   PAGE CONNEXION — Masquer Vlog, fond plein écran
═══════════════════════════════════════════════ */

body.crc-login-standalone #header,
body.crc-login-standalone .vlog-site-header,
body.crc-login-standalone #footer,
body.crc-login-standalone .vlog-site-footer,
body.crc-login-standalone .vlog-copyright,
body.crc-login-standalone .vlog-topbar,
body.crc-login-standalone .vlog-breadcrumbs,
body.crc-login-standalone .widget,
body.crc-login-standalone #sidebar,
body.crc-login-standalone .vlog-sidebar,
body.crc-login-standalone .vlog-content > h1,
body.crc-login-standalone .entry-title {
    display: none !important;
}

body.crc-login-standalone {
    background: #07131F !important;
    min-height: 100vh;
}

body.crc-login-standalone #content,
body.crc-login-standalone #page,
body.crc-login-standalone .vlog-site-content,
body.crc-login-standalone .vlog-section,
body.crc-login-standalone .vlog-content,
body.crc-login-standalone .container,
body.crc-login-standalone .entry-content {
    background: #07131F !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

/* Centrer le formulaire sur toute la hauteur */
body.crc-login-standalone .crc-lf-wrap {
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    background: #07131F !important;
    padding: 0 !important;
}

/* Le card de login centré */
body.crc-login-standalone .crc-lf-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: #0B1F3A;
    border: 1px solid rgba(46,141,232,.2);
    border-radius: 16px;
    padding: 40px 36px;
}

/* Header CRC sur la page login */
body.crc-login-standalone .crc-login-topbar {
    background: #0B1F3A;
    border-bottom: 1px solid rgba(46,141,232,.15);
    padding: 0 40px;
    height: 56px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

/* Footer sur page login */
body.crc-login-standalone .crc-login-footer {
    background: #0B1F3A;
    border-top: 1px solid rgba(46,141,232,.08);
    padding: 16px 40px;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}
