/* ============================================================
   CATALOGUE GRC/CYBER – STYLESHEET
   ============================================================ */

:root {
  --primary:       #263554;
  --primary-light: #344972;
  --accent:        #CDAB55;
  --accent-hover:  #B8963E;
  --success:       #38a169;
  --danger:        #e53e3e;
  --warning:       #d97706;
  --bg:            #ECE2D9;
  --bg-card:       #ffffff;
  --border:        #D9CCBF;
  --text:          #1a202c;
  --text-muted:    #7A6D64;
  --text-light:    #9c8f84;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 30px rgba(0,0,0,.12);
  --radius:        10px;
  --radius-sm:     6px;
  --transition:    .18s ease;
  --header-h:      64px;
  --nav-h:         44px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--primary);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.logo-wrapper { display: flex; align-items: center; }

.logo-img {
  height: 42px;
  width: auto;
  border-radius: 0;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  display: none;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #263554, #CDAB55);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
}

.header-title h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.header-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.header-center { flex: 1; max-width: 520px; margin: 0 auto; }

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.5);
  pointer-events: none;
}

#global-search {
  width: 100%;
  padding: 9px 36px 9px 38px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

#global-search::placeholder { color: rgba(255,255,255,.5); }

#global-search:focus {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
}

.clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  line-height: 1;
  display: none;
}

.clear-btn.visible { display: block; }
.clear-btn:hover { color: #fff; }

.header-right { flex-shrink: 0; }

.mode-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.mode-btn:hover { background: rgba(255,255,255,.2); }

.mode-btn.expert-mode {
  background: rgba(205,171,85,.25);
  border-color: rgba(205,171,85,.5);
}

/* ============================================================
   NAV
   ============================================================ */
.app-nav {
  height: var(--nav-h);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-links { display: flex; gap: 4px; }

.nav-btn {
  padding: 6px 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-btn.active { background: rgba(255,255,255,.15); color: #fff; }

.compare-badge {
  background: #e53e3e;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.compare-badge.hidden { display: none; }

.nav-actions { display: flex; gap: 8px; }

/* ============================================================
   MAIN
   ============================================================ */
.app-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* Views */
.view { display: none; }
.view.active { display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  padding: 8px 18px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-outline.btn-sm { padding: 5px 12px; font-size: 12.5px; border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.8); }
.btn-outline.btn-sm:hover { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.6); }

.btn-ghost {
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover { background: var(--bg); }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-back:hover { background: var(--bg-card); color: var(--text); }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover { text-decoration: underline; }

/* ============================================================
   HOME – HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #344972 60%, #263554 100%);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(205,171,85,.15), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-text h2 {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-text p {
  color: rgba(255,255,255,.75);
  max-width: 520px;
  font-size: 15px;
  line-height: 1.7;
}

.stats-row {
  display: flex;
  gap: 32px;
  flex-shrink: 0;
}

.stat-item { text-align: center; }

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
  display: block;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  margin-bottom: 36px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: var(--transition);
}

.about-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.about-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.about-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION
   ============================================================ */
.section { margin-bottom: 40px; }

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   CATEGORIES GRID
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.category-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-color, var(--accent));
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--cat-color, var(--accent));
}

.cat-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}

.cat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.cat-count {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-color, var(--accent));
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #E2C97A;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tool-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-family: monospace;
  letter-spacing: -1px;
}

.card-meta { flex: 1; min-width: 0; }

.card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-editor {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  background: #F5EDE3;
  color: #344972;
  border: 1px solid #E2C97A;
}

.badge.cat-badge {
  background: var(--cat-bg, #F5EDE3);
  color: var(--cat-fg, #344972);
  border-color: var(--cat-border, #E2C97A);
}

.card-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.stars { color: #CDAB55; font-size: 14px; letter-spacing: 1px; }
.stars .star-empty { color: var(--border); }

.card-actions { display: flex; gap: 8px; align-items: center; }

.btn-view {
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-view:hover { background: var(--accent-hover); }

.btn-compare-toggle {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition);
  color: var(--text-muted);
  flex-shrink: 0;
}

.btn-compare-toggle:hover { background: #F5EDE3; border-color: var(--accent); color: var(--accent); }
.btn-compare-toggle.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   TABLE VIEW
   ============================================================ */
.tools-table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.tools-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 13.5px;
}

.tools-table th {
  background: var(--primary);
  color: rgba(255,255,255,.9);
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  letter-spacing: .3px;
}

.tools-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.tools-table tr:last-child td { border-bottom: none; }

.tools-table tr:hover td { background: #F5EDE3; }

.tools-table .col-name { font-weight: 600; }
.tools-table .col-actions { white-space: nowrap; }

/* ============================================================
   TOOLS LAYOUT (sidebar + content)
   ============================================================ */
.tools-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h) + 28px);
  max-height: calc(100vh - var(--header-h) - var(--nav-h) - 60px);
  overflow-y: auto;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filters-header h3 { font-size: 15px; font-weight: 700; }

.filter-section { margin-bottom: 18px; }

.filter-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}

.filter-option input[type="checkbox"] { cursor: pointer; accent-color: var(--accent); width: 14px; height: 14px; }
.filter-option:hover { color: var(--accent); }

.filter-option .filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 8px;
}

.note-slider-title { display: flex; justify-content: space-between; align-items: center; }
.note-slider-display { font-size: 11px; font-weight: 600; color: #475569; background: #F1F5F9; padding: 2px 8px; border-radius: 6px; border: 1px solid #CBD5E0; white-space: nowrap; }
.note-slider-wrapper { padding: 10px 0 2px; }
.note-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: #E2E8F0; border-radius: 2px; outline: none; cursor: pointer; display: block; }
.note-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #475569; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); cursor: pointer; }
.note-slider::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #475569; border: none; cursor: pointer; }
.note-slider-ticks { display: flex; justify-content: space-between; padding: 0 6px; margin-top: 6px; }
.note-slider-ticks span { width: 1px; height: 5px; background: #CBD5E0; display: block; }
.note-slider-labels { display: flex; justify-content: space-between; padding: 0 4px; margin-top: 2px; }
.note-slider-labels span { font-size: 9px; color: var(--text-muted); text-align: center; width: 12px; margin: 0 -6px; }

.tools-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.toolbar-left { display: flex; align-items: center; gap: 10px; }

.results-count { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }

.toolbar-right { display: flex; align-items: center; gap: 10px; }

.consultant-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.consultant-switch {
  position: relative;
  width: 34px;
  height: 19px;
  background: #CBD5E0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.22s ease;
  flex-shrink: 0;
  padding: 0;
  outline: none;
}

.consultant-switch .switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform 0.22s ease;
  display: block;
}

.consultant-switch.active {
  background: #065f46;
}

.consultant-switch.active .switch-knob {
  transform: translateX(15px);
}

.switch-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.consultant-switch-wrapper:hover .switch-label { color: var(--text); }
.consultant-switch.active + .switch-label { color: #065f46; }

.sort-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }

.view-btn {
  padding: 6px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.view-btn.active { background: var(--primary); color: #fff; }
.view-btn:not(.active):hover { background: var(--bg); }

/* ============================================================
   DETAIL VIEW
   ============================================================ */
.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.detail-actions { display: flex; gap: 10px; }

.detail-content { display: flex; flex-direction: column; gap: 20px; }

.detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--cat-color, var(--accent));
}

.detail-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-family: monospace;
}

.detail-hero-info { flex: 1; }

.detail-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.detail-editor {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.detail-hero-right {
  text-align: right;
  flex-shrink: 0;
}

.detail-stars { font-size: 22px; color: #CDAB55; letter-spacing: 2px; }
.detail-stars .star-empty { color: var(--border); }

.classement-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Detail sections */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.detail-card.full-width { grid-column: 1 / -1; }

.detail-card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-card-title-icon { font-size: 16px; }

.detail-description {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

/* Forces / Limites */
.fl-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.fl-item {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}

.fl-icon { flex-shrink: 0; margin-top: 1px; font-size: 14px; }

/* Modules */
.modules-list { display: flex; flex-wrap: wrap; gap: 6px; }

.module-tag {
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12.5px;
  color: var(--text);
}

/* Conviction box */
.conviction-box {
  background: linear-gradient(135deg, #F5EDE3, #FFF9EC);
  border: 1px solid #DFC97A;
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
}

.conviction-box::before {
  content: '💡';
  font-size: 20px;
  position: absolute;
  top: 16px;
  right: 20px;
}

.conviction-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  font-style: italic;
}

/* Radar chart */
.radar-wrapper {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

/* Partenariat */
.partenariat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.partenariat-badge.yes { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.partenariat-badge.no  { background: #fff5f5; color: #742a2a; border: 1px solid #feb2b2; }

.detail-info-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Price box */
.price-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.price-range {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.price-detail { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Sources (expert only) */
.sources-list { display: flex; flex-direction: column; gap: 6px; }

.source-link {
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
}

/* Expert mode */
.expert-only { display: none !important; }
body.expert-mode .expert-only { display: block !important; }
body.expert-mode .info-row.expert-only { display: flex !important; }

/* Tags */
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  padding: 3px 10px;
  background: #EDE0D4;
  border-radius: 12px;
  font-size: 12px;
  color: #5D4E42;
  border: 1px solid #D9CCBF;
}

/* ============================================================
   COMPARE VIEW
   ============================================================ */
.compare-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.compare-header h2 { font-size: 22px; font-weight: 700; }
.compare-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }

.compare-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.compare-empty-icon { font-size: 48px; margin-bottom: 16px; }
.compare-empty p { font-size: 15px; margin-bottom: 20px; }

.compare-table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  min-width: 600px;
}

.compare-table th {
  padding: 18px 20px;
  text-align: left;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  vertical-align: top;
}

.compare-table th:first-child { width: 160px; }

.compare-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: top;
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table .row-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: #F5EDE3;
  border-right: 1px solid var(--border);
}

.compare-table tr:hover td { background: #F5EDE3; }
.compare-table tr:hover .row-label { background: #EDE0D4; }

.compare-best { background: #f0fff4 !important; }
.compare-worst { background: #fff5f5 !important; }

.remove-compare-btn {
  display: block;
  font-size: 11px;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 4px;
  padding: 0;
}

.remove-compare-btn:hover { text-decoration: underline; }

/* ============================================================
   COMPARE BAR
   ============================================================ */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  border-top: 2px solid rgba(255,255,255,.15);
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  z-index: 200;
  transform: translateY(0);
  transition: transform .25s ease;
}

.compare-bar.hidden { transform: translateY(100%); }

.compare-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.compare-bar-tools {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
}

.compare-bar-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
}

.chip-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 4px;
}

.chip-remove:hover { color: #fff; }

.compare-bar-slot {
  width: 120px;
  height: 36px;
  border: 1.5px dashed rgba(255,255,255,.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: 12px;
}

.compare-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#compare-bar-count { color: rgba(255,255,255,.7); font-size: 13px; white-space: nowrap; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ============================================================
   LOADING
   ============================================================ */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.update-date {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .tools-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; max-height: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-hero { flex-wrap: wrap; }
  .hero-inner { padding: 28px 24px; }
  .stats-row { gap: 20px; }
}

@media (max-width: 600px) {
  .app-header { padding: 0 14px; gap: 10px; }
  .header-title h1 { font-size: 15px; }
  .header-subtitle { display: none; }
  .app-main { padding: 16px 14px 80px; }
  .tools-grid { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; gap: 20px; }
  .stats-row { justify-content: center; }
  .detail-grid { grid-template-columns: 1fr; }
  .compare-bar-inner { flex-wrap: wrap; }
  .app-nav { padding: 0 14px; }
}

/* ============================================================
   DETAIL GRID
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-card { display: block; }

/* ============================================================
   INFO ROWS (flex layout inside detail cards)
   ============================================================ */
.info-row {
  display: flex;
  gap: 12px;
  font-size: 13.5px;
  align-items: flex-start;
}

.info-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 130px;
  flex-shrink: 0;
}

.info-value { color: var(--text); }

/* ============================================================
   SEARCH HIGHLIGHT
   ============================================================ */
mark {
  background: #fef08a;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ============================================================
   PRINT / PDF
   ============================================================ */
@media print {
  .app-header, .app-nav, .detail-toolbar, .compare-bar,
  .btn-back, .detail-actions { display: none !important; }
  body { background: #fff; }
  .detail-card { break-inside: avoid; }
}

/* ============================================================
   TPRM BENCHMARK – COMPOSANTS SPÉCIFIQUES
   ============================================================ */

/* ── Maturity badge ─────────────────────────────────────────── */
.mat-badge {
  background: var(--mat-bg, #F5EDE3);
  color: var(--mat-fg, #344972);
  border-color: var(--mat-border, #E2C97A);
}

/* ── Analyst badges ─────────────────────────────────────────── */
.analyst-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .3px;
  border: 1px solid transparent;
}

.gartner-badge  { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.forrester-badge{ background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.chartis-badge  { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; }

/* ── Score badge in cards ───────────────────────────────────── */
.score-badge {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--score-color, #263554);
  line-height: 1;
  text-align: right;
}

.score-badge .score-max {
  font-size: 11px;
  font-weight: 600;
  opacity: .65;
  display: block;
  text-align: right;
  margin-top: 1px;
}

/* ── CU dots in cards ───────────────────────────────────────── */
.card-cu {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.cu-dot-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: default;
  border: 1px solid transparent;
}

.cu-dot-sm.cu-covered  { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.cu-dot-sm.cu-missing  { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }

/* ── Table score ────────────────────────────────────────────── */
.table-score   { font-size: 14px; font-weight: 800; }
.table-cu      { display: flex; gap: 3px; flex-wrap: wrap; }

/* ── Score ring in detail hero ──────────────────────────────── */
.score-ring {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
}

.score-ring-val {
  font-size: 42px;
  font-weight: 900;
  color: var(--ring-color, #263554);
  letter-spacing: -2px;
  line-height: 1;
}

.score-ring-max {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}

.score-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

/* ── Site link ──────────────────────────────────────────────── */
.site-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 8px;
  word-break: break-all;
}

.site-link:hover { text-decoration: underline; }

/* ── CU list in detail ──────────────────────────────────────── */
.cu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cu-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.cu-item-yes { background: #f0fdf4; border-color: #bbf7d0; }
.cu-item-no  { background: #fafafa; border-color: #e5e7eb; }

.cu-item-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.cu-item-key {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 1px;
}

.cu-item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ── Criteria bars ──────────────────────────────────────────── */
.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crit-row { display: flex; flex-direction: column; gap: 6px; }

.crit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crit-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.crit-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.crit-weight {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.crit-bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.crit-justif {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 8px 12px;
  background: #F5EDE3;
  border-left: 3px solid var(--border);
  border-radius: 0 4px 4px 0;
  margin-top: 2px;
}

/* ── Analyst detail ─────────────────────────────────────────── */
.analyst-detail { display: flex; flex-direction: column; gap: 12px; }

.analyst-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.analyst-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* ── Ref filter tags ────────────────────────────────────────── */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.filter-tag-btn {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  transition: var(--transition);
  line-height: 1.5;
}

.filter-tag-btn:hover,
.filter-tag-btn.active {
  background: #FBF0CC;
  border-color: #DFC97A;
  color: #8B6914;
}

/* ── CU filter option ───────────────────────────────────────── */
.cu-filter-option { align-items: flex-start !important; }
.cu-filter-option span:first-of-type { line-height: 1.4; }

.cu-key-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  background: #F5EDE3;
  color: #5D4E42;
  border: 1px solid #D9CCBF;
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: .3px;
}

/* ── Card hover border by category color ────────────────────── */
.tool-card:hover { border-color: var(--cat-color, var(--accent)); }

/* ── Category badge ─────────────────────────────────────────── */
.badge.category-badge {
  background: #EEF2FF;
  color: #3730a3;
  border-color: #c7d2fe;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* ── Verified badge ─────────────────────────────────────────── */
.badge.verified-badge {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
  font-size: 10px;
  font-weight: 700;
}

