/**
 * CERC Platform Shell - Composants
 * KPI cards, chart cards, chat bubble, table, filter bar, home modules
 * Alignement gauche par defaut - Lecon 38
 */

/* ===================================================
   HOME - PAGE ACCUEIL PLATEFORME
   =================================================== */

.cerc-home-main {
  min-height: calc(100vh - 64px);
  padding: 0 0 80px;
}

.cerc-home-hero {
  padding: 72px var(--cerc-sp-6) 48px;
  max-width: 900px;
}

.cerc-home-title {
  font-family: var(--cerc-font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--cerc-text);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.cerc-home-sub {
  font-size: 1.125rem;
  color: var(--cerc-text-muted);
  margin: 0;
}

.cerc-home-modules {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 var(--cerc-sp-6);
  max-width: 900px;
}

.cerc-module-card {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--cerc-surface);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--cerc-radius-lg);
  text-decoration: none;
  color: var(--cerc-text);
  transition: background .2s, border-color .2s, transform .2s;
  position: relative;
  overflow: hidden;
}

.cerc-module-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  transition: width .3s;
}

.cerc-module-delibs::before  { background: var(--cerc-vert); }
.cerc-module-pmcb::before     { background: #a78bfa; }

.cerc-module-card:hover {
  background: var(--cerc-surface-2);
  border-color: rgba(255,255,255,.12);
  transform: translateX(4px);
}

.cerc-module-card:hover::before { width: 6px; }

.cerc-module-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.04);
  border-radius: var(--cerc-radius-md);
  flex-shrink: 0;
}

.cerc-module-badge {
  display: inline-block;
  font-family: var(--cerc-font-mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 8px;
  border-radius: var(--cerc-radius-sm);
  margin-bottom: 8px;
}

.cerc-module-badge.is-delibs {
  background: rgba(0,230,118,.12);
  color: var(--cerc-vert);
}

.cerc-module-badge.is-pmcb {
  background: rgba(167,139,250,.12);
  color: #a78bfa;
}

.cerc-module-name {
  font-family: var(--cerc-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--cerc-text);
}

.cerc-module-desc {
  font-size: .9rem;
  color: var(--cerc-text-muted);
  margin: 0;
  line-height: 1.5;
}

.cerc-module-arrow {
  color: var(--cerc-text-muted);
  transition: color .2s, transform .2s;
  display: flex;
  align-items: center;
}

.cerc-module-card:hover .cerc-module-arrow {
  color: var(--cerc-vert);
  transform: translateX(4px);
}

.cerc-module-delibs:hover .cerc-module-arrow { color: var(--cerc-vert); }
.cerc-module-pmcb:hover .cerc-module-arrow   { color: #a78bfa; }

.cerc-home-no-access {
  padding: 48px 32px;
  background: var(--cerc-surface);
  border-radius: var(--cerc-radius-lg);
  color: var(--cerc-text-muted);
  text-align: center;
}

@media (max-width: 600px) {
  .cerc-module-card {
    grid-template-columns: 56px 1fr 32px;
    gap: 16px;
    padding: 20px;
  }
  .cerc-module-icon { width: 48px; height: 48px; }
  .cerc-home-hero { padding: 40px 20px 32px; }
  .cerc-home-modules { padding: 0 20px; }
}

/* ===================================================
   GRILLE GENERIQUE
   =================================================== */

.cerc-grid {
  display: grid;
  gap: var(--cerc-sp-4);
}
.cerc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.cerc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cerc-grid-4 { grid-template-columns: repeat(4, 1fr); }
.cerc-grid-kpi { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cerc-grid-charts { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
  .cerc-grid-3, .cerc-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cerc-grid-charts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cerc-grid-2, .cerc-grid-3, .cerc-grid-4, .cerc-grid-kpi, .cerc-grid-charts {
    grid-template-columns: 1fr;
  }
}

/* ===================================================
   CARD BASE
   =================================================== */

.cerc-card {
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg);
  padding: var(--cerc-sp-5);
  transition: border-color var(--cerc-dur) var(--cerc-ease),
              transform 120ms var(--cerc-ease),
              box-shadow 120ms var(--cerc-ease);
}
.cerc-card:hover {
  border-color: var(--cerc-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--cerc-shadow-md);
}

/* ===================================================
   KPI CARDS
   Lecon 38 : varier les emphases, pas toutes identiques
   =================================================== */

.cerc-kpi-card {
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg);
  padding: var(--cerc-sp-5) var(--cerc-sp-5) var(--cerc-sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--cerc-sp-2);
  transition: border-color var(--cerc-dur) var(--cerc-ease),
              transform 120ms var(--cerc-ease),
              box-shadow 120ms var(--cerc-ease);
  position: relative;
  overflow: hidden;
}

.cerc-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--cerc-border);
  transition: background var(--cerc-dur) var(--cerc-ease);
}

.cerc-kpi-card:hover {
  border-color: var(--cerc-border-accent);
  transform: translateY(-2px);
  box-shadow: var(--cerc-shadow-md), var(--cerc-shadow-vert);
}
.cerc-kpi-card:hover::before {
  background: var(--cerc-vert);
}

/* Variant primary */
.cerc-kpi-card.is-primary {
  background: linear-gradient(135deg, var(--cerc-vert-deep) 0%, #0a1e18 100%);
  border-color: var(--cerc-border-accent);
}
.cerc-kpi-card.is-primary::before { background: var(--cerc-vert); }

/* Variant accent (or) */
.cerc-kpi-card.is-accent {
  background: linear-gradient(135deg, #1a1500 0%, #0f0d00 100%);
  border-color: rgba(251,191,36,0.3);
}
.cerc-kpi-card.is-accent::before { background: var(--cerc-or); }

.cerc-kpi-label {
  font-size: var(--cerc-fs-mini);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cerc-text-muted);
  font-family: var(--cerc-font-body);
}
.cerc-kpi-card.is-primary .cerc-kpi-label { color: rgba(0,230,118,0.7); }
.cerc-kpi-card.is-accent  .cerc-kpi-label { color: rgba(251,191,36,0.7); }

.cerc-kpi-value {
  font-family: var(--cerc-font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--cerc-text-strong);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cerc-kpi-card.is-primary .cerc-kpi-value { color: var(--cerc-vert); }
.cerc-kpi-card.is-accent  .cerc-kpi-value { color: var(--cerc-or); }

/* Counter animation target */
.cerc-kpi-value[data-count] { transition: none; }

.cerc-kpi-sub {
  font-size: var(--cerc-fs-mini);
  color: var(--cerc-text-faint);
  margin-top: auto;
}

.cerc-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--cerc-fs-small);
  font-weight: 600;
  font-family: var(--cerc-font-mono);
}
.cerc-kpi-trend.up   { color: var(--cerc-success); }
.cerc-kpi-trend.down { color: var(--cerc-danger);  }

/* ===================================================
   CHART CARD
   =================================================== */

.cerc-chart-card {
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg);
  padding: var(--cerc-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--cerc-sp-3);
}

.cerc-chart-header {}
.cerc-chart-title {
  font-family: var(--cerc-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cerc-text-strong);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.cerc-chart-sub {
  font-size: var(--cerc-fs-small);
  color: var(--cerc-text-muted);
  margin: 0;
}

.cerc-chart-canvas-wrap {
  position: relative;
  height: 220px;
  min-height: 160px;
}
.cerc-chart-canvas-wrap canvas { width: 100% !important; height: 100% !important; }

.cerc-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  gap: var(--cerc-sp-3);
  border: 1px dashed var(--cerc-border-strong);
  border-radius: var(--cerc-r-md);
  color: var(--cerc-text-faint);
}
.cerc-chart-empty-icon {
  width: 40px;
  height: 40px;
  opacity: 0.4;
}
.cerc-chart-empty p {
  font-size: var(--cerc-fs-small);
  text-align: center;
  color: var(--cerc-text-faint);
  margin: 0;
  max-width: 240px;
}

/* ===================================================
   CHAT BUBBLE
   Inspire du pattern PMCB existant, adapte sombre
   =================================================== */

.cerc-chat-wrap {
  display: flex;
  flex-direction: column;
  background: var(--cerc-bg);
  height: calc(100vh - 140px);
  max-width: 880px;
  margin: 0 auto;
}

.cerc-chat-header {
  display: flex;
  align-items: center;
  gap: var(--cerc-sp-3);
  padding: var(--cerc-sp-4) var(--cerc-sp-5);
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg) var(--cerc-r-lg) 0 0;
}

.cerc-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cerc-vert-deep), #0a2015);
  border: 2px solid var(--cerc-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cerc-font-display);
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--cerc-vert);
  flex-shrink: 0;
}

.cerc-chat-info {}
.cerc-chat-info h3 {
  font-size: var(--cerc-fs-body);
  font-weight: 600;
  color: var(--cerc-text-strong);
  margin: 0 0 2px;
}

.cerc-chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--cerc-fs-mini);
  color: var(--cerc-text-muted);
}
.cerc-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cerc-success);
  animation: cerc-pulse 2s infinite;
}
@keyframes cerc-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.cerc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--cerc-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--cerc-sp-4);
  background: var(--cerc-bg-2);
  border-left: 1px solid var(--cerc-border);
  border-right: 1px solid var(--cerc-border);
  scrollbar-width: thin;
  scrollbar-color: var(--cerc-border-strong) transparent;
}
.cerc-chat-messages::-webkit-scrollbar { width: 4px; }
.cerc-chat-messages::-webkit-scrollbar-track { background: transparent; }
.cerc-chat-messages::-webkit-scrollbar-thumb { background: var(--cerc-border-strong); border-radius: 2px; }

.cerc-chat-msg {
  display: flex;
  gap: var(--cerc-sp-3);
  align-items: flex-end;
  max-width: 85%;
}
.cerc-chat-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.cerc-chat-msg-bot {
  align-self: flex-start;
}

.cerc-chat-bubble {
  padding: var(--cerc-sp-3) var(--cerc-sp-4);
  border-radius: var(--cerc-r-lg);
  font-size: var(--cerc-fs-body);
  line-height: var(--cerc-lh-loose);
  animation: cerc-bubble-in 200ms var(--cerc-ease) both;
}
@keyframes cerc-bubble-in {
  from { opacity: 0; transform: scale(0.96) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.cerc-chat-msg-user .cerc-chat-bubble {
  background: var(--cerc-vert);
  color: var(--cerc-text-inverse);
  border-radius: var(--cerc-r-lg) var(--cerc-r-lg) var(--cerc-r-sm) var(--cerc-r-lg);
}

.cerc-chat-msg-bot .cerc-chat-bubble {
  background: var(--cerc-surface);
  color: var(--cerc-text);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg) var(--cerc-r-lg) var(--cerc-r-lg) var(--cerc-r-sm);
}

.cerc-chat-bubble p { margin: 0 0 var(--cerc-sp-2); }
.cerc-chat-bubble p:last-child { margin-bottom: 0; }

/* Typing indicator */
.cerc-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--cerc-sp-3) var(--cerc-sp-4);
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg) var(--cerc-r-lg) var(--cerc-r-lg) var(--cerc-r-sm);
  width: fit-content;
}
.cerc-chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--cerc-text-muted);
  border-radius: 50%;
  animation: cerc-typing-dot 1.4s infinite ease-in-out;
}
.cerc-chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.cerc-chat-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes cerc-typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

/* Suggestions */
.cerc-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cerc-sp-2);
  padding: 0 var(--cerc-sp-5) var(--cerc-sp-3);
  background: var(--cerc-bg-2);
  border-left: 1px solid var(--cerc-border);
  border-right: 1px solid var(--cerc-border);
}
.cerc-suggestion {
  display: inline-flex;
  align-items: center;
  gap: var(--cerc-sp-1);
  padding: 5px var(--cerc-sp-3);
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border-strong);
  border-radius: var(--cerc-r-pill);
  font-size: var(--cerc-fs-small);
  color: var(--cerc-text-muted);
  cursor: pointer;
  transition: color var(--cerc-dur) var(--cerc-ease),
              background var(--cerc-dur) var(--cerc-ease),
              border-color var(--cerc-dur) var(--cerc-ease);
  white-space: nowrap;
}
.cerc-suggestion:hover {
  color: var(--cerc-text);
  background: rgba(0,230,118,0.08);
  border-color: var(--cerc-border-accent);
}

/* Input */
.cerc-chat-form {
  display: flex;
  gap: var(--cerc-sp-2);
  padding: var(--cerc-sp-4) var(--cerc-sp-5);
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-top: none;
  border-radius: 0 0 var(--cerc-r-lg) var(--cerc-r-lg);
  align-items: flex-end;
}
.cerc-chat-form textarea {
  flex: 1;
  background: var(--cerc-bg-2);
  border: 1px solid var(--cerc-border-strong);
  border-radius: var(--cerc-r-md);
  color: var(--cerc-text);
  font-family: var(--cerc-font-body);
  font-size: var(--cerc-fs-body);
  padding: var(--cerc-sp-3) var(--cerc-sp-4);
  resize: none;
  min-height: 44px;
  max-height: 160px;
  overflow-y: auto;
  transition: border-color var(--cerc-dur) var(--cerc-ease),
              box-shadow var(--cerc-dur) var(--cerc-ease);
  outline: none;
}
.cerc-chat-form textarea::placeholder { color: var(--cerc-text-faint); }
.cerc-chat-form textarea:focus {
  border-color: var(--cerc-border-accent);
  box-shadow: 0 0 0 2px rgba(0,230,118,0.12);
}

.cerc-chat-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--cerc-r-md);
  background: var(--cerc-vert);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--cerc-dur) var(--cerc-ease),
              box-shadow var(--cerc-dur) var(--cerc-ease),
              transform 80ms;
  color: var(--cerc-text-inverse);
}
.cerc-chat-submit:hover {
  background: #33eb91;
  box-shadow: var(--cerc-shadow-vert);
}
.cerc-chat-submit:active { transform: scale(0.95); }
.cerc-chat-submit svg { width: 20px; height: 20px; }

.cerc-chat-disclaimer {
  font-size: 10px;
  color: var(--cerc-text-faint);
  text-align: center;
  padding: var(--cerc-sp-2) var(--cerc-sp-5) 0;
  background: var(--cerc-surface);
  border-left: 1px solid var(--cerc-border);
  border-right: 1px solid var(--cerc-border);
  border-bottom: 1px solid var(--cerc-border);
  border-radius: 0 0 var(--cerc-r-lg) var(--cerc-r-lg);
  margin-top: -1px;
}

/* ===================================================
   FILTER BAR - PRIORITE 1 (Lucas : "filtre non visible")
   =================================================== */

.cerc-filter-bar {
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border-strong);
  border-radius: var(--cerc-r-lg);
  padding: var(--cerc-sp-5);
  margin-bottom: var(--cerc-sp-5);
  position: relative;
}

/* Trait vert = signal visuel "actif" */
.cerc-filter-bar::before {
  content: '';
  position: absolute;
  top: 0; left: var(--cerc-sp-5);
  width: 40px;
  height: 3px;
  background: var(--cerc-vert);
  border-radius: 0 0 var(--cerc-r-sm) var(--cerc-r-sm);
}

.cerc-filter-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--cerc-sp-4);
}
.cerc-filter-bar-title {
  font-size: var(--cerc-fs-mini);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cerc-vert);
}

.cerc-filter-bar-reset {
  font-size: var(--cerc-fs-mini);
  color: var(--cerc-text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: var(--cerc-r-sm);
  transition: color var(--cerc-dur) var(--cerc-ease),
              background var(--cerc-dur) var(--cerc-ease);
  font-family: var(--cerc-font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cerc-filter-bar-reset:hover {
  color: var(--cerc-text-muted);
  background: rgba(255,255,255,0.06);
}

.cerc-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cerc-sp-3);
  align-items: flex-end;
}

.cerc-filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--cerc-sp-2);
  flex: 1;
  min-width: 160px;
}

.cerc-filter-label {
  font-size: var(--cerc-fs-mini);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cerc-text-muted);
}

.cerc-filter-select {
  background: var(--cerc-bg-2);
  border: 1px solid var(--cerc-border-strong);
  border-radius: var(--cerc-r-md);
  color: var(--cerc-text);
  font-family: var(--cerc-font-body);
  font-size: var(--cerc-fs-small);
  padding: var(--cerc-sp-2) var(--cerc-sp-3);
  height: 40px;
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%236b7a90' d='M213.66 101.66l-80 80a8 8 0 01-11.32 0l-80-80a8 8 0 0111.32-11.32L128 164.69l74.34-74.35a8 8 0 0111.32 11.32z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  outline: none;
  transition: border-color var(--cerc-dur) var(--cerc-ease),
              box-shadow var(--cerc-dur) var(--cerc-ease);
}
.cerc-filter-select:focus {
  border-color: var(--cerc-border-accent);
  box-shadow: 0 0 0 2px rgba(0,230,118,0.12);
}
.cerc-filter-select.has-value {
  border-color: var(--cerc-border-accent);
  color: var(--cerc-vert);
}

/* Hint sous filtre competence */
.cerc-filter-hint {
  font-size: 10px;
  color: var(--cerc-text-faint);
  margin-top: var(--cerc-sp-1);
  font-style: italic;
}

/* ===================================================
   TABLE
   =================================================== */

.cerc-table-wrap {
  background: var(--cerc-surface);
  border: 1px solid var(--cerc-border);
  border-radius: var(--cerc-r-lg);
  overflow: hidden;
}

.cerc-table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cerc-border-strong) transparent;
}

.cerc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--cerc-fs-small);
}

.cerc-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}
.cerc-table thead th {
  background: var(--cerc-surface-2);
  color: var(--cerc-text-muted);
  font-weight: 600;
  font-size: var(--cerc-fs-mini);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: var(--cerc-sp-3) var(--cerc-sp-4);
  text-align: left;
  border-bottom: 1px solid var(--cerc-border-strong);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.cerc-table thead th:hover {
  color: var(--cerc-text);
  background: var(--cerc-surface-3);
}
.cerc-table thead th .sort-icon {
  display: inline-block;
  opacity: 0.3;
  margin-left: 4px;
}
.cerc-table thead th.sort-asc .sort-icon,
.cerc-table thead th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--cerc-vert);
}

.cerc-table tbody tr {
  border-bottom: 1px solid var(--cerc-border);
  transition: background var(--cerc-dur) var(--cerc-ease);
}
.cerc-table tbody tr:last-child { border-bottom: none; }
.cerc-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.cerc-table td {
  padding: var(--cerc-sp-3) var(--cerc-sp-4);
  color: var(--cerc-text);
  vertical-align: middle;
}

/* Colonne montant : mono, aligne droite */
.cerc-table .col-montant {
  font-family: var(--cerc-font-mono);
  text-align: right;
  color: var(--cerc-text-strong);
  font-weight: 700;
  white-space: nowrap;
}

/* Badge type deliberation */
.cerc-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--cerc-r-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.cerc-type-badge[data-type="marche_public"]    { background: rgba(0,200,83,0.12); color: var(--cerc-type-marche); }
.cerc-type-badge[data-type="garantie_pret"]    { background: rgba(123,97,255,0.12); color: var(--cerc-type-garantie); }
.cerc-type-badge[data-type="subvention"]       { background: rgba(255,107,43,0.12); color: var(--cerc-type-subvention); }
.cerc-type-badge[data-type="exoneration_octroi_mer"] { background: rgba(241,196,15,0.12); color: var(--cerc-type-exoneration); }
.cerc-type-badge[data-type="autre"]            { background: rgba(100,116,139,0.12); color: var(--cerc-type-autre); }

/* ===================================================
   SECTION HEADERS
   =================================================== */

.cerc-section-label {
  font-size: var(--cerc-fs-mini);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cerc-text-faint);
  margin: 0 0 var(--cerc-sp-3);
  padding-bottom: var(--cerc-sp-2);
  border-bottom: 1px solid var(--cerc-border);
}

/* ===================================================
   ALERT / NOTICE
   =================================================== */

.cerc-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--cerc-sp-3);
  padding: var(--cerc-sp-3) var(--cerc-sp-4);
  border-radius: var(--cerc-r-md);
  font-size: var(--cerc-fs-small);
  border-left: 3px solid;
}
.cerc-alert-info    { background: rgba(59,130,246,0.08); border-color: var(--cerc-info);    color: #93c5fd; }
.cerc-alert-success { background: rgba(34,197,94,0.08);  border-color: var(--cerc-success); color: #86efac; }
.cerc-alert-warn    { background: rgba(234,179,8,0.08);  border-color: var(--cerc-warn);    color: #fcd34d; }
.cerc-alert-danger  { background: rgba(239,68,68,0.08);  border-color: var(--cerc-danger);  color: #fca5a5; }

/* ===================================================
   DEMO PAGE SPECIFIQUE
   =================================================== */

.cerc-demo-section {
  margin-bottom: var(--cerc-sp-8);
}
.cerc-demo-section-title {
  font-family: var(--cerc-font-display);
  font-size: var(--cerc-fs-h2);
  font-weight: 800;
  color: var(--cerc-text-strong);
  margin: 0 0 var(--cerc-sp-2);
  letter-spacing: -0.02em;
}
.cerc-demo-section-desc {
  font-size: var(--cerc-fs-small);
  color: var(--cerc-text-muted);
  margin: 0 0 var(--cerc-sp-5);
}
.cerc-demo-label {
  font-size: var(--cerc-fs-mini);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cerc-text-faint);
  display: block;
  margin-bottom: var(--cerc-sp-2);
}
.cerc-demo-box {
  background: var(--cerc-bg-2);
  border: 1px dashed var(--cerc-border-strong);
  border-radius: var(--cerc-r-lg);
  padding: var(--cerc-sp-5);
  margin-bottom: var(--cerc-sp-4);
}
