/**
 * Bythium Sovereign Portal Layout & Sidebar Tree Architecture — v11.5.0
 * 3-Column Documentation & Enterprise Portal Framework
 * Conforme : ISO 24495-1 (Lisibilité), WCAG 2.2 AAA (APCA), ISO 9241-9 (Fitts Target Size)
 */

/* ==========================================================================
 * 1. Structure Globale en 3 Colonnes (Sidebar + Main + TOC)
 * ========================================================================== */
.portal-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--bythium-bg-dark, #0b1120);
  color: var(--bythium-text-primary, #f8fafc);
  font-family: var(--font-family-base, system-ui, sans-serif);
}

/* ==========================================================================
 * 2. Volet Latéral Gauche : Sidebar Arborescente (280px)
 * ========================================================================== */
.portal-sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bythium-surface-base, #0f172a);
  border-inline-end: 1px solid var(--bythium-border-subtle, #1e293b);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: var(--space-4, 16px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
  z-index: 100;
}

.portal-sidebar::-webkit-scrollbar {
  width: 4px;
}
.portal-sidebar::-webkit-scrollbar-thumb {
  background: var(--bythium-border-subtle, #1e293b);
  border-radius: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  padding-block-end: var(--space-3, 12px);
  border-block-end: 1px solid var(--bythium-border-subtle, #1e293b);
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.sidebar-node-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm, 4px);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bythium-status-success, #34d399);
}

.tree-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bythium-text-tertiary, #64748b);
  padding: 6px 8px;
  border-radius: 4px;
}

.tree-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bythium-text-secondary, #94a3b8);
  text-decoration: none;
  border-radius: var(--radius-sm, 4px);
  transition: var(--transition-kinetic, all 160ms ease);
}

.tree-link:hover {
  color: var(--bythium-brand-primary, #38bdf8);
  background: rgba(56, 189, 248, 0.08);
}

.tree-link.active {
  color: #ffffff;
  background: var(--bythium-brand-primary, #0284c7);
  font-weight: 600;
}

.tree-badge {
  margin-inline-start: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--bythium-text-secondary, #94a3b8);
}

/* ==========================================================================
 * 3. Zone Centrale de Contenu Riche (max-width: 960px)
 * ========================================================================== */
.portal-main {
  container: portal-main / inline-size;
  flex: 1;
  min-width: 0;
  padding: var(--space-6, 24px) var(--space-8, 32px);
  box-sizing: border-box;
}

.content-wrapper {
  max-width: 920px;
  margin: 0 auto;
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--bythium-text-tertiary, #64748b);
  margin-bottom: var(--space-6, 24px);
}
.breadcrumb-bar a {
  color: var(--bythium-brand-primary, #38bdf8);
  text-decoration: none;
}

/* En-tête de Page Riche */
.page-header-box {
  background: linear-gradient(135deg, var(--bythium-surface-card, #131b2e) 0%, rgba(56, 189, 248, 0.06) 100%);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: var(--radius-card, 16px);
  padding: var(--space-8, 32px);
  margin-bottom: var(--space-8, 32px);
  box-shadow: var(--shadow-elevation-1);
}

.page-header-title {
  font-size: var(--text-3xl-fluid, 38px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px 0;
  color: #ffffff;
}

.page-header-subtitle {
  font-size: var(--text-lg-fluid, 18px);
  line-height: var(--line-height-normal, 1.5);
  color: var(--bythium-text-secondary, #94a3b8);
  margin: 0 0 24px 0;
}

/* Bandeau de Métriques de l'En-tête */
.header-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.header-metric-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.metric-card-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--bythium-brand-primary, #38bdf8);
}

.metric-card-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bythium-text-tertiary, #64748b);
  margin-top: 4px;
}

/* Sections Substantielles */
.content-section {
  margin-bottom: var(--space-12, 48px);
  scroll-margin-top: 80px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid var(--bythium-border-subtle, #1e293b);
  padding-bottom: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-number {
  font-size: 14px;
  font-family: var(--font-family-mono, monospace);
  color: var(--bythium-brand-primary, #38bdf8);
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 8px;
  border-radius: 4px;
}

.prose-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--bythium-text-secondary, #cbd5e1);
  margin-bottom: 20px;
  max-width: var(--measure-reading, 65ch);
}

.prose-text strong {
  color: #ffffff;
}

/* Blocs de Code Stylisés */
.code-container {
  background: #060911;
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: 8px;
  margin-bottom: 24px;
  overflow: hidden;
}

.code-header {
  background: #0d1322;
  border-bottom: 1px solid var(--bythium-border-subtle, #1e293b);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-family-mono, monospace);
  font-size: 12px;
  color: var(--bythium-text-secondary, #94a3b8);
}

.code-block {
  margin: 0;
  padding: 16px;
  font-family: var(--font-family-mono, monospace);
  font-size: 13px;
  line-height: 1.6;
  color: #38bdf8;
  overflow-x: auto;
  white-space: pre;
}

/* Tableaux de Données Techniques */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: 8px;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.data-table th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bythium-border-subtle, #1e293b);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--bythium-text-secondary, #cbd5e1);
}

.data-table tr:hover td {
  background: rgba(56, 189, 248, 0.03);
}

/* Encadrés Callouts */
.callout-box {
  background: rgba(56, 189, 248, 0.06);
  border-inline-start: 4px solid var(--bythium-brand-primary, #38bdf8);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--bythium-text-secondary, #cbd5e1);
}

.callout-box strong {
  color: var(--bythium-brand-primary, #38bdf8);
}

/* ==========================================================================
 * 4. Volet Droit : Table des Matières "Sur cette page" (220px)
 * ========================================================================== */
.portal-toc {
  width: 220px;
  min-width: 220px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: var(--space-6, 24px) var(--space-4, 16px);
  box-sizing: border-box;
}

.toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bythium-text-tertiary, #64748b);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  font-size: 13px;
  color: var(--bythium-text-secondary, #94a3b8);
  text-decoration: none;
  line-height: 1.4;
  transition: color 140ms ease;
  display: block;
}

.toc-link:hover {
  color: var(--bythium-brand-primary, #38bdf8);
}

/* ==========================================================================
 * 5. Adaptabilité Responsive (Tablette & Mobile)
 * ========================================================================== */
@media (max-width: 1280px) {
  .portal-toc {
    display: none;
  }
}

@media (max-width: 900px) {
  .portal-container {
    flex-direction: column;
  }
  .portal-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-inline-end: none;
    border-block-end: 1px solid var(--bythium-border-subtle, #1e293b);
  }
  .portal-main {
  container: portal-main / inline-size;
    padding: 16px;
  }
}

/* ==========================================================================
 * 6. Primitives L1 & Organismes L2 du Design System Bythium
 * Strictement pur HTML5 + CSS (Aucun Web Component / Custom Element requis)
 * Conforme : WCAG 2.2 AAA, APCA Contrast, ISO 24495-1, EAA 2026
 * ========================================================================== */

/* --- L1 : Badges & Chips --- */
.bythium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm, 4px);
  line-height: 1.2;
}
.bythium-badge.badge-primary {
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: #38bdf8;
}
.bythium-badge.badge-accent {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}
.bythium-badge.badge-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.bythium-badge.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.bythium-badge.badge-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}
.bythium-badge.badge-glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}
.bythium-badge.badge-outline {
  background: transparent;
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  color: var(--bythium-text-secondary, #94a3b8);
}

/* --- L1 : Kbd & Separator --- */
.bythium-kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-family-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.bythium-separator {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #1e293b 20%, #1e293b 80%, transparent 100%);
  margin: var(--space-8, 32px) 0;
}

/* --- L1 : Progress Bar --- */
.bythium-progress {
  width: 100%;
  height: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}
.bythium-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bythium-brand-primary, #0284c7), var(--bythium-status-success, #10b981));
  border-radius: 9999px;
  transition: width 400ms ease;
}

/* --- L1 : Cards & Panels --- */
.bythium-card {
  background: var(--bythium-surface-card, #131b2e);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: var(--radius-card, 16px);
  padding: var(--space-6, 24px);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.bythium-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 24px -4px rgba(2, 132, 199, 0.12);
}
.card-header {
  margin-bottom: 16px;
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}
.card-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--bythium-text-secondary, #94a3b8);
  margin: 0;
}
.card-content {
  color: var(--bythium-text-secondary, #cbd5e1);
  font-size: 14px;
  line-height: 1.6;
}
.card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- L2 : Metric Widget (Organisme avec Sparkline SVG) --- */
.bythium-metric-widget {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.5) 100%);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: var(--radius-card, 16px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: border-color 160ms ease;
}
.bythium-metric-widget:hover {
  border-color: rgba(56, 189, 248, 0.4);
}
.metric-widget-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.metric-widget-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bythium-text-tertiary, #94a3b8);
}
.metric-widget-delta {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.metric-widget-delta.trend-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.metric-widget-delta.trend-down {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.metric-widget-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.metric-widget-val {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.metric-widget-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--bythium-brand-primary, #38bdf8);
}
.metric-widget-sparkline {
  height: 32px;
  width: 100%;
  margin-top: 8px;
}

/* --- L2 : Timeline (Organisme d'Audit & Chronologie) --- */
.bythium-timeline {
  list-style: none;
  position: relative;
  border-left: 2px solid #1e293b;
  padding-left: 24px;
  margin: 24px 0 32px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bythium-timeline .timeline-item {
  position: relative;
}
.bythium-timeline .timeline-marker {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.6);
}
.bythium-timeline .timeline-marker.status-completed {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
.bythium-timeline .timeline-marker.status-progress {
  background: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.6);
}
.bythium-timeline .timeline-marker.status-pending {
  background: #334155;
  color: #94a3b8;
  box-shadow: none;
}
.timeline-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: 10px;
  padding: 14px 18px;
  transition: border-color 160ms ease;
}
.timeline-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}
.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}
.timeline-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bythium-text-secondary, #94a3b8);
  margin: 0 0 8px 0;
}
.timeline-meta {
  font-size: 11px;
  font-family: var(--font-family-mono, monospace);
  color: var(--bythium-text-tertiary, #64748b);
}

/* --- L2 : Terminal Demo (Organisme Émulateur Shell) --- */
.bythium-terminal-demo {
  border-radius: var(--radius-card, 16px);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  background: #030712;
  font-family: var(--font-family-mono, monospace);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  margin: 24px 0;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  padding: 10px 18px;
}
.terminal-dots {
  display: flex;
  gap: 7px;
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-dot.dot-red { background: #ef4444; }
.terminal-dot.dot-amber { background: #f59e0b; }
.terminal-dot.dot-green { background: #10b981; }
.terminal-title {
  font-size: 12px;
  font-family: var(--font-family-base, system-ui, sans-serif);
  font-weight: 500;
  color: #94a3b8;
}
.terminal-status {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}
.terminal-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.terminal-command {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
  font-weight: 600;
}
.terminal-prompt {
  color: #c084fc;
  font-weight: 800;
}
.terminal-output {
  padding-left: 14px;
  border-left: 2px solid #334155;
  color: #cbd5e1;
  white-space: pre-wrap;
  font-size: 12px;
}
.terminal-output.adversarial {
  border-left-color: #f59e0b;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.05);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
}

/* --- L2 : Comparison Table (Organisme Tableau Comparatif) --- */
.bythium-comparison-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-card, 16px);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  background: rgba(15, 23, 42, 0.6);
  margin: 24px 0;
}
.bythium-comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.bythium-comparison-table th, 
.bythium-comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #1e293b;
}
.bythium-comparison-table thead th {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 700;
  font-size: 13px;
}
.bythium-comparison-table thead th.col-bythium {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border-inline: 1px solid rgba(2, 132, 199, 0.3);
}
.bythium-comparison-table tbody td.col-bythium {
  background: rgba(2, 132, 199, 0.05);
  border-inline: 1px solid rgba(2, 132, 199, 0.2);
  color: #34d399;
  font-weight: 600;
}
.bythium-comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* --- L2 : Accordion (Organisme Dépliants Natifs W3C) --- */
.bythium-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.bythium-accordion-item {
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: var(--radius-card, 12px);
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease;
}
.bythium-accordion-item[open] {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.85);
}
.accordion-trigger {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}
.accordion-trigger::-webkit-details-marker {
  display: none;
}
.accordion-trigger::after {
  content: '+';
  font-size: 20px;
  font-weight: 700;
  color: var(--bythium-brand-primary, #38bdf8);
  transition: transform 160ms ease;
}
.bythium-accordion-item[open] > .accordion-trigger::after {
  content: '−';
}
.accordion-panel {
  padding: 0 20px 18px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--bythium-text-secondary, #94a3b8);
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  padding-top: 14px;
}
.accordion-panel p {
  margin: 0 0 10px 0;
}
.accordion-panel p:last-child {
  margin-bottom: 0;
}

/* --- L2 : Trust Badges Banner (Organisme Réassurance) --- */
.bythium-trust-badges-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--bythium-border-subtle, #1e293b);
  border-radius: var(--radius-card, 16px);
  padding: 16px 24px;
  margin: 24px 0;
}
.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bythium-text-secondary, #cbd5e1);
}
.trust-badge-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

/* Règle Concentrique Formelle r_inner = max(0, r_outer - padding) */
.bythium-card {
  --radius-outer: var(--radius-card, 16px);
  --card-padding: var(--space-6, 24px);
  border-radius: var(--radius-outer);
  padding: var(--card-padding);
}
.bythium-card > .card-header .bythium-badge,
.bythium-card > .card-content .bythium-badge,
.bythium-card > .card-footer {
  border-radius: max(0px, calc(var(--radius-outer) - var(--card-padding) + 8px));
}

/* Espacement Ergonomique Sécurisé (Loi de Fitts) */
.cta-actions,
.bythium-button-group {
  display: flex;
  gap: var(--target-gap-safety, 12px);
  flex-wrap: wrap;
}
.bythium-button {
  min-height: var(--target-touch-min, 48px);
  min-width: var(--target-touch-min, 48px);
  box-sizing: border-box;
}

/* Simulateur Mathématique FinOps L2 */
.bythium-finops-formula-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.90) 0%, rgba(2, 132, 199, 0.12) 100%);
  border: 1px solid rgba(2, 132, 199, 0.4);
  border-radius: var(--radius-card, 16px);
  padding: var(--space-6, 24px);
  margin: var(--space-8, 32px) 0;
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5);
}
.formula-math-display {
  background: #030712;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-family-mono, monospace);
  font-size: 14px;
  color: #38bdf8;
  overflow-x: auto;
  margin: 16px 0;
  text-align: center;
}
