:root {
  --primary-bg: #0b0f19;
  --secondary-bg: #111827;
  --card-bg: #1f2937;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-color: #374151;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  /* Nouveaux styles pour les blocs structurés */
  --block-analysis-bg: rgba(59, 130, 246, 0.1);
  --block-summary-bg: rgba(16, 185, 129, 0.1);
  --block-code-bg: rgba(30, 41, 59, 0.8);
  --block-border: rgba(255, 255, 255, 0.1);
}

* { 
  transition: all 0.2s ease; 
  box-sizing: border-box;
}

body {
  background: var(--primary-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  overflow-x: hidden;
  height: 100vh;
  margin: 0;
}

/* Navigation */
.app-navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand i { font-size: 1.75rem; }
.nav-controls { display: flex; align-items: center; gap: 1rem; }

.status-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.nav-btn {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

/* Layout */
.app-container {
  display: flex;
  height: calc(100vh - 64px);
  padding-top: 64px;
  position: relative;
}

/* Sidebar - RESPONSIVE */
.sidebar {
  width: 360px;
  background: var(--secondary-bg);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  height: calc(100vh - 64px);
  z-index: 1020;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  width: 0;
  padding: 0;
  border: none;
}

/* Pour les tablettes et mobiles */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 60vh;
    z-index: 1020;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar.collapsed {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
  }
  
  .app-container {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .sidebar {
    padding: 1rem 0.75rem;
    max-height: 70vh;
  }
}

.sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: -12px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 10;
}

@media (max-width: 992px) {
  .sidebar-toggle {
    display: none;
  }
}

/* Sections */
.sidebar-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section:last-child { border-bottom: none; }
.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i { font-size: 1rem; }

/* Mode cards */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .mode-card {
    padding: 0.75rem 0.5rem;
  }
  
  .mode-icon {
    font-size: 1.25rem;
  }
  
  .mode-name {
    font-size: 0.8rem;
  }
}

.mode-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.mode-card.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px var(--accent-blue), 0 8px 25px rgba(59, 130, 246, 0.25);
}

.mode-icon { font-size: 1.5rem; }
.mode-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Chat area - MODIFIÉ POUR LA ZONE D'ENTRÉE EN BAS */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--primary-bg);
  overflow: hidden;
  position: relative;
}

@media (max-width: 992px) {
  .main-content {
    margin-top: 0;
    height: calc(100vh - 64px);
  }
}

.chat-header {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .chat-actions {
    display: none;
  }
}

.chat-info { display: flex; flex-direction: column; gap: 0.25rem; }
.chat-title {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.chat-actions { display: flex; gap: 0.5rem; }
.chat-btn {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.chat-btn:hover {
  background: var(--card-bg);
  color: var(--text-primary);
}

/* Messages container - MODIFIÉ */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 180px; /* Espace pour la zone d'entrée */
}

@media (max-width: 768px) {
  .messages-container {
    padding-bottom: 200px; /* Plus d'espace sur mobile */
  }
}

/* Messages améliorés - style moderne */
.message {
  max-width: 85%;
  position: relative;
  animation: fadeInUp 0.3s ease;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .message {
    max-width: 90%;
  }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(15px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.message-user {
  margin-left: auto;
  align-items: flex-end;
}

.message-assistant {
  margin-right: auto;
  align-items: flex-start;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.message-user .message-avatar {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.message-assistant .message-avatar {
  background: rgba(59, 130, 246, 0.2);
}

.message-sender {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.message-content {
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 0.95rem;
  min-height: 20px;
  width: 100%;
  transition: all 0.2s ease;
  position: relative;
}

.message-content .code-block-wrapper {
  border-radius: 6px;
}


.message-user .message-content {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  max-width: 100%;
}

.message-assistant .message-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

/* Effet de bulle de message */
.message-user .message-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid #2563eb;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.message-assistant .message-content::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-right: 8px solid var(--card-bg);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.message-assistant .message-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -7px;
  width: 0;
  height: 0;
  border-right: 8px solid var(--border-color);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  z-index: -1;
}

/* Streaming effect */
.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 20px;
  background-color: var(--accent-blue);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* =========================================== */
/* STYLES SPÉCIFIQUES POUR LE CODE - SIMILAIRE À CHATGPT */
/* =========================================== */

/* Badges IA - STYLE CHATGPT */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-badge.openai {
  background: rgba(16, 163, 127, 0.2);
  color: #10a37f;
  border: 1px solid rgba(16, 163, 127, 0.3);
}

.ai-badge.gemini {
  background: rgba(66, 133, 244, 0.2);
  color: #4285f4;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.ai-badge.mistral {
  background: rgba(255, 107, 0, 0.2);
  color: #ff6b00;
  border: 1px solid rgba(255, 107, 0, 0.3);
}

.ai-badge.nebius {
  background: rgba(147, 51, 234, 0.2);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.ai-badge.ollama {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Blocs de code - STYLE CHATGPT */
.code-block-wrapper {
  position: relative;
  margin: 1rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e1e1e;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, 'Courier New', monospace;
  opacity: 0;
  transform: translateY(6px);
  animation: codeFadeIn 180ms ease-out forwards;
}

@keyframes codeFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem 1rem;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.language-label {
  color: var(--accent-purple);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-actions {
  display: flex;
  gap: 0.5rem;
}

.code-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.code-action-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

.code-action-btn.copy-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.code-action-btn.fullscreen-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

.code-block {
  margin: 0 !important;
  border-radius: 0 !important;
  max-height: 500px;
  overflow: auto;
  padding: 1rem !important;
  font-size: 0.875rem;
  line-height: 1.5;
}

.code-block pre {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  white-space: pre;          /* 🔑 clé absolue */
  tab-size: 4;               /* indentation stable */
}

.code-block code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, 'Courier New', monospace !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  white-space: pre;          /* 🔑 impératif */
  tab-size: 4;
}


/* Code inline */
.inline-code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.85em;
  color: #f8f8f2;
}

/* Blocs structurés - STYLE SIMPLIFIÉ */
.structured-block {
  margin: 1rem 0;
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid;
  background: rgba(255, 255, 255, 0.05);
}

.structured-block.analysis {
  border-left-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

.structured-block.summary {
  border-left-color: var(--accent-green);
  background: rgba(16, 185, 129, 0.08);
}

.structured-block.code {
  border-left-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.08);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.block-header i {
  font-size: 1rem;
}

.block-content {
  line-height: 1.6;
  font-size: 0.95rem;
}

.block-content pre {
  margin: 0;
  background: transparent !important;
  padding: 0 !important;
}

.block-content code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

/* Table des matières - STYLE CHATGPT */
.toc-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent-blue);
  font-size: 0.95rem;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-item:hover {
  border-left-color: var(--accent-blue);
  padding-left: 1rem;
}

.toc-item a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.toc-item a:hover {
  color: var(--accent-blue);
}

.toc-item a i {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Styles pour le texte markdown */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

.message-content h1 {
  font-size: 1.5em;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.3em;
}

.message-content h2 {
  font-size: 1.3em;
}

.message-content h3 {
  font-size: 1.1em;
}

.message-content h4 {
  font-size: 1em;
}

.message-content p {
  margin-bottom: 1em;
  line-height: 1.6;
}

.message-content ul,
.message-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
  padding-left: 0;
}

.message-content li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.message-content ul li {
  list-style-type: disc;
}

.message-content ol li {
  list-style-type: decimal;
}

.message-content blockquote {
  border-left: 3px solid var(--accent-blue);
  margin: 1rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.message-content th,
.message-content td {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.message-content th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.message-content tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.message-content hr {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

/* Code inline */
.message-content code:not(pre code) {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.85em;
  color: #f8f8f2;
}

/* Styles pour le reflow pendant le streaming */
.reflowing-content {
  transition: opacity 0.3s ease;
}

.reflowing-content.updating {
  opacity: 0.7;
}

.message {
  contain: layout style;
}

.code-block-wrapper {
  overflow-anchor: none;
}


/* =========================================== */
/* MODALE POUR LE CODE EN PLEIN ÉCRAN - STYLE CHATGPT */
/* =========================================== */

.code-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1090;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.code-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.code-modal {
  background: #1e1e1e;
  border-radius: 12px;
  width: 90%;
  max-width: 1200px;
  height: 85%;
  max-height: 90vh;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.code-modal.show {
  transform: scale(1);
}

.code-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(30, 30, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-modal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.code-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.modal-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.modal-action-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: var(--accent-blue);
}

.modal-action-btn.copy-all-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success-color);
}

.modal-action-btn.download-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--warning-color);
}

.code-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-modal-editor {
  flex: 1;
  overflow: auto;
  padding: 1.5rem;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  background: #1e1e1e;
}

.code-modal-editor pre {
  margin: 0;
  padding: 0;
  background: transparent !important;
}

.code-modal-editor code {
  font-family: 'SF Mono', Monaco, Consolas, monospace !important;
}

.code-modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(30, 30, 30, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.code-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
  color: var(--accent-purple);
}

/* TOAST POUR LES NOTIFICATIONS DE COPIE */
.copy-toast {
  position: fixed;
  bottom: 100px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1100;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.copy-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.copy-toast.success {
  border-left: 4px solid var(--success-color);
}

.copy-toast.error {
  border-left: 4px solid var(--danger-color);
}

.copy-toast-icon {
  font-size: 1.25rem;
}

.copy-toast.success .copy-toast-icon {
  color: var(--success-color);
}

.copy-toast.error .copy-toast-icon {
  color: var(--danger-color);
}

/* Typing indicator amélioré */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px 18px 18px 4px;
  margin-right: auto;
  max-width: 200px;
  animation: pulse 2s infinite;
}

.typing-dots {
  display: flex;
  gap: 0.3rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { 
    transform: translateY(0);
    opacity: 0.6;
  }
  40% { 
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Status */
.status-badge.connecting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.3);
}

.status-dot.connecting {
  background: var(--warning-color);
  animation: pulse 1s infinite;
}

.status-dot.disconnected {
  background: var(--danger-color);
  animation: none;
}

/* AI Selector */
.ai-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .ai-selector-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .ai-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ai-option {
  background: rgba(156, 163, 175, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.ai-option:hover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.ai-option.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
}

/* Profile selector */
.profile-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-option:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.profile-option.active {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-purple);
}

.profile-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 6px;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* Notifications */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  max-width: 300px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  border-left: 4px solid var(--success-color);
}

.notification-error {
  border-left: 4px solid var(--danger-color);
}

.notification-info {
  border-left: 4px solid var(--accent-blue);
}

/* Login */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 2rem;
  background: linear-gradient(135deg, #0b0f19, #111827);
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .login-card {
    padding: 2rem;
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.5rem;
}

.login-form-group {
  margin-bottom: 1.5rem;
}

.login-form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.login-form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.login-form-group input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.9rem;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* CHALLENGE CONFIGURATION STYLES */
.challenge-config-section {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-title {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.challenge-status {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.challenge-status.inactive {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.ai-role-selector {
  margin-bottom: 1.25rem;
}

.role-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent-yellow);
}

.role-title.drafters { color: var(--accent-green); }
.role-title.critics { color: var(--accent-orange); }
.role-title.final { color: var(--accent-blue); }

.ai-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .ai-selection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .ai-role-selector .ai-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .ai-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ai-role-selector .ai-selection-grid {
    grid-template-columns: 1fr;
  }
}

.ai-selection-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.ai-selection-card:hover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.ai-selection-card.selected {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.ai-selection-card.selected.drafter { 
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
}

.ai-selection-card.selected.critic { 
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-orange);
}

.ai-selection-card.selected.final { 
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
}

.ai-icon-lg {
  font-size: 1.5rem;
}

.ai-name-sm {
  font-size: 0.75rem;
  opacity: 0.9;
}

.role-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  display: block;
}

.challenge-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-action-btn {
  flex: 1;
  padding: 0.75rem;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.challenge-action-btn.primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
}

.challenge-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.challenge-action-btn.secondary {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.challenge-action-btn.secondary:hover {
  background: rgba(156, 163, 175, 0.2);
}

.config-alert {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.config-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.config-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

/* Challenge visualization */
.challenge-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.flow-arrow {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.flow-ai {
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Configuration Panel - RESPONSIVE */
.config-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 600px;
  height: 100vh;
  background: var(--secondary-bg);
  border-left: 1px solid var(--border-color);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
  .config-panel {
    width: 450px;
  }
}

@media (max-width: 768px) {
  .config-panel {
    width: 100%;
    max-width: 100%;
  }
}

.config-panel.open {
  transform: translateX(0);
}

.config-panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.95);
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (max-width: 768px) {
  .config-panel-header {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .config-panel-header {
    padding: 0.75rem;
  }
  
  .config-panel-title {
    font-size: 1.1rem;
  }
}

.config-panel-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.config-panel-body {
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .config-panel-body {
    padding: 1rem;
  }
}

.config-section {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .config-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .config-section {
    padding: 0.75rem;
  }
}

.config-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

.profile-config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 992px) {
  .profile-config-grid {
    grid-template-columns: 1fr;
  }
}

.profile-config-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

@media (max-width: 576px) {
  .profile-config-card {
    padding: 0.75rem;
  }
}

.profile-config-card.active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

.profile-config-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.profile-config-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  font-size: 1.25rem;
}

@media (max-width: 576px) {
  .profile-config-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

.profile-config-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.profile-config-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.ai-selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

@media (max-width: 576px) {
  .ai-selector-list {
    max-height: 150px;
  }
}

.ai-selector-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-selector-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.ai-selector-item.active {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-selector-checkbox {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
}

.ai-selector-checkbox.checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.ai-selector-checkbox.checked i {
  color: white;
  font-size: 0.75rem;
}

.ai-selector-label {
  flex: 1;
  font-size: 0.85rem;
}

.config-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .config-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .config-actions .btn {
    width: 100%;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Input area - FIXÉE EN BAS */
.input-container {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  width: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Ajustement pour la sidebar */
@media (min-width: 993px) {
  .input-container {
    left: 360px; /* Largeur de la sidebar */
  }
  
  .sidebar.collapsed + .main-content .input-container {
    left: 0;
  }
}

@media (max-width: 992px) {
  .input-container {
    left: 0;
  }
}

.input-wrapper {
  position: relative;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.message-input {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  resize: none;
  min-height: 56px;
  max-height: 200px;
  line-height: 1.6;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.message-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 2px 15px rgba(59, 130, 246, 0.1);
  background: rgba(31, 41, 55, 0.9);
}

.send-button {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  border: none;
  border-radius: 14px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.send-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.send-button:active {
  transform: translateY(0) scale(0.98);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Quick actions */
.quick-actions {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: thin;
}

.quick-actions::-webkit-scrollbar {
  height: 4px;
}

.quick-actions::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.quick-actions::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.quick-action {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.quick-action:hover {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--secondary-bg);
}

/* Scroll to bottom button */
.scroll-bottom-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #020617;
  color: #e5e7eb;
  border: none;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 999;
}

.scroll-bottom-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================= */
/* CODE STYLE CHATGPT / DEEPSEEK */
/* ============================= */

.code-block-wrapper.chatgpt-style {
  margin: 0.75rem 0;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
}

/* Header minimal */
.code-block-wrapper.chatgpt-style .code-header {
  background: transparent;
  padding: 0.35rem 0.75rem;
  border-bottom: none;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Langage discret */
.code-block-wrapper.chatgpt-style .language-label {
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Boutons invisibles par défaut */
.code-block-wrapper.chatgpt-style .code-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.code-block-wrapper.chatgpt-style:hover .code-actions {
  opacity: 1;
}

/* Boutons ultra sobres */
.code-block-wrapper.chatgpt-style .code-action-btn {
  background: transparent;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  border-radius: 4px;
}

/* Zone code */
.code-block-wrapper.chatgpt-style pre {
  padding: 0.75rem 1rem !important;
  margin: 0;
  background: transparent !important;
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Inline code plus léger */
.inline-code {
  background: rgba(255,255,255,0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}
